SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Proof of Theorem E.15. First, we will assume without loss of generality that, for every group  $S \in S$ ,  $\operatorname{Pr}_D(x \in S) \geq \varepsilon^2 / 32$ . This is because for such  $S$ , our multicalibration constraint is trivially satisfied for tolerances of at least  $\varepsilon / \sqrt{32}$ . We can remove such  $S$  from our group set  $\mathcal{S}$  by testing if  $\operatorname{Pr}_D(x \in S) \leq \varepsilon^2 / 32$ ;  $O\left(\frac{\ln(|S| / \delta)}{\varepsilon^4}\right)$  samples suffices.
Next, we will sample  $v$  according to Lemma E.17, which also takes at most  $O\left(\frac{\ln(|S| / \delta)}{\varepsilon^4}\right)$  samples. Lemma E.18 then guarantees that, since  $T \geq C \ln (k) / \varepsilon^2$ ,  $\operatorname{Reg}_{\text{weak}}(h^{(1:T)}, \{\mathcal{L}_{D,\ell^{(t)}}(\cdot)\}^{(1:T)}) \leq T\varepsilon / 8$ . By Lemma E.19,  $\ell^{(t)}$  is an  $(\varepsilon / 8)$  best-response to the cost function  $-\mathcal{L}_{D,(\cdot)}(h^{(t)})$  with probability at least  $1 - \delta / T$  at each timestep  $t$ . By Lemma 3.4, since the learner has at most  $T\varepsilon / 8$  weak regret and the adversary is  $\varepsilon / 8$  best-responding, there is a timestep  $t \in [T]$  where  $h^{(t)}$  is  $(\varepsilon / 4)$ -optimal for the problem  $(\{D\}, \mathcal{G}_{\mathrm{mc}}', \mathcal{P})$ . By Lemma 3.5, the  $h^{(t)}$  found by the algorithm is  $(\varepsilon / 2)$ -optimal with probability at least  $1 - \delta$ . By Fact E.16, this is an  $(S, \varepsilon, \lambda)$ -multicalibrated predictor.
F Other Fairness Notions
This general framework of approaching multi-objective learning problems with game dynamics can be extended beyond multicalibration. In this section, we use multi-objective learning to derive new guarantees for multi-distribution learning and multi-group learning.
Algorithm 8 Conditional Multicalibration Algorithm (Theorem E.15)
1: Input:  $S \subseteq 2^{\mathcal{X}}, \varepsilon \in (0,1), k,\lambda,T,C \in \mathbb{Z}_{+}$ , and distribution  $D$ ;  
2: Initialize Prod iterate  $h^{(1)} = [1 / k,\dots ,1 / k]^{\mathcal{X}}$ ;  
3: Sample  $C\ln (\mathcal{S} / \delta) / \varepsilon^4$  datapoints  $X$  from  $D$  and, for each  $S \in S$ , remove  $S$  from  $\mathcal{S}$  if  $\frac{1}{|X|}\sum_{(x,y)\in X}1[x \in S] \leq \varepsilon^2 /32$ ;  
4: Sample  $C\ln (\mathcal{S} / \delta) / \varepsilon^4$  datapoints  $X$  from  $D$ , and let  $v_{S} = \frac{1}{|X|}\sum_{(x,y) \in X}1[x \in S]$  for all  $S \in S$ ;  
5: for  $t = 1$  to  $T$  do  
6: Draw  $N = C\varepsilon^{-2}(\ln (|\mathcal{S}|T / \delta) + k\ln (\lambda))$  samples  $(x,y)_t^{(1:N)}$  from  $D$ ;  
7: For all  $S \in S$ , let  $X_{t,S} = \{(x,y)_t^i \mid i \in [N], x_i \in S\}$ ;  
8: Let  $c_{\mathrm{adv}}^{(t)}(S,\ell) := \sqrt{v_S} |X_{t,S}|^{-1}\sum_{(x,y) \in X_{t,S}}\ell(h^{(t)},(x,y))$ ;  
9: Let  $\ell^{(t)} = \arg \max_{\ell \in \mathcal{G}_{\mathrm{mc}}'} c_{\mathrm{adv}}^{(t)}(S,\ell)$ ;  
10: If  $c_{\mathrm{adv}}^{(t)}(S^{(t)},\ell^{(t)}) \leq \varepsilon /8$  terminate and return  $h^{(t)}$ ;  
11: Let  $h^{(t + 1)}(x) = \operatorname{Prod}(c_x^{(1:t)})$  where  
 $c_x^{(t)}(\widehat{y}) := \frac{1[x \in S^{(t)}}{2\sqrt{v_{S^{(t)}}}} (1 + 1[h(x) \in v^{(t)}, x \in S^{(t)}] \cdot i^{(t)} \cdot \widehat{y}_{j^{(t)}})$ ;  
12: end for  
13: Return  $p^*$ , a uniform distribution over  $h^{(1)},\ldots,h^{(T)}$ ;
Competing in multi-distribution learning. Usually, in agnostic multi-objective learning problems, the trade-off between objectives is arbitrated by the worst-off objectives  $\max_{D^{*}\in \mathcal{D},\ell^{*}\in \mathcal{G}}\mathcal{L}_{D^{*},\ell^{*}}(\cdot)$ . However, this approach to negotiating trade-offs may be suboptimal when some objectives are inherently more difficult. In those cases, we can take into account the difficulty of individual objectives by asking for a predictor where there is no objective for which a competitor  $h\in \mathcal{H}^*$  performs significantly better.
Definition F.1. For a multi-objective learning problem  $(\mathcal{D},\mathcal{G},\mathcal{H})$ , a solution that is  $\varepsilon$ -competitive with respect to a class  $\mathcal{H}'$  is a hypothesis  $p\in \Delta (\mathcal{H})$  satisfying,
$$
\mathcal {L} _ {\mathcal {H} ^ {\prime}} ^ {*} (p) - \min  _ {h ^ {*} \in \mathcal {H}} \mathcal {L} _ {\mathcal {H} ^ {\prime}} ^ {*} (h ^ {*}) \leq \varepsilon \text {w h e r e} \mathcal {L} _ {\mathcal {H} ^ {\prime}} ^ {*} (h) := \max  _ {D \in \mathcal {D}} \max  _ {\ell \in \mathcal {G}} (\mathcal {L} _ {D, \ell} (h) - \min  _ {h ^ {*} \in \mathcal {H} ^ {\prime}} \mathcal {L} _ {D, \ell} (h)).
$$
Only a simple modification is needed to provide  $\varepsilon$ -competitive guarantees: amplify your original objectives  $\mathcal{G}$  into a new objective set  $\mathcal{G}' := \left\{\frac{1}{2}(1 + \ell(\cdot) - \ell(h')) \mid \ell \in \mathcal{G}, h' \in \mathcal{H}'\right\}$  and solve as usual. The following fact, which holds by definition, formalizes this reduction.
Fact F.2. Consider a multi-objective learning problem  $(\mathcal{D},\mathcal{G},\mathcal{H})$ . For some choice of  $\mathcal{H}'$ , let  $\mathcal{G}' := \{0.5 + 0.5(\ell(\cdot) - \ell(h')) \mid \ell \in \mathcal{G}, h' \in \mathcal{H}'\}$ . Any solution  $p$  that is  $\varepsilon$ -optimal for the multi-objective learning problem  $(\mathcal{D},\mathcal{G}',\mathcal{H})$ , is also  $2\varepsilon$ -competitive (Definition F.1) w.r.t.  $\mathcal{H}'$  for the original problem  $(\mathcal{D},\mathcal{G},\mathcal{H})$ .
[19] showed that the sample complexity of finding an  $\varepsilon$ -optimal solution to a multi-objective learning problem  $(\mathcal{D},\mathcal{G},\mathcal{H})$  is  $O(\varepsilon^{-2}(\ln (|\mathcal{H}|) + |\mathcal{D}|\ln (|\mathcal{D}||\mathcal{G}| / \delta)))$ . Thus, Fact F.2 immediately implies Theorem 5.1, our sample complexity bound for finding an  $\varepsilon$ -competitive solution.
Algorithm 9 Multi-Group Learning Algorithm (Theorem 5.3)
1: Input:  $S \subseteq 2^{\mathcal{X}}, \varepsilon \in (0,1), \ell : \mathcal{Y} \times \mathcal{Y} \to [0,1]$ , hypothesis class  $\mathcal{H} : \mathcal{X} \to \mathcal{Y}$ , and distribution  $D$ ;
2: Initialize Hedge iterate  $q^{(1)} = \mathrm{Uniform}(\mathcal{S}\times \mathcal{H})$  and  $p^{(1)} = \mathrm{Uniform}(\mathcal{H})$ ;
3: for  $t = 1$  to  $T$  do
4: Sample  $(x_{q}^{(t)},y_{q}^{(t)})\sim D$  and  $(x_p^{(t)},y_p^{(t)})\sim D$
5: Let  $q^{(t + 1)} \coloneqq \mathrm{Hedge}(c_q^{(1:t)})$  and  $p^{(t + 1)} \coloneqq \mathrm{Hedge}(c_p^{(1:t)})$  where
$$
c _ {q} ^ {(t)} (S, h) := \frac {1}{2} + \frac {1}{2} \underset {h ^ {\prime} \sim p ^ {(t)}} {\mathbb {E}} \left[ 1 \left[ x _ {q} ^ {(t)} \in S \right] \left(\ell \left(h, \left(x _ {q} ^ {(t)}, y _ {q} ^ {(t)}\right)\right) - \ell \left(h ^ {\prime}, \left(x _ {q} ^ {(t)}, y _ {q} ^ {(t)}\right)\right)\right) \right]
$$
$$
c _ {p} ^ {(t)} (h) := \frac {1}{2} + \frac {1}{2} \underset {S, h ^ {\prime} \sim q ^ {(t)}} {\mathbb {E}} \left[ 1 \left[ x _ {p} ^ {(t)} \in S \right] \left(\ell \left(h, \left(x _ {p} ^ {(t)}, y _ {p} ^ {(t)}\right)\right) - \ell \left(h ^ {\prime}, \left(x _ {p} ^ {(t)}, y _ {p} ^ {(t)}\right)\right)\right) \right];
$$
6: end for
7: Return:  $p^*$ , a uniform distribution over  $p^{(1)},\ldots ,p^{(T)}$
Multi-group learning. Consider the multi-group learning problem (Definition 5.2) where, rather than seeking simultaneously calibrated estimates of different subsets of the domain as in multicalibration, we seek to simultaneously minimize a general loss function on different subsets of the domain [37].
A (near) optimal sample complexity for multi-group learning of  $O\left(\ln (|\mathcal{S}| |\mathcal{H}|) / \varepsilon^2\right)$  was attained by [39] using a reduction to sleeping experts. [39] also asked whether there exists a simpler optimal algorithm that does not rely on sleeping experts. We answer this affirmatively by designing an optimal algorithm that just runs two Hedge algorithms.
We can equate the multi-group learning problem (Definition 5.2) to finding an  $\varepsilon$ -competitive solution in a single-distribution multi-objective learning problem.
Fact F.3. Fix  $\varepsilon > 0$ , a set of groups  $\mathcal{S} \subseteq 2^{\mathcal{X}}$ , a hypothesis class  $\mathcal{H}$ , data distribution  $D$ , and a loss  $\ell: \mathcal{H} \times (\mathcal{X} \times \mathcal{Y}) \to [0,1]$ . We define  $\ell_S(h,(x,y)) \coloneqq \ell(h,(x,y)) \cdot 1[x \in S]$ . If a hypothesis  $p \in \Delta(\mathcal{H})$  is  $\varepsilon$ -competitive with respect to the class  $\mathcal{H}$  for the single-distribution multi-objective learning problem  $(\{D\}, \{\ell_S\}_{S \in \mathcal{S}}, \mathcal{H})$ , then  $p$  is also an  $\varepsilon$ -optimal solution to the multi-group learning problem  $(\mathcal{S}, \mathcal{H})$ .
The following—a formalization of Theorem 5.3—is a direct consequence of running no-regret no-regret dynamics, as in Lemma 3.3.
Theorem F.4 (Multi-group learning). Fix a set of groups  $\mathcal{S} \subseteq 2^{\mathcal{X}}$ , loss  $\ell : \mathcal{Y} \times \mathcal{Y} \to [0,1]$ , hypothesis class  $\mathcal{H} : \mathcal{X} \to \mathcal{Y}$ , and distribution  $D$ ; for some universal constant  $C$  and  $T = C\ln(|\mathcal{S}||\mathcal{H}|)/\varepsilon^2$ , Algorithm 9 takes  $2T = O\left(\ln(|\mathcal{S}||\mathcal{H}|)/\varepsilon^2\right)$  samples from  $D$  and returns an  $\varepsilon$ -optimal solution to the multi-group learning problem  $(\mathcal{S},\mathcal{H})$ .
G Empirical Results
G.1 Experiment Setup
We conduct three sets of experiments to evaluate different batch multicalibration algorithms. The three sets of experiments we conduct correspond to three datasets: the UCI Adult Income dataset [26], a real-world dataset for predicting individuals' incomes based on the US Census, the UCI Bank Marketing dataset [32], a dataset for predicting whether an individual will subscribe to a bank's term deposit, and the Dry Bean Dataset [27], a dataset for predicting a dry bean's variety.
In every experiment, the performance of a multicalibration algorithm is measured based on the multicalibration violations of the average iterate and last iterate, where multicalibration violations are as defined in Definition 2.1. In every experiment, we empirically evaluate six multicalibration algorithms. Four algorithms are based on no-regret best-response dynamics, using an empirical risk minimizer as the adversary and implementing either Hedge [14] (Hedge-ERM), Prod [28] (Prod-ERM), Optimistic Hedge [36] (OptHedge-ERM), or Gradient Descent (GD-ERM) as the learner. Two algorithms are based on no-regret no-regret dynamics, using either Hedge (Hedge-Hedge) or Optimistic Hedge (OptHedge-OptHedge) as both the learner and adversary. We also note
that the most commonly used multicalibration algorithms are included in these comparisons. The original multicalibration algorithm of [21] is equivalent to GD-ERM. The revised, boosting-inspired, multicalibration algorithm of [25, 7] is equivalent to Hedge-ERM.
G.2 Results
The results of these experiments are summarized in Table 3, which reports the multicalibration errors of each algorithm's final iterate and average iterate. In Appendix G, Figure 1 plots the evolution of training and testing multicalibration errors over the duration of the training process. We identify two key trends that are statistically significant and hold consistently in all three experiments.
UCI Adult	Error Measures
Train Error (Det)	Test Error (Det)	Test Error (Non-Det)
Hedge-Hedge (NRNR)	2.0e-2 ± 2.0e-3	3.0e-2 ± 3.0e-3	2.3e-4 ± 2.7e-5
OptHedge-OptHedge (NRNR)	7.0e-3 ± 0.0	2.7e-2 ± 3.0e-3	2.6e-4 ± 2.8e-5
OptHedge-ERM (NRBR)	0.0 ±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ations on UCI Adult Dataset (20 seeds), UCI Bank Marketing Dataset (5 seeds), and the Dry Bean Dataset (5 seeds). Train Error (Det) and Test Error (Det) evaluate the last iterate (deterministic predictor) on training and test splits; Test Error (Non-Det) measures the average iterate (non-deterministic predictor) on the test split.
Figure 1 plots the evolution of training and testing multicalibration errors over the duration of the training process. These plots confirm that the relative performance of different multicalibration algorithms is fairly monotonic and regular, even across the duration of training and the learning rate schedule.
The last iterates of no-regret no-regret dynamics are surprisingly multicalibrated. On all datasets, the algorithms based on no-regret no-regret dynamics, namely Hedge-Hedge and OptHedge-OptHedge, consistently yield not only among the most multicalibrated randomized predictors (with their average iterate) but also the most multicalibrated deterministic predictors (with their last iterate). This is surprising because the last iterate of these algorithms is not guaranteed to be multicalibrated, and only enjoys a theoretical advantage over no-regret best-response algorithms in terms of average iterate guarantees. As corroborated by Figure 1, this trend does not appear to be an artifact of early stopping or learning rates, but may rather indicate that their more stable adversary updates provide regularization to these algorithms.
Multicalibration Errors On Bank Market Dataset
Multicalibration Errors On Adult Income Dataset
Multicalibration Errors On Dry Beans Dataset
Figure 1: These plots depict the multicalibration violations (Definition 2.1) of various multicalibration algorithms on the UCI Adult Income dataset (top left), Bank Market dataset (top right), and Dry Bean dataset (bottom). The lines plot how much the current iterate violates the multicalibration condition on the training data (top plot) and testing data (bottom plot), with error bars denoting standard error. The iterates of the OptHedge-OptHedge algorithm, which implements no-regret vs no-regret dynamics using the Optimistic Hedge algorithm, are the most multicalibrated predictors.
One's choice of no-regret algorithm matters. On all datasets, we see that the best multicalibration results are consistently achieved by algorithms that instantiate the Optimistic Hedge no-regret algorithm. This is consistent with the theoretical results of [36], which show that Optimistic Hedge converges faster than a standard Hedge in games. We also see that the original multicalibration algorithm of [21], based on gradient descent, consistently attains the worst multicalibration errors, both in terms of average-iterate and last-iterate. This is consistent with gradient descent being a theoretically less effective no-regret algorithm, as it is unstable near the boundaries of a probability simplex.
Due to the superficial similarity between boosting and multicalibration, the field has already begun adopting multicalibration algorithms with Hedge's multiplicative updates rather than gradient descent's additive ones, as suggested by [25]. Our findings offer the first theoretical and empirical endorsement of this shift. Moreover, our results suggest that practitioners should further explore the use of Optimistic Hedge-based algorithms and algorithms based on no-regret no-regret dynamics—even when one is only interested in deterministic predictors.
G.3 Experiment Details
The source code for these experiments is included in the repository https://github.com/ericzhao28/multicalibration. Model checkpoints for replicating our results can be found at https://drive.google.com/drive/folders/1CVusrPZkB-15_55VVkoU3KrLXQGZzne4?usp=sharing. All experiments were performed on a 2021 MacBook Pro, with a M1 Pro chip. The total compute time for replicating the experiments in this section, including hyperparameter tuning, is approximately 20 hours.
UCI Adult Income Dataset. The UCI Adult Income dataset [26] is a dataset for predicting individuals' incomes based on the US Census. Our experiments use the dataset's binary 'income' attribute as the target label and form 129 protected groups using eight of the dataset's labeled attributes: 'age', 'workclass', 'education', 'marital-status', 'occupation', 'relationship', 'race', and 'sex'. We perform random 80-20 train/test splits of the dataset, resulting in approximately 24000 training samples, 6000 test samples, and 130 groups. We discretize the label space into 0.1-width bins  $(\lambda = 10)$ . Experiments are repeated for 20 seeds, with multicalibration algorithms running for 50 iterations.
UCI Bank Market Dataset. The UCI Bank Marketing dataset [32] is a dataset for predicting individuals' subscriptions to a term deposit at a bank. Our experiments use the dataset's binary 'y' attribute as the target label and form 129 protected groups using eight of the dataset's labeled attributes: 'age', 'job', 'marital', 'education', 'default', 'housing', 'loan', and 'contact'. We round ages to the nearest age divisible by 5 since 'age' is a continuous attribute. We perform random 80-20 train/test splits of the dataset, resulting in approximately 36000 training samples, 9000 test samples, and 180 groups. We discretize the label space into 0.1-width bins ( $\lambda = 10$ ). Experiments are repeated for 5 seeds, with multicalibration algorithms running for 50 iterations.
Dry Bean Dataset. The Dry Bean Dataset [27] is a dataset for predicting a dry bean's variety using its physical attributes. Our experiments use the dataset's bean 'type' attribute (which takes 7 possible values) as the target label and form 80 protected groups using eight of the dataset's labeled attributes: 'perimeter', 'major-axis-length', 'minor-axis-length', 'aspect-ratio', 'eccentricity', 'convex-area', and 'equivalent-diameter'. We discretize all numerical/continuously-valued attributes by evenly dividing the range of possible values into 10 segments. We perform random 80-20 train/test splits of the dataset, resulting in approximately 11000 training samples, 2700 test samples, and 80 groups. We discretize the label space into 0.25-width bins  $(\lambda = 4)$ . Experiments are repeated for 5 seeds, with multicalibration algorithms run for 100 iterations.
Hyperparameter tuning. In each experiment, the learning rates of the algorithms are tuned on the training set using 10 seeds (Adult Income dataset), 5 seeds (Bank Market dataset), and 5 seeds (Dry Bean dataset). We sweep over the learning rate decay rates of  $\eta \in [0.8, 0.85, 0.9, 0.95]$  for the learner and (if applicable)  $\eta \in [0.9, 0.95, 0.98, 0.99]$  for the adversary, where the learning rate of the learner at the  $t$ th iteration is  $\eta^t$  and the adversary is  $100 \cdot \eta^t$ . In the Dry Bean dataset, learning rates are universally doubled to  $2\eta^t$  and the adversary is  $200 \cdot \eta^t$ . The selected learning rate decays are summarized below.
Dataset	Hedge-Hedge	OptHedge-OptHedge	OptHedge-ERM	Hedge-ERM	Prod-ERM	GD-ERM
Adult Income	η = (0.95, 0.9)	η = (0.95, 0.9)	η = 0.9	η = 0.9	η = 0.9	η = 0.9
Bank Marketing	η = (0.95, 0.95)	η = (0.95, 0.95)	η = 0.95	η = 0.95	η = 0.95	η = 0.85
Dry Bean	η = (0.99, 0.98)	η = (0.95, 0.99)	η = 0.95	η = 0.95	η = 0.95	η = 0.95