Proceedings

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

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 1648-1656.

https://doi.org/10.24963/ijcai.2025/184

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.

  1. [Arjovsky et al., 2017] Martín Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial net- works. In ICML, volume 70, pages 214-223, 2017.
  2. [Cao et al., 2024] Chentao Cao, Zhun Zhong, Zhanke Zhou, Yang Liu, Tongliang Liu, and Bo Han. Envisioning outlier exposure by large language models for out-of-distribution detection. In ICML, 2024.
  3. [Cimpoi et al., 2014] Mircea Cimpoi, Subhransu Maji, Ia- sonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In CVPR, pages 3606- 3613, 2014.
  4. [Courty et al., 2017] Nicolas Courty, Rémi Flamary, Devis Tuia, and Alain Rakotomamonjy. Optimal transport for domain adaptation. IEEE Trans. Pattern Anal. Mach. In- tell., 39(9):1853-1865, 2017.
  5. [Cuturi, 2013] Marco Cuturi. Sinkhorn distances: Light- speed computation of optimal transport. In NIPS, pages 2292-2300, 2013.
  6. [Esmaeilpour et al., 2022] Sepideh Esmaeilpour, Bing Liu, Eric Robertson, and Lei Shu. Zero-shot out-of-distribution detection based on the pre-trained model CLIP. In AAAI, pages 6568-6576, 2022.
  7. [Fort et al., 2021] Stanislav Fort, Jie Ren, and Balaji Laksh- minarayanan. Exploring the limits of out-of-distribution detection. In NeurIPS, pages 7068-7081, 2021.
  8. [Fu et al., 2024] Yuqian Fu, Yu Wang, Yixuan Pan, Lian Huai, Xingyu Qiu, Zeyu Shangguan, Tong Liu, Yanwei Fu, Luc Van Gool, and Xingqun Jiang. Cross-domain few- shot object detection via enhanced open-set object detec- tor. In ECCV, pages 247-264, 2024.
  9. [Ge et al., 2021] Zheng Ge, Songtao Liu, Zeming Li, Osamu Yoshie, and Jian Sun. OTA: optimal transport assignment for object detection. In CVPR, pages 303-312, 2021.
  10. [Hendrycks and Gimpel, 2017] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of- distribution examples in neural networks. In ICLR, 2017.
  11. [Horn et al., 2018] Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alexander Shepard, Hartwig Adam, Pietro Perona, and Serge J. Belongie. The inatural- ist species classification and detection dataset. In CVPR, pages 8769-8778, 2018.
  12. [Huang et al., 2021] Rui Huang, Andrew Geng, and Yixuan Li. On the importance of gradients for detecting distribu- tional shifts in the wild. In NeurIPS, pages 677-689, 2021.
  13. [Jiang et al., 2024a] Xin Jiang, Hao Tang, Junyao Gao, Xi- aoyu Du, Shengfeng He, and Zechao Li. Delving into mul- timodal prompting for fine-grained visual classification. In AAAI, pages 2570-2578, 2024.
  14. [Jiang et al., 2024b] Xin Jiang, Hao Tang, and Zechao Li. Global meets local: Dual activation hashing network for large-scale fine-grained image retrieval. IEEE Transac- tions on Knowledge and Data Engineering, 2024.
  15. [Jiang et al., 2024c] Xin Jiang, Hao Tang, Rui Yan, Jinhui Tang, and Zechao Li. Dvf: Advancing robust and accurate fine-grained image retrieval with retrieval guidelines. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 2379-2388, 2024.
  16. [Jiang et al., 2024d] Xue Jiang, Feng Liu, Zhen Fang, Hong Chen, Tongliang Liu, Feng Zheng, and Bo Han. Nega- tive label guided OOD detection with pretrained vision- language models. In ICLR, 2024.
  17. [Liu et al., 2020] Weitang Liu, Xiaoyun Wang, John D. Owens, and Yixuan Li. Energy-based out-of-distribution detection. In NeurIPS, 2020.
  18. [Lu et al., 2023] Fan Lu, Kai Zhu, Wei Zhai, Kecheng Zheng, and Yang Cao. Uncertainty-aware optimal trans- port for semantically coherent out-of-distribution detec- tion. In CVPR, pages 3282-3291, 2023.
  19. [Ming et al., 2022] Yifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun, Wei Li, and Yixuan Li. Delving into out- of-distribution detection with vision-language representa- tions. In NeurIPS, 2022.
  20. [Miyai et al., 2023] Atsuyuki Miyai, Qing Yu, Go Irie, and Kiyoharu Aizawa. Zero-shot in-distribution detection in multi-object settings using vision-language foundation models, 2023.
  21. [Radford et al., 2021] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agar- wal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervi- sion. In ICML, volume 139, pages 8748-8763, 2021.
  22. [Ren et al., 2019] Jie Ren, Peter J. Liu, Emily Fertig, Jasper Snoek, Ryan Poplin, Mark A. DePristo, Joshua V. Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out- of-distribution detection. In NeurIPS, pages 14680-14691, 2019.
  23. [Ren et al., 2024] Yilong Ren, Chuanwen Feng, Xike Xie, and S. Kevin Zhou. Partial optimal transport based out-of- distribution detection for open-set semi-supervised learn- ing. In IJCAI, pages 4851-4859, 2024.
  24. [Tack et al., 2020] Jihoon Tack, Sangwoo Mo, Jongheon Jeong, and Jinwoo Shin. CSI: novelty detection via con- trastive learning on distributionally shifted instances. In NeurIPS, 2020.
  25. [Tang et al., 2022] Hao Tang, Chengcheng Yuan, Zechao Li, and Jinhui Tang. Learning attention-guided pyramidal fea- tures for few-shot fine-grained recognition. Pattern Recog- nit., 130:108792, 2022.
  26. [Tang et al., 2023] Hao Tang, Jun Liu, Shuanglin Yan, Rui Yan, Zechao Li, and Jinhui Tang. M3net: Multi-view en- coding, matching, and fusion for few-shot fine-grained ac- tion recognition. In ACM Multimedia, pages 1719-1728, 2023.
  27. [Tang et al., 2025] Hao Tang, Zechao Li, Dong Zhang, Shengfeng He, and Jinhui Tang. Divide-and-conquer: Confluent triple-flow network for RGB-T salient object detection. IEEE Trans. Pattern Anal. Mach. Intell., 47(3):1958-1974, 2025.
  28. [Wang et al., 2023] Hualiang Wang, Yi Li, Huifeng Yao, and Xiaomeng Li. CLIPN for zero-shot OOD detection: Teaching CLIP to say no. In ICCV, pages 1802-1812, 2023.
  29. [Xiao et al., 2010] Jianxiong Xiao, James Hays, Krista A. Ehinger, Aude Oliva, and Antonio Torralba. SUN database: Large-scale scene recognition from abbey to zoo. In CVPR, pages 3485-3492, 2010.
  30. [Xiao et al., 2020] Zhisheng Xiao, Qing Yan, and Yali Amit. Likelihood regret: An out-of-distribution detection score for variational auto-encoder. In NeurIPS, 2020.
  31. [Yang et al., 2024] Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. Generalized out-of-distribution detec- tion: A survey. Int. J. Comput. Vis., 132(12):5635-5662, 2024.
  32. [Zhou et al., 2018] Bolei Zhou, Àgata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE Trans. Pattern Anal. Mach. Intell., 40(6):1452-1464, 2018.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards