SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} \frac{6}{\Delta}\sqrt{t\log(2t / \alpha)}\bigg|_{t = n + \beta}\leq \frac{6}{\Delta}\sqrt{(n + \beta)\log(2n / \alpha + 2\beta / \alpha)} \\ \leq \frac {6}{\Delta} \sqrt {2 \beta \log (4 \beta / \alpha)} \\ = \frac {7 2}{\Delta^ {2}} \sqrt {\log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha}\right) \log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha} \log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha}\right)\right)} \\ = \frac {7 2}{\Delta^ {2}} \sqrt {\log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha}\right) \log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha}\right) + \log \log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha}\right)} \\ \leq \frac {1 0 8}{\Delta^ {2}} \log \left(\frac {4 \cdot 1 0 8}{\Delta^ {2} \alpha}\right) = \beta , \\ \end{array}
$$
where the final inequality uses the (loose) bound  $\log \log (x)\leq \log^2 (x)$
C.4 Proof of Proposition 4
First let us note that  $(\mathcal{K}_t^Q)$  are indeed nonnegative supermartingales. Under the null  $H_0'$ , we have  $\mathbb{E}_{H_0'}[\widehat{Y}_t^0 - \widehat{Y}_t^1] \leq \epsilon$ , so
$$
\mathbb {E} _ {H _ {0} ^ {\prime}} \left[ Q _ {t} ^ {R} \mid \mathcal {F} _ {t - 1} \right] = 1 + \lambda_ {t} \left(\mathbb {E} _ {H _ {0} ^ {\prime}} \left[ \widehat {Y} _ {t} ^ {0} - \widehat {Y} _ {t} ^ {1} \right] - \epsilon\right) \leq 1.
$$
Moreover, for  $\lambda_t \in [\frac{-1}{1 - \epsilon}, \frac{1}{1 + \epsilon}]$ ,  $Q_t \geq 0$ . The argument is similar for  $R_t$ . Therefore, by Ville's inequality,
$$
P (\exists t \geq 1: \mathcal {K} _ {t} ^ {Q} \geq 2 / \alpha) \leq \alpha / 2, \text {a n d} P (\exists t \geq 1: \mathcal {K} _ {t} ^ {R} \geq 2 / \alpha) \leq \alpha / 2,
$$
so the union bound gives  $P(\exists t \geq 1: \mathcal{K}_t^Q \geq 2 / \alpha$  or  $\mathcal{K}_t^R \geq 2 / \alpha) \leq \alpha$ . This implies that the proposed test, which involves rejecting if  $\max \{\mathcal{K}_t^Q, \mathcal{K}_t^R\} \geq 2 / \alpha$  is a level- $\alpha$  sequential test.
Now, note that ONS restricts  $\lambda_{t}$  to be in  $[-1/2, 1/2]$ , which is a subset of  $\left[\frac{-1}{1 - \epsilon}, \frac{1}{1 + \epsilon}\right]$ . We can therefore use a similar ONS analysis as above, without needing to modify the guarantees to account for the range of  $\lambda$ . Recall from Section C.1 the definitions  $g_{t}$ ,  $S_{t}$ , and  $V_{t}$ . Because  $Q_{t}$  and  $R_{t}$  have an extra  $\epsilon$  term, we need to modify these terms for this new setting. Define
$$
S _ {t} ^ {\prime} = \sum_ {i = 1} ^ {t} (g _ {i} - \epsilon), \quad V _ {t} ^ {\prime} = \sum_ {i = 1} ^ {t} (g _ {i} - \epsilon) ^ {2}.
$$
The guarantee given by (20) translates, in this setting, to
$$
\mathcal {K} _ {t} ^ {Q} \geq \frac {1}{V _ {t} ^ {\prime}} \exp \left\{\frac {(S _ {t} ^ {\prime}) ^ {2}}{4 (V _ {t} ^ {\prime} + | S _ {t} ^ {\prime} |)} \right\},
$$
where we've simply replaced  $S_{t}$  and  $V_{t}$  by  $S_{t}^{\prime}$  and  $V_{t}^{\prime}$ . The same guarantee holds for  $\mathcal{K}_t^Q$  (there  $g_{i}$  is replaced with  $-g_{i}$  but it makes no difference).
Results for asymptotic power (for both  $\mathcal{K}_t^Q$  and  $\mathcal{K}_t^R$ ) follow from similar arguments as in Section C.1 but replacing  $S_{t}$  and  $V_{t}$  with  $S_t^\prime$  and  $V_{t}^{\prime}$ . Therefore, let us turn our attention to expected stopping time. We will consider the expected stopping time of the test based on  $\mathcal{K}_t^Q$ . Since identical arguments hold for  $\mathcal{K}_t^R$ , one need only multiply the result by 2 to get the overall expected stopping time.
Following what was done in previous proofs, write  $\mathbb{E}[\tau] = \sum_{t=1}^{\infty} P(E_t)$ , where  $E_t = \{\log \mathcal{K}_t^Q < \log(1 / \alpha)\}$ . We have
$$
\begin{array}{l} E _ {t} \subset \left\{\left(S _ {t} ^ {\prime}\right) ^ {2} <   4 \left(V _ {t} ^ {\prime} + \left| S _ {t} ^ {\prime} \right|\right) \left(\log \left(1 / \alpha\right) - \log \left(1 / V _ {t} ^ {\prime}\right)\right) \right\} \\ \subset \left\{\left(S _ {t} ^ {\prime}\right) ^ {2} <   4 \left(V _ {t} + t \epsilon^ {2} + \left| S _ {t} \right| + t \epsilon\right) \left(\log (1 / \alpha) - \log \left(1 / V _ {t} ^ {\prime}\right)\right) \right\} \\ \subset \left\{\left(S _ {t} ^ {\prime}\right) ^ {2} <   4 \left(V _ {t} + t \epsilon^ {2} + \sum_ {i \leq t} \left| g _ {i} \right| + t \epsilon\right) \left(\log (1 / \alpha) - \log \left(1 / V _ {t} ^ {\prime}\right)\right) \right\}. \\ \end{array}
$$
Here we've used that  $V_{t}^{\prime} \leq V_{t} + t\epsilon^{2}$  and  $|S_t^{\prime}| \leq |S_t| + t\epsilon$ . As in Section C.1, we have  $W_{t} = \sum_{i \leq t} |g_{i}| \leq 2t$  and  $V_{t} \leq 2t$  with probability  $1 - t^{2}$  for all  $t \geq 17$ . Let  $H_{t}$  be the event that both  $V_{t} \leq 2t$  and  $W_{t} \leq 2t$ . Note that by the reverse triangle inequality,  $|S_t^\prime| \geq |S_t| - t\epsilon$ . Therefore,
$$
\begin{array}{l} E _ {t} \cap H _ {t} \subset \left\{\left| S _ {t} ^ {\prime} \right| ^ {2} <   (1 6 t + t (\epsilon + \epsilon^ {2})) (\log (1 / \alpha) + \log (2 t + t \epsilon^ {2})) \right\} \\ \subset \left\{\left| S _ {t} ^ {\prime} \right| <   \sqrt {\left(1 6 t + t \left(\epsilon + \epsilon^ {2}\right)\right) \left(\log \left(1 / \alpha\right) + \log \left(2 t + t \epsilon^ {2}\right)\right)} \right\} \\ \subset \left\{\left| S _ {t} \right| <   t \epsilon + \sqrt {\left(1 6 t + t \left(\epsilon + \epsilon^ {2}\right)\right) \left(\log \left(1 / \alpha\right) + \log \left(2 t + t \epsilon^ {2}\right)\right)} \right\} \\ \subset \left\{\left| S _ {t} \right| <   t \epsilon + \sqrt {1 8 t \left(\log (1 / \alpha) + \log (3 t)\right)} \right\}, \\ \end{array}
$$
where we've used that  $\epsilon < 1$ . With probability  $1 - 1 / t^2$ ,  $|S_t| \geq t\Delta - \sqrt{2t\log(2t)}$ . The minimum  $t = T$  such that  $t\Delta - \sqrt{2t\log(2t)} \geq t\epsilon + \sqrt{18t(\log(1 / \alpha) + \log(3t))}$  is on the order of
$$
T \lesssim \frac {1}{(\Delta - \epsilon) ^ {2}} \log \left(\frac {1}{\alpha (\Delta - \epsilon) ^ {2}}\right).
$$
$$
\mathbb {E} [ \tau ] = \sum_ {t = 1} ^ {\infty} P (E _ {t}) \leq T + \sum_ {t > T} (P (E _ {t} \cap H _ {t}) + P (H _ {t} ^ {c})) \leq T + \sum_ {t > T} \frac {3}{t ^ {2}} \lesssim T.
$$
Note that this is under the alternative, so  $\Delta >\epsilon$  and  $0 <   \Delta -\epsilon <  \Delta$
D Simulation Details
Code to recreate all plots and run the simulations is available at https://github.com/bchugg/auditing-fairness. Here we provide more extensive details on each figure.
Figure 1. Given  $\Delta$ , we generate the two means  $\mu_0$  and  $\mu_1$  as  $\mu_0 = 0.5 + \Delta / 2$  and  $\mu_1 = 0.5 - \Delta / 2$ . We take  $\varphi(X) | \xi_b$  to be distributed as  $\mathrm{Ber}(\mu_b)$ . (Thus, this simulates a scenario for which we witness the classification decisions, not e.g., a risk score.) We set  $\alpha = 0.01$ , so we reject when the wealth process is at least 100. We receive a pair of observations each timestep. Each experiment was run 100 times to generate the plotted standard deviation around the mean of each wealth process.
Figure 2. As above, we take the distribution of model observations  $\varphi_t(X) | \xi_b$  to be  $\mathrm{Ber}(\mu_b(t))$ . For the left hand side of Figure 2 we take  $\mu_0(t) = \mu_1(t) = 0.3$  for  $t = 1, \ldots, 99$ . At  $t = 100$ , we add a logistic curve to  $\mu_1$ . In particular, we let
$$
\mu_ {1} (t) = 0. 3 + \frac {0 . 5}{1 + \exp ((2 5 0 - t) / 2 5)}, \quad t \geq 1 0 0.
$$
We keep  $\mu_0(t)$  at 0.3 for all  $t$ . For the right hand side of Figure 2, we let both  $\mu_{1}$  and  $\mu_0$  be noisy sine functions with different wavelengths. We let
$$
\mu_ {0} (t) = \frac {\sin (t / 4 0)}{1 0} + 0. 4 + \epsilon_ {t} ^ {0},
$$
for all  $t$ , where  $\epsilon_t^0 \sim N(0, 0.01)$ . Meanwhile,
$$
\mu_ {1} (t) = \frac {\sin (t / 2 0)}{1 0} + 0. 4 + \frac {t}{1 0 0 0} + \epsilon_ {t} ^ {1},
$$
where, again,  $\epsilon_t^1\sim N(0,0.01)$ . The mean  $\mu_1(t)$  thus has a constant upward drift over time. As before, we assume we receive a pair of observations at each timestep and we take  $\alpha = 0.01$ . We generate the means once, but run the sequential test 100 times in order to plot the standard deviation around the mean of the wealth process.
Figures 3 and 4. For a given sequential test and a given value of  $\alpha$ , we run (i) the test under the null hypothesis (i.e., with a fair model; we describe how we generated a fair model below), and (ii) the test under the alternative. Repeating 300 times and taking the average gives the FPR and average rejection time for this value of  $\alpha$ . This procedure is how the leftmost two columns of Figure 3 were constructed. The final column then simply plots the FPR versus the value of  $\alpha$ .
We used a vanilla random forest for both the credit default dataset and the US census data. For the credit default dataset, the model does not satisfy equality of opportunity [39] when  $Y$  indicates whether an individual has defaulted on their loan, and  $A$  indicates whether or not they have any university-level education. One can imagine loans being given or withheld on the basis of whether they are predicted to be returned; we might wish that this prediction does not hinge on educational attainment. For the census data, the model does not satisfy equality of opportunity when  $A$  indicates whether an individual has an optical issues, and  $Y$  indicates whether they are covered by public insurance. Admittedly, this example is somewhat less normative than the other. It is unclear whether we should expect perfect equality of opportunity in this context. However, we emphasize that our experiments are for illustrative purposes only. They are not meant as comments on the actual fairness or unfairness of these datasets. We interface with the census data by means the folktables package [51].
For the credit default dataset and random forest classifier, we have  $\Delta = |\mu_0 - \mu_1| = 0.034$ . We have  $\Delta = 0.09$  for the census data. To construct the fair model (in order to test the null), we add  $\Delta$  to the model predictions of the group with the lower mean. Thus, the distributions of predictions are different but the means are identical.
Figure 4 follows similar experimental logic, but we begin with a fair model (i.e., group predictions with the same mean, generated as above), and then switch to the unfair random forest classifier at time  $t = 400$ .
Figure 5. We use US health insurance data [52], which is synthetic data generated based on US census information. We train a logistic regression model to predict the risk of non-repayment based on 11 covariates which include age, BMI, gender, region, and whether the individual is a smoker. We find that the predicted risks are different among males (0.235) and females (0.174), so we use  $A$  as gender and use equality of opportunity as our notion of group fairness.
We construct three data collection policies,  $\pi_1, \pi_2$ , and  $\pi_3$ , which are probability distributions over four regions: NE, SE, NW, SW. Data-collection works by first sampling a region with the probability prescribed by  $\pi_i$ , and then sampling an individual in that region uniformly at random. We defined the three strategies as follows:
$$
\pi_ {1} (N E) = 0. 1, \pi_ {1} (N W) = 0. 2, \pi_ {1} (S E), 0. 3, \pi_ {1} (S W) = 0. 4,
$$
$$
\pi_ {2} (N E) = 0. 0 5, \pi_ {2} (N W) = 0. 1 5, \pi_ {2} (S E), 0. 2 5, \pi_ {2} (S W) = 0. 5 5,
$$
$$
\pi_ {3} (N E) = 0. 0 5, \pi_ {3} (N W) = 0. 1, \pi_ {3} (S E), 0. 1 5, \pi_ {3} (S W) = 0. 7.
$$
We also ran our-betting based method with data sampled uniformly for the population, which served as the comparison point. Of course, as is expected from Proposition 1 and 2, data sampled uniformly from the population yields better results. We also compared to permutation tests run on data sampled uniformly from the population. These were implemented as described above and we do not belabor the details here.