Skip to main content
QUICK REVIEW

[Paper Review] Training OOD Detectors in their Natural Habitats

Julian Katz-Samuels, Julia Nakhleh|arXiv (Cornell University)|Feb 7, 2022
Anomaly Detection Techniques and ApplicationsComputer Science15 citations
TL;DR

This paper proposes WOODS, a novel constrained optimization framework that trains out-of-distribution (OOD) detectors using unlabeled 'wild' data—natural mixtures of in-distribution and OOD samples—without requiring auxiliary outlier data. By formulating a tractable optimization problem via the augmented Lagrangian method, WOODS achieves state-of-the-art OOD detection performance, outperforming baseline methods by 48.10% in FPR95 on CIFAR-100 and 7.36% over Outlier Exposure.

ABSTRACT

Out-of-distribution (OOD) detection is important for machine learning models deployed in the wild. Recent methods use auxiliary outlier data to regularize the model for improved OOD detection. However, these approaches make a strong distributional assumption that the auxiliary outlier data is completely separable from the in-distribution (ID) data. In this paper, we propose a novel framework that leverages wild mixture data, which naturally consists of both ID and OOD samples. Such wild data is abundant and arises freely upon deploying a machine learning classifier in their natural habitats. Our key idea is to formulate a constrained optimization problem and to show how to tractably solve it. Our learning objective maximizes the OOD detection rate, subject to constraints on the classification error of ID data and on the OOD error rate of ID examples. We extensively evaluate our approach on common OOD detection tasks and demonstrate superior performance.

Motivation & Objective

  • To address the limitations of existing OOD detection methods that rely on manually collected, clean auxiliary outlier datasets.
  • To leverage abundant, unlabeled 'wild' data—naturally occurring mixtures of in-distribution and OOD samples—during real-world deployment.
  • To develop a constrained optimization framework that maintains high in-distribution classification accuracy while minimizing false OOD detections on in-distribution data.
  • To provide a tractable, end-to-end training procedure for deep neural networks using the augmented Lagrangian method.

Proposed method

  • Formulates OOD detection as a constrained optimization problem: maximize OOD detection rate while constraining in-distribution misclassification and OOD error on in-distribution examples.
  • Uses the augmented Lagrangian method (ALM) to solve the constrained optimization problem with inequality constraints, enabling end-to-end training via stochastic gradient descent.
  • Employs a differentiable sigmoid loss function for OOD detection, compatible with deep learning, unlike prior work using intractable 0-1 losses.
  • Integrates both in-distribution classification and OOD detection objectives into a unified training objective using only labeled ID data and unlabeled wild data.
  • Adapts ALM to deep neural networks for nonlinear inequality constraints, ensuring strong theoretical guarantees.
  • Employs a dual ascent strategy to enforce constraints on in-distribution error and OOD error on ID data, maintaining baseline classification accuracy.

Experimental results

Research questions

  • RQ1Can OOD detectors be effectively trained using only unlabeled wild data, without access to clean outlier datasets?
  • RQ2How can constrained optimization be adapted to deep neural networks to jointly optimize in-distribution classification and OOD detection?
  • RQ3Does leveraging naturally occurring data mixtures lead to better generalization to real-world test-time distributions than offline auxiliary outlier data?
  • RQ4What is the impact of varying the mixture ratio of in-distribution and OOD data in the wild data on OOD detection performance?
  • RQ5How does the proposed method compare to strong baselines that use auxiliary outlier data in terms of FPR95 and detection accuracy?

Key findings

  • WOODS achieves a 48.10% improvement in FPR95 over a strong baseline trained only on in-distribution data on CIFAR-100.
  • The method outperforms Outlier Exposure (OE) by 7.36% in FPR95, demonstrating the superiority of wild data over curated auxiliary outlier data.
  • The framework maintains near-optimal in-distribution classification accuracy while significantly improving OOD detection, even when the wild data mixture ratio is highly skewed.
  • Ablation studies show robust performance across diverse datasets and varying mixture ratios of ID and OOD data in the wild data.
  • Theoretical and empirical analysis confirms that the choice of sigmoid loss in the constrained optimization framework leads to effective OOD detection.
  • The augmented Lagrangian method enables stable and tractable training with strong convergence guarantees, outperforming regularization-based approaches.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.