NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Debiasing Surgeon: Fantastic Weights and How to Find Them

Rémi Nahon, Ivan Luiz De Moura Matos, Van-Tam Nguyen, Enzo Tartaglione

Abstract

Deep learning models frequently rely on spurious correlations—or biases—rather than robust features, leading to failures in real-world deployment. Traditional debiasing methods often necessitate computationally expensive retraining or complex loss functions. This paper introduces Finding Fantastic Weights (FFW), a novel pruning-based approach that surgically extracts an inherently unbiased sub-network from a standard, pre-trained model without fine-tuning the original weights. By leveraging the observation that vanilla models often learn robust features alongside biased ones, FFW identifies and preserves the "fantastic weights" that represent true signal while discarding those that encode shortcuts.

Introduction

Deep learning models are notoriously "lazy" learners. When a dataset contains spurious correlations—such as a specific background color consistently appearing with a certain object class—the model will often exploit these shortcuts rather than learning the actual features of the target. While effective on biased training data, these models fail when the shortcuts disappear in the real world.

Existing debiasing techniques typically require training models from scratch using specialized architectures or heavy data augmentation. In the era of massive foundation models, such retraining is increasingly impractical due to high computational costs and environmental impact. FFW addresses this by asking a fundamental question: Does a standard, biased model already contain a smaller, unbiased sub-network hidden within its architecture? If so, can we isolate it through pruning?

Methodology: Finding Fantastic Weights (FFW)

FFW operates on the principle of debiasing through subtraction. Instead of teaching a model to ignore bias, it identifies and removes the specific weights responsible for processing biased information. The process involves four key steps:

  1. Model Initialization: A standard model (comprising an Encoder and a Classifier) is trained on a biased dataset and then frozen. No further updates are made to these original weights.
  2. The Privacy Head: A small, auxiliary neural network called a "Privacy Head" is attached to the Encoder's output. This head is trained specifically to predict the bias (e.g., identifying the background color rather than the object).
  3. Surgical Pruning via Gating: Learnable "gating parameters" or masks are introduced to the Encoder’s weights. These masks are optimized to satisfy two competing objectives: maintaining the high accuracy of the main Classifier while minimizing the mutual information between the Encoder’s output and the bias labels (effectively blinding the network to the bias).
  4. Sub-network Extraction: Using temperature scaling, the gating parameters are pushed toward binary values (0 or 1). Weights associated with a 0 are pruned, leaving behind a sparse, unbiased sub-network.

FFW is versatile, supporting both unstructured pruning (individual weights) and structured pruning (entire neurons or channels), the latter of which provides direct benefits for inference speed.

Experimental Evaluation

The authors evaluated FFW across several rigorous debiasing benchmarks:

  • Biased MNIST: A synthetic dataset where digits are highly correlated with background colors.
  • CelebA: A real-world dataset where the task is to predict attributes like "Blond Hair" or "Wearing Glasses" while ignoring the perceived gender of the subject.
  • Corrupted CIFAR10: A dataset where specific classes are injected with corruptions (e.g., motion blur), forcing the model to distinguish between the corruption and the object.
  • Multi-Color MNIST: A complex variant testing the model's ability to handle multiple simultaneous biases.

Key Results

FFW demonstrated performance competitive with or superior to state-of-the-art (SOTA) debiasing methods like LfF, ReBias, and Group DRO, despite not retraining the base model. Notably, on Corrupted CIFAR10 with a 95% bias correlation, FFW outperformed existing techniques by approximately 17% in task accuracy. On CelebA, FFW achieved ~87% accuracy while reducing bias predictability to the level of a random guess (50%), all while pruning nearly half of the network's parameters.

Insights and Discussion

The Timing of Feature Learning

A core insight of the paper is that vanilla models do learn unbiased features; they simply learn them later. During early training epochs, models focus on easy, biased features. However, if trained until they fully fit the data, they eventually incorporate robust features as well. FFW succeeds by isolating these robust features from the "shortcut" features learned earlier.

Efficiency and Sparsity

Because FFW can utilize structured pruning, it offers a path toward "energy-efficient debiasing." The extracted sub-networks are often 40% to 50% sparse. This means the resulting fair model is not only more robust but also faster and cheaper to run during inference than the original biased model.

The Bottleneck of Bias

The authors provide a theoretical derivation suggesting that if a target task inherently relies on a biased feature for its solution, removing that information will mathematically limit performance. Debiasing, therefore, is a delicate balancing act of removing spurious information without starving the model of necessary signal.

Limitations and Future Work

While powerful, FFW has specific constraints:

  • Bias Starvation: If the initial training data is extremely biased (e.g., 99.9% correlation), the vanilla model may never learn robust features at all. In such cases, there are no "fantastic weights" to find.
  • Data Requirements: Learning the pruning masks requires a small, balanced validation set, which may not always be available in sensitive real-world applications.

Future research may explore applying FFW to massive foundation models, where the ability to debias without retraining could significantly lower the barrier to creating fair and responsible AI systems.

Summary updated

BibTeX
@inproceedings{nahon2024debiasing,
  author = {Rémi Nahon and Ivan Luiz De Moura Matos and Van-Tam Nguyen and Enzo Tartaglione},
  title = {{Debiasing Surgeon: Fantastic Weights and How to Find Them}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73013-9\_25},
}
Figure