To tackle the invariance-constrained statistical risk minimization problem we leverage recent duality results in constrained learning theory [1]}, that approximate the problem by its empirical dual
\(~D^{\star }_{\text{emp}} = & \max _{\gamma \ge 0 } \min _{\theta  \in \Theta } \frac{1}{n}\sum _{i=1}^n \ell (f_{\theta }(\mathbf {x}_i), y_i) + \gamma \left(\frac{1}{n}\sum _{i=1}^n \mathbb {E}_{g \sim \lambda ^{\star }}\left[ \ell (f_{\theta }(g\mathbf {x}), y) \right])-\epsilon \right).\) 
