Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection

Chentao Cao, Zhun Zhong, Zhanke Zhou, Yang Liu, Tongliang Liu +1 more
6/2/2024
cs.LG

Official code: tmlr-group/EOE (13 stars, last commit 2025-02-15). 1 more implementation below.

Abstract

Detecting out-of-distribution (OOD) samples is essential when deploying machine learning models in open-world scenarios. Zero-shot OOD detection, requiring no training on in-distribution (ID) data, has been possible with the advent of vision-language models like CLIP. Existing methods build a text-based classifier with only closed-set labels. However, this largely restricts the inherent capability of CLIP to recognize samples from large and open label space. In this paper, we propose to tackle this constraint by leveraging the expert knowledge and reasoning capability of large language models (LLM) to Envision potential Outlier Exposure, termed EOE, without access to any actual OOD data. Owing to better adaptation to open-world scenarios, EOE can be generalized to different tasks, including far, near, and fine-grained OOD detection. Technically, we design (1) LLM prompts based on visual similarity to generate potential outlier class labels specialized for OOD detection, as well as (2) a new score function based on potential outlier penalty to distinguish hard OOD samples effectively. Empirically, EOE achieves state-of-the-art performance across different OOD tasks and can be effectively scaled to the ImageNet-1K dataset. The code is publicly available at: https://github.com/tmlr-group/EOE.

View on arXivView PDF

Code Implementations(2)

tmlr-group/EOEOfficial100%

[ICML 2024] "Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection"

130Shell, PythonJun 2, 20241 years ago
Aboriginer/EOECommunity68%

[ICML 2024] "Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection"

151Shell, PythonJun 2, 20241 years ago
llmood-detectionvision-language-model

Similar Papers

Cite this paper

@article{cao2024envisioning,
  title  = {Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection},
  author = {Chentao Cao and Zhun Zhong and Zhanke Zhou and Yang Liu and Tongliang Liu and Bo Han},
  year   = {2024},
  eprint = {2406.00806},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.00806v1},
  journal = {ICML 2024 2024}
}

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/2406.00806.svg)](https://codeofpaper.com/paper/2406.00806)

Discussion