A Cosine Similarity-based Method for Out-of-Distribution Detection

ICML 2023 Workshop SCIS Submission50 Authors

Published: 20 Jun 2023, Last Modified: 28 Jul 2023SCIS 2023 PosterEveryoneRevisions
Keywords: out-of-distribution detection, cosine similarity, neural network
TL;DR: We present a method called Class Typical Matching (CTM) that can detect whether a given input belongs to the same distribution as the training data or not, based on how similar it is to the typical examples of each class using cosine similarity.
Abstract: The ability to detect OOD data is a crucial aspect of practical machine learning applications. In this work, we show that cosine similarity between the test feature and the typical ID feature is a good indicator of OOD data. We propose Class Typical Matching (CTM), a post hoc OOD detection algorithm that uses a cosine similarity scoring function. Extensive experiments on multiple benchmarks show that CTM outperforms existing post hoc OOD detection methods.
Submission Number: 50
Loading