MaskTune: Mitigating Spurious Correlations by Forcing to Explore

Saeid Asgari Taghanaki, Aliasghar Khani, Fereshte Khani, Ali Gholami, Linh Tran, Ali Mahdavi-Amiri, Ghassan Hamarneh · DOI

Introduction

Deep neural networks (DNNs) are notoriously efficient at finding the path of least resistance to minimize loss. While this efficiency is often a strength, it frequently leads to shortcut learning—a phenomenon where models latch onto "spurious correlations" rather than the underlying semantic features of a class. For instance, a model might learn to identify a cow based on the presence of green grass in the background rather than the physical characteristics of the animal itself. When such a model is deployed in a different environment (e.g., a cow on a beach), its performance collapses.

Traditional methods to mitigate these biases often rely on "subgroup labels," which require human annotators to manually identify which images contain spurious features. This process is prohibitively expensive and difficult to scale. MaskTune addresses this challenge by introducing a simple, unsupervised fine-tuning strategy that forces models to look beyond their initial biases and explore a more diverse set of features.

The MaskTune Framework

MaskTune is a two-stage approach designed to encourage "feature exploration" without requiring prior knowledge of what the spurious correlations might be. The process follows four distinct steps:

  1. Initial Training: A standard model is trained using Empirical Risk Minimization (ERM) until it converges on the training set. At this stage, the model likely relies on the most easily accessible features, many of which may be spurious.
  2. Feature Discovery: Using an explainability method called xGradCAM, the researchers generate a saliency map for every training image. This map identifies the specific pixels the model used to make its initial prediction—essentially identifying the model's "first set" of features.
  3. Masking: A modified version of the training set is created where the pixels identified in the saliency map are masked out (blacked out). This effectively hides the "shortcuts" the model has already learned.
  4. Single-Epoch Fine-tuning: The original model is fine-tuned on this masked data for exactly one epoch using a very small learning rate.

The Philosophy of One Epoch

The "magic" of MaskTune lies in its brevity. By masking the primary features, the model is forced to find a "second set" of discriminative features (such as the actual shape or texture of the object) to solve the task. The authors found that limiting this phase to a single epoch is critical; it allows the model to expand its feature repertoire without "forgetting" the valid features it learned during the initial training phase.

Experimental Evaluation

The researchers evaluated MaskTune across several benchmarks designed to test model robustness against biased data:

  • Biased MNIST: A synthetic dataset where digits are correlated with specific colored squares in the corners.
  • CelebA: A real-world dataset of celebrity faces where "blond hair" is spuriously correlated with "gender" in the training distribution.
  • Waterbirds: A classic benchmark where birds (land birds vs. water birds) are placed on misleading backgrounds (land vs. water).
  • ImageNet-9L: A subset of ImageNet used to measure the extent to which models rely on background information for classification.

Additionally, the team tested MaskTune on Selective Classification tasks using CIFAR-10 and SVHN. In these tasks, the model is given the option to "abstain" from making a prediction if its uncertainty is too high, a critical feature for high-stakes applications.

Key Results and Insights

MaskTune consistently outperformed or matched state-of-the-art methods, even those that utilize expensive manual supervision.

Robustness to Bias

On the CelebA dataset, MaskTune achieved a 78.0% "worst-group" accuracy (the accuracy on the rarest combinations, such as blond males). This represents a massive improvement over the standard ERM's 47.2% and significantly outperforms other unsupervised methods like DivDis, which reached only 55.0%. Similarly, on the Waterbirds benchmark, MaskTune improved worst-group accuracy to 86.4%, compared to 80.8% for the baseline model.

Improved Reliability

By ensembling the original ERM model with the MaskTuned model, the researchers created a system with superior "I don't know" capabilities. Because the two models rely on different feature sets (one more background-heavy, one more object-heavy), a disagreement between them serves as a reliable signal of uncertainty. On the SVHN dataset, this approach reduced the error rate to 3.68% at 100% coverage, outperforming specialized architectures like SelectiveNet.

Conclusion and Future Directions

MaskTune demonstrates that "exploration via obstruction" is a powerful tool for building more robust AI. By simply hiding what a model already knows, we can force it to develop a more holistic understanding of the data. Because it is unsupervised and requires only a single additional epoch of training, it is highly accessible for large-scale applications.

However, the authors note that MaskTune is most effective against localized spurious features (like a patch of color). It may struggle with global transformations, such as a subtle color shift applied to an entire image. Future research may explore extending the MaskTune philosophy to Natural Language Processing (NLP), where models often rely on specific "trigger words" rather than the semantic meaning of a sentence.

Summary updated

BibTeX
@inproceedings{taghanaki2022masktune,
  author = {Saeid Asgari Taghanaki and Aliasghar Khani and Fereshte Khani and Ali Gholami and Linh Tran and Ali Mahdavi-Amiri and Ghassan Hamarneh},
  title = {{MaskTune: Mitigating Spurious Correlations by Forcing to Explore}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=hMGSz9PNQes},
}
Figure