DFM-X: Augmentation by Leveraging Prior Knowledge of Shortcut Learning

Shunxin Wang, Christoph Brune, Raymond Veldhuis, Nicola Strisciuglio

Abstract

Neural networks are prone to learn easy solutions from superficial statistics in the data, namely shortcut learning, which impairs generalization and robustness of models. We propose a data augmentation strategy, named DFM-X, that leverages knowledge about frequency shortcuts, encoded in Dominant Frequencies Maps computed for image classification models. We randomly select X% training images of certain classes for augmentation, and process them by retaining the frequencies included in the DFMs of other classes. This strategy compels the models to leverage a broader range of frequencies for classification, rather than relying on specific frequency sets. Thus, the models learn more deep and task-related semantics compared to their counterpart trained with standard setups. Unlike other commonly used augmentation techniques which focus on increasing the visual variations of training data, our method targets exploiting the original data efficiently, by distilling prior knowledge about destructive learning behavior of models from data. Our experimental results demonstrate that DFM-X improves robustness against common corruptions and adversarial attacks. It can be seamlessly integrated with other augmentation techniques to further enhance the robustness of models.

Introduction: The Challenge of Shortcut Learning

Deep learning models often take the "path of least resistance," latching onto superficial statistical correlations—shortcuts—rather than learning deep semantic concepts. A common but subtle shortcut occurs in the frequency domain, where models rely on a narrow subset of spectral patterns to achieve high training accuracy. This reliance makes them fragile when faced with noise, weather conditions, or adversarial perturbations that disrupt these specific frequencies.

Standard data augmentation techniques like AugMix or AutoAugment focus on increasing visual variety but do not explicitly address these model-distilled shortcuts. We introduce DFM-X (Dominant Frequency Map - X%), an augmentation strategy that uses a model's own spectral bias to force it toward more robust feature learning.

Methodology

The DFM-X pipeline consists of four primary stages designed to break the model's dependence on frequency-domain shortcuts:

  1. Distilling Prior Knowledge: We first compute Dominant Frequency Maps (DFMs) for a pre-trained model. A DFM is a binary mask in the Fourier domain identifying the frequencies most critical for a specific class.
A Dominant Frequency Map (DFM) identifying critical spectral patterns for a specific class.
  1. Targeted Filtering: During training, $X\%$ of images are randomly selected for augmentation.
  2. Cross-Class Frequency Swapping: For an image of class A, we apply a DFM from a different class B. We transform the image via Fast Fourier Transform (FFT), apply the mask, and transform it back to the spatial domain.
An image processed via DFM-X, where frequency components are filtered to discourage shortcut learning.
  1. Semantic Forcing: By presenting a "truck" image containing only the frequencies typically used to identify a "frog," the model is forced to ignore its usual frequency shortcuts and seek deeper, more robust semantic features.

Experimental Setup and Datasets

We evaluated DFM-X using two primary benchmarks:

  • CIFAR-10: Used for standard training and clean-data accuracy.
  • CIFAR-C: A robustness benchmark containing 19 corruption types (e.g., blur, snow, digital noise) across five severity levels, used to calculate Corruption Error.

Key Insights

  • Targeting Implicit Shortcuts: Unlike methods that focus on visible spatial shortcuts (like color patches), DFM-X targets implicit spectral shortcuts that are often invisible to humans but highly influential to neural networks.
  • Synergistic Effects: DFM-X is highly complementary to standard augmentations. While AugMix increases data variety, DFM-X improves data efficiency by breaking spectral dependencies.
  • Model Capacity and Robustness Tax: Lower-capacity models (e.g., ResNet18) benefit more from higher augmentation rates ($X$). Crucially, DFM-X avoids the "robustness tax" typical of adversarial training, maintaining or even improving clean accuracy.

Results

DFM-X demonstrates significant improvements across multiple robustness metrics:

  • Corruption Robustness: On ResNet18, DFM-X reduced the mean Corruption Error (mCE) from 100% to 85.36%.
  • Adversarial Defense: Accuracy under PGD attacks improved from 38.43% (baseline) to 45.88% with DFM-X.
  • Combined Performance: The best results were consistently achieved by combining DFM-X with existing augmentation suites, confirming that shortcut mitigation is a distinct and valuable objective.

Conclusion and Future Work

While DFM-X effectively addresses frequency-domain shortcuts, models may still rely on other shortcut types (spatial or temporal). Future research should explore "data-aware" strategies that consider specific data characteristics and extend these frequency-based approaches to domains like video or medical imaging.

Summary updated

BibTeX
@inproceedings{wang2023dfm,
  author = {Shunxin Wang and Christoph Brune and Raymond Veldhuis and Nicola Strisciuglio},
  title = {{DFM-X: Augmentation by Leveraging Prior Knowledge of Shortcut Learning}},
  booktitle = {VIPriors @ ICCV},
  year = {2023},
  url = {https://openreview.net/forum?id=NywSmrJ3Hr},
}
Figure