Manuscript Offprint

arXiv:2609.37717

Predictive Geometry of Hidden Trajectories in Transformers

Timur Mudarisov, Mikhail Burtsev, Tatiana Petrova, Radu State

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Decoder-only transformers are trained only through a terminal next-token prediction loss, yet this loss constrains every intermediate hidden state through the fixed downstream computation. We formalize this constraint by studying layerwise loss-to-go functions: the terminal loss obtained by continuing a candidate hidden state through the remaining transformer blocks. Around successful validation trajectories, we show that the local second-order geometry of these functions is governed, up to low-loss residual terms, by a pullback Fisher operator on hidden-state space. Its spectrum identifies output-sensitive directions and approximately prediction-null directions, yielding a local observable subspace of the residual stream. For causal transformers, the same geometry induces a tokenwise curvature score: a Fisher-weighted sensitivity of the target logits to perturbations of each token's hidden state. This score vanishes outside the causal ancestor set of the target and is controlled by downstream Jacobian couplings, making it a loss-aware alternative to attention magnitude. We estimate these quantities using matrix-free Jacobian-vector and vector-Jacobian products and evaluate them across decoder-only language models on WikiText, OpenWebText, and FineWeb. Empirically, the induced geometry predicts perturbation sensitivity, supports nonuniform layerwise rank allocation, yields competitive structured token-pruning signals, and improves low-rank student recovery when added to stronger autoregressive distillation objectives such as reverse KL and skew KL. These results support a predictive-geometric view of transformer computation: near successful trajectories, the terminal loss induces a thin, anisotropic set of output-relevant hidden-state directions that can be measured and exploited for compression and distillation.

1 Introduction

Large-scale decoder-only transformers [25, 5] are optimized through a next-token prediction loss applied only at the output layer, yet their computation proceeds through a sequence of intermediate hidden states. This raises a local question about trained models: near hidden-state trajectories on which the model already predicts well, which directions in residual-stream space are constrained by the terminal prediction loss, and which directions are approximately invisible to it? Answering this question would give a loss-based account of hidden-state geometry, rather than treating intermediate representation geometry as an empirical property detached from the objective used to train the model.

Recent empirical work suggests that transformer hidden states are structured and compressible rather than generic high-dimensional vectors. Prior work [24] shows that the intrinsic dimension of hidden representations follows a characteristic expansion-contraction profile across layers, while activation-space compression methods [3, 22, 28] demonstrate that low-rank approximations can often preserve model performance. These results indicate that hidden representations contain substantial redundancy. However, they largely characterize this structure empirically: they do not derive the

Preprint.

relevant directions from the terminal prediction objective itself, nor do they provide a loss-aware notion of which hidden-state directions or token positions matter for the final prediction.

In this work, we start from the prediction loss. For a fixed trained decoder-only transformer, a layer, and a target position, we define a loss-to-go function: the terminal loss obtained by continuing a candidate intermediate hidden state through the fixed downstream transformer. We then study the local second-order geometry of this function around successful validation trajectories. In the low-loss regime, the dominant curvature is given by a pullback Fisher operator: the Fisher geometry of the output distribution pulled back through the downstream computation to the intermediate hidden state. This operator identifies output-sensitive directions in hidden-state space together with approximately prediction-null directions that leave the centered target logits unchanged to first order.

This local output-induced geometry leads to directly measurable quantities. The spectrum of the pullback Fisher operator measures how many output-sensitive directions are present at each layer, suggesting a data-dependent alternative to uniform rank allocation. Taking traces of this operator over token fibers defines a local token-level sensitivity score, measuring how much each token position contributes to the curvature of the target prediction. For causal transformers, this score is supported only on causal ancestors of the target token and is controlled by downstream Jacobian couplings, making it a loss-aware alternative to attention-based pruning heuristics [26, 17, 29]. We use these quantities as signals for matched-budget rank allocation and structured token pruning.

Our perspective connects representation geometry [24], compression and low-rank adaptation [3, 13, 11, 22], token pruning [26, 17, 29], mechanistic interpretability [6], and Fisher-based analyses of neural models [2, 15]. The focus here is specifically on the local predictive geometry of intermediate hidden states: the Fisher geometry induced by the terminal next-token loss and pulled back through the learned forward dynamics of a fixed trained transformer. This paper makes the following contributions:

  1. Loss-induced hidden geometry. We define layerwise loss-to-go functions for fixed trained decoder-only transformers and show that, near successful hidden-state trajectories, their dominant local curvature is a pullback Fisher operator from the output distribution to the intermediate hidden state.

  2. Observable and prediction-null directions. The pullback Fisher operator identifies output-sensitive directions and approximately prediction-null directions in residual-stream space, yielding a testable local decomposition of hidden-state perturbations.

  3. Tokenwise predictive saliency. For causal transformers, we derive a tokenwise Fisher-Jacobian score κℓ,s\kappa_{\ell,s} that measures how much each token position contributes to target-logit curvature. The score is supported only on causal ancestors of the target and is controlled by downstream Jacobian couplings.

  4. Geometry-guided reduction and recovery. We evaluate the resulting geometry across perturbation sensitivity, layerwise rank allocation, structured token pruning, and low-rank student distillation. Across these settings, the geometry provides loss-aware signals for preserving prediction-relevant hidden directions under compression.

References (25)