SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Algorithm 1 Recursive partitioning of missing patterns.
Input:  $\mathcal{D} = \{x_i,s_i,y_i\}_{i = 1}^n$    
Initialize: partition  $\mathcal{P} = \varnothing ,\mathcal{P}' = \mathcal{M}$    
while  $\mathcal{P}'\neq \emptyset$  do   
 $\mathcal{M}_q\gets \mathcal{P}'[0]$ $\mathcal{P}'\gets \mathcal{P}'\backslash \mathcal{M}_q$    
if  $G(\mathcal{M}_q) = \emptyset$  then   
 $\mathcal{P}\gets \mathcal{P}\cup \mathcal{M}_q$    
continue   
end if   
 $j^{*}\gets \arg \min_{G(\mathcal{M}_{q})}L(\mathcal{M}_{q},j)$    
if  $L(\mathcal{M}_q,j^*) <   \min_{h\in \mathcal{H}}\sum_{i\in \mathcal{I}_q}\ell (y_i,h(\boldsymbol {x}_i))$  then   
 $\mathcal{P}'\gets \mathcal{P}'\cup \{\mathcal{M}_q^{j0},\mathcal{M}_q^{j1}\}$    
else   
 $\mathcal{P}\gets \mathcal{P}\cup \mathcal{M}_q$    
end if   
end while   
Return:  $\mathcal{P} = \{\mathcal{M}_q\}_{q = 1}^Q$
C.3 Fair uniform resampling algorithm
The data is separated into groups based on sensitive attribute and label. From each group, we make a new group of the same size by sampling data points uniformly with replacement. These groups are combined to create a new subsample of the same size as the original dataset.
Figure 5: Plot of the synthetic data. The points on the  $x$ -axis represent data with  $X_{2}$  missing.
Algorithm 2 Single iteration of fair uniform resampling.
Input:  $\mathcal{D} = \{\pmb {x}_i,s_i,y_i\}_{i = 1}^n$    
Initialize:  $\mathcal{D}' = \varnothing$    
for  $s\in \{0,1\}$  do for  $y\in \{0,1\}$  do  $\mathcal{D}_{s,y}\gets \{\pmb {x}_i,s_i,y_i\in \mathcal{D}|s_i = s,y_i = y\}$  Sample  $|\mathcal{D}_{s,y}|$  times from  $\mathcal{D}_{s,y}$  uniformly with replacement and append to  $\mathcal{D}'$  end for   
end for   
Add missing indicators m to  $\mathcal{D}'$  , apply imputation method  $f_{\mathrm{imp}}$    
Return: Resampled dataset  $\mathcal{D}'$
D Details on the Experimental Results
We provide a description of the synthetic dataset mentioned at the end of Section 6.2 and a description of COMPAS/Adult. We also summarize hyperparameters and implementation details.
D.1 Description of synthetic data
We create a synthetic dataset by sampling data points from a known distribution and generating artificial missing values. The dataset contains two features,  $X_{1}$  and  $X_{2}$ , with binary sensitive attribute  $S$  and binary label  $Y$ . There are 2400 data points in total.  $X_{1}$  is present for all data points, while  $X_{2}$  is missing in 800 of the data points. For each combination of predictive label and sensitive attribute, we sample data points from a different, fixed distribution (bivariate Normal for data points with  $X_{2}$  present and Gaussian for data points with  $X_{2}$  missing). The distribution of the data points is summarized in table 1, and we visualize 800 of the data points in figure 5.
X2 present
Group	Distribution	N
P(X1, X2|Y = 1, S = 1)	N([−3[-3], [202])	400
P(X1, X2|Y = 1, S = 0)	N([−3[+3], [202])	400
P(X1, X2|Y = 0, S = 1)	N([+3[-3], [202])	400
P(X1, X2|Y = 0, S = 0)	N([+3[+3], [202])	400
X2 missing
Group	Distribution	N
P(X1|Y = 1, S = 1)	N(3,3)	100
P(X1|Y = 1, S = 0)	N(3,3)	300
P(X1|Y = 0, S = 1)	N(-3,3)	100
P(X1|Y = 0, S = 0)	N(-3,3)	300
Table 1: Distribution of the synthetic data.  $N$  denotes the number of data points sampled from the group distribution.
D.2 Description of COMPAS and Adult datasets
COMPAS. The COMPAS (Correctional Offender Management Profiling for Alternative Sanctions) software is a proprietary tool that is used in the criminal justice system in the United States to predict recidivism. COMPAS uses a defendant's criminal history along with other features such as demographic information to assign a score indicating the predicted risk of the defendant recidivating within a two-year period. Racial discrimination in the COMPAS algorithm's predictions has been highly publicized and analyzed [11, 16, 34].
We restrict our experiments with the COMPAS dataset to the set of White and Black defendants. The predictive features we use are age (three categories of less than 25, 25 to 45, and over 45), race, sex, normalized number of prior convictions, and charge degree (misdemeanor/felony). The predictive label is a binary indicator for whether the defendant recidivated in a two-year period, and the sensitive attribute is race ( $S = 0$  for Black defendants,  $S = 1$  for White defendants). We additionally balance the dataset so that the number of Black and White defendants in the data are equal, yielding 4206 data points in the dataset.
Adult. The Adult dataset is a subset of the data from the 1994 Census. The predictive label is a indicator for whether a person's annual income is over $50,000, and the sensitive attribute is gender. We use all of the 14 features in the original dataset except fnlwgt (see [12]). We first balance the dataset by the predictive label and then by gender, yielding 6530 points in the dataset. All features are scaled to be between 0 and 1. We additionally use IPUMS Adult, a reconstructed superset of the original Adult dataset [9, 15], which contains 11996 points after balancing for predictive label and gender.
Missing value generation. Since COMPAS is a complete dataset and Adult has a very low percentage of missing values, we generate missing values synthetically. For each dataset, we create three datasets with missing values corresponding to MCAR, MAR, and MNAR to capture the range of possible missing mechanisms. For each missing mechanism, we choose one or more features to contain missing values. Then, we randomly replace some of the values of the feature(s) with NA with a given probability. Other than the MCAR setting, we allow the probability to vary depending on the value of one of more features in the data or a binary indicator corresponding to the feature, including the missing feature(s). Notably, for MNAR, we allow the missingness of a feature to depend on the predictive label to simulate the scenario where the missingness pattern and label are linked. Statistics for missing values in COMPAS and Adult are provided in Table 2.
COMPAS
Mechanism	Missing feature	I	Pr(MS|I=0)	Pr(MS|I=1)
MCAR	priors_count	N/A	0.2	0.2
MAR	priors_count	sex	0.1	0.4
MNAR	priors_count	two_year_recid	0.1	0.4
sex	sex	0.1	0.4
Adult
Mechanism	Missing feature	I	Pr(MS|I=0)	Pr(MS|I=1)
MCAR	age	N/A	0.2	0.2
MAR	occupation	gender	0.4	0.1
MNAR	capital-gain	income	0.3	0.1
workclass	I[age<0.2]	0.1	0.4
Table 2: Missing value statistics for COMPAS and Adult.  $I$  denotes the feature or indicator on which the probability of missingness depends. As an example, for COMPAS in the MAR setting, the missing feature is priors_count; the probability of priors_count being missing is 0.1 among women (sex = 0) and 0.4 among men (sex = 1).
D.3 Hyperparameters
For algorithms with tunable hyperparameters used in the experiments, we report the values of the hyperparameters that were tested in Table 3.
Algorithm	Hyperparameter	Synthetic	COMPAS/Adult	HSLS
DispMistreatment	τ	{0.01, 0.1, 1, 10, 100}	{0.01, 0.1, 1, 2, 5, 10}	{0.01, 0.1, 1, 10, 100}
FairProjection	tol	{0, 0.001, 0.01, 0.1, 0.5}	{0, 0.001, 0.01, 0.05, 0.1, 0.5, 1}	{0, 0.001, 0.01, 0.1, 0.5}
Reduction	ε	N/A	N/A	{0.001, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2}
ROC	ε	N/A	N/A	{0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1}
Missing pattern clustering	k	1	N/A	{500, 1000, 1500, 2000, 4000}
(α, β)	(1, 0)	N/A	(0.6, 0.3)
Table 3: Summary of hyperparameters tested for the experiments with linear fair classifiers. The DisparateMistreatment, FairProjection, Reduction, and ROC fairness-intervention algorithms have tunable hyperparameters, as well as the missing pattern clustering adaptive algorithm.
Algorithm	Hyperparameter	Values
FairProjection	tol	{0.000, 0.001, 0.01, 0.1}
Reduction	ε	{0.001, 0.01, 0.1, 0.5, 1}
FairMissBag	# bags	20 (FairProjection)10 (Reduction, EqOdds)
Table 4: Summary of hyperparameters tested for the experiments with general fair classifiers. The FairProjection and Reduction fairness-intervention algorithms have tunable hyperparameters, as does FairMissBag.
D.4 Implementation details
We run DispMistreatment with a FNR difference constraint, FairProjection, Reduction, Eq0dds, ROC with an equalized odds/mean equalized odds (EO/MEO) constraint, and Leveraging with an equality of opportunity constraint.
We implement DispMistreatment using the code at https://github.com/mbilalzafar/ fair-classification.For FairProjection, we use code from https://github.com/ HsiangHsu/Fair-Projection. The original code for Leveraging is found at https://github. com/lucaoneto/NIPS2019_Fairness; we use a Python version of the code included in the FairProjection repository. Reduction, EqOdds, and ROC are implemented using the AIF360 library [3]. All experiments were run on a personal computer with 4 CPU cores and 16GB memory.
E Additional Experimental Results
E.1 Linear fair classifiers
Synthetic data. Figure 6 displays fairness-accuracy curves for the synthetic dataset. We see that for both DispMistreatment and FairProjection, missing pattern clustering (Section 4.3) achieves near-perfect accuracy with very little discrimination. In constraint, the baseline performs much worse in both cases; for DispMistreatment, the baseline classifier only achieves the same fairness as missing pattern clustering with an accuracy that is essentially no better than a random guess. Adding missing indicators outperforms the baseline for DispMistreatment but remains significantly worse than missing pattern clustering, and performs nearly identically to the baseline in FairProjection.
These results make intuitive sense given the distribution of the synthetic data.  $\mathbb{I}[X_1 < 0]$  is a near-perfect linear classifier for the data points with  $X_{2}$  present, and  $\mathbb{I}[X_1 > 0]$  is a near-perfect linear classifier for the data points with  $X_{2}$  missing. However, if we use impute-then-classify with zero imputation, a baseline linear classifier will perform poorly on the data points with  $X_{2}$  missing. Moreover, because the  $S = 0$  sensitive group has many more such points, the group will likely suffer
Figure 6: Comparison of adaptive fairness-intervention algorithms on the synthetic dataset, using DispMistreatment (left) and FairProjection (right). Error bars depict the standard error of 5 runs with different train-test splits.
from higher FNR and FPR, increasing the discrimination. Furthermore, this is true even if a missing indicator for  $X_{2}$  is added, as the indicator can only provide an adjustment for the bias and not the coefficient of  $X_{1}$ . However, if missing pattern clustering is used, separate linear classifiers can be trained on each cluster to reach very high accuracy and fairness.
(a) COMPAS,DispMistreatment
(b) Adult, DispMistreatment
Figure 7: Comparison of adaptive fairness-intervention algorithms on COMPAS and Adult using DispMistreatment. For each of COMPAS and Adult, we generate three datasets with missing values corresponding to MCAR, MAR, and MNAR mechanisms (Appendix D.2). Error bars depict the standard error of 10 runs with different train-test splits.
HSLS. Figure 8 displays the fairness-accuracy curves for Reduction, Eq0dds, ROC, Leveraging. We see that adding missing indicators improves the fairness-accuracy tradeoff for all fairness interventions except Eq0dds.
We report additional results for the missing pattern clustering algorithm on the HSLS dataset. As indicated above, we tested minimum cluster sizes of 500, 1000, 1500, 2000, and 4000. The average number of clusters produced from missing pattern clustering across all trials was 2.5 for  $k = 500$ , 1.8 for  $k = 1000$  and  $k = 1500$ , 1.5 for  $k = 2000$ , and 1.3 for  $k = 4000$ . The highest number of clusters obtained from a single trial was 5. As the minimum cluster size is increased, the average number of clusters decreases monotonically as expected. The low average cluster counts indicate that the missing pattern clustering algorithm was not always able to find a viable split of the missing patterns
Figure 8: Comparison of adding missing indicators (Section 4.1) with baseline impute-then-classify on HSLS, using Reduction, Eq0dds, ROC, and Leveraging. Error bars depict the standard error of 15 runs with different train-test splits.
Figure 9: Results for FairMissBag on COMPAS using FairProjection. Using COMPAS, we generate three datasets with missing values corresponding to MCAR, MAR and MNAR mechanisms (Section D.2). Fairness-accuracy curves for mean, KNN, and iterative imputation are shown. Error bars depict the standard error of 5 runs with different train-test splits.
(see the discussion of the semi-synthetic experimental results in Section 6.2 for an explanation on this behavior).
E.2 Non-linear fair classifiers
COMPAS. Figure 9 displays the results of the FairMissBag experiment on COMPAS. When missing values are MNAR, FairMissBag shows large improvements in both accuracy and fairness for all three imputation mechanisms.