Use perturbations when learning from explanations

Juyeon Heo, Vihari Piratla, Matthew Robert Wicker, Adrian Weller

Deep Neural Networks (DNNs) are notorious for "shortcut learning"—exploiting spurious correlations rather than learning the actual underlying logic of a task. A classic example is a model that identifies pneumonia in chest X-rays by looking at hospital-specific text tags rather than actual lung pathology.

To fix this, researchers use Machine Learning from Explanations (MLX). In MLX, humans provide "masks" that highlight irrelevant features (like the hospital tag) to guide the model. Previous approaches attempted to align the model’s internal "saliency maps" with these human masks using gradient regularization. However, these methods are "local"—they only constrain the model at specific training points. To make these constraints stick globally, researchers had to use heavy model smoothing, which often degraded overall performance.

This paper reinterprets MLX not as a simple regularization task, but as a robustness problem. By training models to be invariant to perturbations in human-identified "irrelevant" regions, the authors achieve state-of-the-art results on shortcut-prone datasets, reducing error rates by 20-90% over previous methods.

Recasting MLX as Manifold Robustness

The authors propose a shift in perspective: if a feature is truly irrelevant, the model's prediction should be robust to any changes (perturbations) made to that feature. They treat the human-provided mask as a definition of a lower-dimensional manifold where the model must remain invariant.

To enforce this, they explore three robust training techniques adapted for MLX:

  1. Avg-Ex: Minimizing the average loss over random noise applied to the irrelevant regions.
  2. PGD-Ex: Using Projected Gradient Descent to find the "worst-case" perturbation within the irrelevant region and training the model to ignore it (inspired by adversarial training).
  3. IBP-Ex: Using Interval Bound Propagation to mathematically guarantee that the model's output stays within a certain range, regardless of how the irrelevant features change.
Comparison of MLX methods on toy data showing how IBP-Ex achieves better robustness regions than standard Grad-Reg.

The "secret sauce" of the paper is the Hybrid Approach (P+G / I+G), which combines these robustness techniques with traditional gradient regularization. This allows the model to benefit from both local explanation alignment and global invariance. While robustness is powerful, it struggles when the "irrelevant" space is very high-dimensional. In these cases, the hybrid approach is essential because the gradient regularization helps "guide" the robustness objective.

Key Insights: The Smoothing Trap

A major theoretical contribution of the paper is exposing the "Smoothing Trap." The authors prove that traditional gradient-based MLX (like Grad-Reg) only works globally if the model is extremely smooth. This explains why previous methods often felt like a tug-of-war between accuracy and explanation alignment. By framing the problem as robustness, they move from asking "What is the model looking at?" to "What is the model invariant to?" This provides a much more stable training signal.

Empirical Results

The authors evaluated their methods on four benchmarks designed to test shortcut learning: Decoy-MNIST, Plant Phenotyping, ISIC (Skin Cancer Detection), and Salient-ImageNet. The hybrid methods (P+G and I+G) consistently outperformed all baselines across every dataset.

  • Decoy-MNIST: A synthetic dataset where digits are paired with colored "decoy" squares that reveal the label. The hybrid approach achieved 95.8% worst-group accuracy, compared to just 46.2% for standard gradient regularization and 10.5% for a standard model (ERM).
  • ISIC (Skin Cancer Detection): A medical dataset where a colorful patch often appears next to non-cancerous lesions, leading models to rely on the patch. On the difficult "patched non-cancerous" group, the hybrid method improved accuracy to 69.6%, whereas the standard model sat at 55.9%.
  • Overall Error Reduction: Across the board, the proposed methods reduced the error rate over the previous best MLX methods by 20-90%.

Limitations and Future Work

While highly effective, the method relies on humans providing high-quality masks of irrelevant features. Although some of this can be automated, it remains a bottleneck for scaling to massive datasets. Additionally, techniques like PGD-Ex are computationally expensive, requiring multiple forward/backward passes per training step, and IBP-Ex is difficult to scale to very deep, complex architectures.

Finally, humans might not identify all spurious correlations. Future work will need to explore how these robustness-based MLX models behave when human explanations are noisy, subjective, or incomplete.

Summary updated

BibTeX
@inproceedings{heo2023use,
  author = {Juyeon Heo and Vihari Piratla and Matthew Robert Wicker and Adrian Weller},
  title = {{Use perturbations when learning from explanations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=guyhQMSp2F},
}
Figure