TL;DR
NeuronFair is a new white-box testing framework that uncovers individual discrimination in deep neural networks (DNNs) by identifying the specific internal "biased neurons" responsible for unfair decisions. It outperforms existing state-of-the-art methods by generating nearly 6x more discriminatory instances with a massive 534% average speedup, while uniquely supporting both tabular and image data.
What Problem Does This Paper Address?
As DNNs are increasingly used for high-stakes decisions like loan approvals or criminal justice, ensuring their fairness is critical. Most existing fairness testing tools suffer from three major flaws:
- Lack of Interpretability: They can find biased outcomes but can't explain why the model is biased internally.
- Efficiency Issues: Many rely on gradient-based searches that fail when gradients "vanish" (become too small to provide direction), leading to slow generation or repetitive test cases.
- Data Limitations: Most tools only work on structured (tabular) data. Modifying a "sensitive attribute" like gender in a face image is much harder than flipping a "Gender" bit in a spreadsheet.
Methods
The authors introduce a three-stage approach:
- Biased Neuron Identification: They feed the model pairs of instances that are identical except for a sensitive attribute (e.g., race). By measuring the Activation Difference (ActDiff) of internal neurons, they identify which neurons "react" most violently to changes in sensitive attributes. These are the "biased neurons."
- Quantitative Measurement (AS Curve & AUC): They propose the Activation Sensitivity (AS) curve and its Area Under the Curve (AUC) to quantify exactly how much discrimination exists within each layer of the network.
- Two-Phase Generation:
- Global Phase: Uses K-means clustering and momentum-based acceleration to find a diverse set of "seed" discriminatory instances.
- Local Phase: Searches the immediate neighborhood of those seeds to generate a high volume of unique test cases.
- Generalization to Unstructured Data: To handle images, they use adversarial attack techniques (like FGSM) to find the minimal pixel perturbations that "flip" a sensitive attribute (like gender) according to a separate classifier, allowing them to test fairness on face detection models.
Datasets
The researchers evaluated NeuronFair on seven datasets:
- Structured (Tabular): Adult (census income), German Credit, Bank Marketing, COMPAS (recidivism), and MEPS (medical expenditure).
- Unstructured (Image): Two newly constructed benchmarks for face detection: ClbA-IN (based on CelebA) and LFW-IN (based on Labeled Faces in the Wild).
Key Insights and Ideas
- Bias is Internal: The "aha moment" is that discrimination isn't just an output error; it's a measurable internal state. The authors found that zeroing out the identified "biased neurons" significantly reduced the model's overall discrimination.
- Shortcutting Gradient Vanishing: By targeting internal neurons rather than just the final output layer, NeuronFair creates a shorter "derivation path" for its search algorithm. This effectively bypasses the gradient vanishing problem that slows down other tools.
- Diversity via Dynamics: Instead of a static search, NeuronFair uses dynamic combinations of biased neurons to guide the generation process, ensuring the resulting test cases aren't just numerous, but also diverse.
Key Results
- Effectiveness: On structured data, NeuronFair generated 5.84x more discriminatory instances than state-of-the-art baselines (like ADF and EIDIG).
- Efficiency: It achieved an average speedup of 534.56%. For example, on the Adult dataset, it generated 1,000 instances in ~121 seconds, while some baselines took over 1,500 seconds.
- Fairness Improvement: Retraining models using the instances found by NeuronFair reduced bias in face detectors by 53.77%, far exceeding the 8-10% improvement seen with other methods.
- Interpretability: NeuronFair's test cases covered 100% of biased neurons, whereas competing methods missed significant portions of the internal circuitry causing the bias.
Limitations and Future Work
- White-Box Requirement: The method requires full access to the model's internal weights and activations, which may not be possible for proprietary "API-only" models.
- Attribute Correlation: In unstructured data (images), the authors acknowledge that perturbing one attribute (like gender) might slightly affect others due to feature correlation, though they argue this doesn't break the testing logic.
- Single Attribute Focus: The current experiments focus on one sensitive attribute at a time. The authors suggest that handling multiple intersecting attributes (e.g., Black women vs. White men) is a promising direction for future research but would increase computational costs.
Summary updated