Are Two Heads the Same as One? Identifying Disparate Treatment in Fair Neural Networks

Michael Lohaus, Matthäus Kleindessner, Krishnaram Kenthapadi, Francesco Locatello, Chris Russell

Introduction

Researchers have discovered a striking irony in AI fairness: the more we force a neural network to satisfy "demographic parity," the more it learns to recognize protected attributes like race or gender. By demonstrating that popular fairness techniques are mathematically equivalent to explicitly treating groups differently, this paper argues that many "fair" AI models may actually be committing illegal "disparate treatment" under U.S. law.

The Tension: Disparate Impact vs. Disparate Treatment

In the world of algorithmic fairness, there is a constant tension between two legal and ethical concepts: disparate impact (ensuring outcomes are equal across groups) and disparate treatment (ensuring individuals aren't treated differently based on protected traits).

Many developers use "fairness-regularized" training or data "massaging" to ensure their models produce equal outcomes. The common assumption is that if the model isn't explicitly given a protected attribute (like gender) at test time, it isn't guilty of disparate treatment. This paper challenges that assumption. The authors investigate whether these models are simply "learning to discriminate" internally to balance their own books, effectively creating different "cutoff scores" for different groups under the hood.

Methodology: Peeking Inside the Black Box

The authors employ a multi-step analytical approach to "peek inside" fair models, primarily using the CelebA dataset (a large-scale face attributes dataset) and standard architectures like ResNet50 and MobileNetV3-Small.

  1. Probing Internal States: They trained standard models on image tasks and used linear classifiers to see if the "protected attribute" (e.g., gender) could be recovered from the network's final hidden layer.
  2. The "Two-Headed" Model: They introduced a novel architecture with two output heads: one for the main task (e.g., "is this person smiling?") and one to explicitly predict the protected attribute.
  3. Head Merging: They demonstrated that by taking a weighted sum of these two heads, they could create a single-headed network that is mathematically identical to the original architecture but achieves demographic parity.
  4. Reconstruction & Counterfactuals: They showed that the decisions of existing fair models (trained with standard regularizers) can be almost perfectly replicated by their "two-headed" approach. This allowed them to perform counterfactual analysis: "How would the model's decision change if it perceived this person as a different gender?"

Key Insights and Ideas

Fairness Requires Awareness

The most counterintuitive finding is that as a model becomes "fairer" (in terms of outcome parity), its internal representations become more predictive of protected attributes. To balance outcomes, the model must first learn to identify which group a person belongs to.

Comparison of last-layer representations: unconstrained, regularized for demographic parity, and explicitly group-aware.

As seen in the visualizations above, an unconstrained model mixes the protected groups (Group 0 and Group 1) in its internal representation. However, a model regularized for demographic parity separates these groups almost exactly like a model explicitly trained to be aware of them.

The Hidden "Group-Aware" Switch

The authors prove that fairness regularizers act as a "proxy" for group-specific thresholds. Even if you don't give the model a "Gender" label at test time, the model reconstructs that label internally and uses it to shift the decision boundary for that specific group.

Under U.S. law (specifically Title VII), using different cutoff scores for different groups is generally illegal. Because these fair models effectively "relabel" individuals based on inferred group membership, the authors argue they are likely performing unlawful disparate treatment.

Key Results

  • Attribute Recovery: In 71 out of 72 experiments, there was a positive correlation between the strength of the fairness constraint and the accuracy of predicting the protected attribute from the model's internal state. In some cases, gender could be predicted with 98% accuracy from the internal state of a model that was never explicitly told to look for it.
  • Decision Replication: The "Two-Headed" approach matched the accuracy-fairness trade-offs of state-of-the-art methods while being much more computationally efficient (requiring only one training run instead of dozens to find the right hyperparameter).
  • Counterfactual Impact: For the "fairest" models, up to 30-35% of individuals would receive a different decision if their perceived protected attribute were flipped. This is significantly higher than the "noise" or instability found in standard model retraining (which was around 7%).

Limitations and Future Work

  • Scope of Fairness Definitions: The paper focuses specifically on demographic parity. It does not extensively analyze "Fair Representation Learning," which explicitly tries to hide protected attributes from the network (though the authors suspect these methods may show lower accuracy).
  • Jurisdictional Differences: The legal argument is heavily centered on U.S. law. The authors note that EU law allows for more latitude in "rectifying indirect discrimination," meaning these techniques might be legally safer in Europe.
  • The Path Forward: The authors conclude that because the "opaque nature of ML" makes it nearly impossible to achieve fair outcomes without some form of disparate treatment, legal reform may be necessary to explicitly allow these techniques as tools for equity.

Summary updated

BibTeX
@inproceedings{lohaus2022are,
  author = {Michael Lohaus and Matthäus Kleindessner and Krishnaram Kenthapadi and Francesco Locatello and Chris Russell},
  title = {{Are Two Heads the Same as One? Identifying Disparate Treatment in Fair Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ccyZEIAiFwb},
}
Figure