Adversarial bias and robustness in fair machine learningOn Adversarial Bias and the Robustness of Fair Machine Learning
The authors propose a data poisoning attack framework targeting equalized odds fair models, and state that the stricter the fairness constraint, the more the model's test accuracy drops and the larger its test fairness gap under poisoning.
The attacker knows the clean training set Dc, the learning task, the model architecture, the hyperparameters, and the fairness constraint, and can add εn poisoning points to the training set; the attacker cannot construct features arbitrarily and can only select points from an attack dataset Dk with the same distribution as the clean data (adversarial sampling), and a stronger variant allows flipping the labels of the selected points (adversarial labeling). The victim system is a binary classification model trained with the equalized odds fairness constraint.
- Fair machine learning uses fairness constraints to level model behavior across groups, but the authors ask whether this conflicts with robustness: how much additional damage a data poisoning attack targeting equalized odds fair models causes.
- The authors propose the adversarial bias framework: the attacker selects points (labels may be flipped) from an attack set with the same distribution as the clean data, and uses an online gradient algorithm to maximize, point by point, a weighted sum of loss and fairness gap, giving two algorithm variants and an approximate optimality guarantee.
- Training logistic regression on COMPAS and Adult. The authors report: under the same attack, the fair model's test accuracy drops more than the unconstrained model's, and the smaller δ is, the more it drops; at ε=0.1, on COMPAS, Fair [19] (δ=0) under adversarial labeling (Alg. 2, λ=0) has accuracy 68.3, versus 84.8 for the unconstrained model; the attack also makes the fair model's test fairness gap exceed the unconstrained model's.
- The authors note future directions are to allow the attacker to modify features and design attacks with gradient-based algorithms (Section 6.2), and to design online algorithms with small regret in non-convex settings (Appendix B.2). The experiments use only logistic regression and the two datasets COMPAS and Adult, with a maximum poisoning ratio of ε=0.2, and no defenses are evaluated.
- Evaluated models
- Logistic regression (unconstrained model)Fair logistic regression (reductions approach [1])Fair logistic regression (post-processing approach [19])
- Benchmarks
- COMPASAdult (UCI Census Income)
- Metrics
- test accuracyfairness gap ∆ (equalized odds)
The paper analyzes data poisoning attacks against group-based fair machine learning, focusing on the equalized odds constraint. The authors point out that if an attacker can control the sampling or labeling of part of the training data, they can push test accuracy to a lower level than that of an unconstrained model; such adversarial sampling and adversarial labeling attacks can also widen the fairness gap on the test set, even if the model satisfies the fairness constraint on the training data. The authors empirically evaluate the attacks on multiple algorithms and benchmark datasets.
Paper analysis
What problem does this paper attempt to solve?
The authors study whether the equalized odds fairness constraint weakens a model's robustness to data poisoning attacks, and propose a corresponding attack framework.
Core question: whether a model trained with the equalized odds fairness constraint is more easily damaged by data poisoning attacks (accuracy drop, worse fairness) than an unconstrained model, and why.
- Problem setting: algorithmic fairness is a core requirement for the trustworthiness of automated decision-making, and group fairness definitions such as equalized odds require the model to behave consistently across different protected groups; however, the authors point out that fairness constraints themselves come at the cost of accuracy.
- Gaps in existing work: the authors state that existing studies on fair learning with noisy/biased training data assume that underrepresentation and labeling bias are uniformly distributed, or assume infinite training data; to the authors' knowledge, this paper is the first analysis of the robustness of fair machine learning under adversarial settings.
- Core observation: fair algorithms flatten the importance of groups of different sizes and distributions, disproportionately changing the influence of individual samples, which the attacker can exploit to place poisoning points where they cause large loss (the smallest group, the subgroup with the rarest label).
- Contributions: the paper proposes the adversarial bias poisoning attack framework (two online algorithms) and empirically evaluates the robustness of fair models on multiple fair algorithms and benchmark datasets.
- Threat model:
- Goal: maximize the loss of the fair model on the clean data distribution (reduce test accuracy), and increase the test fairness gap.
- Knowledge: the attacker knows the clean training set Dc, the learning task, the model architecture, the training hyperparameters, and the fairness constraint of the target model.
- Capability: add εn poisoning points to the training set (ε is the ratio of poisoning data to clean data); cannot construct features arbitrarily, and can only select points from an attack dataset Dk with the same distribution as the clean data (adversarial sampling); a stronger variant, adversarial labeling, allows flipping the labels of the selected points.
- Victim system: a binary classification model trained with equalized odds as the fairness constraint (logistic regression in the experiments).
What related research exists?
Related work falls into three groups: fair machine learning, data poisoning attacks, and fair learning with noisy/biased data; this paper's attack algorithm is based on the framework of Steinhardt et al.
Fair machine learning
- Fairness definitions and algorithms: group fairness (equalized odds, Hardt et al. 2016), individual fairness (Dwork et al. 2012), causal fairness (Kusner et al. 2017); implementations are divided into pre-processing, in-processing (e.g., the reductions method, Agarwal et al. 2018), and post-processing (Hardt et al. 2016). This paper focuses on equalized odds and trains fair models with two algorithms, reductions and post-processing.
- The cost of fairness: Corbett-Davies et al. (2017) point out that the optimal decision rule satisfying a fairness definition differs from the optimal decision rule, and that fairness constraints come at the cost of accuracy; Kleinberg et al. point out that when the positive-example proportions of the groups differ, calibration, equal false positive rates and equal false negative rates cannot be achieved simultaneously.
Data poisoning attacks
- Steinhardt et al. (2017): for unconstrained convex models, they propose an optimal poisoning algorithm given a feasible set of poisoning points, approximating the test loss with the training loss on clean data; this paper's attack algorithm is inspired by it and uses the same online learning framework, and Algorithm 2 is equivalent to their algorithm when λ=0.
- Clean-label poisoning (Shafahi et al. 2018): injects data with correct labels but modified features; the paper points out the differences: in adversarial sampling the attacker cannot modify features, and this paper's goal is to reduce the accuracy of the entire test set rather than of specific target points.
- Gradient-ascent poisoning: proposed by Biggio et al. (2012) for SVM, later extended to linear/logistic regression, topic models, collaborative filtering, and neural networks; the paper points out that these works allow modifying features and labels, whereas this paper assumes the attacker cannot modify features.
Fair learning with noisy/biased data
- Bias leads to unfairness: Calders and Žliobaitė (2013) state that data with underrepresentation and mislabeling bias causes unconstrained models to produce biased predictions; Kallus and Zhou (2018) state that under systematic censoring, fair classifiers may still be unfair overall.
- Debiasing methods: De-Arteaga et al. (2018), Jiang and Nachum (2019), Lamy et al. (2019), Blum and Stangl (2019) propose debiasing strategies under the uniform noise assumption; the paper points out that these assumptions cannot transfer to this paper's non-uniform, deliberate adversarial bias that reduces test accuracy.
Baselines and positioning
- Baseline methods: Random sampling (randomly select points), Label flipping (randomly select points and flip labels), Hard examples (randomly select high-loss samples), and the existing optimal attack on unconstrained models (Steinhardt et al. 2017, i.e., Algorithm 2 with λ=0).
- Positioning: the authors state that this paper is the first analysis of the robustness of fair machine learning under adversarial settings, and that the attack exploits the fairness constraints themselves rather than uniform noise.
How does the paper address this problem?
The authors formulate poisoning as a bilevel optimization with a fairness constraint, and via Lagrangian relaxation and an additive approximation of the fairness gap, obtain two online gradient poisoning algorithms.
Overall approach: the attacker's objective is formalized as a bilevel optimization problem with a fairness constraint, transformed through a series of approximations (approximating test loss with clean training loss, replacing the constraint with a Lagrange multiplier, an additive proxy for the fairness gap) into a form solvable online, and the adversarial bias attack framework is designed (Algorithm 1 and Algorithm 2).
Problem setting and formalization
- Fairness definition: a relaxed version of equalized odds (Definition 1): a classifier fθ is δ-fair when Δ(θ, D) := maxy |Pr[fθ(X)≠ y ∣ S=0, Y=y] − Pr[fθ(X)≠ y ∣ S=1, Y=y]| ≤ δ, where ∆ is the empirical fairness gap on the training set and δ=0 is exact fairness.
- Attack objective: the training set consists of clean data Dc (n points) and poisoned data Dp (εn points); the attacker chooses Dp to maximize the model's expected loss on the underlying distribution, i.e., solving the bilevel optimization with constraint C(θ, Dc∪Dp) ≤ 0 (Eq. 2).
Approximations of the optimization framework
- Loss approximation: following the unconstrained poisoning approach, the test loss is approximated by the loss on clean training data (Eq. 3).
- Lagrangian relaxation: a multiplier λ replaces the fairness constraint with a penalty term; weak duality gives a lower bound, and the attacker instead maximizes this lower bound; the constant δ does not affect the solution, so the constraint term can be replaced by the fairness gap ∆, yielding the new objective maxDp minθ ( (L(θ; Dc ∪ Dp))/n + λ Δ(θ, Dc ∪ Dp) ) (Eq. 5), i.e., maximizing a linear combination of training loss and fairness violation.
Additive approximation of the fairness gap and Algorithm 1
- Approximation: ∆ is not an additive function of data points; the authors use the contribution of a single point repeated εn times as a proxy, approximating ∆(θ, Dc∪Dp) by the average of the contributions of the poisoned points (Eq. 6), yielding an additive objective (Eq. 7).
- Algorithm 1: an online gradient descent variant that iterates εn steps: at each step it selects from the feasible set F(Dk) the point maximizing ε·loss + λ·fairness gap and adds it to Dp, then updates the model parameters θt according to the penalized loss. For adversarial sampling, F(Dk)=Dk; for adversarial labeling, F(Dk) also includes points with flipped labels.
- Theoretical guarantee: Theorem 1 gives M* − M(Dp*) ≤ Regret(εn)/εn; Corollary 1 in Appendix B.2 states that when both the loss and ∆ are convex and the step size is ηt=d/(G√t), M* − M(Dp*) ≤ 3Gd/√(εn), with convexity achieved via the linear loss relaxation of Donini et al.
Algorithm 2: unconstrained surrogate model
- Design: the point selection rule is the same as Algorithm 1, but the parameter update follows the descent direction of the unconstrained model's loss (Eq. 9), i.e., the unconstrained model serves as a surrogate for the target fair model.
- Reason given by the authors: the authors state this can reduce the chance of getting stuck in local minima, because each step follows the negative gradient of the exact unconstrained loss; when λ=0 it is equivalent to the attack of Steinhardt et al. against unconstrained models.
Implementation parameters
- Hyperparameters: Algorithm 1 uses λ=ε on COMPAS and λ=0.1ε on Adult (internally using SVM, Hinge loss and a linear loss to approximate ∆); Algorithm 2 uses λ=100ε on both datasets (using logistic regression and computing the exact ∆); attacking the unconstrained model uses Algorithm 2 with λ=0; both algorithms use learning rate η=0.001.
- Fair training: post-processing (exact equalized odds, δ=0) and reductions (relaxed equalized odds, δ>0), implemented with fairlearn using default hyperparameters; the output is a randomized classifier, evaluated with expected accuracy (Eq. 13).
What experiments did the paper conduct?
Training logistic regression on COMPAS and Adult, at ε=0.1 the fair model's test accuracy drops more than the unconstrained model's, and its test fairness gap is also larger.
Experimental setup
- Models evaluated: logistic regression, in four categories — unconstrained model, Fair [1] (δ=0.1), Fair [1] (δ=0.01) (reductions method), Fair [19] (δ=0) (post-processing, exact fairness).
- Datasets: COMPAS (5278 records, race white/black as the sensitive attribute; after preprocessing Dc averages 2111 records, Dtest 528, Dk 2639) and Adult (48,842 records, sex as the sensitive attribute; Dc averages 15385 records, Dtest 6594, Dk 26863); preprocessing trains an SVM on the full data and keeps the 60% (COMPAS)/90% (Adult) with the smallest loss, with the removed hard examples added to Dk.
- Attacks and baselines: Algorithm 1 (COMPAS λ=ε, Adult λ=0.1ε), Algorithm 2 (λ=100ε), Algorithm 2 (λ=0) against the unconstrained model (i.e., the attack of Steinhardt et al.); baselines are Random sampling, Label flipping, Hard examples, Constant prediction.
- Metrics: test accuracy (expected accuracy, Eq. 13) and test fairness gap ∆ (Eq. 1); the poisoning ratio ε ranges from 0 to 0.2.
- Repetitions: 100 runs per experimental setting on COMPAS and 50 on Adult, reporting mean and standard deviation.
Main results
Table 5 and Table 6 give the test accuracy and test fairness gap at ε=0.1 (mean±standard deviation, 100/50 repetitions). The table below shows representative numbers on COMPAS (from Table 5, Table 6):
Swipe horizontally to read the table
Attack Unconstrained model Fair [1] (δ=0.1) Fair [1] (δ=0.01) Fair [19] (δ=0) Benign (accuracy) 93.7±5.6 94.0±5.6 93.5±1.7 87.4±3.8 Adv. sampling (Alg. 2, λ=0) (accuracy) 87.6±1.6 81.5±1.7 78.0±2.3 70.8±1.6 Adv. sampling (Alg. 2, λ=100ε) (accuracy) not reported 80.6±1.9 73.1±3.0 71.6±1.4 Adv. labeling (Alg. 2, λ=0) (accuracy) 84.8±1.7 76.3±1.8 73.3±1.7 68.3±1.7 Adv. labeling (Alg. 2, λ=100ε) (accuracy) not reported 77.6±1.3 71.0±2.8 70.1±1.3 Adv. sampling (Alg. 2, λ=100ε) (∆) not reported 0.29±0.06 0.37±0.09 0.53±0.05 Adv. labeling (Alg. 2, λ=100ε) (∆) not reported 0.28±0.05 0.39±0.08 0.55±0.04 - The authors state that under the same attack capability, fair models are less robust than unconstrained models, and the smaller δ (the stronger the fairness constraint), the larger the accuracy drop; baseline attacks have little effect on test accuracy.
- The authors state that when λ>0, the smaller δ on the training data, the larger the test fairness gap; for example, the fair model with δ=0.01 under adversarial sampling (Alg. 2, λ=100ε) has a test ∆ of about 0.37, exceeding the unconstrained model (0.21 benign, 0.26 under attack).
- The drop on Adult is smaller (Table 5: under adversarial labeling (Alg. 2, λ=100ε), Fair [1] (δ=0.01) is 80.9±1.7); the authors note that constant prediction reaches 81% accuracy on Adult, and the attacked fair model is only slightly better than it.
Conflict between fairness and robustness (varying with ε and δ)
- What was measured: Figure 1/Figure 3 (COMPAS) and Figure 4 (Adult) plot the test accuracy curves of each model as ε ranges from 0 to 0.2; Figure 2, Figure 5 and Figure 6 fix the poisoned data (generated by Alg. 2, λ=100ε) and compare overall, majority-group and minority-group accuracy across different δ.
- Results: the main text states that at ε=0.2 the test accuracy of fair models approaches that of the constant classifier; the caption of Figure 2 states that the minority-group curve under the unconstrained model coincides with the curve of the exact fair model (λ=0). The authors observe that the attack affects the majority group of fair models more, whereas on the unconstrained model the minority group suffers greater loss.
- Authors' interpretation: the authors state that robustness decreases as the fairness level increases, and that fairness and robustness conflict.
Distribution and mechanism of poisoned points
- What was measured: Figure 11/Figure 12 count the proportion of poisoned points in the four subgroups (sensitive attribute × label); Figure 7/Figure 8 report the model's accuracy on clean training data and on poisoned data; Figure 9/Figure 10 report the fairness gap of the unconstrained model on the poisoned training set.
- Results: the main text states that most poisoned points selected by Algorithm 2 (λ=100ε) belong to the smallest subgroup (s=1, y=+ on COMPAS); the accuracy of the fair model with δ=0.01 on poisoned data from Algorithm 2 is about 0.2 at ε=0.1 and rises to about 0.4 at ε=0.2, whereas the unconstrained model's accuracy on poisoned data is essentially zero; at ε=0.1 the unconstrained model's training fairness gap on Alg. 2 (λ=100ε) poisoned data is 0.54, greater than the 0.3 of the random sampling baseline.
- Authors' interpretation: the authors state that the attack, by enlarging the fairness gap and distorting the minority-group distribution, forces fair algorithms to sacrifice overall (especially majority-group) accuracy in order to equalize group behavior.
Other ablations and analyses
- Choice of λ (Appendix D.2): Algorithm 1 tests λ∈{0.1ε, ε, 10ε}, and the main text reports ε for COMPAS and 0.1ε for Adult; Algorithm 2 tests λ∈{ε, 10ε, 100ε} and reports 100ε.
- Algorithm comparison (Appendix D.4): the authors state that Algorithm 2 outperforms Algorithm 1, because Algorithm 1 approximates ∆ with a linear proxy whereas Algorithm 2 computes the exact ∆; λ=100ε and λ=0 are similar when ε<0.1 and diverge afterwards.
- Fluctuation on Adult (Appendix D.6): Algorithm 2 (λ=100ε) shows accuracy fluctuating with ε on Adult; the authors explain that under adversarial sampling the smallest subgroup (s=1, y=+) amounts to only ε=7.69% of poisoning in the attack set, so at larger ε only points from other subgroups can be selected.
- Distribution of poisoned points on Adult (Appendix D.9): s=1, y=+ accounts for only 3.6% of the data; the attack mainly selects y=+ points, and Algorithm 2 (λ=100ε) selects more s=1, y=+ points.
What are some points that can be further explored?
The authors give two directions for future work: gradient attacks that allow modifying features, and online algorithms with small regret under non-convexity; the experiments are limited to two datasets and logistic regression.
Limitations and future directions noted by the authors
- Attacks that allow modifying features (Section 6.2): the authors state that a future direction is to allow the attacker to modify features and design poisoning attacks with gradient-based algorithms, and believe the attacker may thereby further reduce test accuracy.
- Online algorithms in non-convex settings (Appendix B.2): the authors state that future work could design online algorithms that achieve small regret in non-convex settings or under better approximations of the fairness constraint, to further study the impact of poisoning on the robustness of fair models.
- A fundamental trade-off between fairness and robustness may exist (Section 7): the authors suspect that a fundamental trade-off may exist between fairness and robustness, and call for theoretical study of the robustness properties of fair machine learning algorithms and for designing models that are both fair and robust.
Scope of the experiments
- The model under test is logistic regression, and the fair training algorithms are post-processing [19] (δ=0) and reductions [1] (δ=0.1, 0.01); no other model architectures.
- The datasets are COMPAS and Adult, both preprocessed with SVM to remove high-loss samples; the sensitive attributes are race (white/black) and gender, respectively.
- The poisoning ratio ε is at most 0.2; the attacker cannot modify features and can only select points (adversarial sampling) or flip the labels of the selected points (adversarial labeling).
- Number of repetitions: 100 per group for COMPAS and 50 per group for Adult, reporting mean and standard deviation; the paper does not report statistical significance tests.
- The experiments do not include evaluation of any defense methods; in Table 5 and Table 6, the cells for the unconstrained model under λ>0 attacks do not report values.
Summarize the main content of the paper
The authors propose a poisoning attack framework targeting equalized odds fairness models, and empirically show that the stronger the fairness constraint, the greater the loss in accuracy and fairness of the model under poisoning.
This is an attack paper: the authors study the conflict between the equalized odds fairness constraint and robustness to data poisoning, and propose the adversarial bias attack framework.
- Problem: fair algorithms equalize behavior across groups of different sizes, which the authors argue disproportionately amplifies the influence of individual samples, making fair models easier to break by poisoning attacks than unconstrained models.
- Method: the attacker knows the clean training set, the model architecture and the fairness constraint, and selects εn points (labels may be flipped) from an attack set with the same distribution as the clean data; through Lagrangian relaxation and an additive approximation of the fairness gap, the bilevel optimization with the fairness constraint is transformed into online gradient algorithms (Algorithm 1 uses penalized parameter updates, Algorithm 2 uses an unconstrained model as a surrogate), and Theorem 1 gives an approximate optimality guarantee.
- Main results (COMPAS, ε=0.1, Table 5): under adversarial labeling (Alg. 2, λ=0), the unconstrained model's test accuracy is 84.8±1.7, Fair [1] (δ=0.01) is 73.3±1.7, and Fair [19] (δ=0) is 68.3±1.7; the smaller δ, the larger the drop.
- Fairness loss (COMPAS, ε=0.1, Table 6): under adversarial labeling (Alg. 2, λ=100ε), the test fairness gap of Fair [19] (δ=0) reaches 0.55±0.04, exceeding the 0.21±0.07 of the unconstrained model in the benign setting; the authors state the attack can make fair models more discriminatory than unconstrained models.
- Mechanism observations: the authors report that most poisoned points fall in the smallest subgroup (s=1, y=+ on COMPAS), and that fair models sacrifice majority-group accuracy to equalize group behavior; the attack is weaker on Adult, and the authors note that constant prediction already achieves 81% accuracy on this dataset.
- Authors' conclusion: the authors state that fairness and robustness conflict, conjecture that there may be a fundamental trade-off between them, call for designing models that are both fair and robust, and caution that deploying FairML requires care.