TL;DR
The authors introduce $f$-FERM, a unified framework that makes fairness-constrained machine learning scalable and robust. By leveraging $f$-divergences and variational reformulations, they enable fair training even with tiny mini-batches and provide a distributionally robust extension to handle shifts between training and test data.
The Challenge: Scalability and Distribution Shifts
In the quest for "fair" AI, researchers often add constraints to models to ensure predictions don't depend on sensitive attributes like race or gender. However, most existing "in-processing" fairness methods struggle with two major hurdles:
- Scalability: Many fairness regularizers are non-linear and complex, making them incompatible with standard Stochastic Gradient Descent (SGD). They often require looking at the entire dataset at once (full-batch), which is computationally prohibitive for modern, massive datasets.
- Distribution Shift: A model that is fair on its training data often becomes unfair when deployed in the real world, where the data distribution might change (e.g., a model trained on data from California might behave differently when applied in Texas).
$f$-FERM aims to bridge this gap by providing a mathematically grounded way to use a wide variety of fairness measures in a scalable, stochastic, and robust manner.
The $f$-FERM Approach
The core innovation of $f$-FERM is the use of $f$-divergences (a broad family of measures including KL-divergence and $\chi^2$ divergence) to penalize the statistical dependence between model outputs and sensitive features.
To make this work with mini-batches, the authors use the Legendre-Fenchel transformation. This mathematical "trick" reformulates a complex, non-linear objective into a min-max optimization problem. Instead of a single minimization, the model plays a "game" where it tries to minimize error while an internal variable (the dual variable) tries to maximize the fairness penalty. This structure allows for unbiased gradient estimation, meaning the model can learn effectively even from a batch size of one.
Furthermore, the authors extend this to Distributionally Robust Optimization (DRO). They define an "uncertainty set" (using $\ell_p$ norms) around the training distribution. The model is then trained to be fair not just on the training data, but on the "worst-case" distribution within that set, providing a safety net against real-world data shifts.
Key Results and Insights
The framework was evaluated on standard fairness benchmarks, including the Adult dataset (predicting income using gender and race as sensitive attributes) and the New Adult dataset (separated by US states to test distribution shifts).
Independence from Batch Size
Unlike many competitors whose performance collapses when batch sizes get small, $f$-FERM remains consistent. This is crucial for training large-scale models where memory constraints limit batch size.
As shown in the figure above, $f$-FERM provides a smooth tradeoff between accuracy and fairness. More importantly, when testing across different batch sizes (from full batch down to a batch size of 2), $f$-FERM's performance remains remarkably stable, while other methods show significant degradation as the batch size decreases.
The "KL Advantage"
While the framework supports many divergences, the choice of divergence impacts the model's Pareto front.
The authors found that KL-divergence performs exceptionally well in the "low-fairness violation, high-accuracy" regime, offering a better tradeoff curve than other divergence measures in specific settings.
Robustness without Causal Graphs
Many robust fairness methods require a predefined "causal graph" of the data, which is rarely available in practice. $f$-FERM achieves robustness purely through optimization techniques. In distribution shift scenarios (like training on California data and testing on 50 other states), the robust version of the framework ($f$-DRO) significantly reduced fairness violations and maintained a much tighter range of fairness compared to non-robust baselines.
Limitations and Future Work
The authors acknowledge that while $f$-FERM is a unified framework, there is no "one-size-fits-all" $f$-divergence. The choice of which divergence to use (KL, Reverse KL, etc.) remains a hyperparameter that needs to be tuned for each specific application.
Additionally, the current robust formulation for small shifts assumes the shift is comparable to the training accuracy. Future work could explore more complex uncertainty sets or deeper theoretical analysis of the asymptotic behavior of different $f$-divergences in this context.
Summary updated