NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Free Lunch for Generating Effective Outlier Supervision

Sen Pei, Jiaxi Sun, Richard Yi Da Xu, Bin Fan, Shiming Xiang, Gaofeng Meng · OpenReview

TL;DR

This paper introduces BayesAug, a novel method for Out-of-Distribution (OOD) detection that leverages Bayesian principles to improve classifier robustness. By generating "near-realistic" outlier supervision from background features within training images, BayesAug significantly reduces false positives and enhances reliability without requiring explicit OOD samples during training.

What Problem Does This Paper Address?

In real-world applications, computer vision systems frequently encounter data that differs from their training distribution (OOD data). This can lead to incorrect predictions with high confidence, posing significant safety risks. Existing OOD detection methods often rely on heuristic approaches that lack theoretical grounding and struggle with generalization across different model architectures and datasets. The core challenge is to reliably identify OOD data without explicit OOD training examples, while maintaining strong performance on in-distribution data.

Methods

BayesAug tackles OOD detection by reframing it through a Bayesian lens. The authors argue that conventional classifiers fail because they don't properly refine their probability distributions for OOD data. Their approach involves:

  • Bayesian Analysis: They derive a theoretical framework showing how OOD detection relates to a classification problem between in-distribution (ID) and out-of-distribution (OOD) data, highlighting the need to model the "conditional factor" (the probability of an input being ID given its features).
  • Ultra Syntheses: A key innovation is the generation of "near-realistic" OOD supervision. The authors observe that background features within training images, when separated from the main objects, can serve as effective OOD signals. They achieve this by analyzing feature maps from intermediate layers of a neural network and treating image blocks with predictions inconsistent with the whole image as OOD examples.
  • BayesAug Framework: This framework combines a standard classification head (Cls Head) with a new OOD discrimination head (Ood Head). The Cls Head generates predictions for ID data, while the Ood Head, trained using the "ultra syntheses" approach, learns to distinguish ID from OOD features. The final rectified probability distribution is a product of the outputs from both heads, effectively incorporating the conditional factor.
  • Loss Function: A weighted sum of the standard classification loss and the OOD discrimination loss is used for training.

Datasets

The paper evaluates BayesAug on several standard benchmarks:

  • ImageNet [Russakovsky et al., 2015]: Used as the in-distribution dataset.
  • CIFAR-10 [Krizhevsky et al., 2009]: Also used as an in-distribution dataset.
  • OOD Datasets:
    • For ImageNet: iNaturalist, SUN, Places, Textures.
  • For CIFAR-10: SVHN, LSUN, iSUN, Places, Textures.

No new benchmarks were introduced.

Key Insights and Ideas

  • Background as OOD Supervision: The most surprising insight is that background features within training images, often discarded by traditional methods, can be a rich source of "near-realistic" OOD supervision. This bypasses the need for collecting and labeling explicit OOD data.
  • Bayesian Foundation for OOD: The paper provides a theoretical grounding for OOD detection by connecting it to Bayesian principles, offering a more principled approach than purely heuristic methods.
  • Conditional Factor is Key: The authors identify the "conditional factor" (P(x ∈ SID|x)) as crucial for robust OOD detection, which their "ultra syntheses" method implicitly models.
  • Generalizability of Background Features: The effectiveness of using background features suggests that these elements are inherently less tied to specific object categories and thus more representative of general "non-target" information.

Key Results

  • Significant FPR95 Reduction: BayesAug consistently reduces the False Positive Rate at 95% true positive rate (FPR95) across various datasets. On ImageNet, it achieves over 12.50% improvement compared to previous methods.
  • Improved AUROC: The method also shows improvements in Area Under the Receiver Operating Characteristic curve (AUROC).
  • Model and Dataset Agnostic: Experiments demonstrate BayesAug's stability and generalizability across different model architectures (ResNet, DenseNet, MobileNet) and datasets.
  • Negligible Training Cost: The "ultra syntheses" method adds minimal computational overhead during training, making it practical.
  • Failure Cases: While strong, BayesAug can struggle when OOD data shares significant visual similarities with ID data (e.g., Textures dataset when trained on ImageNet), indicating that the diversity of background features in training data is important.

Limitations and Future Work

  • OOD Supervision Diversity: The authors acknowledge that the effectiveness of "ultra syntheses" relies on the diversity of background features in the training data. If training images are very homogeneous, the generated OOD supervision might lack diversity, potentially impacting performance on highly dissimilar OOD data.
  • Overlap in Datasets: The paper notes that performance can be affected when OOD datasets have significant visual overlaps with ID datasets (e.g., Textures and ImageNet).
  • Future Work: The paper suggests that this work can serve as a starting point for further research into OOD detection, emphasizing the potential of leveraging background information and Bayesian principles. The authors also plan to make their code publicly available.

Summary updated

BibTeX
@misc{pei2023free,
  author = {Sen Pei and Jiaxi Sun and Richard Yi Da Xu and Bin Fan and Shiming Xiang and Gaofeng Meng},
  title = {{Free Lunch for Generating Effective Outlier Supervision}},
  year = {2023},
  eprint = {2301.06657},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.06657},
}
Figure