Learning with Mixture of Prototypes for Out-of-Distribution Detection
Haodong Lu, Dong Gong, Shuo Wang, Jason Xue, Lina Yao, Kristen Moore
Abstract
Out-of-distribution (OOD) detection aims to detect testing samples far away from the in-distribution (ID) training data, which is crucial for the safe deployment of machine learning models in the real world. Distance-based OOD detection methods have emerged with enhanced deep representation learning. They identify unseen OOD samples by measuring their distances from ID class centroids or prototypes. However, existing approaches learn the representation relying on oversimplified data assumptions, e.g., modeling ID data of each class with one centroid class prototype or using loss functions not designed for OOD detection, which overlook the natural diversities within the data. Naively enforcing data samples of each class to be compact around only one prototype leads to inadequate modeling of realistic data and limited performance. To tackle these issues, we propose PrototypicAl Learning with a Mixture of prototypes (PALM) which models each class with multiple prototypes to capture the sample diversities, and learns more faithful and compact samples embeddings to enhance OOD detection. Our method automatically identifies and dynamically updates prototypes, assigning each sample to a subset of prototypes via reciprocal neighbor soft assignment weights. To learn embeddings with multiple prototypes, PALM optimizes a maximum likelihood estimation (MLE) loss to encourage the sample embeddings to be compact around the associated prototypes, as well as a contrastive loss on all prototypes to enhance intra-class compactness and inter-class discrimination at the prototype level. Compared to previous methods with prototypes, the proposed mixture prototype modeling of PALM promotes the representations of each ID class to be more compact and separable from others and the unseen OOD samples, resulting in more reliable OOD detection. Moreover, the automatic estimation of prototypes enables our approach to be extended to the challenging OOD detection task with unlabelled ID data. Extensive experiments demonstrate the superiority of PALM over previous methods, achieving state-of-the-art average AUROC performance of 93.82 on the challenging CIFAR-100 benchmark. Code is available at https://github.com/jeff024/PALM .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers28
- Learning to Shape In-distribution Feature Space for Out-of-distribution DetectionYonggang Zhang, Jie Lu, Bo Peng, Zhen Fang et al.NeurIPS 2024 · 33 citations
- Energy-based Hopfield Boosting for Out-of-Distribution DetectionClaus Hofmann, Simon Schmid, Bernhard Lehner, Daniel Klotz et al.NeurIPS 2024 · 19 citations
- Beyond Federated Prototype Learning: Learnable Semantic Anchors with Hyperspherical Contrast for Domain-Skewed DataLele Fu, Sheng Huang, Yanyi Lai, Tianchi Liao et al.AAAI 2025 · 16 citations
- SeTAR: Out-of-Distribution Detection with Selective Low-Rank ApproximationYixia Li, Boya Xiong, Guanhua Chen, Yun ChenNeurIPS 2024 · 13 citations
- GDeR: Safeguarding Efficiency, Balancing, and Robustness via Prototypical Graph PruningGuibin Zhang, Haonan Dong, Yuchen Zhang, Zhixun Li et al.NeurIPS 2024 · 9 citations
Builds on30
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Bootstrap Your Own Latent - A New Approach to Self-Supervised LearningJean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec et al.NeurIPS 2020 · 9,171 citations
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations
- Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
Related papers
- Distributional Prototype Learning for Out-of-distribution DetectionBo Peng, Jie Lu, Yonggang Zhang, Guangquan Zhang et al.KDD 2025
- Provable Discriminative Hyperspherical Embedding for Out-of-Distribution DetectionZhipeng Zou, Sheng Wan, Guangyu Li, Bo Han et al.AAAI 2025 · 1 citation
- How to Exploit Hyperspherical Embeddings for Out-of-Distribution Detection?Yifei Ming, Yiyou Sun, Ousmane Dia, Yixuan LiICLR 2023 · 24 citations
- Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 citations
- DPU: Dynamic Prototype Updating for Multimodal Out-of-Distribution DetectionShawn Li, Huixian Gong, Hao Dong, Tiankai Yang et al.CVPR 2025
