Abstract
Despite the success of large-scale empirical risk minimization (ERM) at achieving high accuracy across a variety of machine learning tasks, fair ERM is hindered by the incompatibility of fairness constraints with stochastic optimization. We consider the problem of fair classification with discrete sensitive attributes and potentially large models and data sets, requiring stochastic solvers. Existing in-processing fairness algorithms are either impractical in the large-scale setting because they require large batches of data at each iteration or they are not guaranteed to converge. In this paper, we develop the first stochastic in-processing fairness algorithm with guaranteed convergence. For demographic parity, equalized odds, and equal opportunity notions of fairness, we provide slight variations of our algorithm–called FERMI–and prove that each of these variations converges in stochastic optimization with any batch size. Empirically, we show that FERMI is amenable to stochastic solvers with multiple (non-binary) sensitive attributes and non-binary targets, performing well even with minibatch size as small as one. Extensive experiments show that FERMI achieves the most favorable tradeoffs between fairness violation and test accuracy across all tested setups compared with state-of-the-art baselines for demographic parity, equalized odds, equal opportunity. These benefits are especially significant with small batch sizes and for non-binary classification with large number of sensitive attributes, making FERMI a practical, scalable fairness algorithm.
Introduction: The Scalability-Fairness Dilemma
In the quest to make AI "fair," researchers often use in-processing methods—incorporating fairness constraints (like ensuring a model doesn't discriminate based on race or gender) directly into the training process. However, a major technical hurdle persists: modern deep learning relies on stochastic optimization (training on small "minibatches" of data), but most fairness metrics are global properties that are difficult to estimate accurately from just a few samples.
Existing fair algorithms typically face a "pick two" dilemma between scalability, stochasticity, and convergence. Before this work, most algorithms required large batches to remain stable or lacked theoretical guarantees that they would ever reach a steady state when using stochastic solvers.
Methodology: Reformulating Fairness with FERMI
The researchers introduce FERMI (Fair Empirical Risk Minimization through ERMI). The core innovation is the use of Exponential Rényi Mutual Information (ERMI) as a fairness regularizer. While mutual information is notoriously difficult to optimize directly, the authors prove that ERMI can be reformulated into a variational (min-max) form.
This transformation turns a complex fairness constraint into a "game" between two components: one trying to minimize error and another trying to maximize the detection of unfairness. Crucially, this reformulation allows for the derivation of stochastically unbiased estimators of the gradients. This means the algorithm can learn from a batch as small as a single data point ($|B|=1$) and still move toward the mathematically optimal fair solution using Stochastic Gradient Descent Ascent (SGDA).
Empirical Performance and Key Insights
The framework was evaluated across several standard and complex benchmarks, including tabular data (Adult, COMPAS), natural language (Toxic Comment Classification), and computer vision (Color MNIST).
Key Results:
- Dominating the Tradeoff: In almost every test case, FERMI produced a superior Pareto frontier compared to state-of-the-art baselines. For any given level of accuracy, FERMI was fairer; and for any given level of fairness, FERMI was more accurate.
- Batch Size Independence: While competing methods often see performance collapse as batch sizes decrease, FERMI’s performance remains nearly identical whether using a batch size of 1 or the full dataset.
- Handling Complexity: Unlike many baselines that only work for binary choices and binary attributes, FERMI scales naturally to multi-class problems and multiple sensitive attributes without a massive computational penalty.
- Convergence Speed: The authors provide a formal proof that FERMI converges to an $\epsilon$-stationary point in $O(1/\epsilon^5)$ evaluations, providing a theoretical safety net that previous stochastic fairness methods lacked.
Conclusion
FERMI represents a significant step forward in making fair machine learning practical for large-scale applications. By providing the first stochastic in-processing fairness algorithm with guaranteed convergence, the authors bridge the gap between theoretical fairness requirements and the realities of modern deep learning optimization. Future work may explore the intersection of this framework with differential privacy and its robustness against adversarial label noise.
Summary updated