Manuscript Offprint
arXiv:2610.31955A Mathematical Theory of the Jacobian Lens
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Recent work from Anthropic introduced a new interpretability tool, called the Jacobian lens (J-lens, Gurnee et al., 2026). This method identified linear directions in the hidden states of frontier language models that had properties reminiscent of working memory-like representations. However, it is unclear what mechanistic properties of such features make them detectable to the J-lens. To this end, we introduce a mathematical theory of the J-lens, and show that it preferentially identifies coherent features – directions that act like leading, spatially coherent Lyapunov modes. Small perturbations along these directions amplify across layers, remain roughly constant across token positions, and are consistent across different contexts. While we are agnostic to whether these properties are necessarily associated with a “Global Workspace”, the analytically derived preferences of the J-lens nevertheless explain prior empirical applied to both model classes. We validate our analysis on a Bayes filter and a toy transformer, each optimally predicting next tokens emitted from a Hidden Markov Model (HMM). We show how modulating task parameters that change the coherence of features in the Bayes filter correspondingly and predictively modulates the response of the J-lens. We also introduce of a family of J-lenses built to emphasize different temporal scales of information processing in LLMs, which we call -J-lenses.
1 INTRODUCTION
In a recent paper, Gurnee et al. (2026) introduced a novel interpretability technique that they claimed could identify an internal ‘workspace’ in large language models (LLMs), which had properties reminiscent of the Global Workspace (Baars, 1988; Dehaene et al., 1998). The object they primarily study is the ‘Jacobian lens’, or ‘J-lens’. This interpretability tool is designed in the spirit of other ‘lenses’ (nostalgebraist, 2020; Belrose et al., 2023), which seek to decode transformer hidden state activations into language by applying the unembedding matrix of the model to these activations (potentially after a learned affine map, as in the tuned lens). These lenses benefit interpretability by mapping hidden states to tokens, which are in the space of language and hopefully more interpretable. Decoding intermediate layers this way has shown that predictions are refined gradually across depth (nostalgebraist, 2020; Belrose et al., 2023), that multilingual models pass through an English-like latent space before producing the target language (Wendler et al., 2024), that false few-shot demonstrations derail predictions only after a critical layer (Halawi et al., 2024), and that a single hidden state already carries information about tokens several positions ahead (Pal et al., 2023). The trajectory of tuned-lens predictions across layers can also detect malicious inputs (Belrose et al., 2023).
The Jacobian lens (J-lens, Gurnee et al., 2026) continues this line of work by introducing a new transfer operator onto the residual stream vector before the application of the unembedding matrix and mapping to tokens. This operator is the Jacobian of the transformer, averaged over tokens. In their paper, the motivation for the usage of the Jacobian K is based on standard results in calculus: A Jacobian describes how a small perturbation in the input of a function results in a change in the output. When the Jacobian is studied in an LLM, it provides directions in the residual stream that are
“verbalizable” (Gurnee et al., 2026), which is to say that it identifies how perturbations change the linguistic output of the model. However, this property holds only in the local neighborhood of the point on which the Jacobian is defined, and the J-lens is defined by averaging over prompts, tokens, and future positions in the output layer. An average Jacobian has no reason to behave like any of its elements. Indeed, if the Jacobians of a system form a curved manifold, the average Jacobian can easily lie off-manifold. More generally, well-known features that describe the behavior of linear operators (e.g., singular vectors and values, which are nonlinear functions of a matrix) can deviate grossly from those of individual Jacobians under averaging (Appendix A). In Figs. 1 and 10 we visually demonstrate this phenomenon for four open source LLMs. What, then, does the J-lens capture?
Recent work (Yan et al., 2026) has attempted to analyze the J-lens as an approximate least squares map from the hidden state to the output using Stein's lemma (Stein, 1981). However, Stein's lemma only applies when the input data is sampled from a Gaussian distribution, and transformer hidden states are notoriously non-Gaussian, with heavy-tailed outlier features and a few activations that are orders of magnitude larger than the rest (Dettmers et al., 2022; Sun et al., 2024). Rather, the J-lens is most directly related to a branch of dynamical systems theory called Lyapunov theory, which describes how perturbations grow or shrink in spatiotemporal dynamical systems.
The Jacobian lens. Let be the activation at layer and token position in a fixed sequence , and let be the final layer. Write to represent a lag in token positions, for the number of lags averaged over, and for a context. Define
(1)
The lens is then applied to a state, along with the unembedding matrix:

Qwen3.5-9B
Qwen3-14B
PC 1
PC 1
Figure 1: Low-dimensional projection (principal component analysis, PCA) of the top 100 singular values for individual (black) and mean (red) Jacobians of four different LLMs (Appendix B). Each Jacobian is evaluated with input at an intermediate layer chosen to be halfway through the model and output at the final layer. Prompts are sampled from a range of datasets with different topics (Wikipedia, Python code, math, news, etc.). Jacobian spectra are plotted in Fig. 9.
where is the model's unembedding matrix.
Lyapunov exponents. Let be a perturbation of a state evolved for T steps under the dynamics. Its Lyapunov exponent (Oseledets, 1968; Eckmann & Ruelle, 1985) measures asymptotic growth of the perturbation:
when the limit exists. At finite T, the finite-time Lyapunov exponents are
where are singular values of the full T-step Jacobian. For dynamical systems, this is typically computed by chaining with multiplication each one-step Jacobian with iterative renormalization
(Benettin et al., 1980; Engelken et al., 2023). Spatiotemporal versions also resolve how a perturbation travels across space: the convective Lyapunov exponent (Deissler & Kaneko, 1987; Jiotsa et al., 2013) measures the growth of a perturbation in a reference frame that is moving in space. Hydrodynamic Lyapunov modes (Eckmann & Gat, 2000) are long-wavelength Lyapunov vectors whose exponents approach zero as their wavenumber k approaches zero.
For transformers, depth is the evolution coordinate (T) and token position the spatial coordinate. A hydrodynamic interpretation requires identifying long wavelength with growth near zero. We'll show here that the J-space is tightly linked to Lyapunov theory. Under the assumptions below, the J-lens favors spatially smooth, slowly varying responses, because it by construction integrates out the fast dynamics, implicitly behaving like a low-pass filter in space. With this connection in hand, we show that many of the results in the original paper follow naturally. Note that this is not an argument that it does not identify a Global Workspace per se, but rather to shed light on what this method is designed to capture and why that may or may not align with the philosophical conception of the Global Workspace.
We begin by constructing a model that establishes this connection, and subsequently relax assumptions of the model.
Shared and context-specific modes. Suppose our Jacobians can be decomposed as follows:
with the number of layers between the read-in layer and the output, and every mode quantity depends on , which we suppress. describes the cross-token evolution dynamics. The shared input directions and output directions are each orthonormal. Each mode has two finite-time Lyapunov exponents: in depth and in token position, while is the mode's rotation per token. At a fixed , any matrix admits a singular value decomposition (SVD). Sharing directions across contexts, factoring depth (Fig. 2a) and lag (Fig. 2b) in this way, and treating the two exponents as independent are additional assumptions of this illustrative model. A Lyapunov mode is a mode that evolves according to a Lyapunov exponent, and hence is defined by its input direction . Averaging over lags and contexts splits the lens into a shared part and an averaged remainder, , in which shared mode is weighted by , with
where denotes the maximum lag between input and output token positions (Appendix C). We also assume the context-specific response is no larger than the shared one: , where .
Isolation of slow modes. The future averaging suppresses modes that decay rapidly or oscillate quickly. For , . Slow modes with , retain , while rapid decay or oscillation is attenuated. Another way to see this is to consider the Fourier decomposition of a response over the window:
Thus averaging over time extracts the zero-frequency coefficient of the finite window, thereby identifying slowly varying responses in space (token position). Similarly, time (layers) weights modes by , thereby favoring growing or slowly decaying modes. This is not necessarily a strong weighting, especially closer to the output when the Jacobian becomes increasingly aligned with the identity map.
Incoherent directions are suppressed. For a unit input direction and independent contexts , the averaged remainder is , which quantifies the expected overlap between two contexts' responses to the same input (Appendix C). Suppose this overlap is small, with . Taking the largest growth over unit inputs and assuming bounded scales of the modes,
(8)
Thus for small overlap , averaging suppresses the incoherent response relative to the shared response. Since , its leading singular directions approach those of as .
Relaxing exact shared modes. The above model shows that if spatially (in a transformer, across tokens) and contextually coherent Lyapunov modes exist, these modes dominate in the Jacobian lens. However, exact shared directions need not exist. We show next under a more general construction that the J-lens directions preferentially select Lyapunov modes that (a) maximally grow over depth T (magnitude a), (b) are maximally coherent across token lags (lag coherence ), and (c) are maximally coherent across different contexts c (context coherence ). Using the same SVD notation, write
For a unit input direction v, define
(10)
We call these the coherence parameters for directions in the Jacobian lens. We use the 2-norm for each parameter here, but other norms could reasonably apply as well. is the average response magnitude, is the lag coherence of a response, and is the context coherence. These coherence parameters can be understood intuitively through the lens of spatiotemporal Lyapunov modes: a describes the canonical notion of a Lyapunov exponent, here how a direction grows over time (layers). describes how activity along a direction oscillates across spatial (token) positions, with indicating no oscillation. Lastly, describes how consistently direction is read in and written out across different contexts (instantiations of Jacobian), given the same vector.
We illustrate what each coherence parameter measures in Fig. 2. Intuitively, magnitude measures the total effect of a perturbation along a feature direction across both layers and time, thereby capturing how persistent or relevant it is. Lag coherence measures how the response of a perturbation changes across token positions, for which large values are approximately static, such as the overall topic of a document, whereas incoherent features change rapidly, such as word type. Context coherence measures whether a perturbation along a direction responds similarly in the same way for different contexts, and how prior context modulates its effect. For example, adding in a new rule such as “today is opposite day” into context requires reprocessing each feature with this in mind. Context-coherent directions are processed consistently across contexts, while incoherent directions change their behavior.
Define , when their denominators are zero. The three factors telescope via multiplication to yield . The leading singular value of the lens is therefore
Subsequent directions maximize the same quantity subject to orthogonality to prior input directions . This shows that the J-lens preferentially upweights directions with the largest combinations of magnitudes and coherences . In the notation of Eq. 5, the J-lens selects

Figure 2: Schematic of the three coherence parameters. (left) Schematic of large versus small magnitude directions. A perturbation grows across layers in the red direction, but shrinks in the blue direction. (middle) Schematic of lag-coherent (black) versus lag-incoherent (gray) feature directions across token positions. (right) Context-coherent directions evolve similarly across layers in contexts, while context-incoherent directions evolve differently.
the modes with the largest growth across layers (magnitude), spatial changes that do not oscillate much ( ), and , that change minimally across contexts (context coherence). Gurnee et al. (2026) found that the J-space summarized only a small portion of the variance. This observation is easily explained by recognizing that variance explained is unrelated to each of the factors in Eq. 11, which we formalize now:
Corollary 1.1. A direction selected by Jacobian averaging may explain arbitrarily little or arbitrarily much activation variance. Consequently, the singular values of do not determine the variance explained by its selected directions.
The proof is a two-dimensional counterexample and is given in Appendix D.
Thus every token-indexed J-lens direction is a mixture of the right singular modes : the singular value weights the strength of the corresponding coherent response channel, while measures how strongly that channel's downstream response aligns with the token's unembedding direction. This connection matters because the J-space is operationally defined by approximating an activation as a sparse non-negative combination of the directions (Gurnee et al., 2026). The sparse decomposition therefore selects a small number of semantically labeled mixtures of the coherent modes that survive averaging. In this sense, the singular structure of supplies the underlying dynamical geometry, while the unembedding and sparse non-negative decomposition translate that geometry into the token-level “concepts” reported by the J-lens.
1.2 FAMILIES OF JACOBIAN LENSES
Our analysis suggests that the Jacobian lens can be modified to extract different types of information. Here, we focus on the modulation of lag coherence selectivity. Eq. 7 highlights that averaging over time points is equivalent to a Fourier projection onto the zero-frequency mode. Modulating the parameter in this projection (or even generalizing to band-pass filtering) induces a family of lenses we call -J-lenses, where given the Nyquist limit for sampling frequency 1 / token. We demonstrate their selectivity in our toy task in Fig. 6.
2 TOY MODEL
We designed a simple toy task to study the J-lens for models performing next-token prediction, and demonstrate its behavior on optimal Bayes filters as well as trained transformers. Our task, inspired by recent work studying how transformers learn to track hidden states (Shai et al., 2024), is a hidden Markov model (HMM) with several independent latent states , each arranged on a ring of discrete states: . We design the dynamics to be the simplest model that can selectively modulate each of the coherence factors via the task parameters. The dynamics of each latent state are (suppressing the latent index for clarity):
Here is called the state persistence parameter, with probabilities and . We will see how changing modulates magnitude by determining for how many positions a token is useful to estimate the state of the latents. The integer is the velocity of the state on the ring, is its angular velocity, and is a diffusion term. Lag coherence measures whether a state drives all future states in the same way, and modulates this by increasing misalignment across positions. With a fully observed state at all timepoints, however, the model is not forced to integrate over time (filtering), which would make the Jacobian 0 across all timepoints. To force integration, we reveal the states with probability , via another random variable . Each latent state is combined into a token by concatenating state index into an -ary variable and converting that to a token index , making a total of tokens, where the additional token is a null token (states unobserved). In the following, we use three latents with for simplicity. We will show how this model setup allows us to selectively modulate the magnitude (through ) and lag coherence (through ) of the Jacobian lens vectors. Note that this toy model is easily solved by a transformer, and indeed even the embeddings learn to represent the latent states. The main result of our analysis is that we can a priori predict the order of the modes and their approximate coherence parameters in the Jacobian lens of the transformer.
2.1 INTRODUCING CONTEXTUAL DEPENDENCY
So far, all tokens across all random sequences for a given model are integrated the same way. This means that the context coherence of the Jacobian lens vectors cannot be modulated. To introduce this, we add a new variable called a key state where the observed state , and , with key bias . This state is always fully observed, forcing the models to look back one timestep to identify how to infer the state of the observed token at the present timestep. This directly modulates context coherence because it forces the read-in and read-out directions of a feature to change dependent on the context. Each keyed state has its own independent key, making tokens, where is the set of latents with keys.
3 THE BAYES FILTER AND ITS JACOBIAN LENS
Prior work (Shai et al., 2024) has found that transformers trained on HMMs learned to represent optimal Bayesian beliefs of the hidden states in their residual stream. We follow this line of work by deriving the Bayes filter for the above HMM, its Jacobian lens, and then show that the Jacobian lens captures belief states ordered by their coherence parameters in the transformer as well. Because each state exists on a ring, we account for rotational symmetry by studying the Fourier modes . The Bayes filter optimally integrates the given evidence into a belief state, which is defined as the expected value of a state given the history:
The belief state for a given Fourier mode of a given state is updated by unkeyed evidence as
where , with the rotation of mode per step and the diffusion factor (Appendix E). This update rule is locally linear, either updating with the expected evolution operator if no evidence is observed, and replacing the state with the observation otherwise. The graphical model of the task and the Bayes filter are schematized in Fig. 3.
a
b

Figure 3: Graphical models of the task (a) and the Bayes filter (b). (a) Three latents evolve independently on their rings. The reveal variable sets whether the token shows the latents, and in the context sweep the key sets whether the shown state is flipped. (b) The belief is the previous belief propagated by , or, when , the revealed state from propagated by .
3.1 KEYED FILTERS
Keyed states are observed differently, but the key state is directly observable at every token and is invertible. This means that the Fourier mode of the evidence is directly related to the state: . The Bayes filter can be similarly extended, as
The first of the latter two terms accounts for the setting in which the key does not change the state, and the second accounts for the changed state by inverting the rotation to recover the state. This forces the predictive model to change where it reads in token information and writes to the predicted next token, thereby modulating the contextual coherence of the dynamics.
3.2 THE JACOBIAN LENS
In this section we derive the three factors of the J-lens for the Bayes filter (magnitude , lag coherence and context coherence ) and show how the task parameters set them. We focus on one latent and one Fourier mode : the Jacobian of mode of the belief at with respect to mode of the evidence at the revealed source , in context ,
This object captures all of the dynamics, as the latents are independent and the filter acts on each Fourier mode separately. Thus the Jacobians between different latents or different modes are zero, and the lens is block diagonal, making each mode its own separate singular vector. The piecewise-linear components of the dynamics combine to form
where the product is one if no evidence has been observed across all tokens from position to , and zero otherwise.
Let be the memory of mode across one step, where , and let be the number of tokens until the next reveal, so that . Summing over lags gives , where is the response accumulated before the next reveal. This sum matches the lens of Eq. (1) up to the averaging factor , which scales every singular value equally and so leaves their order unchanged. For large
H the three coherence parameters are (Appendix E.1)
(19)
where is the series given in Eq. (43). When , every term of is real and positive, so , and the persistence changes only the magnitude . A nonzero angular velocity rotates successive terms of so that they partly cancel, which lowers the lag coherence .
3.3 CONNECTION TO THE TRANSFORMER
The Jacobian lens on the transformer is defined by , where is the unembedding matrix. Given that the activity after the unembedding layer maps to tokens via a softmax, the J-lens on the transformer studies the effect of perturbations on the log probabilities, rather than the probabilities of each state as in the Bayes filter. The difference on the Jacobian is a factor of , which is an effective reweighting by a positive factor. This reweighting, however, preserves the order of each factor , thus the qualitative ordering as predicted by the theory should transfer to the transformer.
4 NUMERICAL RESULTS
In the following three sections, we first introduce the parameter that is modulated across multiple independent latent states in the HMM (three, across all sections) to induce selective changes in either magnitude , lag coherence , or context coherence . We then apply the Bayes filter to validate the analytical theory. Next, we train a two-layer decoder-only transformer (Vaswani et al., 2017) with residual dimension 128 and 4 heads per layer to predict the next token given the history (see Appendix F for further details). Our primary result is a validation that the Jacobian lens unsupervisedly identifies independent modes associated with the latent states, ordered by the selectively modulated coherence factor. To do so, we fit an encoding model that maps from the Fourier modes (two per latent state for sin and cos) of a latent to the residual stream, and compute the coherence parameters for these directions. We also compute the total cosine similarity between this encoding subspace and the Jacobian lens singular vectors (input side) and (output side) (Appendices G and H). We also repeat this process on decoding vectors. Finally, we show that we can predict the persistence at which two latents swap places, given different angular velocities .
4.1 SELECTIVELY MODULATING MAGNITUDE
We first modulate the persistence by designing a hidden Markov model (HMM) with three latent states, each on a ring, with respectively. We set the latent state velocity , which holds and fixed while selectively modulating the magnitude of each latent (Fig. 4a). All models learn to predict the next token as well as the optimal Bayes filter (Fig. 4b). On the Bayes filter, the measured J-lens factors match the theory: the lens weight tracks the magnitude , while and stay fixed (Fig. 4c). The J-lens applied to the transformer has similar factors at each layer. As predicted, the J-lens directions identify latents in order of their magnitude (Fig. 13). Across all seeds, this is true for both the input direction (the right singular vector of the J-lens, which reads in the residual stream at layer ) and the output direction (the left singular vector, which writes to the output). The rank order predicted by the theory is validated on the Bayes filter and transformer (Figs. 11 and 12). The results are also consistent when utilizing decoding vectors for each latent, rather than encoding vectors (Fig. 14), albeit with slightly smaller alignment values.
a persistence , one step
b


C
O Bayes filter
transformer, layer 0
transformer, layer 1
theory

Figure 4: The J-lens captures the selective modulation of magnitude in the Bayes filter and transformers. (a) Cartoon of the task feature that is modulated: a state on the ring is kept with probability (persistence), and sampled uniformly otherwise. (b) Learning curves for the transformer, in comparison to the optimal Bayes filter. (c) J-lens factors of each latent as a function of persistence : lens weight (the singular value ) and magnitude , both relative to their largest value, then lag coherence and context coherence . Open circles: Bayes filter. Blue circles and orange squares: transformer layers 0 and 1. Large markers show the mean across seeds and small markers show single seeds. Red line: theory (Eq. 19).
4.2 SELECTIVELY MODULATING LAG COHERENCE
Next, we selectively modulated the lag coherence by changing the velocity v of each latent on the ring (Fig. 5a). We placed states on a ring of 8 indices, and selected three latents again with velocities (perfectly coherent), 2, and 4 (maximally incoherent), that is, , , . Our theory again predicts that the J-lens should identify these latents in order of their lag coherence . As in the prior section, we found that for transformers trained to optimality (Fig. 5b), this played out empirically across all seeds (Fig. 15). The lag coherence of the J-lens applied to the transformer on each latent separately was similarly modulated most by the velocity, while a and were less sensitive (Fig. 5c). Again, the results are also consistent when utilizing decoding vectors for each latent, rather than encoding vectors (Fig. 16).
4.2.1 -LENS FAMILY
As described in Sec. 1.2, we also evaluated the -J-lenses on the lag coherence sweep for both transformer layers and the Bayes filter. We swept the parameter across the whole range, and found that it preferentially upweighted latent directions with lag coherence parameters (tuned via in the task) that maximally aligned with the (Fig. 6). This suggests that the -J-lens family can be used to selectively identify rapidly changing information across tokens (like syntax) or slowly changing information, by sweeping .
4.3 SELECTIVELY MODULATING CONTEXT COHERENCE
Lastly, we selectively modulate context coherence by introducing a key state to latent states with states (Sec. 2.1). In this HMM, an observed state is flipped to the opposite state with probability . Holding all other parameters besides fixed, the context coherence can be modulated independently, since for the Bayes filter (Appendix F). We select , ranging from maximally incoherent (0) to coherent (1), and train a transformer on this 3-latent HMM. The J-lens factors of the Bayes filter match the theory, with tracking (Fig. 7). The Bayes filter J-lens identifies the latents in the predicted order, and the transformer does as well (Fig. 17).
a
b

C
O Bayes filter
transformer, layer 0
transformer, layer 1
theory

turn per token (degrees)
turn per token (degrees)
turn per token (degrees)
turn per token (degrees)
Figure 5: The J-lens captures the selective modulation of lag coherence in the Bayes filter and transformers. (a) The velocity v of the state along the ring, with angular velocity , modulates lag coherence . (b) Learning curves of the transformer, as in Fig. 4. (c) J-lens factors as a function of angular velocity , as in Fig. 4.

lens frequency
transformer, layer 0
lens frequency
transformer, layer 1
lens frequency
Figure 6: The -J-lens selectively upweights latent directions with lag coherences aligned with . Solid line indicates the theoretical curves (optimally rescaled from the Bayes filter theory to fit the transformers), points indicate real sampled data. Colors (denoting latent index) are determined by alignment with latent encoding direction.
This lens is noisier than the previous analyses, potentially due to the increase in noise in the observed states added by the key variable. In both layers, several J-lens directions also align with patterns other than the latent belief states, mainly the reveal state (whether or not the latent states are observed) of the present token and the key state (Fig. 19). This suggests that the J-lens can identify other important features in the latent space in an unsupervised fashion. The lens factors (Fig. 7c) show that both transformer layers compress the range of context coherence: is much higher than in the Bayes filter for the incoherent latent ( ) and lower for the coherent ones. The high at suggests that transformers may have a bias for extracting context-independent information from data. Finally, the results remain consistent when utilizing decoding vectors for each latent, rather than encoding vectors (Fig. 18).
4.4 THEORY PREDICTS THE CROSSING OF TWO LATENTS
To further emphasize that our theory can predict the ordering of features in the J-lens, we show that our theory can predict when two latents are swapped in the Bayes filter, and that this predicted crossing point roughly translates to the transformer. We simulate an HMM with no keys here for a key (mean )

b

C
O Bayes filter
transformer, layer 0
transformer, layer 1
theory

Figure 7: The J-lens captures the selective modulation of context coherence in the Bayes filter and transformers. (a) For keyed features, the true state is revealed in the token with probability . Otherwise, the state is revealed inverted, so that . (b) Learning curves of the transformer, as in Fig. 4. (c) J-lens factors as a function of key bias , as in Fig. 4.
simplicity. For two latents with angular velocities and , our theory predicts a persistence value for a given and , at which two latents swap order in the J-lens (Appendix E.1, Eq. (46)). On the Bayes filter, this theory plays out extremely cleanly (Fig. 8a,b) across a range of and values, with the theory exactly predicting the crossing point of two latents. Applied to the transformer, our results generalize with small bias (for , as the difference in singular values grows monotonically with , and the error is ) and in opposite directions at each layer (Fig. 8c). Together, this suggests that even though the Bayes filter theory does not perfectly translate to the transformer, as expected, the predictions are still quite informative.
5 DISCUSSION
We have shown that the Jacobian lens, as introduced by Gurnee et al. (2026), identifies modes in any temporally and spatially varying dynamical system that jointly maximize three different statistical features:
Magnitude a. Magnitude measures how a state grows or shrinks across a ‘temporal’ dimension. In transformers, this growth is across layers, with depth exponent . However, this could be defined differently in other systems. Magnitude aligns most directly with the standard notion of a Lyapunov exponent, which typically measures growth across time in a dynamical system.
Lag coherence . Lag coherence measures how a feature is modulated across ‘spatial’ lags . In transformers, this is measured across token positions, where a mode decays at rate and rotates at frequency . Cross-token dynamics in language models have previously been studied as multi-particle systems (Lu et al., 2019; Geshkovski et al., 2023), in which each token (particle) has a particular spatial position and interacts with others via self-attention. The most coherent spatial modes are those with zero spatial frequency and little decay ( ). In Lyapunov theory, coherent directions relate to the measurement of hydrodynamic Lyapunov modes, which are exactly the spatially coherent Lyapunov vectors.
Context coherence . Context coherence measures how much the dynamics are modulated across different states or time periods. Roughly, maximizing context coherence identifies modes that are a

b
C
transformer, layer 0
transformer, layer 1
Figure 8: Predictive theory of crossing of latents in the J-lens. (a) Empirical singular values (circles) and analytically derived values in the large-H limit (line) for the J-lens applied to a Bayes filter with two latents (L0, L1). is swept for L0, while is held fixed for L1. Vertical dotted line denotes the predicted crossing point . (b) Predicted crossing point (Eq. (46)) and empirical crossing point (circles) as a function of the angular velocity of L1. (c) Difference in singular values as a function of , for the transformer trained on the same HMM as in (a). Vertical solid line denotes the mean crossing point across seeds, gray shading denotes standard deviation. Each curve is averaged over 4 variations of (circles in (b)).
autonomous ( ), which is to say independent with respect to the context. The transformer architecture is highly context-dependent, whereas autonomous dynamical systems are not. That the transformer learned features with much higher than the Bayes filter for the context-incoherent latent (Fig. 7c) suggests that transformers might learn to modulate contextual information via context-independent dynamics, which could be a fundamental mechanism for symbolic processing. This further suggests that it may be viable to study transformers more generally as dynamical systems (Ostrow et al., 2024) just like recurrent neural networks (Sussillo & Barak, 2013).
Our analysis explains a number of phenomena in the original J-lens paper (Gurnee et al., 2026). As described previously, high-magnitude, lag-coherent, and context-coherent directions do not have to be large variance (Corollary 1.1). This is commensurate with Gurnee et al. (2026) finding that the J-space is never more than 10% of activation variance. Lag coherence preference explains why, when Claude was asked to ‘concentrate on X while solving Y’ (Gurnee et al., 2026), the J-lens identified features corresponding to X, as these features would be prevalent and coherent across all token positions. A preference for contextually coherent directions explains why averaging identifies concepts that are broadly verbalizable, not specific to a single prompt.
Our work aligns with other results in mechanistic interpretability (Shai et al., 2024) that study how toy transformers represent belief state geometry in their latent state and learn to decompose independent factors of the generative process into orthogonal subspaces (Shai et al., 2026). However, this work has generally relied on linear decoding of these belief states, which requires a priori knowledge of the optimal belief states at each timepoint. Our results here suggest that the J-lens could be a way to identify these belief states in an unsupervised manner, which would be effective for scaling to real-world behaviors.
This analysis also suggests that a family of Jacobian lenses could be designed to capture different types of information within transformers. For example, local information could be emphasized by averaging over high-frequency Fourier modes, rather than low-frequency, as we showed in Fig. 6. This could be relevant for isolating and understanding fast-changing information, such as those on the level of syntax that change word-by-word. Contextually incoherent information could be isolated by identifying Jacobian modes that minimize context coherence , rather than maximize it.
Given recent work on estimating Jacobians from dynamical data (Eisen et al., 2026), the -J-lenses could productively be applied to biological neural data as well. Together, our results clarify the mathematical nature of the J-lens, which is necessary for such a useful and efficient interpretability tool.
Limitations. Here, we only study toy models, in which the task was relatively easy to learn and the coherence parameters of the task were easily manipulable.
REFERENCES
Bernard J. Baars. A Cognitive Theory of Consciousness. Cambridge University Press, 1988.
Nora Belrose, Igor Ostrovsky, Lev McKinney, Zach Furman, Logan Smith, Danny Halawi, Stella Biderman, and Jacob Steinhardt. Eliciting latent predictions from transformers with the tuned lens. arXiv preprint arXiv:2303.08112, 2023.
Giancarlo Benettin, Luigi Galgani, Antonio Giorgilli, and Jean-Marie Strelcyn. Lyapunov Characteristic Exponents for smooth dynamical systems and for hamiltonian systems; a method for computing all of them. Part 1: Theory. Meccanica, 15(1):9–20, March 1980. ISSN 1572-9648. doi: 10.1007/BF02128236. URL https://doi.org/10.1007/BF02128236.
Ilias Chalkidis, Abhik Jana, Dirk Hartung, Michael Bommarito, Ion Androutsopoulos, Daniel Martin Katz, and Nikolaos Aletras. LexGLUE: A benchmark dataset for legal language understanding in English. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, pp. 4310–4330, 2022.
Yulong Chen, Yang Liu, Liang Chen, and Yue Zhang. DialogSum: A real-life scenario dialogue summarization dataset. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pp. 5062–5074, 2021.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
Stanislas Dehaene, Michel Kerszberg, and Jean-Pierre Changeux. A neuronal model of a global workspace in effortful cognitive tasks. Proceedings of the National Academy of Sciences, 95(24):14529–14534, 1998.
Robert J. Deissler and Kunihiko Kaneko. Velocity-dependent Lyapunov exponents as a measure of chaos for open-flow systems. Physics Letters A, 119(8):397–402, 1987.
Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. LLM.int8(): 8-bit matrix multiplication for transformers at scale. In Advances in Neural Information Processing Systems, volume 35, 2022.
Jean-Pierre Eckmann and Omri Gat. Hydrodynamic Lyapunov modes in translation-invariant systems. Journal of Statistical Physics, 98(3):775–798, 2000.
Jean-Pierre Eckmann and David Ruelle. Ergodic theory of chaos and strange attractors. Reviews of Modern Physics, 57(3):617–656, 1985.
Adam J Eisen, Mitchell Ostrow, Sarthak Chandra, Leo Kozachkov, Earl Miller, and Ila Fiete. Characterizing control between interacting subsystems with deep jacobian estimation. Advances in Neural Information Processing Systems, 38:51361–51406, 2026.
Rainer Engelken, Fred Wolf, and L. F. Abbott. Lyapunov spectra of chaotic recurrent neural networks. Phys. Rev. Res., 5:043044, Oct 2023. doi: 10.1103/PhysRevResearch.5.043044. URL https://link.aps.org/doi/10.1103/PhysRevResearch.5.043044.
Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, and Philippe Rigollet. A mathematical perspective on Transformers. arXiv preprint arXiv:2312.10794, 2023.
Wes Gurnee, Nicholas Sofroniew, Adam Pearce, Mateusz Piotrowski, Isaac Kauvar, Runjin Chen, Anna Soligo, Paul Bogdan, Euan Ong, Rowan Wang, Ben Thompson, David Abrahams, Subhash Kantamneni, Emmanuel Ameisen, Joshua Batson, and Jack Lindsey. Verbalizable representations form a global workspace in language models. arXiv preprint arXiv:2607.15495, 2026.
Danny Halawi, Jean-Stanislas Denain, and Jacob Steinhardt. Overthinking the truth: Understanding how language models process false demonstrations. In International Conference on Learning Representations, 2024.
Karl Moritz Hermann, Tomáš Kočiský, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, volume 28, 2015.
Kenfack Jiotsa, Aurelien Jiotsa, Antonio Politi, and Alessandro Torcini. Convective Lyapunov spectra. Journal of Physics A: Mathematical and Theoretical, 46(25):254013, 2013. doi: 10.1088/1751-8113/46/25/254013.
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019.
Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin Clement, Dawn Drain, Daxin Jiang, Duyu Tang, Ge Li, Lidong Zhou, Linjun Shou, Long Zhou, Michele Tufano, Ming Gong, Ming Zhou, Nan Duan, Neel Sundaresan, Shao Kun Deng, Shengyu Fu, and Shujie Liu. CodeXGLUE: A machine learning benchmark dataset for code understanding and generation. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, 2021.
Yiping Lu, Zhuohan Li, Di He, Zhiqing Sun, Bin Dong, Tao Qin, Liwei Wang, and Tie-Yan Liu. Understanding and improving Transformer from a multi-particle dynamic system point of view. arXiv preprint arXiv:1906.02762, 2019.
Yev Meyer, Marjan Emadi, Dhruv Nathawani, Lipika Ramaswamy, Kendrick Boyd, Maarten Van Segbroeck, Matthew Grossman, Piotr Mlocek, and Drew Newberry. Synthetic-text-to-SQL: A synthetic dataset for training language models to generate SQL queries from natural language prompts. https://huggingface.co/datasets/gretelai/synthetic_text_to_sql, 2024.
nostalgebraist. interpreting GPT: the logit lens. LessWrong, https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens, 2020.
Valery I. Oseledets. A multiplicative ergodic theorem. Lyapunov characteristic numbers for dynamical systems. Transactions of the Moscow Mathematical Society, 19:197–231, 1968.
Mitchell Ostrow, Adam Eisen, and Ila Fiete. Delay embedding theory of neural sequence models. arXiv preprint arXiv:2406.11993, 2024.
Koyena Pal, Jiuding Sun, Andrew Yuan, Byron C. Wallace, and David Bau. Future lens: Anticipating subsequent tokens from a single hidden state. In Proceedings of the 27th Conference on Computational Natural Language Learning (CoNLL), 2023. doi: 10.18653/v1/2023.conll-1.37.
Keiran Paster, Marco Dos Santos, Zhangir Azerbaijan, and Jimmy Ba. OpenWebMath: An open dataset of high-quality mathematical web text. In International Conference on Learning Representations, 2024.
Abigail See, Peter J. Liu, and Christopher D. Manning. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pp. 1073–1083, 2017.
Adam Shai, Loren Amdahl-Culleton, Casper L. Christensen, Henry R Bigelow, Fernando Rosas, Alexander Boyd, Eric A. Alt, Kyle J Ray, and Paul M. Riechers. Transformers learn factored representations. In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=f1DGB9On0h.
Adam S Shai, Sarah E Marzen, Lucas Teixeira, Alexander G Oldenziel, and Paul M Riechers. Transformers represent belief state geometry in their residual stream. Advances in Neural Information Processing Systems, 37:75012–75034, 2024.
Charles M. Stein. Estimation of the mean of a multivariate normal distribution. The Annals of Statistics, 9(6):1135–1151, 1981.
Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. RoFormer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024.
Mingjie Sun, Xinlei Chen, J. Zico Kolter, and Zhuang Liu. Massive activations in large language models. In Conference on Language Modeling (COLM), 2024.
David Sussillo and Omri Barak. Opening the black box: low-dimensional dynamics in high-dimensional recurrent neural networks. Neural Computation, 25(3):626–649, 2013.
Don Tuggener, Pius von Däniken, Thomas Peetz, and Mark Cieliebak. LEDGAR: A large-scale multi-label corpus for text classification of legal provisions in contracts. In Proceedings of the Twelfth Language Resources and Evaluation Conference, pp. 1235–1241, 2020.
Lewis Tunstall, Leandro von Werra, and Thomas Wolf. Natural Language Processing with Transformers. O'Reilly Media, 2022.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, 2017.
Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. Do llamas work in English? on the latent language of multilingual transformers. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL), 2024.
Wikimedia Foundation. Wikimedia downloads: Wikipedia dump of 2023-11-01. https://dumps.wikimedia.org, 2023.
Shi-Qi Yan, Kai-Xuan Ding, Chao-Hong Tan, Qian Chen, Wen Wang, Xiangang Li, and Zhen-Hua Ling. Short horizons and sparse concepts: a mathematical view of the readout in the J-lens. arXiv preprint arXiv:2608.25347, 2026.
A JACOBIAN SINGULAR VALUES UNDER AVERAGING
Fix and singular values for , with . For each sample , draw a random permutation and set
Every has the same singular values . Since are shared,
so the singular values of are the diagonal entries of ,
Each is a uniform draw from , so
Every singular value of therefore converges to the same value . Each has the decaying spectrum , but the mean has a flat spectrum: .
B REAL JACOBIANS OF LLMS
For each model, we computed per-token Jacobians of the residual stream on 96 text prompts drawn from 16 public datasets, six prompts each, all from Hugging Face:
• Wikipedia, 2023-11-01 dump, in English, Russian, Arabic, Chinese, Japanese and Swahili (wikimedia/wikipedia; Wikimedia Foundation, 2023);
• Python code from CodeParrot-clean (codeparrot/codeparrot-clean; Tunstall et al., 2022);
• JavaScript functions from the CodeXGLUE code-to-text benchmark (google/code_x_glue_ct_code_to_text; Lu et al., 2021);
• SQL schemas with queries from Gretel's synthetic text-to-SQL dataset ( Gretelai/synthetic_text_to_sql; Meyer et al., 2024);
• mathematical web text from OpenWebMath (open-web-math/open-web-math; Paster et al., 2024);
• grade-school math word problems with worked solutions from GSM8K (openai/gsm8k; Cobbe et al., 2021);
• dialogues from DialogSum (knkarthick/dialogsum; Chen et al., 2021);
• news articles from CNN/DailyMail, version 3.0.0 (abisee/cnn_dailymail; Hermann et al., 2015; See et al., 2017);
• poems (merve/poetry) ;
• contract clauses from LEDGAR, via LexGLUE (coastalcph/lex_glue; Tuggener et al., 2020; Chalkidis et al., 2022);
• recipes (corbt/all-recipes) .
Prompts were drawn at random, with a fixed seed, from the first 200 training examples of each dataset. Only texts of at least 400 characters were kept, and each was truncated to its first 57 tokens. We computed the exact Jacobian from the middle block of all models to the last block, one token ahead:
Jacobians were computed by reverse-mode differentiation, with float32 weights and eager attention, giving matrices per model. The mean Jacobian is their element-wise average,
where c denotes context and t denotes position in the text. To visualize the distribution of these matrices, we computed each Jacobian's top 100 singular values, suppressing the rest as they may be noisy. We rescaled the singular value distribution by taking a logarithm, so that lower values can contribute in dimensionality reduction, and normalized the distribution for all Jacobians. We then fit and applied PCA to the individual Jacobians, then projected the mean Jacobian into this space.
C THE SHARED-MODE MODEL
This appendix provides the averaging steps and assumptions behind the shared-mode model of Eq. (5).
https://huggingface.co/datasets/merve/poetry
https://huggingface.co/datasets/corbt/all-recipes

Figure 9: Jacobian singular value spectra of four LLMs, with estimated power laws. Individual Jacobian curve is averaged over all points in Fig. 1, with shading denoting standard deviation.
a
b


Figure 10: Low-dimensional projection of the left and right singular vectors of Jacobians. The top 100 left and right singular vectors, ranked by singular values as in Fig. 1, are projected into two dimensions by computing the subspace distance on Grassmannians , where are the principal subspace angles and is the projector matrix defined by the singular vectors, . This pairwise distance matrix is reduced to two dimensions and visualized with PCA. (a) Left singular vectors. (b) Right singular vectors.
Averaging. The shared component has singular strengths . Suppressing in the notation, averaging gives
(26)
The shared singular strengths after averaging are . Assume bounded accumulated depth growth and non-growing lag dynamics:
(27)
These assumptions prevent the context-specific response from having arbitrarily greater magnitude than the shared response scale. Spectral dominance additionally requires shared strengths above the averaged remainder, as shown in Eq. (8).
Overlap of context-specific responses. For a unit input perturbation v and independent context draws ,
Here and denotes conjugate transpose. Thus growth is the expected Frobenius overlap of the Jacobians restricted to the same input direction. The unprojected overlap sums over input directions instead.
Write , using for singular values, output directions, and input directions. Then
The bound used in Eq. (8) therefore requires that, on average, the input or output directions of the context-specific modes are poorly aligned across contexts.
Response-scale bound. Since and for a unit input ,
At a fixed response scale, a direction’s contribution to the lens is therefore capped by the product of its two coherences.
D PROOF OF COROLLARY 1.1
Proof. Let be orthonormal directions, and consider the linear response model
where takes values with equal probability. The first direction is perfectly coherent across contexts and constant across future lags; the second changes sign across contexts and oscillates rapidly across lags. Thus
The unique nonzero singular value is s, and its input direction is .
Independently, choose centered input activations, independent of , with covariance
These responses are realized by the context-dependent linear maps . The fraction of activation variance captured by projection onto the selected direction is
Interchanging the two covariance eigenvalues makes this fraction approach 1, without changing the Jacobians, their coherence or slowness, or the singular values of .
By (12), every nonzero token-indexed J-lens direction in this example is proportional to . Hence even the full span of the J-lens directions can capture arbitrarily little activation variance. Jacobian averaging favors coherent, slowly varying responses, weighted by their response magnitudes. Those properties do not require the corresponding activations to have large variance.
E BAYES FILTER DERIVATIONS
Any distribution p on is defined by its modes :
Lemma E.1 (Expected dynamic). For ,
Proof. The expectation of a mode is . One update step gives
and
□
E.1 DERIVATION OF THE J-LENS FACTORS
We use the notation of Section 3.2: , , and the number of tokens until the next reveal, with . Then for and 0 from onward, so .
Magnitude. Since ,
Lag coherence. For one mode, the lag coherence is
whose denominator is . Summing the Jacobian over lags,
where is the update accumulated over the steps until the state is next revealed. The lag coherence is therefore
where the expectation over the reveal time has the closed form
Context coherence. The mean of the accumulated response is
The context coherence
follows by dividing Eq. (40) by Eq. (39).
Long-window limit. Since , the accumulated responses are bounded, , so the boundary term in Eq. (39) and the factors in Eqs. (35), (38), (40) and (41) vanish geometrically as . The magnitude and the mean accumulated response become
and, substituting into Eq. (39),
The coherences are and . For general , the modulus prevents a closed form for Eq. (43), but it cancels from their product and from the singular value of Eq. (11),
so only the split of between lag and context coherence requires the series. The split is closed when is real. Then for all , so has the sign of for every and . For a static latent , and : the singular value is pure magnitude. For an alternating mode , , and : the context coherence is perfect, and the lag coherence carries the whole loss from rotation. For intermediate both coherences are below one, with their product fixed by Eq. (44).
Singular-value switching. For the Bayes filter in belief units, the latents are independent and share only the reveal, so the lens is block diagonal over latents (Section 3.2) and each latent's mode contributes a degenerate pair of singular values equal to . Singular values of different latents therefore cross rather than avoid each other, and the top direction of the lens switches from one latent to the other exactly where their singular values are equal. Compare two latents, labeled 0 and 1 as in Fig. 8, on mode , which carries the largest singular value here. We fix and index by latent instead: , , and is the corresponding singular value. Here is the diffusion factor of mode , shared by both latents. By Eq. (44), the switch occurs when
Take latent 0 static ( ) with its persistence swept, and latent 1 fixed. Let . Then Eq. (45) is the quadratic , whose positive root gives the critical persistence
This closed form needs ; otherwise the equation is quartic and has no simple root. The singular value rises monotonically from 0 with . The static latent therefore takes the top direction for and loses it below, and a switch exists within the sweep whenever . The rotating latent's handicap enters only through , the inverse of its product of coherences up to the factor , which is smallest for and grows with up to . A faster-turning latent is thus overtaken at a lower .
F TRANSFORMER TRAINING METHODS
Each model is a standard decoder-only transformer with causal self-attention and rotary position embeddings (RoPE; Su et al., 2024) applied to the queries and keys only during attention. The vocabulary size V is defined by the HMM: for three latents on rings of 8 (every combination of revealed places, plus the null token) and for the context sweep (null or plain or keyed reveal of three latents, times the three key bits).
We write for the residual stream at position before block : is the token embedding, the stream between the two blocks, and the output of the last block (so ), which the final LayerNorm and read. The J-lens is read at and .
We trained each model with cross-entropy on next-token prediction, with AdamW (Loshchilov & Hutter, 2019) for 20,000 steps with learning rate and weight decay 0.01, on uniform batches of 64 sequences. We compared it with two references: the Bayes filter, which is the optimal predictor, and a memoryless predictor that uses the stationary distribution of the process.
F.1 DATA FOR ALL SWEEPS
For each sweep and seed we draw 500,000 training sequences of 192 tokens from the respective HMM process, and 200 test sequences. All sweeps use a reveal probability of . We ran 8 model seeds per task, jittering task parameters for each seed around a fixed mean. For the magnitude sweep, we set the number of states per latent , velocity , diffusion probability and persistence . For the lag sweep, we set , , , . For the context coherence sweep we set , , , , and key probabilities .
These parameter sweeps selectively modulate magnitude, lag coherence and context coherence:
Magnitude sweep. We only differ , hence all and therefore and so , and likewise . Recall that
with , giving magnitude parameters of 0.82, 1.23, 1.50 for .
Lag sweep. We have that are shared, hence the magnitude is fixed across all latents. Only varies, which varies , and with , we have that for . For , the sign of is shared across all contexts for and so . For , the value is slightly less, at .
Context sweep. For the context sweep, we modified only. This keeps and magnitude fixed, while , as and .
G COMPUTING ALIGNMENT OF J-LENS VECTORS AND LATENT STATE REPRESENTATIONS
We compute the Jacobian lens on 1000 sampled sequences from the task HMM after a 32-token burn-in period, for sequences of length 192. We computed the Jacobian only on the tokens that revealed latent states, totaling about 19,000 sources. We averaged over lags. The Jacobian was computed with forward-mode autodifferentiation and validated with a split-halves analysis. For the Bayes filter, the input is separated by latent, and the output is the predicted distribution over each latent separately as well.
We computed the singular value decomposition using standard linear algebra routines in Python. The left singular vectors are the output directions that the Jacobian writes, while the right singular vectors are the directions that the model reads. They are ordered by the singular values on the diagonal of .
H ALIGNMENT BETWEEN J-LENS VECTORS AND LATENT VECTORS
We identify the relationship between the J-lens vectors and the latent state features by identifying an encoding and decoding subspace for each latent state mode (the Fourier mode of latent state ), and computing the overlap between the J-lens vector and these subspaces. Specifically, we take sequences and, at the last time step of each, record latent state patterns (e.g. and , the real and imaginary parts of the first Fourier mode of latent state 1). We stack the centered residual activity vectors into and the centered patterns into , which has two columns (real and imaginary parts) for each latent mode. These are the patterns on which encoding and decoding regression is done.
We compute the encoding direction of each pattern independently via
which is a map from patterns to activity; the diagonal means that each pattern is regressed independently, rather than jointly. For a decoding analysis, we reverse the process, computing
where is a ridge penalty and holds the Bayes filter beliefs of latent , for example , split into real and imaginary parts.
On the output side, the patterns are directly readable from the tokens. Each token represents a particular state of all latents, so we can directly align the Fourier mode patterns broadcast to the output singular vectors. That is, each output singular vector is in , and for each Fourier mode of each latent we construct a vector in by setting the entry of each token to (or ), where is the state of that latent in the token. Then, the encoding analysis simply comes down to projection of the J-lens singular vector onto the plane spanned by each pattern individually.
We compute alignment by measuring how much a unit vector of the J-lens lies in the span of a group of encoding or decoding directions, which in practice are taken to be the vectors corresponding to a single mode of a latent state (typically two vectors corresponding to the sine and cosine directions). We define the overlap of a unit lens vector v by projecting it onto the span of the reference vectors corresponding to the relevant feature:
where the columns of are an orthonormal basis for the reference vectors, constructed with a QR decomposition. Under this construction, a random unit direction in dimensions has an expected squared projection of onto a -dimensional subspace, making the chance level of overlap , with for Fourier modes and . We assign each J-lens direction to the latent with the largest overlap.
I VALIDATING SINGULAR VALUE SWITCHING THEORY
The switching analysis (Appendix E.1) makes two predictions. First, in the large-H limit the singular value of each latent's first Fourier mode is (Eq. (44)). Second, for a static latent 0 with swept persistence and a fixed latent 1, the two singular values cross, and the top J-lens direction switches from latent 1 to latent 0, at the persistence of Eq. (46). We test both predictions on the Bayes filter, and the second on transformers trained across the switch.
Task. We use the toy-model HMM with two unkeyed latents on rings of states, diffusion probability and reveal probability , which gives tokens. Latent 0 is static () and its persistence is swept. Latent 1 has fixed persistence and velocity , that is, angular velocity , which are all the nonzero turns a ring of 8 allows, up to direction.
Theory. The predicted singular values are Eq. (44), evaluated for each latent on mode . The predicted switch point is Eq. (46), which depends only on latent 1 and the shared parameters, not on . The series for (Eq. (43)), needed for the individual coherences but not for , is truncated at 200 terms.
Measuring the singular values. We compute the J-lens as in Appendix G, on 1000 sampled sequences of 192 tokens with a 32-token burn-in, using only the revealed source tokens, and sum over lags. The first Fourier mode of each latent is a plane (its real and imaginary parts), so each latent owns two singular directions. We assign the J-lens directions to latents by the overlap of their output side with each latent's mode-1 pattern (Appendix H), and take to be the mean of the two singular values assigned to latent . For the Bayes filter the two are degenerate (Appendix E.1).
I. 1 BAYES FILTER
Singular values. We sweep in steps of 0.025 at , and compare the measured and with Eq. (44). The same sampled sequences are reused at every , so that sampling noise does not vary along the sweep.
Switch point. For each we measure and at seven values of , spaced 0.02 apart and centered on Eq. (46). We locate the crossing by linear interpolation of , which increases monotonically with , and compare it with Eq. (46).
I. 2 TRANSFORMER
Training. For each we train transformers (Appendix F) on a grid of 11 persistences , with from -0.24 to 0.16 in steps of 0.04 and from Eq. (46). The grid is wide because the transformer's switch need not sit at the filter's. At every grid point we train 5 models from independent seeds, 220 models in total, and compute each model's J-lens at layers and on 1000 freshly sampled sequences. The transformer's lens is in token-score units, so its singular values are on a different scale from the filter's (Section 3.2). We therefore compare only the location of the crossing with the theory.
Estimating the crossing. For each model we take the difference and compute its mean and standard deviation over seeds at each grid point. We then smooth these with a Savitzky–Golay filter (a least-squares quadratic over a window of 5 grid points). The crossing is where the smoothed mean changes sign, found by linear interpolation on that grid step, and we propagate the spread across seeds into an uncertainty on the crossing as
We compare at each layer with Eq. (46).
J SUPPLEMENTARY RESULTS

Figure 11: Validation of the J-lens theory for the Bayes filter. X-axis denotes the value predicted by the theory (Eq. (19)), while the y-axis denotes the value measured from the lens, for magnitude , lag coherence and context coherence (columns) in each sweep (rows, colored by , or ). There is only one visible data point for the fixed parameters in each sweep because the HMM is designed to fix these metrics in the Bayes filter.
one seed O direction shared by two latents

Figure 12: Validation of the J-lens theory rank prediction for the Bayes filter and the transformer. X-axis denotes the predicted rank order of the singular vectors corresponding to each particular latent (colored by their task parameter , or ), while the y-axis denotes the measured rank in the J-lens.

Figure 13: Alignment of the J-lens directions with the encoding directions in the magnitude sweep. Alignment of the J-lens singular vectors (solid: input side , hatched: output side ), ranked by singular value, with the encoding directions of each latent (colored by persistence ) and with other patterns of the HMM (gray). Columns show the Bayes filter belief state (left), transformer layer 0 (middle) and layer 1 (right). Dashed line: alignment of a random direction.
a
b
c

Figure 14: Alignment of the J-lens vectors with the decoding vectors for each latent in the magnitude sweep. (a) Test decoding accuracy ( ) for the Bayes filter belief state on each layer of the transformer, for each latent in the sweep. (b, c) Alignment of the J-lens directions with each latent's own decoding directions (colored) and with the other latents' decoding directions (gray), for transformer layer 0 (b) and layer 1 (c).

Figure 15: Alignment of the J-lens directions with the encoding directions in the lag coherence sweep. Latents are colored by angular velocity . Panels as in Fig. 13.
a
b
c

Figure 16: Alignment of the J-lens vectors with the decoding vectors for each latent in the lag coherence sweep. (a) Test decoding accuracy ( ) for the Bayes filter belief state on each layer of the transformer, for each latent in the sweep. (b, c) Alignment of the J-lens directions with each latent's own decoding directions (colored) and with the other latents' decoding directions (gray), for transformer layer 0 (b) and layer 1 (c).
key frequency ( more contextually coherent)

Figure 17: Alignment of the J-lens directions with the encoding directions in the context coherence sweep. Latents are colored by key bias . Panels as in Fig. 13.
a
b
c

Figure 18: Alignment of the J-lens vectors with the decoding vectors for each latent in the context coherence sweep. (a) Test decoding accuracy ( ) for the Bayes filter belief state on each layer of the transformer, for each latent in the sweep. (b, c) Alignment of the J-lens directions with each latent's own decoding directions (colored) and with the other latents' decoding directions (gray), for transformer layer 0 (b) and layer 1 (c).

Figure 19: J-lens direction alignment with other features of the HMM that are not the latent states in the context sweep. Black denotes the reveal state : whether or not the latent state is revealed in the token, and the colors denote the key state (whether the latent state is flipped) for each key bias .