Manuscript Offprint

arXiv:2608.29706

The Depth Flow of Token Representations Is Nonlinear and Does Not Descend Its Own Density

Alexandre Quemy

Abstract

A token's representation is carried through the network layer by layer. The whole vocabulary carried together forms a flow. We fit this flow's equation of motion as a discrete Langevin model over corpus-mean trajectories of Pythia-160M and Pythia-410M, and score the predicted steps on held-out tokens. Linear maps are often used as cheap surrogates for a layer. The flow they summarize is not linear: a quadratic drift beats the linear linear map at every transition of both models, and the Kramers–Moyal estimator agrees wherever its neighborhoods stay local. We then characterize the flow further. First, we show that it does not descend its own log-density. The drift instead descends a potential that is not the density. Second, the rotational component is not negligible, 4 to 45% of the explainable drift, and the circulation shows in what the flow preserves: a token keeps its angular rank across all thirteen layers while its norm rank is shuffled and its concentration rank is reversed by the last block.

Keywords: Langevin dynamics, Kramers–Moyal estimator, token representations, transformer depth

1. Introduction

A token's representation is transformed layer by layer via the residual stream, from its embedding row to the state vector used by the model to predict the next token. Across depth, each token traces a trajectory, and the whole vocabulary together forms a flow as depicted in Figure 1.

Writing stℓs_t^\ell for the residual-stream state at corpus position tt after ℓ\ell blocks, and P(v)\mathcal{P}(v) for the set of positions whose next token is vv, the trajectory of a vocabulary token vv is

hvℓ=1∣P(v)∣∑t∈P(v)stℓ,ℓ=0,…,L,h_v^\ell = \frac{1}{|\mathcal{P}(v)|} \sum_{t \in \mathcal{P}(v)} s_t^\ell, \qquad \ell = 0, \ldots, L,

and the flow is the family of these trajectories over the vocabulary. A trajectory begins at the mean state of the positions that precede vv, not at vv's own embedding row.

Concretely, take v=“dog”v = \text{“dog”} and a corpus that contains “he walked the dog” and “she fed her dog”. Then P(dog)\mathcal{P}(\text{dog}) holds the positions of “the” and “her”, the two moments the model is about to produce “dog”. Each of those positions carries one vector through thirteen states, and averaging them state by state gives the path hdog0,…,hdog12h_{\text{dog}}^0, \ldots, h_{\text{dog}}^{12}: at layer 0 the mean embedding of “the” and “her”, at layer 12 the mean vector from which the model says “dog”. Over the full corpus the average runs over every such position.

We are interested in this particular quantity because it is the one vector that the network actually carries end to end, from the embedding to the final state. The average over the

© 2026 A. Quemy.

Figure

Figure 1: Token trajectories, drawn along the leading comoving coordinate, the axis of largest variation once each layer's cloud is standardized, so a token's height is its position relative to all tokens. Trajectories are colored by the token's centrality percentile at layer 0, its rank in cosine to the ensemble mean direction, bold lines are decile medians, and the side strips give the median color at each height at entry and exit.

corpus is only pragmatic: as the trajectories are context-dependent, they would be most likely unique, such that we would not be able to study them statistically.

In this paper, we study this flow of token representations across depth, and in particular its equation of motion. In other words, how does a model transform a token representation from one layer to the next. We model the flow as a Langevin equation, with a drift and a diffusion term, and we ask whether the drift is linear or nonlinear, and whether it is a gradient flow or not. We use three estimators: with Kramers--Moyal (KM) expansion (Friedrich et al., 2011), a linear map, and a quadratic map. The linear map is known to transfer across models and scales (Yom Din et al., 2024).

Our contributions are:

  • The drift is nonlinear. A quadratic drift and KM beat the linear map at every layer of Pythia-160M and Pythia-410M.

  • The drift is not the gradient of the log-density. We measure the alignment between the drift and the estimated density gradient and find nothing. We show that the motion has a gradient component, but the diffusion and the rotational part are also load-bearing.

  • Among three observable quantities of a token in a cloud of tokens (cosine to the mean direction, vector norm and participation ratio), only the cosine to the mean direction is strongly preserved, confirming the importance of the rotational part.

References (22)