Prototype Fusion: A Training-Free Multi-Layer Approach to OOD Detection
Not on the map. Why?
Abstract (arXiv)
Deep learning models are increasingly deployed in safety-critical applications, where reliable out-of-distribution (OOD) detection is essential to ensure robustness. Existing methods predominantly rely on the penultimate-layer activations of neural networks, assuming they encapsulate the most informative in-distribution (ID) representations. In this work, we revisit this assumption to show that intermediate layers encode equally rich and discriminative information for OOD detection. Based on this observation, we propose a simple yet effective model-agnostic approach that leverages internal representations across multiple layers. Our scheme aggregates features from successive convolutional blocks, computes class-wise mean embeddings, and applies L_2 normalization to form compact ID prototypes capturing class semantics. During inference, cosine similarity between test features and these prototypes serves as an OOD score--ID samples exhibit strong affinity to at least one prototype, whereas OOD samples remain uniformly distant. Extensive experiments on state-of-the-art OOD benchmarks across diverse architectures demonstrate that our approach delivers robust, architecture-agnostic performance and strong generalization for image classification. Notably, it improves AUROC by up to 4.41% and reduces FPR by 13.58%, highlighting multi-layer feature aggregation as a powerful yet underexplored signal for OOD detection, challenging the dominance of penultimate-layer-based methods. Our code is available at: https://github.com/sgchr273/cosine-layers.git.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 20 of its 23 references that are in the map. First posted on arXiv 24 Mar 2026.
Builds on
20 of 23 references.
References · 20
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2020Energy-based Out-of-distribution Detectioncited by 1,296
- 2022Out-of-Distribution Detection with Deep Nearest Neighborscited by 596
- 2021ReAct: Out-of-distribution Detection With Rectified Activationscited by 486
- 2019Scaling Out-of-Distribution Detection for Real-World Settingscited by 465
- 2021On the Importance of Gradients for Detecting Distributional Shifts in the Wildcited by 338
- 2021SSD: A Unified Framework for Self-Supervised Outlier Detectioncited by 264
- 2023Nearest Neighbor Guidance for Out-of-Distribution Detectioncited by 64
- 2021Neural Mean Discrepancy for Efficient Out-of-Distribution Detectioncited by 42
- 2023NECO: NEural Collapse Based Out-of-distribution detectioncited by 41
- 2023Detecting Out-of-Distribution Through the Lens of Neural Collapsecited by 33
- 2023Out-of-Distribution Detection by Leveraging Between-Layer Transformation Smoothnesscited by 15
8 more
- 2024Pursuing Feature Separation based on Neural Collapse for Out-of-Distribution Detectioncited by 12
- 2025Controlling Neural Collapse Enhances Out-of-Distribution Detection and Transfer Learningcited by 11
- 2025Mysteries of the Deep: Role of Intermediate Representations in Out of Distribution Detectioncited by 6
- 2023Multi-layer Aggregation as a key to feature-based OOD detectioncited by 5
- 2025Leveraging Intermediate Representations for Better Out-of-Distribution Detectioncited by 5
- 2025EOOD: Entropy-based Out-of-distribution Detectioncited by 5
- 2024FisherMask: Enhancing Neural Network Labeling Efficiency in Image Classification Using Fisher Informationcited by 3
- 2024LPLgrad: Optimizing Active Learning Through Gradient Norm Sample Selection and Auxiliary Model Trainingcited by 2
Built on by
Not cited yet.