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

Aldo Sean Sartor, Leandro de Souza Rosa, Andriy Enttsel, Mauro Mangia, Riccardo Rovatti
8/24/2026
cs.CV
transformer-attention

No confident code implementation found for this paper.

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.

Show full abstract

A class-conditional density model is then fitted at each layer, producing per-class \emph{typicality scores} that are stacked across depth into \emph{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 \emph{Prototype Alignment Score} (PAS), measuring agreement with class reference prototype patterns, and a \emph{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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sartor2026svdbased,
  title  = {SVD-Based Typicality Maps for Out-of-Distribution Detection in Vision Transformers},
  author = {Aldo Sean Sartor and Leandro de Souza Rosa and Andriy Enttsel and Mauro Mangia and Riccardo Rovatti},
  year   = {2026},
  eprint = {2608.23499},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.23499v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.23499.svg)](https://codeofpaper.com/paper/2608.23499)

Discussion