Generative Interventions for Causal Learning

Chengzhi Mao, Augustine Cha, Amogh Gupta, Hao Wang, Junfeng Yang, Carl Vondrick

Abstract

We introduce a framework for learning robust visual representations that generalize to new viewpoints, backgrounds, and scene contexts. Discriminative models often learn naturally occurring spurious correlations, which cause them to fail on images outside of the training distribution. In this paper, we show that we can steer generative models to manufacture interventions on features caused by confounding factors. Experiments, visualizations, and theoretical results show this method learns robust representations more consistent with the underlying causal relationships. Our approach improves performance on multiple datasets demanding out-of-distribution generalization, and we demonstrate state-of-the-art performance generalizing from ImageNet to the ObjectNet dataset.

Introduction: The Challenge of Spurious Correlations

Standard deep learning models are typically trained using Empirical Risk Minimization (ERM), which assumes that test data will mirror the training distribution. However, ERM often latches onto "spurious correlations"—statistical shortcuts that do not reflect the true cause of a label. For example, if a dataset primarily features "ladles" held by human hands, a model may learn that the presence of a hand is a defining feature of a ladle.

A hand holding a broom illustrates how models might misclassify objects based on spurious contextual cues like the presence of a hand.

When such a model encounters a hand holding a broom, it may misclassify it. Factors like camera angle, lighting, and background context are "nuisance variables" that act as confounders, leading models astray when they encounter objects in novel environments.

The GenInt Framework

To break these confounding links, we propose GenInt (Generative Interventions). This framework moves beyond simple data augmentation by explicitly intervening in the causal graph of the image generation process. Our approach relies on three pillars:

  1. Steerable Generative Models: We use BigGAN and GANSpace to identify latent directions corresponding to physical changes, such as rotating an object or swapping its background.
  2. Causal Interventions: Instead of just sampling more images, we move latent vectors along these "nuisance directions." This creates a training distribution where the object (the cause) is decoupled from its usual context (the confounder).
  3. Neural Style Transfer: To maintain realism, we use style transfer to map these generative interventions back onto real ImageNet photos, allowing us to perturb the background or viewpoint of natural images while preserving the original object's identity.
Intervening on the background context of an object allows the model to learn features specific to the object rather than its surroundings.

Experimental Evaluation

We evaluated GenInt on benchmarks designed for out-of-distribution (OOD) generalization, including ObjectNet, a dataset where objects are captured in unusual orientations and backgrounds.

  • ObjectNet State-of-the-Art: GenInt achieved 39.3% top-1 accuracy with a ResNet152, a significant 9% gain over previous benchmarks.
  • Robustness to Corruptions: On ImageNet-C, the method reduced the Mean Corruption Error (mCE) by 12.48% compared to standard training.
  • No Performance Trade-off: Unlike some robustness techniques, GenInt slightly improved accuracy on the original ImageNet validation set and ImageNet-V2, showing no "robustness tax" on clean data.

Visualizations using GradCAM confirm that GenInt-trained models focus more tightly on the object itself (e.g., the head of a broom) rather than the surrounding context (e.g., the hand holding it).

Conclusion

GenInt demonstrates that generative models can be steered to break spurious correlations, forcing discriminative models to learn robust causal features. While currently dependent on the quality of the underlying GAN and some manual selection of latent directions, this framework paves the way for more self-supervised causal learning in computer vision.

Summary updated

BibTeX
@inproceedings{mao2021generative,
  author = {Chengzhi Mao and Augustine Cha and Amogh Gupta and Hao Wang and Junfeng Yang and Carl Vondrick},
  title = {{Generative Interventions for Causal Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=Ht6sr6nXqEO},
}
Figure