acceptodds
Under review as a conference paper at ICLR 2027

Storage-Efficient Out-of-Distribution Detection with Class-wise Prototypes

Abstract

Deep neural networks can make highly confident errors on out-of-distribution (OOD) inputs, motivating reliable OOD detection. Nearest-neighbor methods incur substantial storage and inference costs by retaining massive training feature banks. We propose CPD, a distance-based post-hoc method that replaces these banks with compact class-wise prototypes without model retraining. CPD applies -means clustering to -normalized features within each class and computes detection scores by aggregating distances to the nearest prototypes. Across CIFAR-10, CIFAR-100, ImageNet-200, and ImageNet-1K, CPD achieves near- and far-OOD AUROC comparable to or better than KNN while requiring substantially less feature storage. On ImageNet-1K with ResNet-50, Swin-T, and ViT-B/16, a single-prototype-per-class configuration reduces feature storage by approximately 99.92% relative to the full KNN feature bank while improving near- and far-OOD AUROC by 3.70–4.80 and 1.46–5.00 percentage points, respectively. Further analysis shows that increasing the number of prototypes does not necessarily improve detection performance, as its benefit depends on the aggregation neighborhood size, highlighting the importance of jointly selecting prototype count and scoring strategy.

open until 14 Dec 2026

est. 32% chance this paper gets accepted at ICLR 2027.

Reject 68%Accept 32%

What do you think this paper will get?

All positions stay anonymous.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.