Towards Fair Classification against Poisoning Attacks

Han Xu, Xiaorui Liu, Yuxuan Wan, Jiliang Tang

As machine learning models increasingly influence high-stakes decisions like hiring and lending, ensuring their fairness—equal treatment across different demographic groups—has become a top priority. However, a new paper from researchers at Michigan State University reveals a troubling reality: these fair models are highly vulnerable to "poisoning attacks," where an adversary injects a small amount of malicious data into the training set to sabotage both accuracy and equity.

TL;DR

This paper introduces F-Attack, a novel poisoning strategy that specifically targets fair classifiers by evading standard outlier detection. To counter this, the authors propose Robust Fair Classification (RFC), a defense framework that audits data at the subgroup level to successfully preserve the accuracy-fairness trade-off even under heavy attack.

What Problem Does This Paper Address?

Most research on adversarial machine learning focuses on accuracy. We know that "poisoning" a training set with bad samples can make a model fail. However, fair classification introduces a second objective: minimizing bias (e.g., ensuring the model doesn't favor one gender over another).

The authors identify a critical gap: existing defenses against poisoning, such as SEVER or k-NN defense, were designed for standard classification. They look for "global" outliers—data points that look weird compared to the entire dataset. The researchers discovered that an attacker can inject samples that look perfectly normal globally but are strategically placed to distort the model's perception of specific subgroups, effectively "breaking" fairness without tripping traditional alarms.

Methods

The paper contributes two major components: a new attack and a new defense.

1. F-Attack: The "Insidious" Poisoner

F-Attack is formulated as a bi-level optimization problem. Unlike traditional attacks that just try to maximize error, F-Attack aims to maximize the loss of a model that is constrained to be fair.

Crucially, F-Attack uses a "feasible injection set" constraint. This ensures that poisoning samples stay close to the centers of their labeled classes. As seen in Figure 1, F-Attack samples (yellow) are much closer to clean data than traditional Min-Max attack samples (red), making them far harder to detect.

Figure 1: PCA visualization of Clean Samples and Poisoning Samples

2. RFC: Subgroup-Level Defense

The proposed defense, Robust Fair Classification (RFC), shifts the focus from global data sanitization to subgroup-level auditing.

  • Centered Data Analysis: RFC calculates "Alignment Scores" for samples within each specific subgroup (e.g., "Female, Class 0"). It looks for samples that contribute most to the variance within that specific group.
  • Online Data Sanitization: The algorithm iteratively identifies candidate "poisoning sets" from subgroups. It then retrains the model without these sets and evaluates the result on a small, clean validation set.
  • Balanced Metric: It uses a ValScore that explicitly penalizes both low accuracy and high unfairness, ensuring the final model maintains a healthy trade-off.

Datasets

The authors evaluated their methods on two gold-standard fairness benchmarks:

  • Adult Census Dataset: Predicting whether an individual's income exceeds $50k/year, with gender as the sensitive attribute.
  • COMPAS Dataset: Predicting criminal recidivism, with race as the sensitive attribute.

Key Insights and Ideas

  • Fairness is a unique target: Traditional attacks like Min-Max are "loud" and easily caught by gradient-based defenses. F-Attack is "quiet" because it exploits the tension between accuracy and fairness.
  • The Subgroup Blind Spot: Global defenses fail because they average out the "weirdness" of poisoning samples across the whole population. RFC’s "aha moment" is that to protect fairness, you must defend every subgroup individually.
  • Theoretical Guarantee: The authors provide a theoretical proof (Theorem 4.1) showing that their alignment score method is mathematically guaranteed to remove more poisoning samples than clean samples, provided the attack is sufficiently distinct from the clean distribution.

Key Results

The experiments demonstrate that F-Attack is significantly more damaging than standard attacks, and RFC is the only defense that consistently holds the line.

As shown in Table 1, on the Adult Census dataset, F-Attack (z=1) drops the fairness of a "No Defense" model to 0.803. Even the sophisticated SEVER defense only manages to bring it back to 0.943, while suffering an accuracy hit.

Table 1: F-Attack vs. Min-Max on Adult Census Dataset

In more extensive testing (see the extracted tables below), RFC consistently outperformed baselines like Wang and Roh across various attack types (Label Flipping, Attribute Flipping, and F-Attack). For instance, under a 15% F-Attack on the Adult dataset, RFC maintained an accuracy of ~0.80 and fairness of ~0.95, while other defenses saw accuracy plummet to the low 0.70s.

Extracted table showing RFC performance vs baselines

Limitations and Future Work

  • Linear Scope: This work focuses primarily on linear classification problems. While the authors suggest RFC could be extended to Deep Neural Networks (DNNs) using techniques like energy-based out-of-distribution detection, they leave the empirical validation for future study.
  • Clean Validation Set: The defense relies on the availability of a small, trusted, clean validation set to guide the "Online Data Sanitization" process. In some real-world scenarios, obtaining even a small amount of perfectly clean data might be challenging.
  • Computational Cost: The iterative "retrain-and-test" nature of the online sanitization process could be computationally expensive for very large datasets or complex models.

Summary updated

BibTeX
@misc{xu2022towards,
  author = {Han Xu and Xiaorui Liu and Yuxuan Wan and Jiliang Tang},
  title = {{Towards Fair Classification against Poisoning Attacks}},
  year = {2022},
  eprint = {2210.09503},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.09503},
}
Figure