Google Research

Contrastive Training for Improved Out-of-Distribution Detection

NeurIPS (2020)


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 previous 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 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.

Learn more about how we do research

We maintain a portfolio of research projects, providing individuals and teams the freedom to emphasize specific types of work