Fairneuron: Improving Deep Neural Network Fairness with Adversary Games on Selective Neurons

Xuanqi Gao, Juan Zhai, Shiqing Ma, Chao Shen, Yufei Chen, Qian Wang

Abstract

Deep Neural Networks (DNNs) are increasingly deployed in high-stakes domains, yet they often inherit and amplify societal biases. Traditional adversarial training methods to mitigate this bias are computationally expensive and difficult to stabilize. We present FairNeuron, a lightweight "automatic repair" tool that improves fairness by identifying and muting specific neurons where accuracy and fairness goals conflict. By applying selective dropout to these "biased" neurons during a specialized retraining phase, FairNeuron achieves state-of-the-art fairness results with significantly lower overhead than traditional methods.

1. Introduction

As Deep Neural Networks (DNNs) become integral to critical decision-making systems—including AI-driven hiring, loan processing, and recidivism prediction—their ethical implications have come to the forefront. These models frequently mirror biases present in their training data, leading to discriminatory outcomes based on sensitive attributes such as race, gender, or age.

The prevailing solution to this issue is adversarial training, which employs a "minimax game" where a primary model attempts to perform its task while a secondary adversary model tries to detect sensitive attributes from the primary model's internal representations. While effective in theory, this approach is often computationally prohibitive, prone to training instabilities like "mode collapse," and frequently results in a significant "fairness-accuracy trade-off." FairNeuron addresses these challenges by shifting the adversarial game from the model level to the individual neuron level.

2. Methodology

FairNeuron operates on the insight that conflicts between accuracy and fairness are localized within specific "conflict paths" in a network. The tool implements a three-stage pipeline:

2.1 Neural Network Slicing

The first stage involves identifying neurons that rely heavily on sensitive attributes to generate predictions. Through forward and backward analysis, FairNeuron calculates the contribution of each neuron to the final output, pinpointing those most responsible for biased behavior.

2.2 Sample Clustering

Using the results from the slicing phase, FairNeuron clusters training data into "biased" and "benign" samples. Biased samples are defined as those that trigger the previously identified conflict paths, indicating a reliance on unfair features.

2.3 Selective Training

Rather than modifying the entire architecture, FairNeuron introduces a specialized retraining phase. When processing a "biased" sample, the model applies selective dropout to the conflict neurons, effectively muting them. This forces the network to ignore biased shortcuts and instead learn from more robust, fair features. For "benign" samples, the model undergoes standard training to preserve overall accuracy.

3. Experimental Setup

The efficacy of FairNeuron was evaluated across several standard fairness benchmarks and image datasets:

  • UCI Adult Census: Income prediction (Sensitive attribute: Gender).
  • COMPAS: Recidivism risk assessment (Sensitive attribute: Race).
  • German Credit: Creditworthiness assessment (Sensitive attribute: Gender).
  • MNIST & CIFAR-10: Scalability testing for image data using Class-wise Variance (CV) and Maximum Class-wise Discrepancy (MCD) as metrics.

4. Key Insights

  • Localized Bias: Bias is not a global property of the model but is often concentrated in specific paths. Surgical intervention is more efficient than broad retraining.
  • The Path of Least Resistance: Models often exploit sensitive attributes because they provide an "easy" path to high training accuracy. Muting these neurons forces the optimizer to find more complex, but fairer, features.
  • Utility Gains: In some instances, such as with the COMPAS and German Credit datasets, fixing fairness actually improved accuracy by preventing the model from overfitting to biased noise.

5. Results

FairNeuron demonstrated significant improvements across all metrics:

  • Fairness: Improved Demographic Parity (DP) by an average of 57.65%. Notably, on the Adult Census dataset, the Demographic Parity Ratio (DPR) improved by 98.47%.
  • Efficiency: The method is highly efficient, requiring approximately 20% (1/5th) of the training time required by state-of-the-art adversarial methods like Ethical Adversaries.
  • Stability: Unlike GAN-based frameworks, FairNeuron avoids convergence issues, offering a more stable deployment path for engineers.
  • Scalability: On image datasets, the tool improved fairness by 20% for MCD and 80% for CV.

6. Limitations and Future Work

While FairNeuron represents a significant step forward, several limitations remain. The "slicing" technique is less effective on very small datasets (e.g., German Credit) where distinguishing between biased and benign paths is difficult. Additionally, for Convolutional Neural Networks (CNNs), the current implementation focuses on the final fully-connected layers. Future work will aim to extend path analysis deeper into convolutional layers and explore the assumption that samples activate a limited number of paths across diverse architectures.

Summary updated

BibTeX
@inproceedings{gao2022fairneuron,
  author = {Xuanqi Gao and Juan Zhai and Shiqing Ma and Chao Shen and Yufei Chen and Qian Wang},
  title = {{Fairneuron: Improving Deep Neural Network Fairness with Adversary Games on Selective Neurons}},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510087},
}
Figure