arXiv:2610.06012cs.LGOct 2026

Manuscript Offprint

arXiv:2610.06012

Spectral Geometry of Attention: From Information Routing to Uncertainty

Giulio Viganò, Simone Melzi, Maks Ovsjanikov

Abstract

In this work, we study transformer attention through the lens of spectral geometry and operator theory. We view each attention head as a functional map between Hilbert spaces of functions on the token sequence and derive a Token Difference Operator, whose spectral structure controls how token-space information is routed to the output. We show that standard Euclidean spectra are structurally biased by sinks, conflating mass concentration with genuine routing capacity. By recasting token space in the intrinsic probability geometry induced by attention, the token difference spectrum disentangles sink effects from routing capacity and provides a spectral description of the dimensionality of the head output. This yields a unified framework for analyzing attention maps, explaining sinks, routing collapse, and output dimensionality within a single operator-theoretic framework. In practice, by grounding attention heuristics in spectral geometry, we develop a novel attention-based uncertainty estimator that complements probability-based scores, with the largest gains on long-context inputs.

1 Introduction

Attention maps are increasingly viewed as windows into the internal computation of transformer architectures [37]. Prior works have shown that attention carries useful signals about how transformers process information, studying it as probability distributions [37], graph operators [27, 7], transition matrices [14], or through row-wise statistics [38, 43]. While these perspectives have revealed important insights, they primarily focus on pairwise token interactions, or leveraging models that do not describe the single pass effect of the attention, leaving comparatively unexplored the global structural properties of attention operators as a whole, especially in relation to the hidden representation dimensionality and the final output of the transformer.

In this work, we approach attention from this global operator perspective, framing each attention map A as a linear functional operator that transfers signals between geometric domains defined for the token sequence, and investigating its spectral properties. Inspired by functional maps [28] and shape difference operators [33, 20], we derive a functional operator that characterizes the single-step action V↦AVV \mapsto AV induced by an attention head. Its spectrum reveals the multi-scale, global behavior of attention and is, as we demonstrate, strongly correlated with a range of phenomena from attention sinks to model uncertainty.

We introduce the Token Difference Operator (TDO), a framework that departs from standard Euclidean analysis by assigning distinct geometric structures to the input and output domains of the attention map A. We demonstrate that the conventional practice of adopting a uniform Euclidean metric is structurally flawed; specifically, it is biased by the inherent row-stochasticity of attention and the

*Work performed while at Ecole Polytechnique

Preprint.

Figure

Figure 1: Teaser: (Left block) Our work studies transformers’ attention as a functional map between Hilbert spaces equipped with an inner product. The properties of the operator change with the standard Euclidean measure (Blue) and with an intrinsic probability geometry measure (Red). (Center Block) Parametrizing row stochastic causal map interpolating ( α\alpha) between a copy map and a sink map, we show that the Euclidean spectrum of the matrix is biased towards the sink, while reweighting the input measure relaxes this bias. (Right Block) We leverage our insights to design an uncertainty quantifier, identifying uncertainty as a routing capability collapse in certain selected heads (red box in the uncertain model).

presence of attention sinks. In these biased settings, the mass assigned to initial tokens can saturate the operator spectrum, making it appear that there is significant information flow when no actual token-dependent routing is occurring. To rectify this, we induce an intrinsic probability geometry on the input domain, directly derived from the attention mechanism. With this intrinsic metric, the trivial constant mode corresponds to a transported mean, while the remaining centered modes describe the token-dependent component of the head output. This yields a mean–routing decomposition of AV that cleanly separates phenomena often conflated in the literature, including attention sinks [18, 4, 32], dimensional collapse [11, 35].

Importantly, these structural quantities are not purely conceptual constructions: the TDO can be computed from attention maps, and its spectrum provides a strong signal in a range of probing tasks. We show that intrinsic spectral diagnostics are less dominated by sink score than raw attention or Euclidean spectral analysis, while aligning more closely with the dimensionality of the head output. Building on this, we introduce Spectral Attention Uncertainty Quantification (SAUQ), an unsupervised single-pass uncertainty estimator. Unlike probability-based estimators [44, 22, 13], which can fail when task-relevant distinctions are compressed before reaching the logits [3, 29, 39], SAUQ looks upstream at routing capacity and improves over closely related attention-based methods, especially on long-form summarization tasks.

We formalize these insights through the following theoretical and practical contributions, also summarized in Figure 1:

• A global operator-theoretic view of attention. We model attention maps as linear functional operators on token-space signals, shifting focus from token-level summaries to the spectral structure of the TDO.

• A theoretical separation between sinks and dimensional collapse. We prove that Euclidean spectra can be biased by sink tokens, and derive an intrinsic probability geometry in which the information dynamic is decomposed into a mean mode and a token-dependent routing subspace, proving that the nontrivial spectrum controls the dimensionality of the head output.

• A link to uncertainty: We empirically show that the spectral signal of high routing heads can be leveraged to predict uncertainty of LLMs.

References (40)