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 (6)
Cited by in corpus (12)
- Exploring the Limits of Out-of-Distribution Detection
- Learning and Evaluating Representations for Deep One-class Classification
- A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detection
- On the Importance of Gradients for Detecting Distributional Shifts in the Wild
- Contrastive Predictive Coding for Anomaly Detection
- Graph Posterior Network: Bayesian Predictive Uncertainty for Node Classification
- Do We Really Need to Learn Representations from In-domain Data for Outlier Detection?
- Hybrid Generative-Contrastive Representation Learning
- Graceful Degradation and Related Fields
- Shifting Transformation Learning for Out-of-Distribution Detection
- Unsupervised Anomaly Detection From Semantic Similarity Scores
- Out of distribution detection for skin and malaria images