Skip to main content
QUICK REVIEW

[Paper Review] Is Out-of-Distribution Detection Learnable?

Zhen Fang, Yixuan Li|arXiv (Cornell University)|Oct 26, 2022
Machine Learning and AlgorithmsComputer Science32 citations
TL;DR

The paper develops a PAC-learning-theory framework for OOD detection, proving conditions under which OOD detection is learnable or not, and identifying scenarios where learnability can be achieved, especially with neural networks and finite-ID distributions.

ABSTRACT

Supervised learning aims to train a classifier under the assumption that training and test data are from the same distribution. To ease the above assumption, researchers have studied a more realistic setting: out-of-distribution (OOD) detection, where test data may come from classes that are unknown during training (i.e., OOD data). Due to the unavailability and diversity of OOD data, good generalization ability is crucial for effective OOD detection algorithms. To study the generalization of OOD detection, in this paper, we investigate the probably approximately correct (PAC) learning theory of OOD detection, which is proposed by researchers as an open problem. First, we find a necessary condition for the learnability of OOD detection. Then, using this condition, we prove several impossibility theorems for the learnability of OOD detection under some scenarios. Although the impossibility theorems are frustrating, we find that some conditions of these impossibility theorems may not hold in some practical scenarios. Based on this observation, we next give several necessary and sufficient conditions to characterize the learnability of OOD detection in some practical scenarios. Lastly, we also offer theoretical supports for several representative OOD detection works based on our OOD theory.

Motivation & Objective

  • Motivate the study of learning theory for OOD detection under unknown and diverse OOD data.
  • Provide a PAC-learning framework for OOD detection in domain and hypothesis spaces.
  • Identify impossibility results and derive conditions that characterize learnability in practical spaces.
  • Relate theory to practical hypothesis spaces such as FCNNs and score-based methods.

Proposed method

  • Define a domain space of mixed ID and OOD distributions and a hypothesis/ scoring function space.
  • Introduce R_D(h) and R_D^α(h) risks and define Learnability and Strong Learnability for OOD detection.
  • Prove that learnability is not distribution-free and derive Condition 1 (Linear Condition) as a necessary condition.
  • Establish impossibility theorems in total and separate spaces and analyze overlaps between ID and OOD distributions.
  • Introduce representative prior-unknown spaces (single-distribution, total, separate, finite-ID, density-based) and study conditions for learnability in each.
  • Propose constructive combinations of ID and binary classification hypotheses for multi-class ID settings and state related conditions (Conditions 2, 3).
  • Connect theory to practice by mapping results to FCNN-based and score-based hypothesis spaces.

Experimental results

Research questions

  • RQ1Can OOD detection be learned in a PAC sense when OOD data are absent during training and may be diverse?
  • RQ2What conditions on the domain space and hypothesis space ensure (strong) learnability of OOD detection?
  • RQ3How do overlaps between ID and OOD distributions affect learnability?
  • RQ4What practical spaces (finite-ID, density-based, etc.) admit necessary and sufficient conditions for learnability?
  • RQ5How do neural-network and score-based hypothesis spaces align with the proposed theoretical conditions?

Key findings

  • OOD detection is not learnable in the total space when overlaps between ID and OOD exist or under certain mappings (Impossibility Theorem for Total Space).
  • A linear (Condition 1) relation between in-distribution and out-of-distribution risks is necessary for learnability in some spaces, and is sufficient in the single-distribution space.
  • In the separate space, learnability may fail under mild assumptions, but becomes possible under additional structure, such as finite input domain size or specific composition of ID and binary (OOD) classifiers.
  • Finite-ID-distribution space admits a compatibility condition (Condition 3) that is necessary and sufficient for learnability; learning rates of order 1/√n are achievable under this condition.
  • In density-based spaces, realizability (Condition 3) suffices for learnability when the hypothesis class has finite Natarajan dimension, with similar sublinear learning rates.
  • The theory provides support for practical OOD methods and clarifies when far-OOD image scenarios are more amenable to learnable OOD detection.

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.