Skip to main content
QUICK REVIEW

[Paper Review] Delving into Out-of-Distribution Detection with Vision-Language Representations

Yifei Ming, Ziyang Cai|arXiv (Cornell University)|Nov 24, 2022
Multimodal Machine Learning ApplicationsComputer Science31 citations
TL;DR

The paper introduces Maximum Concept Matching (MCM), a zero-shot OOD detection method that uses vision-language (CLIP) representations to align visual features with textual concept prototypes, achieving strong ID-OOD separation without training and outperforming several baselines on diverse tasks."

ABSTRACT

Recognizing out-of-distribution (OOD) samples is critical for machine learning systems deployed in the open world. The vast majority of OOD detection methods are driven by a single modality (e.g., either vision or language), leaving the rich information in multi-modal representations untapped. Inspired by the recent success of vision-language pre-training, this paper enriches the landscape of OOD detection from a single-modal to a multi-modal regime. Particularly, we propose Maximum Concept Matching (MCM), a simple yet effective zero-shot OOD detection method based on aligning visual features with textual concepts. We contribute in-depth analysis and theoretical insights to understand the effectiveness of MCM. Extensive experiments demonstrate that MCM achieves superior performance on a wide variety of real-world tasks. MCM with vision-language features outperforms a common baseline with pure visual features on a hard OOD task with semantically similar classes by 13.1% (AUROC). Code is available at https://github.com/deeplearning-wisc/MCM.

Motivation & Objective

  • Motivate OOD detection in a multi-modal setting using joint vision-language representations.
  • Leverage textual concept prototypes to define ID class proximity in a shared embedding space.
  • Develop a simple, training-free OOD detector that is agnostic to OOD data and scalable to large tasks.

Proposed method

  • Define concept prototypes as text-embedded representations for ID classes using prompts like 'this is a photo of a <class>'.
  • Compute label-wise cosine similarity between image features and each textual prototype.
  • Define the MCM score as a softmax over these similarities: S_MCM(x;Y_in, T, I) = max_i exp(s_i(x)/τ) / sum_j exp(s_j(x)/τ).
  • Use a threshold on S_MCM for OOD detection and assign ID samples to the nearest concept by max s_i.
  • Provide theoretical justification that softmax scaling with a moderate temperature τ improves ID-OOD separability in CLIP-like models.

Experimental results

Research questions

  • RQ1Can vision-language pre-trained models enable effective zero-shot OOD detection without using OOD data?
  • RQ2How does multi-modal (vision-language) representation compare to visual-only prototypes for OOD detection?
  • RQ3What is the impact of softmax scaling on OOD separability in CLIP-like models?
  • RQ4Is MCM scalable and robust across a diverse set of ID and hard OOD tasks?

Key findings

  • MCM achieves strong zero-shot OOD detection across seven ID datasets with CLIP; e.g., ImageNet-1k average AUROC of 94.61 against iNaturalist and 99.90+ on several tasks in the presented results.
  • On ImageNet-1k, MCM (CLIP-L) attains AUROC of 94.95 and FPR95 of 28.38, outperforming several training-based baselines.
  • MCM outperforms Mahalanobis (visual-only) and other baselines, especially on hard OOD tasks like ImageNet-10 vs ImageNet-20 and Waterbirds spurious OOD settings.
  • Using larger CLIP models (CLIP-L vs CLIP-B) improves OOD performance; e.g., FPR95 drops and AUROC increases with model size.
  • Softmax scaling with a moderate temperature τ provably improves OOD detection, consistent with empirical results.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.