Provable Discriminative Hyperspherical Embedding for Out-of-Distribution Detection

Authors

  • Zhipeng Zou School of Computer Science and Engineering, Nanjing University of Science and Technology, China Key Laboratory of Intelligent Perception and Systems for High-Dimensional Information of Ministry of Education, China Jiangsu Key Laboratory of Image and Video Understanding for Social Security, China
  • Sheng Wan School of Computer Science and Engineering, Nanjing University of Science and Technology, China Key Laboratory of Intelligent Perception and Systems for High-Dimensional Information of Ministry of Education, China Jiangsu Key Laboratory of Image and Video Understanding for Social Security, China
  • Guangyu Li School of Computer Science and Engineering, Nanjing University of Science and Technology, China Key Laboratory of Intelligent Perception and Systems for High-Dimensional Information of Ministry of Education, China Jiangsu Key Laboratory of Image and Video Understanding for Social Security, China
  • Bo Han Hong Kong Baptist University, China
  • Tongliang Liu Sydney AI Centre, The University of Sydney, Sydney
  • Lin Zhao School of Computer Science and Engineering, Nanjing University of Science and Technology, China Key Laboratory of Intelligent Perception and Systems for High-Dimensional Information of Ministry of Education, China Jiangsu Key Laboratory of Image and Video Understanding for Social Security, China
  • Chen Gong Department of Automation, Institute of Image Processing and Pattern Recognition, Shanghai Jiao Tong University, China

DOI:

https://doi.org/10.1609/aaai.v39i12.33472

Abstract

Out-of-distribution (OOD) detection aims to identify the test examples that do not belong to the distribution of training data. The distance-based methods, which identify OOD examples based on their distances from the centroids of in-distribution (ID) examples, have demonstrated promising OOD detection performance. However, the objectives utilized in prior approaches are typically designed for classification and thus might not yield sufficient discriminative power to distinguish between ID and OOD examples. Therefore, this paper proposes a prototype-based contrastive learning framework for OOD detection, which is termed provable Discriminative Hyperspherical Embedding (DHE). The proposed framework provides a theoretical analysis of inter-class dispersion, which is proved to be fundamental in reducing the false positive rate (FPR) on OOD examples. Based on this, we devise an angular spread loss to achieve the maximal dispersion of the prototypes of different classes prior to training. Subsequently, a prototype-enhanced contrastive loss is introduced to align embeddings of ID examples closely with their corresponding prototypes. In our proposed DHE, the maximal prototype dispersion is theoretically proved, thereby avoiding the pitfalls of local optima commonly encountered by most existing methods. Experimental results demonstrate the effectiveness of our proposed DHE, which showcases a remarkable reduction in FPR95 (i.e., 5.37% on CIFAR-100) and more than doubling the computational efficiency when compared with the state-of-the-art methods.

Downloads

Published

2025-04-11

How to Cite

Zou, Z., Wan, S., Li, G., Han, B., Liu, T., Zhao, L., & Gong, C. (2025). Provable Discriminative Hyperspherical Embedding for Out-of-Distribution Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 39(12), 13483–13491. https://doi.org/10.1609/aaai.v39i12.33472

Issue

Section

AAAI Technical Track on Data Mining & Knowledge Management II