Contrastive Training for Improved Out-of-Distribution Detection
arXiv:2007.05566
Abstract
Reliable detection of out-of-distribution (OOD) inputs is increasingly understood to be a precondition for deployment of machine learning systems. This paper proposes and investigates the use of contrastive training to boost OOD detection performance. Unlike leading methods for OOD detection, our approach does not require access to examples labeled explicitly as OOD, which can be difficult to collect in practice. We show in extensive experiments that contrastive training significantly helps OOD detection performance on a number of common benchmarks. By introducing and employing the Confusion Log Probability (CLP) score, which quantifies the difficulty of the OOD detection task by capturing the similarity of inlier and outlier datasets, we show that our method especially improves performance in the `near OOD' classes -- a particularly challenging setting for previous methods.
References in corpus (15)
- A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks
- Weight Uncertainty in Neural Networks
- Momentum Contrast for Unsupervised Visual Representation Learning
- A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks
- Data-Efficient Image Recognition with Contrastive Predictive Coding
- Large Batch Training of Convolutional Networks
- Deep Anomaly Detection with Outlier Exposure
- Do ImageNet Classifiers Generalize to ImageNet?
- Learning Confidence for Out-of-Distribution Detection in Neural Networks
- WAIC, but Why? Generative Ensembles for Robust Anomaly Detection
- Why is the Mahalanobis Distance Effective for Anomaly Detection?
- Hybrid Models with Deep and Invertible Features
- Out-of-Distribution Detection using Multiple Semantic Label Representations
- A Variational Dirichlet Framework for Out-of-Distribution Detection
- Hybrid Models for Open Set Recognition
Cited by in corpus (27)
- CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances
- Exploring the Limits of Out-of-Distribution Detection
- Outlier Exposure with Confidence Control for Out-of-Distribution Detection
- Learning and Evaluating Representations for Deep One-class Classification
- Does Your Dermatology Classifier Know What It Doesn't Know? Detecting the Long-Tail of Unseen Conditions
- A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detection
- Contrastive Out-of-Distribution Detection for Pretrained Transformers
- On the Importance of Gradients for Detecting Distributional Shifts in the Wild
- Understanding Anomaly Detection with Deep Invertible Networks through Hierarchies of Distributions and Features
- Perfect density models cannot guarantee anomaly detection
- OpenMatch: Open-set Consistency Regularization for Semi-supervised Learning with Outliers
- Contrastive Predictive Coding for Anomaly Detection
- Graph Posterior Network: Bayesian Predictive Uncertainty for Node Classification
- Improving Transformation Invariance in Contrastive Representation Learning
- Do We Really Need to Learn Representations from In-domain Data for Outlier Detection?
- Hybrid Generative-Contrastive Representation Learning
- Graceful Degradation and Related Fields
- Exploring Covariate and Concept Shift for Detection and Calibration of Out-of-Distribution Data
- Unsupervised Anomaly Detection From Semantic Similarity Scores
- Shifting Transformation Learning for Out-of-Distribution Detection
- Masked Contrastive Learning for Anomaly Detection
- A statistical framework for efficient out of distribution detection in deep neural networks
- Decomposing Representations for Deterministic Uncertainty Estimation
- Evaluation of Out-of-Distribution Detection Performance of Self-Supervised Learning in a Controllable Environment
- Video Class Agnostic Segmentation with Contrastive Learning for Autonomous Driving
- FISHing in Uncertainty: Synthetic Contrastive Learning for Genetic Aberration Detection
- Out of distribution detection for skin and malaria images