An Analysis of Residual-Stream Geometry Across Transformer Depth

Sunit Bhattacharya, Ravi Shankar Kolli
7/20/2026
cs.LGcs.AI
transformer-attention

No confident code implementation found for this paper.

Abstract

We propose a transition-centred geometric analysis of transformer residual streams. Relative displacement measures how \emph{far} representations move between consecutive layers, and orthogonal Procrustes analysis separates each transition into a rigid rotation and a non-rigid residual.

Show full abstract

Across six instruction-tuned models, on code generation and cross-lingual translation, these measurements reveal reproducible depth regularities. Relative displacement is strongly layer-dependent; typically larger early and late, with a quieter middle third; and nearly invariant across conditions within each model. Rotation magnitude is nearly constant across depth, while Procrustes residual and angle concentration remain depth-modulated, with residual peaking at the final transition. During generation, non-English targets show larger final-layer displacement and residual than English targets. We present these as descriptive geometric regularities, not as measures of computational effort or causal explanations. The contribution is a measurement framework for residual-stream transitions and evidence that, in the settings studied here, depth curves are model-dependent and largely condition-stable.

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{bhattacharya2026analysis,
  title  = {An Analysis of Residual-Stream Geometry Across Transformer Depth},
  author = {Sunit Bhattacharya and Ravi Shankar Kolli},
  year   = {2026},
  eprint = {2607.18348},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.18348v1}
}

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/2607.18348.svg)](https://codeofpaper.com/paper/2607.18348)

Discussion