Mysteries of the Deep: Role of Intermediate Representations in Out of Distribution Detection
Not on the map. Why?
Abstract (arXiv)
Out-of-distribution (OOD) detection is essential for reliably deploying machine learning models in the wild. Yet, most methods treat large pre-trained models as monolithic encoders and rely solely on their final-layer representations for detection. We challenge this wisdom. We reveal the textitintermediate layers of pre-trained models, shaped by residual connections that subtly transform input projections, textitcan encode textitsurprisingly rich and diverse signals for detecting distributional shifts. Importantly, to exploit latent representation diversity across layers, we introduce an entropy-based criterion to textitautomatically identify layers offering the most complementary information in a training-free setting -- textitwithout access to OOD data. We show that selectively incorporating these intermediate representations can increase the accuracy of OOD detection by up to 10% in far-OOD and over 7% in near-OOD benchmarks compared to state-of-the-art training-free methods across various model architectures and training objectives. Our findings reveal a new avenue for OOD detection research and uncover the impact of various training objectives and model architectures on confidence-based OOD detection methods.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 49 of its 66 references that are in the map. First posted on arXiv 7 Oct 2025.
Builds on
49 of 66 references.
References · 49
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,403
- 2017On Calibration of Modern Neural Networkscited by 4,960
- 2021Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervisioncited by 3,864
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,385
- 2013Describing Textures in the Wildcited by 2,125
- 2021An Empirical Study of Training Self-Supervised Vision Transformerscited by 1,616
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,485
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,328
- 2020Energy-based Out-of-distribution Detectioncited by 1,299
37 more
- 2019VisualBERT: A Simple and Performant Baseline for Vision and Languagecited by 1,296
- 2019Can You Trust Your Model's Uncertainty? Evaluating Predictive Uncertainty Under Dataset Shiftcited by 1,287
- 2021ViLT: Vision-and-Language Transformer Without Convolution or Region Supervisioncited by 1,230
- 2018Deep Anomaly Detection with Outlier Exposurecited by 942
- 2017Network Dissection: Quantifying Interpretability of Deep Visual Representationscited by 708
- 2021ImageNet-21K Pretraining for the Massescited by 613
- 2019Scaling Out-of-Distribution Detection for Real-World Settingscited by 465
- 2021Tip-Adapter: Training-free CLIP-Adapter for Better Vision-Language Modelingcited by 431
- 2022ViM: Out-Of-Distribution with Virtual-logit Matchingcited by 405
- 2020Understanding the Behaviour of Contrastive Losscited by 398
- 2021Revisiting the Calibration of Modern Neural Networkscited by 390
- 2021Open-Set Recognition: a Good Closed-Set Classifier is All You Need?cited by 353
- 2025Perception Encoder: The best visual embeddings are not at the output of the networkcited by 326
- 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 294
- 2021Exploring the Limits of Out-of-Distribution Detectioncited by 283
- 2021MOS: Towards Scaling Out-of-distribution Detection for Large Semantic Spacecited by 233
- 2022Delving into Out-of-Distribution Detection with Vision-Language Representationscited by 216
- 2022Extremely Simple Activation Shaping for Out-of-Distribution Detectioncited by 212
- 2020Contrastive Training for Improved Out-of-Distribution Detectioncited by 186
- 2022CLIP-Dissect: Automatic Description of Neuron Representations in Deep Vision Networkscited by 147
- 2022Is Out-of-Distribution Detection Learnable?cited by 109
- 2021MOOD: Multi-level Out-of-distribution Detectioncited by 94
- 2021Types of Out-of-Distribution Texts and How to Detect Themcited by 80
- 2021Provable Guarantees for Understanding Out-of-distribution Detectioncited by 78
- 2021Revisiting Mahalanobis Distance for Transformer-Based Out-of-Domain Detectioncited by 70
- 2024Negative Label Guided OOD Detection with Pretrained Vision-Language Modelscited by 66
- 2024Learning Transferable Negative Prompts for Out-of-Distribution Detectioncited by 43
- 2021Out-of-Scope Intent Detection with Self-Supervision and Discriminative Trainingcited by 42
- 2023GL-MCM: Global and Local Maximum Concept Matching for Zero-Shot Out-of-Distribution Detectioncited by 36
- 2024Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detectioncited by 32
- 2021Unsupervised Out-of-Domain Detection via Pre-trained Transformerscited by 31
- 2013Experiments with Random Projectioncited by 27
- 2021Uncertainty-Aware Reliable Text Classificationcited by 23
- 2022Breaking Down Out-of-Distribution Detection: Many Methods Based on OOD Training Data Estimate a Combination of the Same Core Quantitiescited by 23
- 2024Conjugated Semantic Pool Improves OOD Detection with Pre-trained Vision-Language Modelscited by 13
- 2014The Johnson-Lindenstrauss lemma is optimal for linear dimensionality reductioncited by 12
- 2025Leveraging Intermediate Representations for Better Out-of-Distribution Detectioncited by 5
Built on by
Citing papers per year: 2026: 7.
7 papers.
- 2026Attentive multilayer fusion for vision transformerscited by 4
- 2026Prototype Fusion: A Training-Free Multi-Layer Approach to OOD Detectioncited by 0
- 2026Ranked Activation Shift for Post-Hoc Out-of-Distribution Detectioncited by 0
- 2026Adaptive Forensic Feature Refinement via Intrinsic Importance Perceptioncited by 0
- 2026Vertical Fusion: Condensing Internal Representations for Robust ViT Classificationcited by 0
- 2026Layer Selection in VLMs for Zero-Shot OOD Detection via Multi-Resolution Entropy Estimationcited by 0
- 2026Not All Layers Are Equal: Dynamic Layer Routing for Reliable CLIP OOD Detectioncited by 0
- 2026Layer Selection in VLMs for Zero-Shot OOD Detection via Multi-Resolution Entropy Estimation8 Sep 2026
- 2026Not All Layers Are Equal: Dynamic Layer Routing for Reliable CLIP OOD Detection30 Jul 2026
- 2026Vertical Fusion: Condensing Internal Representations for Robust ViT Classification11 Jul 2026
- 2026Adaptive Forensic Feature Refinement via Intrinsic Importance Perception18 Apr 2026
- 2026Ranked Activation Shift for Post-Hoc Out-of-Distribution Detection27 Mar 2026
- 2026Prototype Fusion: A Training-Free Multi-Layer Approach to OOD Detection24 Mar 2026
- 2026Attentive multilayer fusion for vision transformers14 Jan 2026