Fighting Fire with Fire: Avoiding DNN Shortcuts through Priming

Chuan Wen, Jianing Qian, Jierui Lin, Jiaye Teng, Dinesh Jayaraman, Yang Gao

Deep neural networks (DNNs) are notorious for learning "shortcuts"—spurious correlations like background textures—rather than the actual task. This paper introduces PrimeNet, a strategy that uses simple domain knowledge to provide a "priming" variable (a coarse estimate of the answer) to the model, effectively creating a "good" shortcut that out-competes "bad" ones during training.

The Problem: Shortcut Learning

DNNs are "lazy" optimizers. When trained on standard labeled datasets, they often latch onto the easiest statistical path to minimize loss, even if that path is a fluke of the data distribution. This phenomenon is known as shortcut learning.

For example, a model trained to recognize "cows" might learn to look for green grass because most training photos of cows are in pastures. When shown a cow on a beach, the model fails. In autonomous driving, a model might learn a "copycat" shortcut: instead of processing complex visual cues to decide when to move, it simply copies its previous action. If the car stopped at a red light, it might stay stopped forever because it’s "stuck" in a loop of copying the previous "stop" command.

Standard supervision (just the input and the final label) isn't enough to steer models away from these pitfalls.

The Solution: PrimeNet Architecture

To combat this, the authors propose PrimeNet, which "primes" the model using a two-module architecture:

Standard vs. Primed DNN Training
  1. The Priming Module ($g_\phi$): This module takes only "key inputs"—subsets of the data that humans know are task-relevant (e.g., the foreground object in an image or the most recent frame in a video). It produces a priming variable ($\zeta$), which is a coarse, approximate estimate of the target label.
  2. The Main Module ($f_\theta$): This module receives the full input (e.g., the whole image or the entire video history) plus the priming variable $\zeta$.

The "Aha!" Moment: By providing $\zeta$, the authors intentionally create a "better" shortcut. Because $\zeta$ is already a decent guess at the answer and is fed directly into the main module, the optimizer finds it much easier to rely on $\zeta$ (and by extension, the key features) than to hunt for complex, spurious correlations in the background or history.

The authors use a stop-gradient operation between the modules to ensure the main module doesn't "corrupt" the priming module's focus on the key features during backpropagation.

Key Insights

  • Simplicity Bias as a Tool: DNNs have a "simplicity bias"—they prefer functions that are linear or less complex. PrimeNet exploits this by making the "correct" solution look simpler to the optimizer than the "wrong" shortcut.
  • Fighting Fire with Fire: Instead of trying to mathematically "remove" bad shortcuts (which is computationally expensive and often requires knowing exactly what the shortcuts are), PrimeNet simply provides a more attractive, human-guided shortcut.
  • Domain Knowledge is Cheap: You don't need perfect "key inputs." Even a coarse crop of an image or just looking at the single most recent frame is enough to "prime" the model effectively.
  • Theoretical Grounding: The authors connect their empirical success to Neural Tangent Kernel (NTK) theory, proving that under certain conditions, a model will naturally prefer the linear path provided by the priming variable over non-linear spurious correlations.

Empirical Results

The researchers evaluated PrimeNet across several distinct domains, proving its versatility against baseline models:

  • Image Classification (NICO): On this benchmark for out-of-distribution (OOD) generalization (e.g., animals in unusual contexts), PrimeNet improved OOD accuracy by over 6% compared to a vanilla ResNet-18, outperforming state-of-the-art debiasing methods like IRM and StableNet.
  • Autonomous Driving (CARLA): Tested in a high-fidelity simulator to address the "copycat" problem in dense traffic, PrimeNet significantly reduced "timeouts." Its success rate was 49.3%, nearly doubling the performance of vanilla Behavioral Cloning (34.1%) and even beating DAGGER, an "upper bound" method requiring an active expert during training.
  • Robotics (MuJoCo): In continuous control tasks (Hopper, Ant, HalfCheetah), PrimeNet consistently outperformed specialized imitation learning techniques designed to fight shortcuts, such as History-Dropout and Fighting Copycat Agents (FCA).

Limitations and Future Work

While powerful, PrimeNet relies on a human to specify the "key inputs" (e.g., "look at the foreground"). If the specified key input is poorly defined or irrelevant, it could theoretically hurt performance. Currently, the function $k(x)$ that extracts key features is hand-crafted. Future work could focus on automatically discovering these key inputs from data and refining how much information the coarse priming variable should carry to balance guidance versus flexibility.

Summary updated

BibTeX
@inproceedings{wen2022fighting,
  author = {Chuan Wen and Jianing Qian and Jierui Lin and Jiaye Teng and Dinesh Jayaraman and Yang Gao},
  title = {{Fighting Fire with Fire: Avoiding DNN Shortcuts through Priming}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=hpqHPKJcui},
}
Figure