Defense-Aware Fairness Poisoning and the Clean-Accuracy Price of Subgroup Sanitization

A malicious actor can add a small number of crafted points to a training set and make the resulting classifier treat one demographic group unfairly — say, systematically denying them loans — while overall accuracy stays indistinguishable from a cleanly trained model. Standard validation, which watches aggregate error, never notices. The best current defense against this is to sanitize the training data per subgroup: score each point on how well it fits the distribution of its own sensitive-attribute-by-class cell, and discard the outliers. But this defense has never faced an attacker who knows the scoring rule and deliberately crafts poisons that look statistically typical inside each subgroup. And there is a second, quieter problem: because minority subgroups contain few points to begin with, an aggressive per-subgroup filter inevitably throws away legitimate rare minority examples, so the defense damages exactly the group it is meant to protect.

This proposal builds both sides of that confrontation and measures what survives. The core deliverable is a closed-loop study: a defense-aware poisoning attack that places the sanitizer inside the attacker's optimization loop, a subgroup-size-aware defense built to resist it without over-cleansing, and an empirical mapping of the three-way frontier between fairness protection, attack resistance, and clean accuracy — especially clean accuracy on the minority group itself.

Core Claim

The claim has three parts. First, any sanitization defense keyed to fixed per-subgroup statistics — such as the subgroup alignment scores used by Robust Fair Classification (RFC) in Towards Fair Classification against Poisoning Attacks — can be bypassed by an adversary who optimizes poisoned points to be alignment-typical: statistically indistinguishable from clean members of the same subgroup while still nudging the decision boundary against that group. Second, the reflexive patch — tightening the filter — does not restore safety; it instead transfers harm to clean minority accuracy, because subgroup sparsity means outlier scores cannot separate rare benign points from adversarial ones. This is the fairness analogue of the "clean data rejection" penalty documented for generic backdoor cleansing, where representation-based filtering costs 2–3% of clean accuracy by flagging atypical benign samples, as reported in Training set cleansing of backdoor poisoning by self-supervised representation learning. Third, and constructively, a defense that replaces hard removal with soft reweighting, with per-subgroup tolerance calibrated to the subgroup's population share, should dominate hard filtering on this frontier. The calibration target comes from theory: Fairness-Aware Learning from Corrupted Data proves that under a fraction $\alpha$ of corrupted training points, no learner can avoid excess bias of at least $\Omega(\alpha/P_0)$, where $P_0$ is the minority share — the "minority tax." That lower bound tells us a defense cannot make minority subgroups safe by filtering alone, only bound the damage, so the design question is where to spend the unavoidable cost.

Research Program

The attack generalizes the bilevel fairness poisoning of Poisoning Attacks on Algorithmic Fairness, which computes gradients of the trained model's parameters with respect to poisoned inputs and uses them to move decision boundaries against unprivileged groups at fixed accuracy. We insert the defense into the inner loop. The sanitizer assigns each candidate point a weight based on its fit to its subgroup's clean statistics; the attacker optimizes

$$\max_{D_p}\ \Delta_{\text{fair}}\big(\theta^*(w(D_{\text{tr}}\cup D_p))\big) \ \ \text{s.t.}\ \ \big|\text{Acc}(\theta^*)-\text{Acc}_{\text{benign}}\big|\le\epsilon_{\text{acc}},$$

where $D_p$ is the poison set, $w(\cdot)$ is the (differentiably relaxed) defense weighting, $\theta^*$ is the model trained on the weighted data, $\Delta_{\text{fair}}$ is the post-training fairness gap (demographic parity or equalized odds difference), and $\epsilon_{\text{acc}}$ is a small camouflage budget keeping overall accuracy near the benign level. The gradient signal through $w$ is what makes the attack defense-aware: poisons are pushed toward the interior of each subgroup's alignment distribution, not merely toward the class centroid as in static attacks. This matters because the empirical record already shows stealth by distributional camouflage works — the Z-Flipping attack of Breaking Fair Binary Classification with Optimal Flipping Attacks subverts fair binary classifiers with a poisoning rate of only 3.2% at minimal distributional distance, and the Proportional Fairness Attack of Adversarial Bias: Data Poisoning Attacks on Fairness reaches the maximum equalized-odds difference of 1.0 in 4 of 12 model/dataset settings at full poisoning budget. None of these attacks, nor the bilevel F-Attack, nor the influence-based attacks of Exacerbating Algorithmic Bias through Fairness Attacks, has ever been pointed at a defense that scores points per subgroup; RFC's own evaluation is exclusively against static attacks, which is precisely the evaluation flaw diagnosed generally in Optimizing Adaptive Attacks against Content Watermarks for Language Models and Adversarial Defense without Adversarial Defense: Enhancing Language Model Robustness via Instance-level Principal Component Removal: defenses validated only against fixed adversaries create a false sense of security.

The defense side replaces binary removal with a soft, size-aware weighting: a point in subgroup $g$ with alignment score $s_i$ receives weight $w_i \propto \exp(-s_i/\tau_g)$, where the temperature $\tau_g$ grows as the subgroup's clean sample count shrinks, so sparse subgroups are filtered more leniently in percentage terms and downweighted softly rather than discarded. The size calibration is justified by the $\Omega(\alpha/P_0)$ bound: small subgroups cannot afford aggressive cleansing, so the defense must tolerate more residual poison there and instead cap its effect through the weighted training objective of the corruption-robust learner in Fairness-Aware Learning from Corrupted Data. We also extend the entire pipeline beyond the linear classifiers where RFC's theory lives — an acknowledged open problem in that paper — to small multilayer networks, probing whether subgroup alignment statistics remain a usable filter in a deeper model, and connecting to the observation of Towards Poisoning Fair Representations that deep fair learners fall to 5% poisoning with no defense at all. One honest caveat inherited from RFC: its defense assumes a clean validation set for estimating subgroup statistics. We treat this assumption explicitly, measuring how much statistics estimated on a partially corrupted or small validation set degrade the filter.

A secondary question, motivated by a genuine contradiction in the literature, is whether test-time robustness training helps against training-time poisoning. On Adversarial Bias and the Robustness of Fair Machine Learning shows fairness constraints amplify poisoning vulnerability (fair models collapse where unconstrained ones do not), while On the Alignment between Fairness and Accuracy: from the Perspective of Adversarial Robustness claims fairness and robustness align — but only in the test-time evasion setting, where its Fair Adversarial Training keeps the demographic parity gap near 15–20% under attack versus nearly 100% for an undefended baseline. We will test whether that alignment survives when the attack moves to the training data; we expect it does not, which would sharpen the dichotomy rather than resolve it.

Baselines

The "do nothing" reference point is standard fairness-constrained training with no defense, the Zafar-style learner attacked by Poisoning Attacks on Algorithmic Fairness. It is the strongest reference for how bad the problem is without intervention: on COMPAS at 10% poisoning, a highly fairness-constrained model ($\delta=0.01$) shows a clean-test fairness gap of 0.37 to 0.55, versus 0.21 to 0.26 for an unconstrained model under the same attack, as reported by On Adversarial Bias and the Robustness of Fair Machine Learning. Any proposed defense must beat both numbers. The strongest existing competitor is RFC itself, the subgroup-alignment sanitizer of Towards Fair Classification against Poisoning Attacks, which reports only minimal degradation in accuracy and fairness under static attacks; no reported result found on Lacuna for RFC's exact numeric accuracy or fairness values on Adult or COMPAS, so we reimplement it faithfully (linear stage first, then the deep extension), give it the same clean validation access, the same tuning budget via grid search over its filter thresholds, and the same poisoning fractions, so the comparison isolates adaptivity of the attacker and the design of the filter rather than compute or tuning. On the attack side, the strongest static competitors are the bilevel F-Attack and, for stealth at low budget, Z-Flipping with its reported 3.2% poisoning rate and fairness-gap increase from 0.05 to 0.14 on synthetic data; our adaptive attack must beat these at equal poisoning budget against each defense, otherwise adaptivity adds nothing. Two ablations isolate the proposal's key ingredients: the same defense with a single global (non-subgroup) threshold, and the same subgroup defense with hard removal instead of soft size-aware reweighting. If the size-aware soft variant does not beat both on minority clean accuracy at matched fairness protection, the core claim fails.

Why not just…?

Why not just use standard outlier removal or SEVER-style sanitization? The corpus answers this directly: Towards Fair Classification against Poisoning Attacks evaluated traditional sanitization including SEVER against fairness poisoning and found it fails — under F-Attack with 10% poisoning on Adult, SEVER suffers substantial drops in both accuracy and fairness, because stealthy fairness poisons are crafted to sit close to the clean distribution of their class, where global outlier scores cannot see them. Subgroup statistics are the response to that failure, and our attack is the response to subgroup statistics; the arms race is the point of the study, not an inconvenience.

Why not just drop fairness constraints, since they amplify poisoning vulnerability? This is a real threat and we will run it as the unconstrained baseline. But the record shows it only avoids the spectacular collapse, not the harm: the same paper reports the unconstrained model still carries a 0.21 to 0.26 fairness gap on COMPAS under 10% poisoning, and the theory of Fairness-Aware Learning from Corrupted Data shows unconstrained learners inherit corruption bias scaling as $\Omega(\alpha/P_0)$ on the minority regardless. If in our experiments the unconstrained model under adaptive attack achieves both lower fairness gap and higher minority clean accuracy than any defended fair model, that would falsify the defense program's premise, and we would report it as such.

Why not just adversarial training (TRADES or Fair Adversarial Training)? TRADES formalizes the robustness-accuracy split in Theoretically Principled Trade-off between Robustness and Accuracy, and its own numbers show the cost: on CIFAR-10 the regularization parameter sweeps natural accuracy from 88.64% down to 56.61% robust accuracy — a trade we cannot accept on tabular fairness tasks where the "attack" is in the training data, not the input. More importantly, Robustness May Be at Odds with Fairness: An Empirical Study on Class-wise Accuracy shows adversarial training amplifies per-group disparities, dropping vulnerable class accuracy by up to 30%, and its own mitigation costs 3.9 points of average accuracy (78.9% to 75%). Fair Adversarial Training from On the Alignment between Fairness and Accuracy is the most serious variant because it targets fairness directly; but it defends test-time perturbations on clean training data and has never been tested against training-time poisoning. Rather than argue, we will run FAT as a defense baseline under our adaptive poisoning attack — this is exactly the Gap-4 experiment — and let the result settle whether the fairness-robustness alignment survives when the adversary corrupts the training set.

Proposed Experiments

The main testbed is the four tabular benchmarks where stealthy bias attacks are established — Adult Census, COMPAS, German Credit, and Drug Consumption, used across Poisoning Attacks on Algorithmic Fairness, Exacerbating Algorithmic Bias through Fairness Attacks, Towards Poisoning Fair Representations, and Adversarial Bias: Data Poisoning Attacks on Fairness — plus the 2D Gaussian synthetic setup from Breaking Fair Binary Classification with Optimal Flipping Attacks for visualizing where adaptive poisons land relative to subgroup alignment contours. Three measurements carry the paper. First, attack success: for each defense (none, RFC-replica, global-threshold ablation, hard subgroup filter, size-aware soft filter, FAT), sweep poisoning fractions of 3%, 5%, 10%, and 20%, and report the achieved fairness gap under the constraint that overall accuracy stays within one point of the benign model — the camouflage condition that defines stealthy bias injection. Second, defense cost with no attacker present: clean overall and per-subgroup accuracy of each defense versus undefended fair training, which isolates the minority over-cleansing penalty; we expect hard subgroup filters to show a clean minority accuracy loss consistent in kind with the 2–3% clean rejection penalty of the self-supervised cleansing method in Training set cleansing of backdoor poisoning by self-supervised representation learning, but concentrated on the smaller group. Third, the frontier: a Pareto plot of fairness gap under adaptive attack versus minority clean accuracy, across defenses and poisoning budgets, with the $\Omega(\alpha/P_0)$ bound overlaid as a theoretical floor on achievable fairness damage. The decisive checks are crisp. The adaptive attack beats the static F-Attack and Z-Flipping against the RFC-replica at every budget, or adaptivity is not the vulnerability we claim. The size-aware soft filter beats hard removal on minority clean accuracy at matched fairness protection, or the defense design fails. And either the adaptive attack or the defense wins outright, or — the outcome we consider most likely and most publishable — the result is a quantified, theoretically anchored trade-off curve that tells practitioners exactly what clean accuracy they must spend per unit of fairness protection against an adversary who knows the defense.