acceptodds
Withdrawn from ICLR 2027

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

Withdrawn from ICLR 2027, so left out of the paper lists and the map.

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.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Out-of-Distribution Detection, Post-hoc Method, Distance-based Method, Prototypes, Feature Space

Reviews

Among:
Shape:
1234this paper, Bottom 9%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.50 over 4 reviews, above 9% of the others.
Reviewer_8BScOpenReview ↗
Rating
1
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This work introduces the class-wise prototypes for Out-Of-Distribution (OOD) detection. The key is to create multiple prototypes per class, as multiple prototypes can capture different within-class regions (lines 053-055). The authors propose a post-hoc OOD detection method named CPD with simple techniques: spherical k-means is applied to normalized features per class. The writing is actually not very qualified, and empirical results are not satisfying.

Critical strengths
  1. The technique of the proposed CPD detection method is simple, straightforward, and intuitive, which should be appreciated.
  2. The computational cost of CPD is significantly less than that of the nearest-neighbor-based detection method.
  3. Experiments on the large-scale ImageNet-1K dataset are executed.
Critical weaknesses

One critical weakness is the inadequate writing. In the Abstract, the authors mainly focus on the technical advantage of CPD in computational cost, but do not even devote a single sentence to the rationale of how CPD promotes the separability between In-Distribution (ID) data and OOD data. In the Introduction, the authors only mention that “multiple prototypes can capture different within-class regions” (line 055) but do not provide any justification. In short, throughout the paper, the rationale behind CPD for OOD detection is not sufficiently justified.

Another critical weakness lies in experiments. As shown in Tables 1 and 2, the proposed CPD actually does not outperform OODD. The detection performance of CPD is not satisfactory. Moreover, the compared baselines are limited. NNGuide [a] is an enhanced version of KNN but is not included in the comparisons. KPCA [b] also addresses the heavy computational cost of KNN but is also missing from the comparisons.

[a] Nearest Neighbor Guidance for Out-of-Distribution Detection. ICCV 2023.
[b] Kernel PCA for Out-of-Distribution Detection. NeurIPS 2024.

Questions for authors
  1. The authors should provide sufficiently convincing justifications for the rationale of CPD for OOD detection, and accordingly significantly revise the paper.

  2. The detection performance of CPD shows no advantages compared to OODD, and more relevant baselines should be included and compared.

Reviewer_VxpHOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

This paper presents classwise prototype distance (CPD), a posthoc OOD detection method that replaces large training feature banks with compact class-wise prototypes constructed using spherical k-means. The proposed method achieves comparable or improved OOD detection performance over nearest neighbor methods while reducing feature storage and inference costs.

Critical strengths
  • The paper addresses an important practical problems of reducing storage and computational requirements of distance-based OOD detection. This is particularly useful for deploying models in resource-constrained settings. This is evident from the reported reduction in feature storage, especially on Imagenet1K, which is substantial.

  • The overall evaluation is reasonably comprehensive as the authors evaluate the proposed method across four benchmarks, multiple architectures, and against several OOD detection methods. The additional analysis provided by the authors on prototype budgets and aggregation strategies is also useful for general understanding of the method.

Critical weaknesses
  1. I'm not entirely convinced on the motivation for learning multiple prototypes. The paper argues that mutiple prototypes can better capture within-class feature distributions (as discussed in Sec 3.2), but the experiments do not demonstrate this convincingly. The Imagenet1K experiments seems to select only 1 prototype per class and increasing the number of prototypes often provides limited benefits (Fig 3/Table 4). This could also mean that it not well established if any additional information is captured by the learned prototypes and how that information actually improves ID vs OOD separation.

  2. The comparison with existing centroid-based OOD detection methods look insufficient. While the paper compares against methods like SHE, another closely related method like NCDD (DOI: https://doi.org/10.1007/978-3-031-98691-8_14) are missing. NCDD in this case seems particularly crucial as it relies on class-wise features centroids for post-hoc OOD detection (although it uses a different distance-based scoring strategy). Second, when the proposed CPD uses a single prototype per class (related to concern 1), it seems its scoring essentially reduces to normalized nearest-centroid distance (Eqn 4). So it may be crucial to differentiate the novelty and benefits against these kind of methods.

  3. I'm also concerned about the comparisons made for the computational efficiency. In Sec 4.2, it is stated that "KNN uses CPU-based FAISS retrieval, whereas CPD performs scoring on the GPU." So is the speed up because of proposed method or the differences in implementation. At the same time, as seen across Tables 1-3, CPD also doesn't consistently outperform other compact OOD detectors in both detection accuracy or storage efficiency.

Questions for authors

Please respond to the critiques raised in the weakness section.

Reviewer_TByiOpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper studies post-hoc distance-based OOD detection, where KNN-style detectors must store the full training feature bank. It argues that compact class-wise prototypes can replace the bank, and that the right number of prototypes depends on the task. CPD ℓ2-normalizes penultimate features and runs spherical k-means within each class to get n prototypes. A test input is scored by the negative minimum, over classes, of its mean squared distance to the k nearest prototypes of that class, with (n, k) chosen on OpenOOD validation data. Evaluation follows OpenOOD v1.5 on CIFAR-10/100, ImageNet-200 and ImageNet-1K, plus Swin-T and ViT-B/16, and includes storage and timing. The authors conclude that CPD matches or exceeds KNN at a fraction of its storage, and that more prototypes do not reliably help.

Critical strengths
  1. All baselines are re-measured in one environment, the smaller benchmarks use three checkpoints, and storage, setup and inference costs are reported (Tables 1 to 3, C1 to C4). Losses to OODD, MDSN and RMDSN are stated openly (Section 4.2, Appendix B.2).
  2. Fig. D1 and D2 show that lower ID representation error does not yield higher AUROC, and that one prototype per class is preferred on ImageNet. This is a useful finding for memory-bank detectors.
Critical weaknesses
  1. On ImageNet-1K, validation selects (n, k) = (1, 1) for all three backbones (Table A2). CPD then reduces to cosine similarity with the normalized class mean (Section 3.2), so the 99.92% storage cut and the gains over KNN involve no clustering or aggregation.
  2. Where n > 1 is selected, CPD and KNN differ by at most 0.53 AUROC on CIFAR (Table 1). Fig. 3 suggests the smallest budget is within about a point of the selected one on CIFAR-100 and ImageNet-200, and sometimes better.
  3. Table 4 ablates n = 50, not the deployed setting. There, normalization adds at least 12 points, while k-means over random sampling adds 2 to 3.
  4. Table 4’s unnormalized random/all-mean row (55.24/71.39) nearly reproduces POD in Table 2 (55.29/71.93). This suggests POD, the stated base of CPD, was run without normalization.
  5. Storage savings are measured against the full KNN bank. Random bank subsampling (already studied in the KNN paper) and coreset selection as in PatchCore are missing as matched-budget baselines.
  6. Against compact detectors the storage advantage disappears: SHE is identical, and MDSN is 8.11 MiB on transformers. MDSN also exceeds CPD by about 4 Near-OOD points on Swin-T and ViT-B/16 (averaged from Tables B5, B6).
  7. CPD with n = 1 is essentially single-layer Prototype Fusion, which is cited but not compared. POT and SPROD are likewise absent, and SSD’s feature-space k-means is not discussed.
Questions for authors
  1. Report CPD(1,1) on CIFAR-10, CIFAR-100 and ImageNet-200 (mean ± std) next to the selected configuration. Does n > 1 beat n = 1 beyond seed variance on any benchmark?
  2. Was POD run on ℓ2-normalized features? Please add normalized POD and storage-matched subsampled KNN on CIFAR-100 and ImageNet-1K.
  3. How does CPD(1,1) differ from single-layer Prototype Fusion, or from SHE on normalized features with a max over classes?
  4. What is KNN’s inference time with GPU FAISS?
Reviewer_yxS3OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes Class-wise Prototype Distance (CPD), a post-hoc OOD detector that replaces a training feature bank with class-wise prototypes constructed by spherical k-means. It scores test inputs by aggregating distances to nearby prototypes within each class. Experiments on four benchmarks examine detection performance, storage costs, and prototype budgets.

Critical strengths

S1. Clear presentation.

The paper is well organized. Prototype construction, scoring, and the geometric interpretation are clearly explained.

S2. Practical relevance.

Reducing detector storage without retraining is useful. The experiments cover multiple datasets and backbones, and the budget analysis shows that more accurate ID representations do not necessarily improve OOD detection.

Critical weaknesses

W1. Limited methodological novelty.

CPD combines established class-wise representations and distance aggregation with spherical k-means. Its distinction from POD, SHE, and related prototype methods is incremental. In particular, the single-prototype configuration uses the same class-mean cosine scoring rule as the single-layer component of Prototype Fusion (Gul et al., 2026, Eqs. 5-9), given the same features and reference samples. The paper does not sufficiently establish what new methodological contribution extends beyond these existing approaches.

W2. The selected ImageNet configurations do not establish the contribution of local multi-prototype aggregation.

Table A2 selects n=k=1n=k=1 for all three ImageNet-1K backbones, reducing CPD to maximum cosine similarity to a normalized class mean. All selected ImageNet-200 configurations satisfy k=nk=n, which permits exact scoring with one aggregated vector per class under Eq. (7). Clustering can still affect that vector, but local prototype selection is unnecessary in these configurations. Table 4 demonstrates clustering gains at n=50n=50, whereas the main ImageNet-1K results use n=1n=1. The contribution of the proposed aggregation mechanism to the headline results therefore remains unclear.

W3. The advantage over existing compact detectors is inconsistent.

On CIFAR-100, the selected CPD configuration requires 52.08 MiB, compared with RMDSN's 2.39 MiB, while achieving similar Near- and Far-OOD AUROC. On ImageNet-200, MDSN also achieves comparable AUROC with less storage. Section 4.4 reports competitive CPD results at smaller budgets, but the comparisons do not establish a consistent performance-storage advantage over existing compact detectors.

Additional Concerns

C1. Comparisons under matched storage budgets are incomplete.

The random-sampling ablations and CPD budget experiments are useful, but comparisons with subsampled KNN under the same storage constraints are missing.

C2. The inference-time comparison mixes algorithmic and implementation differences.

KNN uses CPU FAISS retrieval, while CPD scores on the GPU. Timing also includes data loading and backbone inference. The reported 3.72×3.72\times speedup cannot be attributed solely to the detector algorithm.

C3. Configuration transfer across OOD distributions remains uncertain.

Prototype counts and aggregation neighborhoods vary across datasets and checkpoints. Selection using OOD validation data follows the stated protocol, but the stability of these choices across different OOD validation sources is not established.

C4. The compression results receive limited explanation.

Appendix D shows that lower ID representation error does not guarantee better OOD detection. The observation is useful, but the paper offers limited analysis of why stronger compression sometimes improves ID-OOD separation.

Questions for authors

. At the selected ImageNet-1K operating point, what contribution does CPD provide beyond the existing single-layer class-mean cosine score?

  1. How does CPD compare with subsampled KNN under matched storage budgets and comparable device placement?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Discussion (0)

Sign in to comment.