SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Proof Sketch. The upper bound of Theorem 4 works for any loss function. Recall the proof idea; in every round  $t$  there is some  $\widehat{y}_t \in \mathcal{V}$  the learner can predict such that no matter what the adversary picks as the true label  $y_t^\star$ , the online dimension of the version space at round  $t$ , i.e.,  $V = \{h \in \mathcal{H} : h(x_\tau) = y_\tau^\star, 1 \leq \tau \leq t\}$ , decreases by  $\ell(y_t^\star, \widehat{y}_t)$ , minus some shrinking number  $\epsilon_t$  that we can choose as a parameter. Therefore we get that the sum of losses is bounded by the online dimension and the sum of  $\epsilon_t$  that we can choose to be arbitrarily small.
The lower bound for online learning in Theorem 4 would be  $\mathbb{D}^{\mathrm{onl}}(\mathcal{H}) / (2c) - \varepsilon$ , for any  $\epsilon > 0$ , since the adversary can force a loss of  $\gamma_{\mathbf{y} \leq t} / (2c)$  in every round  $t$ , where  $\gamma_{\mathbf{y} \leq t}$  is the sum of the gaps across the path  $\mathbf{y}$ .