TL;DR
Enforcing fairness constraints in machine learning models can inadvertently make them highly vulnerable to data poisoning attacks. This paper demonstrates that an adversary can exploit group-fairness constraints (like equalized odds) via strategic data sampling or label flipping to drastically reduce test accuracy and widen the test-time fairness gap. The findings reveal a critical, systemic conflict between algorithmic fairness and adversarial robustness.
What Problem Does This Paper Address?
As machine learning models are increasingly deployed in sensitive domains like criminal justice and lending, ensuring they make unbiased decisions is paramount. "Fair" machine learning algorithms typically achieve this by introducing constraints during training to equalize the model's behavior across different demographic groups (e.g., ensuring equal false positive rates regardless of race or gender).
However, this paper uncovers a hidden cost to these protections: a severe vulnerability to data poisoning attacks. While prior work studied how random noise impacts fair models, this paper provides the first analysis of how a malicious actor can deliberately introduce adversarial bias into the training data. The authors investigate whether trying to force a model to treat unequal groups equally gives an attacker a powerful lever to break both the model's accuracy and its fairness.
Methods
The authors frame the data poisoning challenge as a bi-level optimization problem. The attacker's objective is to choose a small fraction of poisoning data ($\epsilon$) that maximizes the model's test loss, subject to the constraint that the resulting model must still satisfy the fairness constraint on the poisoned training set.
Because solving bi-level optimization with non-convex fairness constraints is computationally intractable, the authors introduce two key approximations:
- Lagrangian Relaxation: The fairness constraint is converted into a penalty term using a Lagrange multiplier ($\lambda$), transforming the objective into a joint optimization of classification loss and fairness violation.
- Additive Fairness Gap Surrogate: The empirical fairness gap is approximated as an additive function over individual data points, allowing the attack to be computed iteratively.
Using these approximations, they propose two online gradient descent algorithms to generate poisoning data:
- Algorithm 1: Iteratively selects poisoning points that maximize the joint loss-fairness objective while updating parameters to track the fair model.
- Algorithm 2: Uses an unconstrained model as a surrogate during the parameter update step to avoid local minima, while still selecting attack points based on the joint objective.
The threat model covers two realistic scenarios: adversarial sampling (the attacker selectively includes/excludes clean data points to introduce bias) and adversarial labeling (the attacker can also flip the labels of the selected points).
Datasets
The algorithms were evaluated on two standard benchmarks in the fairness literature:
- COMPAS Dataset: Used to predict recidivism risk, with race (White/Black) as the sensitive attribute.
- UCI Adult Dataset: Used to predict whether an individual's income exceeds $50K/year, with gender (Male/Female) as the sensitive attribute.
Note on Pre-processing: Because the raw versions of these datasets yield low baseline accuracies, the authors filtered them to keep only the lowest-loss examples (the top 60% for COMPAS, 90% for Adult) to establish a clean baseline accuracy of ~94%, making the degradation caused by the attacks clearly visible.
Key Insights and Ideas
- The Fairness-Robustness Conflict: There is a direct trade-off between how fair you want a model to be and how robust it is. The stricter the fairness constraint enforced during training ($\delta \to 0$), the more catastrophic the drop in test accuracy under attack.
- Exploiting the Minority Subgroup: The optimal strategy for the attacker is to place poisoning data into the smallest demographic subgroup with the least frequent label (e.g., Black individuals with a positive recidivism label in COMPAS). Because fair algorithms naturally assign higher weights to under-represented groups to satisfy fairness constraints, the attacker's poisoned points gain outsized influence over the entire model.
- Fairness Generalization Failure: A model can be successfully forced to look perfectly fair on the poisoned training data, but it completely fails to generalize that fairness to clean test data. In fact, the attacks often make the fair models more discriminatory at test time than a standard, unconstrained model.
Key Results
The empirical evaluation shows that fair models degrade much faster than unconstrained models under both sampling and labeling attacks.
As illustrated in Figure 1, when the contamination level reaches 20% ($\epsilon = 0.2$) on the COMPAS dataset, the test accuracy of fair models plummets toward the performance of a naive constant classifier, while the unconstrained model remains highly resilient.
Quantitatively, the test-time fairness gap worsens dramatically under attack. For instance, on the COMPAS dataset with a 10% adversarial sampling attack ($\epsilon = 0.1$), a model trained for strict fairness ($\delta = 0.01$) saw its test-time fairness gap skyrocket from a benign 0.06 to 0.37. This is significantly worse than the unconstrained model's test gap of 0.26 under the same attack, proving that the fairness constraint backfires in adversarial environments.
Limitations and Future Work
The authors acknowledge a few boundaries to their current work:
- Restricted Threat Model: The attacker is restricted to selecting points from an existing attack dataset (sampling or label flipping) rather than crafting arbitrary, synthetic feature vectors from scratch. However, they note that giving the attacker the power to modify features would likely make the attacks even more devastating.
- Convex Relaxations: The optimization relies on linear relaxations of the fairness gap. Developing online algorithms that achieve smaller regrets in purely non-convex settings remains an open challenge.
The paper concludes with a call to action for the machine learning community: system designers cannot treat fairness and security as isolated goals. Future research must focus on designing algorithms that are explicitly engineered to be both fair and robust simultaneously.
Summary updated