Proceedings

Prototype-based Optimal Transport for Out-of-Distribution Detection

Download BibTeX Cite

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

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

Abstract

Detecting Out-of-Distribution (OOD) inputs is crucial for improving the reliability of deep neural networks in the real-world deployment. In this paper, inspired by the inherent distribution shift between in-distribution (ID) and OOD data, we propose a novel method that leverages optimal transport to measure the distribution discrepancy between test inputs and ID prototypes. The resulting transport costs are used to quantify the individual contribution of each test input to the overall discrepancy, serving as a desirable measure for OOD detection. To address the issue that solely relying on the transport costs to ID prototypes is inadequate for identifying OOD inputs closer to ID data, we generate virtual outliers to approximate the OOD region via linear extrapolation. By combining the transport costs to ID prototypes with the costs to virtual outliers, the detection of OOD data near ID data is emphasized, thereby enhancing the distinction between ID and OOD inputs. Extensive evaluations demonstrate the superiority of our method over state-of-the-art methods.

  1. [Arjovsky et al., 2017] Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. In arXiv preprint arXiv:1701.07875, 2017.
  2. [Bendale and Boult, 2016] Abhijit Bendale and Terrance E. Boult. Towards open set deep networks. In CVPR, pages 1563-1572. IEEE, 2016.
  3. [Bitterwolf et al., 2023] Julian Bitterwolf, Maximilian Müller, and Matthias Hein. In or out? fixing imagenet out-of-distribution detection evaluation. In ICML, pages 2471-2506. PMLR, 2023.
  4. [Caron et al., 2020] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by con- trasting cluster assignments. NeurIPS, 33:9912-9924, 2020.
  5. [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. IEEE, 2014.
  6. [Cuturi, 2013] Marco Cuturi. Sinkhorn distances: Light- speed computation of optimal transport. NeurIPS, 26, 2013.
  7. [Deng, 2012] Li Deng. The mnist database of handwritten digit images for machine learning research [best of the web]. IEEE Signal Processing Magazine, 29(6):141-142, 2012.
  8. [DeVries and Taylor, 2018] Terrance DeVries and Gra- ham W. Taylor. Learning confidence for out-of- distribution detection in neural networks. arXiv preprint arXiv:1802.04865, 2018.
  9. [Djurisic et al., 2023] Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, and Rosanne Liu. Extremely simple acti- vation shaping for out-of-distribution detection. In ICLR, 2023.
  10. [Dosovitskiy and et al, 2021] Alexey Dosovitskiy and Lu- cas Beyer et al. An image is worth 16x16 words: Trans- formers for image recognition at scale. In ICLR, 2021.
  11. [Filos et al., 2020] Angelos Filos, Panagiotis Tigkas, Rowan McAllister, Nicholas Rhinehart, Sergey Levine, and Yarin Gal. Can autonomous vehicles identify, recover from, and adapt to distribution shifts? In ICML, pages 3145-3153.
  12. PMLR, 2020.
  13. [Garg et al., 2023] Sahil Garg, Sanghamitra Dutta, Mina Dalirrooyfard, Anderson Schneider, and Yuriy Nevmy- vaka. In-or out-of-distribution detection via dual diver- gence estimation. In Uncertainty in Artificial Intelligence, pages 635-646. PMLR, 2023.
  14. [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.
  15. [He et al., 2016] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In CVPR, pages 770-778. IEEE, 2016.
  16. [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.
  17. [Hendrycks et al., 2019a] Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with out- lier exposure. In ICLR, 2019.
  18. [Hendrycks et al., 2019b] Dan Hendrycks, Mantas Mazeika, Saurav Kadavath, and Dawn Song. Using self-supervised learning can improve model robustness and uncertainty. In NeurIPS, pages 15637-15648, 2019.
  19. [Hendrycks et al., 2022] Dan Hendrycks, Steven Basart, Mantas Mazeika, Andy Zou, Joseph Kwon, Moham- madreza Mostajabi, Jacob Steinhardt, and Dawn Song. Scaling out-of-distribution detection for real-world set- tings. In ICML, pages 8759-8773. PMLR, 2022.
  20. [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. IEEE, 2018.
  21. [Hsu et al., 2020] Yen-Chang Hsu, Yilin Shen, Hongxia Jin, and Zsolt Kira. Generalized ODIN: detecting out-of-distribution image without learning from out-of- distribution data. In CVPR, pages 10948-10957. IEEE, 2020.
  22. [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.
  23. [Krizhevsky, 2009] Alex Krizhevsky. Learning multiple lay- ers of features from tiny images. 2009.
  24. [Le and Yang, 2015] Ya Le and Xuan S. Yang. Tiny ima- genet visual recognition challenge. CS 231N, 7(7):3, 2015.
  25. [Lee et al., 2018] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detect- ing out-of-distribution samples and adversarial attacks. In NeurIPS, pages 7167-7177, 2018.
  26. [Liang et al., 2018] Shiyu Liang, Yixuan Li, and R. Srikant. Enhancing the reliability of out-of-distribution image de- tection in neural networks. In ICLR, 2018.
  27. [Liu et al., 2020] Weitang Liu, Xiaoyun Wang, John D. Owens, and Yixuan Li. Energy-based out-of-distribution detection. In NeurIPS, pages 21464-21475, 2020.
  28. [Liu et al., 2023] Xixi Liu, Yaroslava Lochman, and Christo- pher Zach. GEN: pushing the limits of softmax-based out- of-distribution detection. In CVPR, pages 23946-23955. IEEE, 2023.
  29. [Liu et al., 2024] Yibing Liu, Chris XING TIAN, Haoliang Li, Lei Ma, and Shiqi Wang. Neuron activation cover- age: Rethinking out-of-distribution detection and general- ization. In ICLR, 2024.
  30. [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.
  31. [Ming et al., 2022] Yifei Ming, Ying Fan, and Yixuan Li. Poem: Out-of-distribution detection with posterior sam- pling. In ICML, pages 15650-15665. PMLR, 2022.
  32. [Nalisnick et al., 2018] Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshmi- narayanan. Do deep generative models know what they don't know? arXiv preprint arXiv:1810.09136, 2018.
  33. [Netzer et al., 2011] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learn- ing. In NeurIPS Workshop, 2011.
  34. [Peyré et al., 2019] Gabriel Peyré, Marco Cuturi, et al. Com- putational optimal transport: With applications to data sci- ence. Foundations and Trends® in Machine Learning, 11(5-6):355-607, 2019.
  35. [Ren et al., 2021] Jie Ren, Stanislav Fort, Jeremiah Z. Liu, Abhijit Guha Roy, Shreyas Padhy, and Balaji Lak- shminarayanan. A simple fix to mahalanobis dis- tance for improving near-ood detection. arXiv preprint arXiv:2106.09022, 2021.
  36. [Sastry and Oore, 2020] Chandramouli Shama Sastry and Sageev Oore. Detecting out-of-distribution examples with gram matrices. In ICML, pages 8491-8501. PMLR, 2020.
  37. [Sehwag et al., 2021] Vikash Sehwag, Mung Chiang, and Prateek Mittal. SSD: A unified framework for self- supervised outlier detection. In ICLR, 2021.
  38. [Song et al., 2022] Yue Song, Nicu Sebe, and Wei Wang. Rankfeat: Rank-1 feature removal for out-of-distribution detection. In NeurIPS, 2022.
  39. [Sun and Li, 2022] Yiyou Sun and Yixuan Li. DICE: lever- aging sparsification for out-of-distribution detection. In ECCV, pages 691-708. Springer, 2022.
  40. [Sun et al., 2021] Yiyou Sun, Chuan Guo, and Yixuan Li. React: Out-of-distribution detection with rectified activa- tions. In NeurIPS, pages 144-157, 2021.
  41. [Sun et al., 2022] Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribution detection with deep nearest neighbors. In ICML, pages 20827-20840. PMLR, 2022.
  42. [Tanwisuth et al., 2021] Korawat Tanwisuth, Xinjie Fan, Huangjie Zheng, Shujian Zhang, Hao Zhang, Bo Chen, and Mingyuan Zhou. A prototype-oriented framework for unsupervised domain adaptation. NeurIPS, 34:17194- 17208, 2021.
  43. [Turrisi et al., 2022] Rosanna Turrisi, Rémi Flamary, Alain Rakotomamonjy, and Massimiliano Pontil. Multi-source domain adaptation via weighted joint distributions optimal transport. In Uncertainty in Artificial Intelligence, pages 1970-1980. PMLR, 2022.
  44. [Vaze et al., 2022] Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: A good closed-set classifier is all you need. In ICLR, 2022.
  45. [Wang and Deng, 2021] Mei Wang and Weihong Deng. Deep face recognition: A survey. Neurocomputing, 429:215-244, 2021.
  46. [Wang et al., 2022a] Haobo Wang, Mingxuan Xia, Yixuan Li, Yuren Mao, Lei Feng, Gang Chen, and Junbo Zhao. Solar: Sinkhorn label refinery for imbalanced partial-label learning. NeurIPS, 2022.
  47. [Wang et al., 2022b] Haoqi Wang, Zhizhong Li, Litong Feng, and Wayne Zhang. Vim: Out-of-distribution with virtual-logit matching. In CVPR, pages 4911-4920. IEEE, 2022.
  48. [Wang et al., 2023] Qizhou Wang, Junjie Ye, Feng Liu, Quanyu Dai, Marcus Kalander, Tongliang Liu, Jianye Hao, and Bo Han. Out-of-distribution detection with implicit outlier transformation. In ICLR, 2023.
  49. [Zhang et al., 2023a] Jingyang Zhang, Nathan Inkawhich, Randolph Linderman, Yiran Chen, and Hai Li. Mixture outlier exposure: Towards out-of-distribution detection in fine-grained environments. In WACV, pages 5531-5540, 2023.
  50. [Zhang et al., 2023b] Jingyang Zhang, Jingkang Yang, Pengyun Wang, Haoqi Wang, Yueqian Lin, Haoran Zhang, Yiyou Sun, Xuefeng Du, Kaiyang Zhou, Wayne Zhang, Yixuan Li, Ziwei Liu, Yiran Chen, and Hai Li. Openood v1.5: Enhanced benchmark for out-of- distribution detection. arXiv preprint arXiv:2306.09301, 2023.
  51. [Zhang et al., 2023c] Jinsong Zhang, Qiang Fu, Xu Chen, Lun Du, Zelin Li, Gang Wang, Xiaoguang Liu, Shi Han, and Dongmei Zhang. Out-of-distribution detection based on in-distribution data patterns memorization with modern hopfield energy. In ICLR, 2023.
  52. [Zhou et al., 2018] Bolei Zhou, Àgata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. PAMI, 40(6):1452-1464, 2018.
  53. [Zhu et al., 2023] Jianing Zhu, Yu Geng, Jiangchao Yao, Tongliang Liu, Gang Niu, Masashi Sugiyama, and Bo Han. Diversified outlier exposure for out- of-distribution detection via informative extrapolation. NeurIPS, 36:22702-22734, 2023.

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

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