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

Nguyen Ngoc-Hieu, Nguyen Hung-Quang, The-Anh Ta, Thanh Nguyen-Tang, Khoa D Doan +1 more
6/23/2023
cs.LG

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ngochieu2023cosine,
  title  = {A Cosine Similarity-based Method for Out-of-Distribution Detection},
  author = {Nguyen Ngoc-Hieu and Nguyen Hung-Quang and The-Anh Ta and Thanh Nguyen-Tang and Khoa D Doan and Hoang Thanh-Tung},
  year   = {2023},
  eprint = {2306.14920},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.14920v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.14920.svg)](https://codeofpaper.com/paper/2306.14920)

Discussion