cs.CVAug 24, 2026

SVD-Based Typicality Maps for Out-of-Distribution Detection in Vision Transformers

Authors: Aldo Sean Sartor, Leandro de Souza Rosa, Andriy Enttsel, Mauro Mangia, Riccardo Rovatti

Organizations: DEI, †ARCES, University of Bologna, Italy

Abstract

We present a method for analyzing the internal representations of Vision Transformers (ViTs) exploiting the geometry of their learned parameters. Each affine layer's weight matrix is factored via Singular Value Decomposition (SVD), and activations are projected onto the leading right singular vectors to obtain compact, layer-intrinsic representations. A class-conditional density model is then fitted at each layer, producing per-class typicality scores that are stacked across depth into typicality maps: two-dimensional summaries of how class-specific evidence evolves through the network. From these maps, we derive two post-hoc scores for Out-Of-Distribution (OOD) detection: a Prototype Alignment Score (PAS), measuring agreement with class reference prototype patterns, and a Multi-Layer Soft Voting (MLSV) score, capturing cross-layer consensus without stored prototypes. On ViT-B/16 fine-tuned on CIFAR-100, the proposed scores achieve competitive detection performance without retraining or OOD exposure.

Figures & tables

Explore similar work

CardsList
  1. Sparsity as a Key: Unlocking New Insights from Latent Structures for Out-of-Distribution Detection

    Apr 29, 2026Ahyoung Oh, Wonseok Shin, Songkuk KimSparse AutoencodersOOD Detection

  2. Prototype Fusion: A Training-Free Multi-Layer Approach to OOD Detection

    Mar 24, 2026Shreen Gul, Mohamed Elmahallawy, Ardhendu Tripathy +1OOD Detection

  3. DynProto: Dynamic Prototype Evolution for Out-of-Distribution Detection

    Apr 26, 2026Yanqi Wu, Xinhua Lu, Runhe Lai +4Prototype-Based ClassificationOOD Detection