OT-DETECTOR: Delving into Optimal Transport for Zero-shot Out-of-Distribution Detection

Yu Liu, Hao Tang, Haiqi Zhang, Jing Qin, Zechao Li
3/9/2025
cs.CVcs.MM

No official code found. Best implementation: yuleoliu/OT-DETECTOR (1 star, last commit 2026-04-01).

Abstract

Out-of-distribution (OOD) detection is crucial for ensuring the reliability and safety of machine learning models in real-world applications. While zero-shot OOD detection, which requires no training on in-distribution (ID) data, has become feasible with the emergence of vision-language models like CLIP, existing methods primarily focus on semantic matching and fail to fully capture distributional discrepancies. To address these limitations, we propose OT-DETECTOR, a novel framework that employs Optimal Transport (OT) to quantify both semantic and distributional discrepancies between test samples and ID labels. Specifically, we introduce cross-modal transport mass and transport cost as semantic-wise and distribution-wise OOD scores, respectively, enabling more robust detection of OOD samples. Additionally, we present a semantic-aware content refinement (SaCR) module, which utilizes semantic cues from ID labels to amplify the distributional discrepancy between ID and hard OOD samples. Extensive experiments on several benchmarks demonstrate that OT-DETECTOR achieves state-of-the-art performance across various OOD detection tasks, particularly in challenging hard-OOD scenarios.

View on arXivView PDF

Code Implementations(1)

Code for IJCAI-25 paper OT-DETECTOR: Delving into Optimal Transport for Zero-shot Out-of-Distribution Detection

10PythonSep 18, 20256 months ago

Similar Papers

Cite this paper

@article{liu2025otdetector,
  title  = {OT-DETECTOR: Delving into Optimal Transport for Zero-shot Out-of-Distribution Detection},
  author = {Yu Liu and Hao Tang and Haiqi Zhang and Jing Qin and Zechao Li},
  year   = {2025},
  eprint = {2503.06442},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.06442v2}
}

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

Discussion