Skip to main content
QUICK REVIEW

[Paper Review] Out-of-distribution Detection in Classifiers via Generation

Sachin Vernekar, Ashish Gaurav|arXiv (Cornell University)|Oct 9, 2019
Adversarial Robustness in Machine Learning27 references45 citations
TL;DR

The paper introduces a CVAE-based method to generate effective OOD samples (Type I and II) and trains an n+1 class classifier for robust OOD detection, showing improved performance over baselines on MNIST and Fashion-MNIST.

ABSTRACT

By design, discriminatively trained neural network classifiers produce reliable predictions only for in-distribution samples. For their real-world deployments, detecting out-of-distribution (OOD) samples is essential. Assuming OOD to be outside the closed boundary of in-distribution, typical neural classifiers do not contain the knowledge of this boundary for OOD detection during inference. There have been recent approaches to instill this knowledge in classifiers by explicitly training the classifier with OOD samples close to the in-distribution boundary. However, these generated samples fail to cover the entire in-distribution boundary effectively, thereby resulting in a sub-optimal OOD detector. In this paper, we analyze the feasibility of such approaches by investigating the complexity of producing such "effective" OOD samples. We also propose a novel algorithm to generate such samples using a manifold learning network (e.g., variational autoencoder) and then train an n+1 classifier for OOD detection, where the $n+1^{th}$ class represents the OOD samples. We compare our approach against several recent classifier-based OOD detectors on MNIST and Fashion-MNIST datasets. Overall the proposed approach consistently performs better than the others.

Motivation & Objective

  • Motivate the need for reliable OOD detection in discriminatively trained classifiers used in real-world deployments.
  • Propose a principled way to generate diverse, boundary-covering OOD samples using manifold learning.
  • Train an n+1 class softmax classifier where the extra class represents OOD samples, improving boundary delineation.
  • Analyze two OOD sample categories (Type I and Type II) and show how they cover the in-distribution boundary.
  • Empirically compare with classifier-based OOD detectors on MNIST and Fashion-MNIST datasets.

Proposed method

  • Leverage a conditional variational autoencoder (CVAE) to model the data manifold per class.
  • Generate Type I OOD samples by perturbing in-distribution samples along directions normal to the data manifold (left-nullspace of the CVAE decoder Jacobian).
  • Generate Type II OOD samples by sampling from low-density regions of the CVAE aggregate posterior in latent space and decoding to input space.
  • Train an n+1 class classifier with standard cross-entropy, where the n+1 th class represents OOD samples.
  • Use the OOD class probability as the OOD score for detection.
  • Compare against baselines like Confident-Classifier, ODIN, and Mahalanobis distance on MNIST and Fashion-MNIST.

Experimental results

Research questions

  • RQ1Can CVAE-based generation produce OOD samples that effectively cover the in-distribution boundary better than GAN-based approaches?
  • RQ2Do Type I and Type II OOD samples complement each other to yield a robust OOD detector when used to train an n+1 class classifier?
  • RQ3How does the proposed OOD generation strategy perform relative to state-of-the-art classifier-based detectors across multiple OOD datasets?
  • RQ4Is there a measurable impact on in-distribution classification accuracy when training with OOD samples?
  • RQ5How robust is the method across different in-distribution datasets (MNIST vs Fashion-MNIST) and varied OOD sources?

Key findings

  • The proposed approach outperforms several classifier-based OOD detectors on MNIST and Fashion-MNIST across multiple OOD datasets.
  • Type I and Type II OOD samples, generated via the CVAE, provide diverse coverage of the in-distribution boundary.
  • Training with generated OOD samples (n+1 class) does not cause a significant drop in in-distribution accuracy.
  • The method remains robust across diverse OOD datasets and does not require per-dataset hyperparameter tuning for perturbation magnitudes.
  • Compared to Confident-Classifier baseline, the proposed method yields substantial improvements in several metrics (AUROC, AUPR, FPR, detection error).
  • The approach offers an intuitive measure of the complexity of generating “effective” OOD samples through its manifold-based generation process.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.