Post-Hoc Methods for Debiasing Neural Networks

Yash Savani, Colin White, Naveen Sundar Govindarajulu

Abstract

As deep learning models become tasked with more and more decisions that impact human lives, such as criminal recidivism, loan repayment, and face recognition for law enforcement, bias is becoming a growing concern. Debiasing algorithms are typically split into three paradigms: pre-processing, in-processing, and post-processing. However, in computer vision or natural language applications, it is common to start with a large generic model and then fine-tune to a specific use-case. Pre- or in-processing methods would require retraining the entire model from scratch, while post-processing methods only have black-box access to the model, so they do not leverage the weights of the trained model. Creating debiasing algorithms specifically for this fine-tuning use-case has largely been neglected. In this work, we initiate the study of a new paradigm in debiasing research, intra-processing, which sits between in-processing and post-processing methods. Intra-processing methods are designed specifically to debias large models which have been trained on a generic dataset and fine-tuned on a more specific task. We show how to repurpose existing in-processing methods for this use-case, and we also propose three baseline algorithms: random perturbation, layerwise optimization, and adversarial fine-tuning. All of our techniques can be used for all popular group fairness measures such as equalized odds or statistical parity difference. We evaluate these methods across three popular datasets from the AIF360 toolkit, as well as on the CelebA faces dataset.

Introduction

In modern machine learning, the standard workflow often involves taking a massive pre-trained model (e.g., ResNet or BERT) and fine-tuning it for a specific downstream task. While this approach is computationally efficient, it presents a significant challenge for ensuring fairness. Existing debiasing tools generally fall into three categories:

  1. Pre-processing: Modifying the training data before the model sees it.
  2. In-processing: Incorporating fairness constraints directly into the training objective, which requires retraining the entire model from scratch.
  3. Post-processing: Adjusting the outputs of a trained "black-box" model without accessing its internal parameters.
Taxonomy of debiasing paradigms, highlighting the novel intra-processing stage between in-processing and post-processing.

As illustrated in Figure 1, there is a "missing middle" in this taxonomy. In-processing is often prohibitively expensive for large-scale models, while post-processing ignores the rich information stored in the model's internal weights, often leading to a significant drop in accuracy. This research introduces intra-processing, a paradigm designed to leverage the internal weights of a pre-trained model to improve fairness during the fine-tuning stage.

Methodology

The authors propose and evaluate four distinct intra-processing techniques to update model weights for fairness:

  • Random Perturbation: A simple baseline that iteratively adds multiplicative Gaussian noise to model weights, keeping the version that best optimizes a combined accuracy-fairness objective.
  • Layer-wise Optimization: To manage computational complexity, this method uses Gradient-Boosted Regression Trees (GBRT)—a zeroth-order optimization technique—to tune the weights of individual layers one at a time.
  • Adversarial Fine-Tuning: The most sophisticated approach, where a "critic" model is trained to predict the amount of bias in a minibatch. The main model is then updated via backpropagation to "fool" the critic, effectively using the critic as a differentiable proxy for non-differentiable fairness metrics.
  • Repurposed In-processing: The authors demonstrate how to adapt existing in-processing algorithms (specifically Zhang et al.’s adversarial method) by lowering learning rates and limiting their influence on early layers to suit the fine-tuning context.

Experimental Evaluation

The study evaluates these methods across both tabular and image-based data:

  • AIF360 Tabular Datasets: Includes the COMPAS recidivism dataset (protected attributes: race, gender), Adult Census Income (gender, race), and Bank Marketing (age).
  • CelebA Faces Dataset: A large-scale image dataset. The authors focused on predicting "young" or "smiling" attributes while using the Fitzpatrick skin type scale as the protected attribute to ensure fairness across different skin tones.

Key Insights and Results

Pareto-Dominance

Intra-processing methods frequently "Pareto-dominate" traditional post-processing methods, meaning they can achieve higher accuracy and lower bias simultaneously. On the CelebA dataset, the Adversarial Fine-Tuning method achieved a balanced accuracy of ~91% while keeping bias below a 0.05 threshold. In contrast, standard post-processing methods like "Reject Option Classification" (ROC) or "Equalized Odds" (EqOdds) either failed to meet the fairness threshold or suffered significantly lower accuracy.

Bias Volatility

One of the most striking findings is that bias is far more sensitive to initial conditions than accuracy. In models trained with different random seeds, the variance in bias scores was an order of magnitude higher than the variance in accuracy. This reinforces the need for debiasing after an initial model is trained but before it is deployed (i.e., intra-processing).

Efficiency and Consistency

By only fine-tuning or optimizing specific layers, these methods provide a "fair" model in a fraction of the time it would take to retrain a large architecture like ResNet-18 from scratch. Furthermore, intra-processing methods were more consistent at keeping bias below target thresholds across multiple trials compared to post-hoc adjustments.

Conclusion and Future Work

Intra-processing fills a vital gap in the debiasing literature, offering a practical solution for large-scale models where retraining is impossible and black-box adjustments are insufficient. While challenges remain—such as the computational overhead of zeroth-order optimization and the difficulty of ensuring fairness on small validation sets—this work establishes a new frontier for developing fair and accurate AI systems. Future directions include exploring intra-processing for NLP models (like Transformers) and developing more efficient first-order optimization proxies for a wider variety of fairness constraints.

Summary updated

Abstract

As deep learning models become tasked with more and more decisions that impact human lives, such as criminal recidivism, loan repayment, and face recognition for law enforcement, bias is becoming a growing concern. Debiasing algorithms are typically split into three paradigms: pre-processing, in-processing, and post-processing. However, in computer vision or natural language applications, it is common to start with a large generic model and then fine-tune to a specific use-case. Pre- or in-processing methods would require retraining the entire model from scratch, while post-processing methods only have black-box access to the model, so they do not leverage the weights of the trained model. Creating debiasing algorithms specifically for this fine-tuning use-case has largely been neglected. In this work, we initiate the study of a new paradigm in debiasing research, intra-processing, which sits between in-processing and post-processing methods. Intra-processing methods are designed specifically to debias large models which have been trained on a generic dataset and fine-tuned on a more specific task. We show how to repurpose existing in-processing methods for this use-case, and we also propose three baseline algorithms: random perturbation, layerwise optimization, and adversarial fine-tuning. All of our techniques can be used for all popular group fairness measures such as equalized odds or statistical parity difference. We evaluate these methods across three popular datasets from the AIF360 toolkit, as well as on the CelebA faces dataset. Our code is available at https://github.com/abacusai/intraprocessing_debiasing.
BibTeX
@inproceedings{savani2020post,
  author = {Yash Savani and Colin White and Naveen Sundar Govindarajulu},
  title = {{Post-Hoc Methods for Debiasing Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=6Zvduh7djha},
}
Figure