Sparsity as a Key: Unlocking New Insights from Latent Structures for Out-of-Distribution Detection
Not on the map. Why?
Abstract (arXiv)
Sparse Autoencoders (SAEs) have demonstrated significant success in interpreting Large Language Models (LLMs) by decomposing dense representations into sparse, semantic components. However, their potential for analyzing Vision Transformers (ViTs) remains largely under-explored. In this work, we present the first application of SAEs to the ViT [CLS] token for out-of-distribution (OOD) detection, addressing the limitation of existing methods that rely on entangled feature representations. We propose a novel framework utilizing a Top-k SAE to disentangle the dense [CLS] features into a structured latent space. Through this analysis, we reveal that in-distribution (ID) data exhibits consistent, class-specific activation patterns, which we formalize as Class Activation Profiles (CAPs). Our study uncovers a key structural invariant: while ID samples preserve a stable pattern within CAPs, OOD samples systematically disrupt this structure. Leveraging this insight, we introduce a scoring function based on the divergence of core energy profiles to quantify the deviation from ideal activation profiles. Our method achieves strong results on the FPR95 metric, critical for safety-sensitive applications across multiple benchmarks, while also achieving competitive AUROC. Overall, our findings demonstrate that the sparse, disentangled features revealed by SAEs can serve as a powerful, interpretable tool for robust OOD detection in vision models.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 26 of its 37 references that are in the map. First posted on arXiv 29 Apr 2026.
Builds on
26 of 37 references.
References · 26
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2023DINOv2: Learning Robust Visual Features without Supervisioncited by 7,764
- 2018UMAP: Uniform Manifold Approximation and Projection for Dimension Reductioncited by 2,841
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2013Describing Textures in the Wildcited by 2,110
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,359
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
- 2020Energy-based Out-of-distribution Detectioncited by 1,296
- 2018Deep Anomaly Detection with Outlier Exposurecited by 939
- 2022Toy Models of Superpositioncited by 928
14 more
- 2021Generalized Out-of-Distribution Detection: A Surveycited by 796
- 2020Transformer Interpretability Beyond Attention Visualizationcited by 620
- 2022Out-of-Distribution Detection with Deep Nearest Neighborscited by 596
- 2024Scaling and evaluating sparse autoencoderscited by 530
- 2021ReAct: Out-of-distribution Detection With Rectified Activationscited by 486
- 2022ViM: Out-Of-Distribution with Virtual-logit Matchingcited by 404
- 2021Open-Set Recognition: a Good Closed-Set Classifier is All You Need?cited by 351
- 2021On the Importance of Gradients for Detecting Distributional Shifts in the Wildcited by 338
- 2021Unsolved Problems in ML Safetycited by 291
- 2018Deep Anomaly Detection Using Geometric Transformationscited by 269
- 2013k-Sparse Autoencoderscited by 209
- 2023OpenOOD v1.5: Enhanced Benchmark for Out-of-Distribution Detectioncited by 178
- 2023In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluationcited by 132
- 2025Mahalanobis++: Improving OOD Detection via Feature Normalizationcited by 30
Built on by
Not cited yet.