Adaptive Sampling for Minimax Fair Classification

Shubhanshu Shekhar, Greg Fields, Mohammad Ghavamzadeh, Tara Javidi

TL;DR

This paper tackles the problem of algorithmic bias by focusing on the data collection stage rather than post-hoc model tweaks. The authors propose an adaptive sampling algorithm based on Upper Confidence Bounds (UCB) to actively sample more data from harder-to-classify minority groups, ensuring the final model achieves "minimax fairness" (minimizing the error for the worst-off group).

What Problem Does This Paper Address?

Machine learning models trained on standard, uncurated datasets often perform poorly on underrepresented or "harder-to-learn" groups. While much of the fair ML literature attempts to fix this by adding constraints during the training phase or adjusting predictions after the fact, this paper targets the root of the problem: the dataset itself.

The authors aim to achieve minimax fairness, a framework where the goal is to make the model's performance on the worst-case group as good as possible. The core challenge is doing this in an active learning setting. Given a limited budget for collecting or labeling data, how should an algorithm dynamically decide which demographic group to sample next when it doesn't know in advance which groups are the hardest to classify?

Optimal sampling proportions for minimax fairness

Methods

The authors frame data collection as a multi-armed bandit problem and introduce an optimistic adaptive sampling strategy called $\mathcal{A}_{\text{opt}}$.

  • The Core Algorithm ($\mathcal{A}_{\text{opt}}$): Instead of sampling uniformly or greedily, $\mathcal{A}_{\text{opt}}$ uses an Upper Confidence Bound (UCB) approach. At each step, it calculates the expected loss for each group plus a confidence interval (uncertainty). It then samples from the group with the highest UCB. This balances exploitation (sampling from groups the model is currently bad at) with exploration (sampling from groups the model hasn't seen enough of).
  • Theoretical Guarantees: The authors prove upper bounds on the convergence rate of $\mathcal{A}_{\text{opt}}$ and provide a matching mathematical lower bound, proving their algorithm is near-optimal for this specific class of problems.
  • Heuristic Extension ($\mathcal{A}_{\text{opt}}+$): Because $\mathcal{A}_{\text{opt}}$ requires retraining the model from scratch after every single sample, it is too slow for deep learning. The authors introduce a practical variant that uses batch sampling, gradient updates, and a Mann-Kendall trend statistic. This trend statistic detects if a group has hit a "performance ceiling" so the algorithm stops wasting its budget on a group that won't improve with more data.

Key Insights and Ideas

  • Exploration is Non-Negotiable for Fairness: A purely greedy sampling approach (always picking the group with the current highest error) often fails. It can get stuck in local optima, resulting in a highly skewed dataset. Optimism under uncertainty (the UCB approach) is required to find the truly optimal data mixture.
  • Robustness Over $\epsilon$-Greedy: Previous work proposed an $\epsilon$-greedy approach to this problem (randomly exploring $\epsilon$% of the time). The authors demonstrate that $\mathcal{A}_{\text{opt}}$ is mathematically superior and practically much more robust to hyperparameter tuning than $\epsilon$-greedy, which can fail to converge if $\epsilon$ is chosen poorly.
Convergence of sampling algorithms
  • Equalizing Loss: In real-world datasets, the optimal sampling distribution naturally tends to equalize the loss across all attributes. On FashionMNIST, $\mathcal{A}_{\text{opt}}$ allocated the vast majority of its budget to visually similar clothing pairs, resulting in a much tighter spread of accuracy across all groups compared to uniform sampling.

Key Results

  • Theoretical: The authors proved that the excess risk of $\mathcal{A}_{\text{opt}}$ converges at a rate of $\mathcal{O}(\sqrt{\log(n)/n})$, and proved a lower bound of $\Omega(1/\sqrt{n})$, establishing the algorithm's near-optimality.
  • Tabular Data: On the Adult dataset, $\mathcal{A}_{\text{opt}}$ quickly reached the theoretical maximum worst-case accuracy (~80.5%), significantly outperforming uniform sampling at smaller sample sizes.
  • Image Data: On UTKFace, uncurated sampling performed terribly because the hardest group to classify (Asian faces) only made up 14% of the natural dataset. $\mathcal{A}_{\text{opt}}$ actively corrected this imbalance, vastly outperforming uncurated baselines in worst-case accuracy.
  • Handling Unlearnable Groups: On a synthetic dataset where one group was inherently capped at a low accuracy, the trend-aware $\mathcal{A}_{\text{opt}}+$ successfully realized that additional samples wouldn't help, reallocated its budget to other groups, and achieved a 4% higher average accuracy than the standard UCB approach.

Limitations and Future Work

  • The "Risk-Equalizing" Assumption: The theoretical guarantees rely heavily on the assumption that there exists a "fair mixture" of data that will eventually equalize the risk across all groups. In reality, some groups might be fundamentally harder to classify due to missing features or noisy labels, meaning perfect equality is impossible.
  • Future Directions: The authors suggest relaxing this strict assumption to design algorithms that find Pareto optimal mixture distributions. They also suggest expanding this active sampling framework to support other mathematical definitions of fairness, such as demographic parity or equalized odds.

Summary updated

BibTeX
@inproceedings{shekhar2021adaptive,
  author = {Shubhanshu Shekhar and Greg Fields and Mohammad Ghavamzadeh and Tara Javidi},
  title = {{Adaptive Sampling for Minimax Fair Classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=ZDMqRGSksHs},
}
Figure