SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} \mathcal {C} _ {\ell \text {c s t n d}} (h, x) - \inf  _ {\mu \in \mathbb {R}} \mathcal {C} _ {\ell \text {c s t n d}} (h _ {\mu}, x) \\ = \sup  _ {\mu \in \mathbb {R}} \left\{\left(1 - p _ {1}\right) \left[ \Phi (- \tau_ {2}) - \Phi (- \tau_ {1} + \mu) \right] + \left(1 - p _ {2}\right) \left[ \Phi (- \tau_ {1}) - \Phi (- \tau_ {2} - \mu) \right] \right\} \\ = \sup  _ {\mu \in \mathbb {R}} \left\{\frac {2 - P - p _ {1} + p _ {2}}{2} \left[ \Phi (- \tau_ {2}) - \Phi (- \tau_ {1} + \mu) \right] + \frac {2 - P + p _ {1} - p _ {2}}{2} \left[ \Phi (- \tau_ {1}) - \Phi (- \tau_ {2} - \mu) \right] \right\} (P = p _ {1} + p _ {2} \in \left[ \frac {1}{n - 1}, 1 \right]) \\ = \inf  _ {P \in \left[ \frac {1}{n - 1}, 1 \right]} \inf  _ {\tau_ {1} \geq \max  \left\{\tau_ {2}, 0 \right\}} \sup  _ {\mu \in \mathbb {R}} \left\{\frac {2 - P - p _ {1} + p _ {2}}{2} \left[ \Phi (- \tau_ {2}) - \Phi (- \tau_ {1} + \mu) \right] \right. \\ \left. + \frac {2 - P + p _ {1} - p _ {2}}{2} \left[ \Phi (- \tau_ {1}) - \Phi (- \tau_ {2} - \mu) \right] \right\} \quad (\tau_ {1} \geq 0, \tau_ {2} \leq \tau_ {1}) \\ = \mathfrak {T} ^ {\text {c s t n d}} \left(p _ {1} - p _ {2}\right) \\ = \mathcal {T} ^ {\text {c s t n d}} \left(\Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x)\right). \tag {by Lemma 1} \\ \end{array}
$$
where for  $n = 2$ , an additional constraint  $\tau_{1} + \tau_{2} = 0$  is imposed and the expression of  $\mathcal{T}^{\mathrm{comp}}$  is simplified. Since  $\mathcal{T}^{\mathrm{cstnd}}$  is convex, by Jensen's inequality, we obtain for any hypothesis  $h \in \mathcal{H}$  and any distribution,
$$
\begin{array}{l} \mathcal {T} ^ {\text {c s t n d}} \left(\mathcal {R} _ {\ell_ {0 - 1}} (h) - \mathcal {R} _ {\ell_ {0 - 1}} ^ {*} (\mathcal {H}) + \mathcal {M} _ {\ell_ {0 - 1}} (\mathcal {H})\right) \\ = \mathcal {T} ^ {\text {c s t n d}} \left(\underset {X} {\mathbb {E}} \left[ \Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x) \right]\right) \\ \leq \mathbb {E} _ {X} \left[ \mathcal {T} ^ {\text {c s t n d}} \left(\Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x)\right) \right] \\ \leq \mathbb {E} _ {X} \left[ \Delta \mathcal {C} _ {\ell^ {\text {c s t n d}}, \mathcal {H}} (h, x) \right] \\ = \mathcal {R} _ {\ell \text {c s t n d}} (h) - \mathcal {R} _ {\ell \text {c s t n d}} ^ {*} (\mathcal {H}) + \mathcal {M} _ {\ell \text {c s t n d}} (\mathcal {H}). \\ \end{array}
$$
For the second part, we first consider  $n = 2$ . For any  $t \in [0,1]$ , we consider the distribution that concentrates on a singleton  $\{x\}$  and satisfies  $p(x,1) = \frac{1 + t}{2}$ ,  $p(x,2) = \frac{1 - t}{2}$ . For any  $\epsilon > 0$ , by the definition of infimum, we can take  $h \in \mathcal{H}$  such that  $h(x,2) = \tau_{\epsilon} \geq 0$  and satisfies
$$
\sup _ {\mu \in \mathbb {R}} \Bigg \{\frac {1 - t}{2} [ \Phi (\tau_ {\epsilon}) - \Phi (- \tau_ {\epsilon} + \mu) ] + \frac {1 + t}{2} [ \Phi (- \tau_ {\epsilon}) - \Phi (\tau_ {\epsilon} - \mu) ] \Bigg \} <   \mathfrak {T} ^ {\mathrm {c s t n d}} (t) + \epsilon .
$$
$$
\begin{array}{l} \mathcal {T} ^ {\text {c s t n d}} (t) \leq \mathcal {R} _ {\ell^ {\text {c s t n d}}} (h) - \mathcal {R} _ {\ell^ {\text {c s t n d}}} ^ {*} (\mathcal {H}) + \mathcal {M} _ {\ell^ {\text {c s t n d}}} (\mathcal {H}) \\ = \mathcal {R} _ {\ell \text {c s t n d}} (h) - \mathbb {E} _ {X} \left[ \mathcal {C} _ {\ell \text {c s t n d}} ^ {*} (\mathcal {H}, x) \right] \\ = \mathcal {C} _ {\ell c s t n d} (h, x) - \mathcal {C} _ {\ell c s t n d} ^ {*} (\mathcal {H}, x) \\ = \sup  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \left[ \Phi \left(\tau_ {\epsilon}\right) - \Phi (- \tau_ {\epsilon} + \mu) \right] + \frac {1 + t}{2} \left[ \Phi (- \tau_ {\epsilon}) - \Phi (\tau_ {\epsilon} - \mu) \right] \right\} \\ <   \mathcal {T} ^ {\mathrm {c s t n d}} (t) + \epsilon . \\ \end{array}
$$
By letting  $\epsilon \to 0$ , we conclude the proof. The proof for  $n > 2$  directly extends from the case when  $n = 2$ . Indeed, For any  $t \in [0,1]$ , we consider the distribution that concentrates on a singleton  $\{x\}$  and satisfies  $p(x,1) = \frac{1 + t}{2}$ ,  $p(x,2) = \frac{1 - t}{2}$ ,  $p(x,y) = 0$ ,  $3 \leq y \leq n$ . For any  $\epsilon > 0$ , by the definition of infimum, we can take  $h \in \mathcal{H}$  such that  $h(x,1) = \tau_{1,\epsilon}$ ,  $h(x,2) = \tau_{2,\epsilon}$ ,  $h(x,y) = 0$ ,  $3 \leq y \leq n$  and satisfies  $\tau_{1,\epsilon} + \tau_{2,\epsilon} = 0$ , and
$$
\begin{array}{l} \inf_{P\epsilon \bigl[\frac{1}{n - 1},1\bigr ]}\sup_{\mu \in \mathbb{R}}\Biggl\{\frac{2 - P - t}{2}\bigl[\Phi \bigl( - \tau_{2,\epsilon}\bigr) - \Phi \bigl( - \tau_{1,\epsilon} + \mu \bigr)\bigr ] + \frac{2 - P + t}{2}\bigl[\Phi \bigl( - \tau_{1,\epsilon}\bigr) - \Phi \bigl( - \tau_{2,\epsilon} - \mu \bigr)\bigr ]\Biggr \} \\ = \sup  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \left[ \Phi (- \tau_ {2, \epsilon}) - \Phi (- \tau_ {1, \epsilon} + \mu) \right] + \frac {1 + t}{2} \left[ \Phi (- \tau_ {1, \epsilon}) - \Phi (- \tau_ {2, \epsilon} - \mu) \right] \right\} \\ <   \mathcal {T} ^ {\mathrm {c s t n d}} (t) + \epsilon . \\ \end{array}
$$
$$
\mathfrak {T} ^ {\mathrm {c s t n d}} (t) \leq \mathcal {R} _ {\ell \mathrm {c s t n d}} (h) - \mathcal {R} _ {\ell \mathrm {c s t n d}} ^ {*} (\mathcal {H}) + \mathcal {M} _ {\ell \mathrm {c s t n d}} (\mathcal {H}) <   \mathfrak {T} ^ {\mathrm {c s t n d}} (t) + \epsilon .
$$
D.2 Characterization of  $\mathcal{T}^{\mathrm{cstnd}}$  (Theorem 11)
$$
\begin{array}{l} \mathcal {T} ^ {\mathrm {c s t n d}} (t) = \left\{ \begin{array}{l l} \Phi (0) - \inf  _ {\mu \in \mathbb {R}} \Big \{\frac {1 - t}{2} \Phi (\mu) + \frac {1 + t}{2} \Phi (- \mu) \Big \} & n = 2 \\ \inf  _ {\tau \geq 0} \Big \{\big (2 - \frac {1}{n - 1} \big) \Phi (- \tau) - \inf  _ {\mu \in \mathbb {R}} \Big \{\frac {2 - t - \frac {1}{n - 1}}{2} \Phi (- \tau + \mu) + \frac {2 + t - \frac {1}{n - 1}}{2} \Phi (- \tau - \mu) \Big \} \Big \} & n > 2 \end{array} \right. \\ \begin{array}{r l} & {\geq \left\{\Phi (0) - \inf _ {\mu \in \mathbb {R}} \Bigl \{\frac {1 - t}{2} \Phi (\mu) + \frac {1 + t}{2} \Phi (- \mu) \Bigr \} \right. n = 2} \\ & {\left. \inf _ {\tau \geq 0} \Bigl \{2 \Phi (- \tau) - \inf _ {\mu \in \mathbb {R}} \Bigl \{\frac {2 - t}{2} \Phi (- \tau + \mu) + \frac {2 + t}{2} \Phi (- \tau - \mu) \Bigr \} \right\} n > 2.} \end{array} \\ \end{array}
$$
$$
\begin{array}{l} \mathfrak {T} ^ {\mathrm {c s t n d}} (t) = \inf  _ {\tau \geq 0} \sup  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} [ \Phi (\tau) - \Phi (- \tau + \mu) ] + \frac {1 + t}{2} [ \Phi (- \tau) - \Phi (\tau - \mu) ] \right\} \\ = \inf  _ {\tau \geq 0} \left(\frac {1 - t}{2} \Phi (\tau) + \frac {1 + t}{2} [ \Phi (- \tau) ]\right) - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \Phi (- \tau + \mu) + \frac {1 + t}{2} \Phi (\tau - \mu) \right\} \\ = \inf  _ {\tau \geq 0} \left(\frac {1 - t}{2} \Phi (\tau) + \frac {1 + t}{2} [ \Phi (- \tau) ]\right) - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \Phi (\mu) + \frac {1 + t}{2} \Phi (- \mu) \right\} \\ \geq \inf  _ {\tau \geq 0} \left(\Phi (0) - \Phi^ {\prime} (0) t \tau\right) - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \Phi (\mu) + \frac {1 + t}{2} \Phi (- \mu) \right\} \quad (\Phi \text {i s c o n v e x}) \\ = \Phi (0) - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \Phi (\mu) + \frac {1 + t}{2} \Phi (- \mu) \right\} \quad \left(\Phi^ {\prime} (0) <   0, t \tau \geq 0\right) \\ \end{array}
$$
where the equality can be achieved by  $\tau = 0$
$$
\mathfrak{T}^{\text{cstnd}}(t) = \inf_{P\in \left[ \begin{array}{c}\frac{1}{n - 1},1 \end{array} \right]}\inf_{\tau_{1}\geq \max \{\tau_{2},0\}}\sup_{\mu \in \mathbb{R}}F(P,\tau_{1},\tau_{2},\mu)
$$
where we let  $F(P, \tau_1, \tau_2, \mu) = \frac{2 - P - t}{2} \left[ \Phi(-\tau_2) - \Phi(-\tau_1 + \mu) \right] + \frac{2 - P + t}{2} \left[ \Phi(-\tau_1) - \Phi(-\tau_2 - \mu) \right]$ . For simplicity, we assume that  $\Phi$  is differentiable. For general convex  $\Phi$ , we can proceed by using left and right derivatives, which are non-decreasing. Differentiate  $F$  with respect to  $\mu$ , we have
$$
\frac {\partial F}{\partial \mu} = \frac {P + t - 2}{2} \Phi^ {\prime} (- \tau_ {1} + \mu) + \frac {2 - P + t}{2} \Phi^ {\prime} (- \tau_ {2} - \mu).
$$
Using the fact that  $P \in \left[\frac{1}{n - 1}, 1\right], t \in [0,1]$  and  $\Phi'$  is non-decreasing, we obtain that  $\frac{\partial F}{\partial \mu}$  is non-increasing. Furthermore,  $\Phi'$  is non-decreasing and non-positive,  $\Phi$  is non-negative, we obtain that  $\Phi'(+\infty) = 0$ . This implies that  $\frac{\partial F}{\partial \mu}(+\infty) \leq 0$  and  $\frac{\partial F}{\partial \mu}(-\infty) \geq 0$ . Therefore, there exists  $\mu_0 \in \mathbb{R}$  such that
$$
\frac {\partial F}{\partial \mu} (\mu_ {0}) = \frac {P + t - 2}{2} \Phi^ {\prime} (- \tau_ {1} + \mu_ {0}) + \frac {2 - P + t}{2} \Phi^ {\prime} (- \tau_ {2} - \mu_ {0}) = 0
$$
By taking  $\mu = \tau_{1} - \tau_{2}$  and using the fact that  $\Phi'(0) < 0$ , we have
$$
\frac {\partial F}{\partial \mu} (\tau_ {1} - \tau_ {2}) = \frac {P + t - 2}{2} \Phi^ {\prime} (- \tau_ {2}) + \frac {2 - P + t}{2} \Phi^ {\prime} (- \tau_ {1}) <   0.
$$
$$
\frac {\partial F}{\partial \tau_ {2}} = \frac {P + t - 2}{2} \Phi^ {\prime} (- \tau_ {2}) + \frac {2 - P + t}{2} \Phi^ {\prime} (- \tau_ {2} - \mu_ {0}).
$$
$$
\frac {\partial F}{\partial \tau_ {2}} \leq \frac {P + t - 2}{2} \Phi^ {\prime} (- \tau_ {2}) + \frac {2 - P + t}{2} \Phi^ {\prime} (- \tau_ {2} - \tau_ {1} + \tau_ {2}) = \frac {\partial F}{\partial \mu} (\tau_ {1} - \tau_ {2}) <   0,
$$
which implies that the infimum  $\inf_{\tau_1\geq \max \{\tau_2,0\}}$  is achieved when  $\tau_{2} = \tau_{1}$ . Differentiate  $F$  with respect to  $P$  at  $\mu_0$  and  $\tau_{1} = \tau_{2}$ , by the convexity of  $\Phi$ , we obtain
$$
\frac {\partial F}{\partial P} = \Phi (- \tau_ {1} + \mu_ {0}) - \Phi (- \tau_ {1}) - \Phi (- \tau_ {1}) + \Phi (- \tau_ {1} - \mu_ {0}) \geq 0,
$$
which implies that the infimum  $\inf_{P\in \left[\frac{1}{n - 1},1\right]}$  is achieved when  $P = \frac{1}{n - 1}$ . Above all, we obtain
$$
\begin{array}{l} \mathfrak{T}^{\mathrm{cstnd}}(t) = \inf_{\tau \geq 0}\sup_{\mu \in \mathbb{R}}F\bigg(\frac{1}{n - 1},\tau ,\tau ,\mu \bigg) \\ = \inf  _ {\tau \geq 0} \left\{\left(2 - \frac {1}{n - 1}\right) \Phi (- \tau) - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t - \frac {1}{n - 1}}{2} \Phi (- \tau + \mu) + \frac {2 + t - \frac {1}{n - 1}}{2} \Phi (- \tau - \mu) \right\} \right\} \\ \geq \inf_{\tau \geq 0}\sup_{\mu \in \mathbb{R}}F(0,\tau ,\tau ,\mu) \\ = \inf  _ {\tau \geq 0} \left\{2 \Phi (- \tau) - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} \Phi (- \tau + \mu) + \frac {2 + t}{2} \Phi (- \tau - \mu) \right\} \right\}. \\ \end{array}
$$
D.3 Computation of examples
Example:  $\Phi(t) = \Phi_{\exp}(t) = e^{-t}$ . For  $n = 2$ , plugging in  $\Phi(t) = e^{-t}$  in Theorem 11, gives
$$
\begin{array}{l} \mathcal {T} ^ {\mathrm {c o m p}} = 1 - \inf _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} e ^ {- \mu} + \frac {1 + t}{2} e ^ {\mu} \right\} \\ = 1 - \sqrt {1 - t ^ {2}}. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = \frac {1}{2} \log \frac {1 - t}{1 + t}) \\ \end{array}
$$
For  $n > 2$ , plugging in  $\Phi(t) = e^{-t}$  in Theorem 11 yields
$$
\begin{array}{l} \mathfrak {T} ^ {\mathrm {c o m p}} \geq \inf  _ {\tau \geq 0} \left\{2 e ^ {\tau} - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} e ^ {\tau - \mu} + \frac {2 + t}{2} e ^ {\tau + \mu} \right\} \right\} \\ \geq 2 - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} e ^ {- \mu} + \frac {2 + t}{2} e ^ {\mu} \right\} \quad (\text {m i n i m u m a c h i e v e d a t} \tau = 0) \\ = 2 - \sqrt {4 - t ^ {2}}. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = \frac {1}{2} \log \frac {2 - t}{2 + t}) \\ \end{array}
$$
Example:  $\Phi(t) = \Phi_{\text{hinge}}(t) = \max \{0, 1 - t\}$ . For  $n = 2$ , plugging in  $\Phi(t) = \max \{0, 1 - t\}$  in Theorem 11, gives
$$
\begin{array}{l} \mathfrak {T} ^ {\mathrm {c o m p}} = 1 - \inf _ {\mu \in \mathbb {R}} \left\{\frac {1 - t}{2} \max  \{0, 1 - \mu \} + \frac {1 + t}{2} \max  \{0, 1 + \mu \} \right\} \\ = t. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = - 1) \\ \end{array}
$$
For  $n > 2$ , plugging in  $\Phi(t) = \max \{0, 1 - t\}$  in Theorem 11 yields
$$
\begin{array}{l} \mathfrak{T}^{\mathrm{comp}}\geq \inf_{\tau \geq 0}\Bigg\{2\max \{0,1 + \tau \} -\inf_{\mu \in \mathbb{R}}\left\{\frac{2 - t}{2}\max \{0,1 + \tau - \mu \} +\frac{2 + t}{2}\max \{0,1 + \tau +\mu \} \right\} \Bigg\} \\ = 2 - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} \max  \{0, 1 - \mu \} + \frac {2 + t}{2} \max  \{0, 1 + \mu \} \right\} \quad (\text {m i n i m u m a c h i e v e d a t} \tau = 0) \\ = t. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = - 1) \\ \end{array}
$$
Example:  $\Phi(t) = \Phi_{\mathrm{sq - hinge}}(t) = (1 - t)^2 \mathbb{1}_{t \leq 1}$ . For  $n = 2$ , plugging in  $\Phi(t) = (1 - t)^2 \mathbb{1}_{t \leq 1}$  in Theorem 11, gives
$$
\begin{array}{l} \mathfrak{T}^{\mathrm{comp}} = 1 - \inf_{\mu \in \mathbb{R}}\left\{\frac{1 - t}{2}\big(1 - \mu \big)^{2}\mathbb{1}_{\mu \leq 1} + \frac{1 + t}{2}\big(1 + \mu \big)^{2}\mathbb{1}_{\mu \geq -1}\right\} \\ = t ^ {2}. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = - t) \\ \end{array}
$$
For  $n > 2$ , plugging in  $\Phi(t) = (1 - t)^{2}\mathbb{1}_{t \leq 1}$  in Theorem 11 yields
$$
\begin{array}{l} \mathfrak {T} ^ {\text {c o m p}} \geq \inf  _ {\tau \geq 0} \left\{2 (1 + \tau) ^ {2} \mathbb {1} _ {\tau \geq - 1} - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} (1 + \tau - \mu) ^ {2} \mathbb {1} _ {- \tau + \mu \leq 1} + \frac {2 + t}{2} (1 + \tau + \mu) ^ {2} \mathbb {1} _ {\tau + \mu \geq - 1} \right\} \right\} \\ \geq 2 - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} (1 - \mu) ^ {2} \mathbb {1} _ {\mu \leq 1} + \frac {2 + t}{2} (1 + \mu) ^ {2} \mathbb {1} _ {\mu \geq - 1} \right\} \quad (\text {m i n i m u m a c h i e v e d a t} \tau = 0) \\ = \frac {t ^ {2}}{2}. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = - \frac {t}{2}) \\ \end{array}
$$
Example:  $\Phi(t) = \Phi_{\mathrm{sq}}(t) = (1 - t)^2$ . For  $n = 2$ , plugging in  $\Phi(t) = (1 - t)^2$  in Theorem 11, gives
$$
\begin{array}{l} \mathfrak{T}^{\mathrm{comp}} = 1 - \inf_{\mu \in \mathbb{R}}\left\{\frac{1 - t}{2}\bigl(1 - \mu \bigr)^{2} + \frac{1 + t}{2}\bigl(1 + \mu \bigr)^{2}\right\} \\ = t ^ {2}. \quad (\text {m i n i m u m a c h i e v e d a t} \mu = - t) \\ \end{array}
$$
For  $n > 2$ , plugging in  $\Phi(t) = (1 - t)^2$  in Theorem 11 yields
$$
\begin{array}{l} \mathfrak {T} ^ {\operatorname {c o m p}} \geq \inf  _ {\tau \geq 0} \left\{2 (1 + \tau) ^ {2} - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} (1 + \tau - \mu) ^ {2} + \frac {2 + t}{2} (1 + \tau + \mu) ^ {2} \right\} \right\} \\ \geq 2 - \inf  _ {\mu \in \mathbb {R}} \left\{\frac {2 - t}{2} (1 - \mu) ^ {2} + \frac {2 + t}{2} (1 + \mu) ^ {2} \right\} \quad (\text {m i n i m u m a c h i e v e d a t} \tau = 0) \\ = \frac {t ^ {2}}{2}. \quad \left(\text {m i n i m u m a c h i e v e d a t} \mu = - \frac {t}{2}\right) \\ \end{array}
$$
E Extensions of comp-sum losses
E.1 Proof of  $\overline{\mathcal{H}}$ -consistency bounds with  $\overline{\mathbb{J}}^{\mathrm{comp}}$  (Theorem 5)
with  $\overline{\mathfrak{T}}^{\mathrm{comp}}$  the  $\overline{\mathcal{H}}$ -estimation error transformation for comp-sum losses defined for all  $t \in [0,1]$  by  $\overline{\mathfrak{T}}^{\mathrm{comp}}(t) =$
$$
\left\{ \begin{array}{l l} \inf  _ {\tau \in \left[ 0, \frac {1}{2} \right]} \sup  _ {\mu \in \left[ s _ {\min } - \tau , 1 - \tau - s _ {\min } \right]} \left\{\frac {1 + t}{2} \big [ \Phi (\tau) - \Phi (1 - \tau - \mu) \big ] + \frac {1 - t}{2} \big [ \Phi (1 - \tau) - \Phi (\tau + \mu) \big ] \right\} & n = 2 \\ \inf  _ {P \in \left[ \frac {1}{n - 1} \vee t, 1 \right]} \inf  _ {S _ {\min } \leq \tau_ {2} \leq \tau_ {1} \leq S _ {\max }} \sup  _ {\mu \in C} \Big \{\frac {P + t}{2} \big [ \Phi (\tau_ {2}) - \Phi (\tau_ {1} - \mu) \big ] + \frac {P - t}{2} \big [ \Phi (\tau_ {1}) - \Phi (\tau_ {2} + \mu) \big ] \Big \} & n > 2, \end{array} \right.
$$
where  $C = \left[\max \{s_{\min} - \tau_2, \tau_1 - s_{\max}\}, \min \{s_{\max} - \tau_2, \tau_1 - s_{\min}\}\right]$ ,  $s_{\max} = \frac{1}{1 + (n-1)e^{-2\inf_x\Lambda(x)}}$  and  $s_{\min} = \frac{1}{1 + (n-1)e^{2\inf_x\Lambda(x)}}$ . Furthermore, for any  $t \in [0,1]$ , there exist a distribution  $\mathcal{D}$  and  $h \in \mathcal{H}$  such that  $\mathcal{R}_{\ell_{0-1}}(h) - \mathcal{R}_{\ell_{0-1}}^*(\mathcal{H}) + \mathcal{M}_{\ell_{0-1}}(\mathcal{H}) = t$  and  $\mathcal{R}_{\ell^{\mathrm{comp}}}^*(h) - \mathcal{R}_{\ell^{\mathrm{comp}}}^*(\mathcal{H}) + \mathcal{M}_{\ell^{\mathrm{comp}}}(\mathcal{H}) = \mathcal{T}^{\mathrm{comp}}(t)$ .
$$
\begin{array}{l} \mathcal {C} _ {\ell \text {c o m p}} (h, x) \\ = \sum_ {y \in \mathcal {Y}} p (x, y) \ell^ {\operatorname {c o m p}} (h, x, y) \\ = \sum_ {y \in \mathcal {Y}} p (x, y) \Phi \left(\frac {e ^ {h (x , y)}}{\sum_ {y ^ {\prime} \in \mathcal {Y}} e ^ {h (x , y ^ {\prime})}}\right) \\ = \sum_ {y \in \mathcal {Y}} p (x, y) \Phi \left(S _ {h} (x, y)\right) \\ = p (x, y _ {\max }) \Phi \left(S _ {h} (x, y _ {\max })\right) + p (x, \mathsf {h} (x)) \Phi \left(S _ {h} (x, \mathsf {h} (x))\right) + \sum_ {y \notin \{y _ {\max }, \mathsf {h} (x) \}} p (x, y) \Phi \left(S _ {h} (x, y)\right) \\ \end{array}
$$
where we let  $S_{h}(x,y) = \frac{e^{h(x,y)}}{\sum_{y^{\prime}\in\mathcal{Y}}e^{h(x,y^{\prime})}}$  for any  $y\in \mathcal{V}$  with the constraint that  $\sum_{y\in \mathcal{V}}S_h(x,y) = 1$ . Note that for any  $h\in \mathcal{H}$ ,
$$
\frac {1}{1 + (n - 1) e ^ {2 \Lambda (x)}} = \frac {e ^ {- \Lambda (x)}}{e ^ {- \Lambda (x)} + (n - 1) e ^ {\Lambda (x)}} \leq S _ {h} (x, y) \leq \frac {e ^ {\Lambda (x)}}{e ^ {\Lambda (x)} + (n - 1) e ^ {- \Lambda (x)}} = \frac {1}{1 + (n - 1) e ^ {- 2 \Lambda (x)}}
$$
Therefore for any  $(x,y)\in \mathcal{X}\times \mathcal{Y}$ ,  $S_{h}(x,y)\in [S_{\min},S_{\max}]$ , where we let  $S_{\mathrm{max}} = \frac{1}{1 + (n - 1)e^{-2\Lambda(x)}}$  and  $S_{\mathrm{min}} = \frac{1}{1 + (n - 1)e^{2\Lambda(x)}}$ . Furthermore, all values in  $[S_{\min},S_{\max}]$  of  $S_{h}$  can be reached for some  $h\in \mathcal{H}$ .
Observe that  $0 \leq S_{\max} + S_{\min} \leq 1$ . Let  $y_{\max} = \operatorname{argmax}_{y \in \mathcal{Y}} p(x, y)$ , where we choose the label with the highest index under the natural ordering of labels as the tie-breaking strategy. For any  $h \in \mathcal{H}$  such that  $h(x) \neq y_{\max}$  and  $x \in \mathcal{X}$ , we can always find a family of hypotheses  $\{h_\mu\} \subset \mathcal{H}$  such that  $S_{h,\mu}(x, \cdot) = \frac{e^{h_\mu(x, \cdot)}}{\sum_{y' \in \mathcal{Y}} e^{h_\mu(x, y')} }$  take the following values:
Since  $S_{h,\mu}(x,y)\in [S_{\min},S_{\max}]$ , we have the following constraints on  $\mu$
$$
S _ {\min } - S _ {h} (x, y _ {\max }) \leq \mu \leq S _ {\max } - S _ {h} (x, y _ {\max })
$$
$$
\begin{array}{l} \min  _ {h} h (x, h (x)) - f = \max  _ {h} h (x, h (x)) \\ S _ {h} (x, h (x)) - S _ {\max } \leq \mu \leq S _ {h} (x, h (x)) - S _ {\min }. \end{array} \tag {7}
$$
Let  $p_1 = p(x, y_{\max})$ ,  $p_2 = p(x, \mathsf{h}(x))$ ,  $\tau_1 = S_h(x, \mathsf{h}(x))$  and  $\tau_2 = S_h(x, y_{\max})$  to simplify the notation. Let  $\overline{C} = \{\mu \in \mathbb{R} : \mu \text{ verify constraint (7)}\}$ . Since  $S_h(x, \mathsf{h}(x)) - S_{\max} \leq S_{\max} - S_h(x, y_{\max})$  and  $S_{\min} - S_h(x, y_{\max}) \leq S_h(x, \mathsf{h}(x)) - S_{\min}$ ,  $\overline{C}$  is not an empty set and can be expressed as  $\overline{C} = [\max \{S_{\min} - \tau_2, \tau_1 - S_{\max}\}, \min \{S_{\max} - \tau_2, \tau_1 - S_{\min}\}]$ .
Then, by the definition of  $S_{h,\mu}$ , we have for any  $h \in \mathcal{H}$  and  $x \in \mathcal{X}$ ,
$$
\begin{array}{l} \mathcal{C}_{\ell^{\mathrm{comp}}}(h,x) - \inf_{\mu \in \overline{C}}\mathcal{C}_{\ell^{\mathrm{comp}}}(h_{\mu},x) \\ = \sup  _ {\mu \in \overline {{C}}} \left\{p _ {1} \left[ \Phi (\tau_ {2}) - \Phi (\tau_ {1} - \mu) \right] + p _ {2} \left[ \Phi (\tau_ {1}) - \Phi (\tau_ {2} + \mu) \right] \right\} \\ = \sup  _ {\mu \in \overline {{C}}} \left\{\frac {P + p _ {1} - p _ {2}}{2} \left[ \Phi (\tau_ {2}) - \Phi (\tau_ {1} - \mu) \right] + \frac {P - p _ {1} + p _ {2}}{2} \left[ \Phi (\tau_ {1}) - \Phi (\tau_ {2} + \mu) \right] \right\} \\ (P = p _ {1} + p _ {2} \in \left[ \frac {1}{n - 1} \vee p _ {1} - p _ {2}, 1 \right]) \\ \geq \inf  _ {P \in \left[ \frac {1}{n - 1} \vee p _ {1} - p _ {2}, 1 \right]} \inf  _ {S _ {\min } \leq \tau_ {2} \leq \tau_ {1} \leq S _ {\max } \atop \tau_ {1} + \tau_ {2} \leq 1}} \sup  _ {\mu \in \overline {{C}}} \left\{\frac {P + p _ {1} - p _ {2}}{2} \left[ \Phi (\tau_ {2}) - \Phi (\tau_ {1} - \mu) \right] \right. \\ \left. + \frac {P - p _ {1} + p _ {2}}{2} \big [ \Phi \big (\tau_ {1} \big) - \Phi \big (\tau_ {2} + \mu \big) \big ] \right\} \qquad (S _ {\min} \leq \tau_ {2} \leq \tau_ {1} \leq S _ {\max}, \tau_ {1} + \tau_ {2} \leq 1) \\ \geq \inf  _ {P \in \left[ \frac {1}{n - 1} \vee p _ {1} - p _ {2}, 1 \right]} \inf  _ {S _ {\min } \leq \tau_ {2} \leq \tau_ {1} \leq S _ {\max } \atop \tau_ {1} + \tau_ {2} \leq 1}} \sup  _ {\mu \in C} \left\{\frac {P + p _ {1} - p _ {2}}{2} \left[ \Phi (\tau_ {2}) - \Phi (\tau_ {1} - \mu) \right] \right. \\ \left. + \frac {P - p _ {1} + p _ {2}}{2} \left[ \Phi \left(\tau_ {1}\right) - \Phi \left(\tau_ {2} + \mu\right) \right] \right\} \quad (S _ {\min } \leq s _ {\min } \leq s _ {\max } \leq S _ {\max }) \\ = \mathfrak {T} ^ {\operatorname {c o m p}} \left(p _ {1} - p _ {2}\right) \\ = \mathcal {T} ^ {\operatorname {c o m p}} \left(\Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x)\right), \quad (\text {b y}) \\ \end{array}
$$
where  $C = \left[\max \{s_{\min} - \tau_2, \tau_1 - s_{\max}\}, \min \{s_{\max} - \tau_2, \tau_1 - s_{\min}\}\right] \subset \overline{C}$ ,  $s_{\max} = \frac{1}{1 + (n - 1)e^{-2\inf_x\Lambda(x)}}$  and  $s_{\min} = \frac{1}{1 + (n - 1)e^{2\inf_x\Lambda(x)}}$ . Note that for  $n = 2$ , an additional constraint  $\tau_1 + \tau_2 = 1$  is imposed and the expression can be simplified as
$$
\begin{array}{l} \mathcal{C}_{\ell^{\mathrm{comp}}}(h,x) - \inf_{\mu \in \overline{C}}\mathcal{C}_{\ell^{\mathrm{comp}}}(h_{\mu},x) \\ \geq \inf  _ {\tau \in \left[ 0, \frac {1}{2} \right]} \sup  _ {\mu \in \left[ s _ {\min } - \tau , 1 - \tau - s _ {\min } \right]} \left\{\frac {1 + p _ {1} - p _ {2}}{2} \left[ \Phi (\tau) - \Phi (1 - \tau - \mu) \right] + \frac {1 - p _ {1} + p _ {2}}{2} \left[ \Phi (1 - \tau) - \Phi (\tau + \mu) \right] \right\} \\ = \mathfrak {T} ^ {\operatorname {c o m p}} \left(p _ {1} - p _ {2}\right) \\ = \mathcal {T} ^ {\operatorname {c o m p}} \left(\Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x)\right), \tag {by Lemma 1} \\ \end{array}
$$
where we use the fact that  $s_{\max} + s_{\min} = 1$  and  $P = 1$  when  $n = 2$ . Since  $\mathfrak{T}^{\mathrm{comp}}$  is convex, by Jensen's inequality, we obtain for any hypothesis  $h \in \mathcal{H}$  and any distribution,
$$
\begin{array}{l} \mathfrak {T} ^ {\text {c o m p}} \left(\mathcal {R} _ {\ell_ {0 - 1}} (h) - \mathcal {R} _ {\ell_ {0 - 1}} ^ {*} (\mathcal {H}) + \mathcal {M} _ {\ell_ {0 - 1}} (\mathcal {H})\right) \\ = \mathcal {T} ^ {\operatorname {c o m p}} \left(\underset {X} {\mathbb {E}} \left[ \Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x) \right]\right) \\ \leq \mathbb {E} _ {X} \left[ \mathcal {T} ^ {\operatorname {c o m p}} \left(\Delta \mathcal {C} _ {\ell_ {0 - 1}, \mathcal {H}} (h, x)\right) \right] \\ \leq \mathbb {E} _ {X} \left[ \Delta \mathcal {C} _ {\ell \text {c o m p}, \mathcal {H}} (h, x) \right] \\ = \mathcal {R} _ {\ell \operatorname {c o m p}} (h) - \mathcal {R} _ {\ell \operatorname {c o m p}} ^ {*} (\mathcal {H}) + \mathcal {M} _ {\ell \operatorname {c o m p}} (\mathcal {H}). \\ \end{array}
$$