SlowGuess/NeurIPS_2023_OCR huggingface dataset:
A proof can be found in Sec. C.2. Combining the results in Prop. 6 and 7 using the triangle inequality yields (6) and concludes the proof of Thm. 1.
C.1 Bounding the parametrization error: proof of Prop. 6
The lower bound stems directly from the definition of the dual problem in  $(\mathrm{D}_{\theta}$ -RES). Indeed, it is immediate that
$$
\tilde {\mathrm {D}} _ {\theta} ^ {\star} \geq \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \lambda ; \mathbf {u}\right), \quad \text {f o r a l l} \lambda \in \mathbb {R} _ {+} ^ {m}. \tag {19}
$$
In particular, (19) holds for a solution  $\lambda^{\star}$  of the resilient functional dual problem D-RES. Explicitly, we can write
$$
\tilde {\mathrm {D}} _ {\theta} ^ {\star} \geq \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda} ^ {\star}; \mathbf {u}\right)
$$
Since  $\mathcal{F}_{\theta} \subseteq \mathcal{F}$ , it follows that
$$
\tilde {\mathrm {D}} _ {\theta} ^ {\star} \geq \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda} ^ {\star}; \mathbf {u}\right) \geq \min  _ {\phi \in \mathcal {F}, \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} \left(\phi , \boldsymbol {\lambda} ^ {\star}; \mathbf {u}\right) = \tilde {\mathrm {D}} _ {\mathrm {R}} ^ {\star} = \tilde {\mathrm {P}} _ {\mathrm {R}} ^ {\star}. \tag {20}
$$
The upper bound is obtained by relating the parameterized dual problem  $(\mathrm{D}_{\theta}$  -RES) to a tightened version of (P-RES). Start by adding and subtracting  $\tilde{L}_{\mathbb{R}}(\phi ,\lambda ;\mathbf{u})$  in (16) from the objective of the parametrized dual problem  $(\mathrm{D}_{\theta}$  -RES) to get
$$
\begin{array}{l} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}\right) = \tilde {L} _ {\mathrm {R}} \left(\phi , \boldsymbol {\lambda}; \mathbf {u}\right) + \left[ \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}\right) - \tilde {L} _ {\mathrm {R}} \left(\phi , \boldsymbol {\lambda}; \mathbf {u}\right) \right] \\ = \tilde {L} _ {\mathrm {R}} (\phi , \boldsymbol {\lambda}; \mathbf {u}) + \mathbb {E} _ {\mathcal {D} _ {0}} \left[ \ell_ {0} \left(f _ {\theta} (\mathbf {x}), y\right) - \ell_ {0} (\phi (\mathbf {x}), y) \right] \tag {21} \\ + \sum_ {i = 1} ^ {m} \lambda_ {i} \mathbb {E} _ {\mathcal {D} _ {i}} \left[ \ell_ {i} \left(f _ {\theta} (\mathbf {x}), y\right) - \ell_ {i} \left(\phi (\mathbf {x}), y\right) \right], \\ \end{array}
$$
where the relaxations  $u_{i}$  and relaxation costs  $h(\mathbf{u})$  canceled out. To proceed, use the Lipschitz continuity of the losses (Assumption 3) to bound the expected loss difference as
$$
\begin{array}{l} \left| \mathbb {E} _ {\mathcal {D} _ {i}} \left[ \ell_ {i} (f _ {\theta} (\mathbf {x}), y) - \ell_ {i} (\phi (\mathbf {x}), y) \right] \right| \leq \mathbb {E} _ {\mathcal {D} _ {i}} \left[ | \ell_ {i} (\phi (\mathbf {x}), y) - \ell_ {i} (f _ {\theta} (\mathbf {x}), y) | \right] \\ \leq M \mathbb {E} _ {\mathcal {D} _ {i}} \left[ | f _ {\theta} - \phi (\mathbf {x}) | \right], \quad \text {f o r} i = 0, \dots , m. \\ \end{array}
$$
We can then bound (21) as
$$
\tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}\right) \leq \tilde {L} _ {\mathrm {R}} \left(\phi , \boldsymbol {\lambda}; \mathbf {u}\right) + M \left(1 + \sum_ {i = 1} ^ {m} \lambda_ {i}\right) \left[ \max  _ {i \in \{0, \dots , m \}} \mathbb {E} _ {\mathcal {D} _ {i}} \left[ | f _ {\theta} - \phi (\mathbf {x}) | \right] \right]. \tag {22}
$$
Minimizing (22) over  $\theta$  yields
$$
\min  _ {\theta \in \Theta} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}\right) \leq \tilde {L} _ {\mathrm {R}} \left(\phi , \boldsymbol {\lambda}; \mathbf {u}\right) + M \left(1 + \sum_ {i = 1} ^ {m} \lambda_ {i}\right) \left[ \min  _ {\theta \in \Theta} \max  _ {i \in \{0, \dots , m \}} \mathbb {E} _ {\mathcal {D} _ {i}} \left[ | f _ {\theta} - \phi (\mathbf {x}) | \right] \right]. \tag {23}
$$
However, from the  $\nu$ -approximation property of the parametrization (Assumption 4), for every  $\phi \in \mathcal{F}$  there exists  $\theta \in \Theta$  such that  $\mathbb{E}_{\mathcal{D}_i}\left[|f_\theta - \phi(\mathbf{x})|\right] \leq \nu$ , for  $i = 0, \dots, m$ . Hence, (23) simplifies to
$$
\min  _ {\theta \in \Theta} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}\right) \leq \tilde {L} _ {\mathrm {R}} \left(\phi , \boldsymbol {\lambda}; \mathbf {u}\right) + \left(1 + \sum_ {i = 1} ^ {m} \lambda_ {i}\right) M \nu . \tag {24}
$$
Notice that (24) holds uniformly over  $\phi \in \mathcal{F}$ . Additionally, since the left-hand side does not depend on  $\phi$ , minimizing it over  $\mathbf{u}$  and  $\phi$  then maximizing with respect to  $\lambda$  recover the dual value from  $(\mathrm{D}_{\theta} - \mathrm{RES})$ . We immediately obtain the upper bound
$$
\tilde {\mathrm {D}} _ {\theta} ^ {\star} \leq \max  _ {\boldsymbol {\lambda} \in \mathbb {R} _ {+} ^ {m}} \min  _ {\phi \in \mathcal {F}, \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} (\phi , \boldsymbol {\lambda}; \mathbf {u}) + \left(1 + \sum_ {i = 1} ^ {m} \lambda_ {i}\right) M \nu . \tag {25}
$$
Expanding  $\tilde{L}_{\mathbb{R}}$  and rearranging the terms in (25), we recognize the Lagrangian of a perturbed version of (P-RES), namely
$$
\tilde {\mathsf {P}} _ {M \nu} ^ {\star} = \min  _ {\phi \in \mathcal {F}, \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \quad \mathbb {E} _ {\mathcal {D} _ {0}} \left[ \ell_ {0} (\phi (\mathbf {x}), y) \right] + h (\mathbf {u}) + M \nu \tag {PVI}
$$
$$
\text {s u b j e c t} \quad \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {i}} \left[ \ell_ {i} (\phi (\mathbf {x}), y) \right] \leq u _ {i} - M \nu , \quad i = 1, \dots , m.
$$
Hence, the right-hand side of (25) is the dual problem of (PVI). Since (PVI) is strongly dual (from lemma 2), we obtain that  $\tilde{\mathrm{D}}_{\theta}^{\star}\leq \tilde{\mathrm{P}}_{M\nu}^{\star}$ . To bound  $\tilde{\mathrm{P}}_{M\nu}^{\star}$ , note that we can construct a feasible pair for (PVI) from any pair  $(\phi^{\star},\mathbf{u}^{\star})$  that solves the resilient functional learning problem (P-RES). Explicitly, observe that the pair  $(\phi^{\star},\mathbf{u}^{\star} + \mathbb{1}\cdot M\nu)$  is a (suboptimal) feasible point of (PVI). Thus,
$$
\begin{array}{l} \tilde {\mathrm {D}} _ {\theta} ^ {\star} \leq \tilde {\mathrm {P}} _ {M \nu} ^ {\star} \leq \mathbb {E} _ {\mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {\star} (\mathbf {x}), y\right) \right] + h \left(\mathbf {u} ^ {\star} + \mathbb {1} \cdot M \nu\right) + M \nu \tag {26} \\ \leq \tilde {\mathrm {P}} _ {\mathrm {R}} ^ {\star} - h (\mathbf {u} ^ {\star}) + h (\mathbf {u} ^ {\star} + \mathbb {1} \cdot M \nu) + M \nu \\ \end{array}
$$
Combining (20) and (26) concludes the proof.
C.2 Bounding the generalization error: Proof of Prop. 7
Let  $\lambda^{\star}$  and  $\hat{\lambda}^{\star}$  be solution pairs of  $(\mathrm{D}_{\theta}\text{-RES})$  and  $(\hat{\mathrm{D}}\text{-RES})$  respectively and consider the sets of dual minimizers
$$
\mathcal {M} (\boldsymbol {\lambda}) = \operatorname * {a r g m i n} _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} (f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}) \quad \text {a n d} \quad \hat {\mathcal {M}} (\boldsymbol {\lambda}) = \operatorname * {a r g m i n} _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \hat {L} _ {\theta} (\theta , \boldsymbol {\lambda}; \mathbf {u}).
$$
Note that member of these set are pairs  $(\theta, \mathbf{u})$ . Since  $\hat{\lambda}^{\star}$  maximizes the minimum (with respect to  $\theta$  and  $\mathbf{u}$ ) of the empirical Lagrangian in (5), it holds that  $\min_{\theta \in \Theta, \mathbf{u} \in \mathbb{R}_+^m} \hat{L}_{\theta}(\theta, \hat{\lambda}^{\star}; \mathbf{u}) \geq \min_{\theta \in \Theta, \mathbf{u} \in \mathbb{R}_+^m} \hat{L}_{\theta}(\theta, \mathbf{\lambda}; \mathbf{u})$  for all  $\mathbf{\lambda} \in \mathbb{R}_+^m$ . In particular,
$$
\begin{array}{l} \tilde {\mathrm {D}} _ {\theta} ^ {\star} - \hat {\mathrm {D}} _ {\mathrm {R}} ^ {\star} = \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} \left(f _ {\theta}, \boldsymbol {\lambda} ^ {\star}; \mathbf {u}\right) - \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \hat {L} _ {\theta} \left(\theta , \hat {\boldsymbol {\lambda}} ^ {\star}; \mathbf {u}\right) \\ \leq \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \tilde {L} _ {\mathrm {R}} (f _ {\theta}, \boldsymbol {\lambda} ^ {\star}; \mathbf {u}) - \min  _ {\theta \in \Theta , \mathbf {u} \in \mathbb {R} _ {+} ^ {m}} \hat {L} _ {\theta} (\theta , \boldsymbol {\lambda} ^ {\star}; \mathbf {u}). \\ \end{array}
$$
Since  $(\hat{\theta}^{\dagger},\hat{\mathbf{u}}^{\dagger})\in \hat{\mathcal{M}} (\pmb{\lambda}^{\star})$  is suboptimal for  $\tilde{L}_{\mathbb{R}}(f_{\theta},\pmb{\lambda}^{\star};\mathbf{u})$  , we get
$$
\tilde {\mathrm {D}} _ {\theta} ^ {\star} - \hat {\mathrm {D}} _ {\mathrm {R}} ^ {\star} \leq \tilde {L} _ {\mathrm {R}} (f _ {\hat {\theta} ^ {\dagger}}, \boldsymbol {\lambda} ^ {\star}; \hat {\mathbf {u}} ^ {\dagger}) - \hat {L} _ {\theta} (\hat {\theta} ^ {\dagger}, \boldsymbol {\lambda} ^ {\star}; \hat {\mathbf {u}} ^ {\dagger}).
$$
Using a similar argument yields
$$
\tilde {\mathrm {D}} _ {\theta} ^ {\star} - \hat {\mathrm {D}} _ {\mathrm {R}} ^ {\star} \geq \tilde {L} _ {\mathrm {R}} \left(f _ {\theta^ {\dagger}}, \hat {\boldsymbol {\lambda}} ^ {\star}; \mathbf {u} ^ {\dagger}\right) - \hat {L} _ {\theta} \left(\theta^ {\dagger}, \hat {\boldsymbol {\lambda}} ^ {\star}; \mathbf {u} ^ {\dagger}\right)
$$
for  $(\theta^{\dagger},\mathbf{u}^{\dagger})\in \mathcal{M}(\hat{\lambda}^{\star})$  . We thus obtain
$$
\left. \right.\left| \tilde {\mathrm {D}} _ {\theta} ^ {\star} - \hat {\mathrm {D}} _ {\mathrm {R}} ^ {\star} \right| \leq \max  \left\{\left| \tilde {L} _ {\mathrm {R}} \left(f _ {\hat {\theta} ^ {\dagger}}, \boldsymbol {\lambda} ^ {\star}; \hat {\mathbf {u}} ^ {\dagger}\right) - \hat {L} _ {\theta} \left(\hat {\theta} ^ {\dagger}, \boldsymbol {\lambda} ^ {\star}; \hat {\mathbf {u}} ^ {\dagger}\right)\right|, \left| \tilde {L} _ {\mathrm {R}} \left(f _ {\theta^ {\dagger}}, \hat {\boldsymbol {\lambda}} ^ {\star}; \mathbf {u} ^ {\dagger}\right) - \hat {L} _ {\theta} \left(\theta^ {\dagger}, \hat {\boldsymbol {\lambda}} ^ {\star}; \mathbf {u} ^ {\dagger}\right)\right|\right\} \tag {27}
$$
Using the uniform convergence bound from Assumption 5, we obtain that
$$
\left| \tilde {L} _ {\mathbb {R}} \left(f _ {\theta}, \boldsymbol {\lambda}; \mathbf {u}\right) - \hat {L} _ {\theta} (\theta , \boldsymbol {\lambda}; \mathbf {u}) \right| \leq \xi (N, \delta) + \sum_ {i = 1} ^ {m} \lambda_ {i} \xi (N, \delta) \leq (1 + \| \boldsymbol {\lambda} \| _ {1}) \xi (N, \delta), \tag {28}
$$
holds uniformly over  $\theta$  with probability  $1 - (m + 1)\delta$ . Combining (27) with (28) using the union bound concludes the proof.
D Proofs from Main Text
Proof. [Existence] To show there exists  $\mathbf{u}^{\star} \in \mathbb{R}_{+}^{m}$  satisfying Def. 1, notice that (2) is equivalent to showing that there exists  $\mathbf{u}^{\star}$  such that  $\mathbf{0} \in \partial f(\mathbf{u}^{\star})$  for  $f(\mathbf{u}) = \tilde{\mathrm{P}}^{\star}(\mathbf{u}) + h(\mathbf{u})$ . Notice that  $f$  is a convex function, so that its subgradient is well-defined [see (1)].
Start by noticing that the set of minimizers of  $f$  is not empty. Explicitly, let  $\mathcal{U}^{\star} = \operatorname*{argmin}_{\mathbf{u} \in \mathbb{R}_+^m} f(\mathbf{u})$ . Observe that since the losses  $\ell_i$  are bounded,  $\tilde{\mathrm{P}}^{\star}(\bar{\mathbf{u}}) = \tilde{\mathrm{P}}^{\star}(\mathbf{v})$  for all  $\mathbf{v} \succeq \bar{\mathbf{u}} = B \cdot \mathbb{1}$ . Immediately, we obtain that  $f(\mathbf{v})$  is a componentwise increasing function for  $\mathbf{v} \succeq \bar{\mathbf{u}}$ , which implies that  $\mathcal{U}^{\star} = \operatorname*{argmin}_{\mathbf{u} \in \bar{\mathcal{U}}} f(\mathbf{u})$ , where  $\bar{\mathcal{U}} = \{\mathbf{u} \in \mathbb{R}_+^m \mid \mathbf{u} \preceq \bar{\mathbf{u}}\}$ . Since  $\bar{\mathcal{U}}$  is compact and  $f$  is convex, its set of minimizers  $\mathcal{U}^{\star}$  is compact and non-empty [51, Prop. B.10(b)].
For all  $\mathbf{u}' \in \mathrm{int}(\mathcal{U}^{\star})$ , where  $\mathrm{int}(\mathcal{Z})$  denotes the interior of the set  $\mathcal{Z}$ , it must be that  $\mathbf{0} \in \partial f(\mathbf{u}')$  [52, Prop. 5.4.7]. This is simply a statement of the first-order optimality condition for  $\mathbf{u}'$ .
Suppose, now, that  $\mathcal{U}^{\star}$  has no interior and that for all  $\mathbf{u}' \in \mathcal{U}^{\star}$ ,  $[\mathbf{u}']_j = 0$  for some  $j$ . Then, it could be that for all  $\mathbf{p} \in \partial f(\mathbf{u}')$  are such that  $[\mathbf{p}]_j > 0$ . However, this would lead to a contradiction. Indeed, since  $h$  is normalized, it holds that  $[\nabla h(\mathbf{u}')]_j = 0$ , so that  $\partial f(\mathbf{u}') = \partial \tilde{\mathsf{P}}^{\star}(\mathbf{u}')$ . Thus, if all  $\mathbf{p} \in \partial f(\mathbf{u}')$  are such that  $[\mathbf{p}]_j > 0$ , then all  $\mathbf{p} \in \partial \tilde{\mathsf{P}}^{\star}(\mathbf{u}')$  are such that  $[\mathbf{p}]_j > 0$ . From the convexity of  $\tilde{\mathsf{P}}^{\star}$ , this would imply that  $\tilde{\mathsf{P}}^{\star}(\mathbf{u}' + \mathbf{e}_j) \geq \tilde{\mathsf{P}}^{\star}(\mathbf{u}') + [\mathbf{p}]_j > \tilde{\mathsf{P}}^{\star}(\mathbf{u}')$ , where  $\mathbf{e}_j$  is the  $j$ -th element of the canonical basis. This contradicts the fact that  $\tilde{\mathsf{P}}^{\star}$  is componentwise non-increasing. It must therefore be that  $\mathbf{0} \in \partial f(\mathbf{u}')$ .
[Unicity] If  $h$  is strictly convex, then  $f$  is strictly convex. Then, its minimizer is unique [53, Chap. 27], i.e.,  $\mathcal{U}^{\star}$  is a singleton. Suppose there exists  $\mathbf{u}^{\dagger} \notin \mathcal{U}^{\star}$  that satisfies the equilibrium in Def. 1. Then, from (2), it holds that  $\mathbf{0} \in \partial f(\mathbf{u}^{\dagger})$ . Since  $f$  is convex, this implies that  $\mathbf{u}^{\dagger}$  is a minimizer, which violates the hypothesis that it is not in  $\mathcal{U}^{\star}$ .
D.2 Proposition 2
Proof. From the definition of sub-differential, it holds for any  $\mathbf{p}_v\in \partial \tilde{\mathrm{P}}^\star (\mathbf{v})$  and  $\mathbf{p}_w\in \partial \tilde{\mathrm{P}}^\star (\mathbf{w})$  that
$$
\tilde {\mathbf {P}} ^ {\star} (\mathbf {v}) \geq \tilde {\mathbf {P}} ^ {\star} (\mathbf {w}) + \mathbf {p} _ {w} ^ {T} (\mathbf {v} - \mathbf {w}) \tag {29}
$$
$$
\tilde {\mathbf {P}} ^ {\star} (\mathbf {w}) \geq \tilde {\mathbf {P}} ^ {\star} (\mathbf {v}) + \mathbf {p} _ {v} ^ {T} (\mathbf {w} - \mathbf {v}) \tag {30}
$$
Adding (29) and (30), we can rearrange the terms to get
$$
0 \geq \left(\mathbf {p} _ {v} - \mathbf {p} _ {w}\right) ^ {T} (\mathbf {w} - \mathbf {v}) \tag {31}
$$
Then, since  $\mathbf{v}_i - \mathbf{u}_i > 0$  if  $i = j$  and 0 otherwise, (31) implies that  $[\mathbf{p}_v]_j - [\mathbf{p}_w]_j\leq 0$ , which yields the desired result. Applying the same argument for  $h$  concludes the proof.
D.3 Proposition 3
Proof. The strong duality of (P-RES) under assumptions 1 and 2 holds due to Lemma 2. The proof then follows the same steps used to prove that optimal Lagrange multipliers are subgradients of the dual function in convex problems; see, e.g., [39, Section 5.6.2]. We just verify that the proof holds despite the non-convexity of the problem as long as the problem is strongly dual.
By definition of the dual function we can write
$$
\tilde {\mathrm {P}} ^ {\star} (\mathbf {u}) = \mathrm {D} ^ {\star} (\mathbf {u}) = g \left(\boldsymbol {\lambda} ^ {*}; \mathbf {u}\right) = \min  _ {\phi} \mathcal {L} \left(\phi , \boldsymbol {\lambda} ^ {*} (\mathbf {u}); \mathbf {u}\right) \leq \mathcal {L} \left(\phi , \boldsymbol {\lambda} ^ {*} (\mathbf {u}); \mathbf {u}\right) \tag {32}
$$
where the inequality is true for any function  $\phi$ . We particularize this inequality to a function  $\phi^{*}(\cdot ;\mathbf{v})$  that attains the minimum of  $(\mathrm{P_u})$  for relaxation  $\mathbf{v}$ . We can therefore write
$$
\tilde {\mathbf {P}} ^ {\star} (\mathbf {u}) \leq \mathcal {L} \left(\phi^ {*} (\cdot ; \mathbf {v}), \lambda^ {*} (\mathbf {u}); \mathbf {u}\right), \tag {33}
$$
We now substitute the definition of the Lagrangian in (3) for the right hand side of (33) to write
$$
\tilde {\mathbf {P}} ^ {\star} (\mathbf {u}) \leq \mathbb {E} _ {\mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {v}), y\right) \right] + \sum_ {i = 1} ^ {m} \lambda_ {i} ^ {*} (\mathbf {u}) \left[ \mathbb {E} _ {\mathcal {D} _ {i}} \left[ \ell_ {i} \left(\phi^ {*} (\mathbf {x}; \mathbf {v}), y\right) \right] - u _ {i} \right]. \tag {34}
$$
The important property to observe in (34) is that we consider perturbation  $\mathbf{u}$  and corresponding dual variable  $\lambda^{*}(\mathbf{u})$  while evaluating the Lagrangian at the function  $\phi^{*}(\mathbf{x};\mathbf{v})$  that is primal optimal for perturbation  $\mathbf{v}$ . This latter fact implies that the following equality and inequalities are true
$$
\mathbb {E} _ {\mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {v}), y\right) \right] = \tilde {\mathsf {P}} ^ {\star} (\mathbf {v}), \quad \mathbb {E} _ {\mathcal {D} _ {i}} \left[ \ell_ {i} \left(\phi^ {*} (\mathbf {x}; \mathbf {v}), y\right) \right] \leq - v _ {i}. \tag {35}
$$
Using the relationships in (35) and (34) we conclude that
$$
\tilde {\mathrm {P}} ^ {\star} (\mathbf {u}) \leq \tilde {\mathrm {P}} ^ {\star} (\mathbf {v}) + \sum_ {i = 1} ^ {m} \lambda_ {i} ^ {*} (\mathbf {u}) [ v _ {i} - u _ {i} ]. \tag {36}
$$
The two sums in the right hand side of (36) equal the inner product of multiplier  $\lambda^{\star}(\mathbf{u})$  with  $(\mathbf{v} - \mathbf{u})$ . Implementing this substitution in (36) and reordering terms yields
$$
\tilde {\mathsf {P}} ^ {\star} (\mathbf {v}) \geq \tilde {\mathsf {P}} ^ {\star} (\mathbf {u}) - \boldsymbol {\lambda} ^ {*} (\mathbf {u}) ^ {T} (\mathbf {v} - \mathbf {u}). \tag {37}
$$
Comparing (37) with (1) we see that  $\lambda^{*}(\mathbf{u})$  satisfies Definition 1.
D.4 Proposition 4
Proof. As we did in the proof of Prop. 1, we begin by showing that  $\mathbf{u}^{\star}$  is a minimizer of  $(\tilde{\mathsf{P}}^{\star} + h)(\mathbf{u}) = \tilde{\mathsf{P}}^{\star}(\mathbf{u}) + h(\mathbf{u})$ . Explicitly,
$$
\mathbf {u} ^ {\star} \in \underset {\mathbf {u} \in R _ {+} ^ {m}} {\operatorname {a r g m i n}} (\tilde {\mathbf {P}} ^ {\star} + h) (\mathbf {u}). \quad (\tilde {\mathbf {P}} - \mathrm {R E S} ^ {\prime})
$$
As shown in proposition 1,  $\mathbf{u}^{\star}$  minimizes  $\tilde{\mathrm{P}}^{\star} + h$  iff  $0\in \partial (\tilde{\mathrm{P}}^{\star} + h)(\mathbf{u}^{\star})$ . Then  $0\in \partial (\tilde{\mathrm{P}}^{\star} + h)(\mathbf{u}^{\star})$  is also equivalent to the resilient equilibrium definition (2).
In  $(\tilde{\mathbf{P}}_{\mathbf{u}})$ , the function  $\tilde{\mathbb{P}}^{\star}(\mathbf{u})$  is defined as the solution of  $(\tilde{\mathbf{P}}_{\mathbf{u}})$ . To show that  $(\tilde{\mathbf{P}} -\mathrm{RES}^{\prime})$  and  $(\tilde{\mathbf{P}} -\mathrm{RES})$  are equivalent a nested minimization over variables  $\phi$  and  $\mathbf{u}$  is equivalent to a joint minimization over  $\phi$  and  $\mathbf{u}$ . To confirm that this holds here recall the definition of  $\mathbf{u}^{\star}$  as the resilient relaxation and of  $\phi^{*}(\mathbf{x};\mathbf{u})$  as the minimizer of the relaxed problem  $(\tilde{\mathbf{P}}_{\mathbf{u}})$  – which holds for all  $\mathbf{u}$  and  $\mathbf{u}^{\star}$  in particular. Since  $\mathbf{u}^{\star}$  is the solution of  $(\tilde{\mathbf{P}} -\mathrm{RES}^{\prime})$ . We therefore have that for all perturbations  $\mathbf{u}$
$$
\mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {u} ^ {\star}), y\right) \right] + h \left(\mathbf {u} ^ {\star}\right) \leq \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {u}), y\right) \right] + h (\mathbf {u}). \tag {38}
$$
Further observe that  $\phi^{*}(\mathbf{x};\mathbf{u})$  is the minimizer of the relaxed problem  $(\mathrm{P_u})$  associated with perturbation  $\mathbf{u}$ . We then have that for any feasible function  $\phi$  we must have
$$
\mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {u}), y\right) \right] + h (\mathbf {u}) \leq \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi (\mathbf {x}), y\right) \right] + h (\mathbf {u}). \tag {39}
$$
The bound in (39) is true for all  $\phi$  and  $\mathbf{u}$ . In particular, it is true for the solution  $\phi^{*}$ ,  $\mathbf{u}^{*}$  of (P-RES). Particularizing (39) to this pair and combining the resulting inequality with the bound in (38) we conclude that
$$
\mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {u} ^ {\star}), y\right) \right] + h \left(\mathbf {u} ^ {\star}\right) \leq \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}), y\right) \right] + h \left(\mathbf {u} ^ {*}\right). \tag {40}
$$
On the other hand, given that  $\phi^{*},\mathbf{u}^{*}$  solve (P-RES) we have that for all feasible  $\mathbf{u}$  and  $\phi$
$$
\mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}), y\right) \right] + h \left(\mathbf {u} ^ {*}\right) \leq \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi (\mathbf {x}), y\right) \right] + h (\mathbf {u}). \tag {41}
$$
In particular, this is true if we make  $\mathbf{u} = \mathbf{u}^{\star}$  and  $\phi = \phi^{*}(\mathbf{x};\mathbf{u}^{\star})$ . We can then write,
$$
\mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}), y\right) \right] + h \left(\mathbf {u} ^ {*}\right) \leq \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {D} _ {0}} \left[ \ell_ {0} \left(\phi^ {*} (\mathbf {x}; \mathbf {u} ^ {\star}), y\right) \right] + h \left(\mathbf {u} ^ {\star}\right) \tag {42}
$$
For (40) and (42) to hold we must have that  $\phi^{*}$ ,  $\mathbf{u}^{*}$  is a solution of (P-RES) if and only if  $\mathbf{u}^{\star}$  and  $\phi = \phi^{*}(\mathbf{x};\mathbf{u}^{\star})$  are a resilient perturbation and a corresponding resilient minimizer.
D.5 Proposition 8
Proposition 8. Let  $\Phi^{\star} = \operatorname*{argmin}_{\phi \in \mathcal{F}}\mathbb{E}_{(\mathbf{x},y)\sim \mathcal{D}_0}\left[\ell_0(\phi (\mathbf{x};\mathbf{u}^{\star}),y)\right]$  denote the solution set of the unconstrained problem and  $\mathbf{b}_i = \min_{\phi \in \Phi^{\star}}\mathbb{E}_{(\mathbf{x},y)\sim \mathcal{D}_i}\left[\ell_i(\phi (\mathbf{x};\mathbf{u}^{\star}),y)\right], i = 1,\ldots ,m$  be the minimum constraint losses achieved. We show there exists costs such that  $\underline{u}_i^\star \leq \epsilon$  and  $\bar{u}_i^\star \geq b_i - \epsilon$  for  $i = 1,\dots,m$ .