Generative Classifiers Avoid Shortcut Solutions

Alexander C. Li, Ananya Kumar, Deepak Pathak
12/31/2025
cs.LGcs.AIcs.CV

No confident code implementation found for this paper.

Abstract

Discriminative approaches to classification often learn shortcuts that hold in-distribution but fail even under minor distribution shift. This failure mode stems from an overreliance on features that are spuriously correlated with the label. We show that generative classifiers, which use class-conditional generative models, can avoid this issue by modeling all features, both core and spurious, instead of mainly spurious ones. These generative classifiers are simple to train, avoiding the need for specialized augmentations, strong regularization, extra hyperparameters, or knowledge of the specific spurious correlations to avoid. We find that diffusion-based and autoregressive generative classifiers achieve state-of-the-art performance on five standard image and text distribution shift benchmarks and reduce the impact of spurious correlations in realistic applications, such as medical or satellite datasets. Finally, we carefully analyze a Gaussian toy setting to understand the inductive biases of generative classifiers, as well as the data properties that determine when generative classifiers outperform discriminative ones.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025generative,
  title  = {Generative Classifiers Avoid Shortcut Solutions},
  author = {Alexander C. Li and Ananya Kumar and Deepak Pathak},
  year   = {2025},
  eprint = {2512.25034},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.25034v1},
  journal = {ICLR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.25034.svg)](https://codeofpaper.com/paper/2512.25034)

Discussion