acceptodds
Under review as a conference paper at ICLR 2027

Spectral Signatures And Emergent Equivariance In Looped Transformers For In-Context Dynamical-System Prediction

Abstract

We investigate the internal representations and computations learned by looped Transformers for in-context prediction of stochastic linear dynamical systems. Pretrained on diverse next-state prediction tasks, the models develop approximate spectral degeneracies and shared operator structure without explicit equivariance constraints. We explain these observations through a shared hidden representation of orthogonal coordinate transformations, in which compact core matrices organize the model's operators. Projecting onto this structure yields a computational skeleton that largely preserves the original model's outputs and predictive performance. With a specified first-loop routing rule, the fixed cores support prediction at new input dimensions and longer contexts without retraining. This compact representation makes the learned computation easier to interpret and analyze, connecting its hidden organization to its predictive function and reuse.

Primary area:
interpretability and explainable AI
Keywords:
In-context learning, Dynamical systems, Mechanistic interpretability, Emergent equivariance, Looped Transformers

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_5ggWOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
1
Soundness
1
Read review
Paper summary

This paper argues that the weights of looped Transformer models are "approximately equivariant" when trained for the next-state prediction of linear stochastic systems. By fitting trained models to a (relatively complicated) equivariant ansatz, it is claimed that the resulting "core matrices" form a small and interpretable set of parameters that are useful for transfer across tasks.

Critical strengths

The idea of looking for exploitable structure in the weights of trained Transformers is interesting. It is shown that training induces a shared low-rank bias in the weights, supporting certain "folklore" statements in the field.

Critical weaknesses

The paper is very hard to understand and the results are largely unconvincing. It is entirely empirical, which is okay and could still be valuable, but right now the work presents as a collection of poorly explained experiments that do little to support the authors' conclusions. It is not even clear that the baseline task is meaningful: next-state prediction of stochastic dynamical systems (measured by MSE) is dubious since random noise is deliberately injected at each step. The performance of the baseline models is also not discussed at all, making it impossible to interpret the authors' results. How can I understand that the equivariant projection is meaningful here when the only metric is "Final MSE / Projected MSE"? MSE is also unnormalized, so raw MSE values do not communicate anything about how the model is actually performing.

I should also mention that it is very difficult to separate the work of the authors from the work of generative AI in this paper. The scope of work here is something that could be potentially "one-shot" by current frontier AI, as it relies on experimental analysis performed with a very simple architecture, and the figures and prose are heavily AI-assisted. While I trust that the authors have exercised appropriate scientific judgement, I do not believe that this work is sufficiently novel or interesting to warrant publication.

Questions for authors

Can you provide convincing evidence that the training task is meaningful, or that the equivariant approximation is satisfied? Can you present simple experiments that illustrate the baseline model's performance alongside that of the equivariant approximation?

2 comments

Thank you for your feedbacks and for pointing out where our explanation of the prediction task and the role of the equivariant projection was unclear. In our general response, we explain the scope of the task family and how we revised the manuscript to make the model design and analysis easier to follow. We chose stochastic linear systems because they provide a commonly used setting for prediction and filtering. Recent work has also studied how Transformers learn these tasks in context (Du et al., 2023; Cole et al., 2025; Vlădărean et al., 2026). Building on this work, we ask how a looped Transformer with softmax attention uses past transitions to predict the next state of an unknown system and whether the learned computation can be reused across input dimensions.

  1. Prediction with process noise. The transition matrix BτB_\tau is unknown to the model but fixed within each trajectory, so past transitions xt→xt+1x_t \to x_{t+1} provide information about the systematic part of the next step, BτxtB_\tau x_t. We train on noisy next states. Since the next noise increment is independent and has zero mean, it adds only a constant to the expected squared error (Appendix A.7). Because we generate the trajectories, we can evaluate each prediction against the expected next state under the true dynamics, BτxtB_\tau x_t. In the revised Section 2.1, we distinguish this conditional-mean MSE from the noisy-target MSE used in training.

  2. Baseline performance. Following your suggestion, we revise Appendix B.1 to report training loss and predictive performance across model configurations, including NMSE to account for differences in state scale. We normalize the total squared prediction error by the total squared norm of the conditional-mean targets. In Table 1, the reference model achieves all-position NMSE of 0.050 on ID tasks and 0.084 on OOD tasks, well below persistence (0.637 and 0.932, respectively). Causal ridge is more accurate on both sets (0.042 and 0.031).

  3. Original and projected models. We agree that the original label “Final MSE / Projected MSE” in Fig. 5(a) was ambiguous. Fig. 5 is actually intended to test circuit interventions after projection, but not to measure the predictive performance of the projected model. In the revised manuscript, we updated the y-axis label in Fig. 5(a), giving the MSE with the intervention divided by the MSE without it, both for the same projected model. Fig. 3(c) evaluates the effect of equivariant projection itself by comparing prediction errors before and after projection on the same trajectories. Across 25 models, projection changes outputs by 3.3% on ID and 4.2% on OOD, while reducing conditional-mean MSE by 1.79% and 1.73% on average (Appendix C.4)(These relative changes are identical for MSE and NMSE because the NMSE denominator depends only on the evaluation data, not on the model). Fig. 3(b) also shows how closely the weights match the predicted structure: on average, it captures over 99% of the squared Frobenius norm for the embedding, readout, and OV operators, and about 90–93% for the routing forms.

  4. Theory was essential to identifying the learned structure. Our study began with an empirical puzzle, and numerical experiments played a substantial role throughout. Even in this simple architecture, the trained OV operators developed striking spectral degeneracies. Those patterns hinted to a hidden symmetry, but by themselves did not tell how the hidden states were organized. It took several rounds of theoretical reasoning and numerical investigation to turn that initial clue into a hypothesis with a testable consequence.

    Specifically, if hidden states transform as vector channels in a shared basis and the modules respect that transformation, Theorem 1 determines the form their weights must take. For the OV operators, this form also explains the repeated eigenvalues that first drew our attention. In this process, the theory told us what to look for. For each of 25 trained models, we fitted a basis using hidden activations alone, then examined whether the predicted structure appeared in the weights. Figure 3(d) illustrates the weight structure revealed by this change of basis, and Figure 3(b) quantifies how much of each operator’s squared norm the projection preserves. We have revised Sections 3–4 to make this reasoning explicit.

    As our AI Use Statement acknowledges, AI tools provided substantial assistance. In our experience, however, describing the work as “one-shot” overlooks its central scientific challenge: deciding what the spectral evidence could mean, developing a theory precise enough to guide the next experiment, and revising that theory in light of the results.

References

Reviewer_9MDcOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
1
Soundness
2
Read review
Paper summary

The paper studies the in-context learning of a family of stochastic linear dynamical systems using a looped transformer architecture, focusing on internal representations encoded by the learned transformer. They identify spectral clustering of the learned model's weights, and that weight matrices across heads commute with a common subspace. To explain this behavior, they posit the existence of a shared hidden representation of orthogonal transformations. Disentangling the core coefficients of the model enables out-of-domain generalization and generalization to larger input dimensions and context lengths.

Critical strengths

Identifying the core structures and coefficients of transformer weights that enable them to generalize out of distribution is an important direction. The ideas of the paper seem to have the potential to guide towards a more efficient design of transformer models.

Critical weaknesses

I found it very difficult to read the paper and extract the main ideas, even despite being familiar with the research area. The paper would benefit from a significant revision where more intuition is provided to explain the model design, theoretical results, and the experimental setup.

Additionally, the data distribution seems to follow a very specific structure (Equations (1) and (2)), and it is not clear whether the conclusions of the paper hold for more general time series models. In particular, the equivariance with respect to rotations (Equation (5)) seems to motivate many of the results.

Questions for authors

Could the authors provide more intuition for Theorem 1? How should its conclusion be interpreted?

Figure 4 demonstrates that the trained model is able to successfully generalize to longer contexts than it was trained on. Is it possible that the later trajectory becomes easier to predict at later times due because the system has already fully mixed?

The OOD results seem to focus on shifts to the ranges of parameters defining the task distribution. How do you expect the model to perform under more substantial distribution shifts, such as to trajectories with qualitatively different spatiotemporal behavior?

1 comment

Thank you for your valuable suggestions. We have added intuitive explanations for the task, model, and theory. For example, Section 4 now includes explicit block-matrix illustrations showing how the predicted parameter structure preserves equivariance: rotating each vector channel and then mixing the channels gives the same result as performing these operations in the reverse order.

  1. Specificity of the task distribution. In Appendix A.1, we show that every real drift matrix Γ\Gamma for which −Γ-\Gamma is asymptotically stable admits our potential-circulation decomposition. Our sampler selects a family within that class, with control over length scales, anisotropy, and circulation strength. Individual systems can therefore have very different trajectories under the same coordinate-symmetric prior.
  2. What follows from Equation (5) (now Equation (6))? We agree that Bayes-optimal output equivariance makes approximate output equivariance a natural expectation for a good predictor. Whether a trained Transformer exhibits this symmetry, and how it realizes it internally, remain empirical questions. The observed OV spectra led us to ask whether one basis could explain both how hidden states transform and how the weights are organized. We fit the basis by aligning hidden states, then test the structure in the learned weights predicted by Theorem 1 (Fig. 3). These developments go beyond Equation (5) (now it is Equation (6) in the revised manuscript).
  3. Intuition for Theorem 1. In the proposed basis, the hidden state consists of vectors that rotate together with the input. A compatible OV operator can mix these vectors, but must use the same mixing coefficients at every physical coordinate. This gives the C⊗IdC\otimes I_d form. Each eigenvalue of CC then appears dd times in the full OV operator, which helps explain the eigenvalue clusters observed after training. Under the compatibility conditions in Section 4.1, rotating the input by RR rotates each embedded vector channel by RR and leaves the attention weights unchanged. Each head therefore combines its value vectors (the VV in query–key–value attention) with the same attention weights as before. The OV structure ensures that the resulting update rotates by RR in each channel. This equivariance carries through every loop and the readout, giving fθ(RX)=Rfθ(X)f_\theta(RX)=Rf_\theta(X).
  4. Could mixing explain the improvement with longer contexts? To separate the effect of elapsed time from that of additional history, we compared windows from the same trajectories at d=16d=16 (Appendix E.3, Table 4). With context length fixed at 127 states, all 25 core predictors had slightly higher final-position MSE on the late window than on the early one. With the late prediction target held fixed, extending the history from 127 to 511 states reduced mean MSE by 45%. In a separate architecture comparison, the single-head model's OOD MSE rose at later positions even within the training length (Appendix B.1, Fig. 8). Together, these results suggest that consistently improving predictions by exploiting available history, including contexts longer than those seen during training, is a learned capability.
  5. Different spatiotemporal behavior and distribution shifts. As explained in our general response, the construction in Section 2.1 and Appendix A generates a broad family of stable linear systems with diverse dynamical modes. Our OOD test samples the principal directions as in training but shifts the ranges of length scale, anisotropy, and circulation strength (Appendix C.1). The resulting systems typically have larger stationary length scales, greater anisotropy, slower decay, and shorter oscillation periods. In our opinion, this has already generated qualitatively different spatiotemporal dynamical trajectories, and this distribution shift provides a stress test to the trained model within the linear family. The revised Fig. 3(c) shows substantially higher conditional-mean MSE on OOD than on ID trajectories, both before and after structural projection. One possible test of a larger distribution shift is to evaluate one-step prediction on nonlinear dynamical systems. We have explored this in a small number of preliminary tests using a frozen core from a model trained on linear systems. The results were mixed and do not yet support a general conclusion about transfer to nonlinear dynamics. We have therefore not including them in the revised manuscript.
Reviewer_jd7cOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

This paper examines the internal mechanism of a looped Transformer trained to do next state prediction for unknown dynamical systems. It is found that when the input coordinates are rotated, the model’s internal states behave approximately like several copies of the original state vector. Using a basis fitted from internal activations gives a common pattern across model's weights. They authors use this discovery to simplify the model and show that the simplified model keep the prediction capabilities. The extracted coefficients are then used at other input dimensions.

Critical strengths

Novelty: I find that the discovery of the internal mechanism is very interesting. The analysis on hidden states is convincing. Repeating the analysis across 25 trained models is also convincing.

Critical weaknesses

Generalizability: here the dynamical systems are linear and quite simple. Moreover, their distribution already has rotation symmetries and the test sets keep these symmetries. The findings, albeit interesting, may be invalid for less carefully designed tasks.

Questions for authors

Could you please proceed the analysis on tasks with little rotation symmetry ?

3 comments

We very much appreciate your positive assessment of our analysis of the model’s internal mechanism. As discussed in the General Rebuttal, the OU drift parameterization covers all asymptotically stable continuous-time linear systems. Coordinate symmetry is also natural in many systems: describing the same dynamics in a different coordinate system should transform the prediction accordingly. Our task prior does not favor any particular direction, while allowing individual systems and trajectories to be strongly anisotropic.

Training with weaker rotational symmetry. Although the population task prior has no directional preference, a finite training set need not retain this symmetry. With only four base tasks in their original orientations, rotated versions of the sampled systems will generally be absent from training. In this setting, the predicted equivariant block structure captures only 16.3% of the squared OV norm on average (this fraction of OV norm kept is a proxy measure of equivariance; the higher the more equivariant), compared with 99.6% for 2,000 base tasks without augmentation (Table 5). This supports our interpretation that learning the equivariant structure depends on the training distribution and task diversity.

Rotational augmentation. In Appendix F, we examine whether presenting the same four base systems in more orientations helps recover the predicted structure. Applying an independent random orthogonal transformation to each training trajectory changes its orientation while preserving the system’s decay rates and oscillation periods. With the same four base tasks and the same number of training trajectories, augmentation raises the captured OV fraction to 96.8% (Table 5) and reduces mean OOD MSE from 4.56 to 0.61 (Fig. 14(b)). Training on 2,000 base tasks without augmentation further lowers OOD MSE to 0.36. These results distinguish the benefits of directional coverage from those of broader dynamical diversity, as clarified in Appendix F.3.

We hope that these experiments address the scenarios with little rotation symmetry in a finite training set.

Thank you to the authors for the analysis, which address the little rotation symmetry scenarios. I will keep my current positive score.

We are glad this addressed your question. Thank you for your positive assessment!

Comments on the paper

1 comment
AuthorsOpenReview ↗

General Rebuttal

We thank the reviewers for their thoughtful comments and valuable suggestions. Several reviewers found the reasoning behind our design choices and experiments difficult to follow. We have substantially revised the manuscript to make the reasoning more intuitive and the paper easier to read. We now explain why we chose the task and model, how the observed spectral patterns motivate our hypothesis about hidden symmetry, and how the experiments test its predictions. Below, we first address the scope and coordinate symmetry of the task distribution, then summarize the main revisions.

  1. Data and task setting. The Ornstein–Uhlenbeck (OU)-motivated construction in fact gives a broad family of stable linear prediction tasks. The potential–circulation decomposition covers every real drift matrix Γτ\Gamma_\tau for which −Γτ-\Gamma_\tau is asymptotically stable (Appendix A.1). With the additive Gaussian noise used here, each task admits a unique stationary distribution and has bounded variance. We have exploited this property mainly in order to construct tasks with stationary distributions and avoids the unbounded growth in variance (this can occur with unconstrained transition matrices). Other than this, our framework is very flexible and is able to generate very diverse dynamical behaviors (we have varied the parameters to obtain systems with different principal directions, decay rates, and oscillation periods). In short, our data and task setting is very generic in linear dynamical systems construction, rather than being restricted.
  2. Symmetry. In image classification, rotating an image can leave the object’s label unchanged. In motion prediction, the predicted position should rotate with the coordinate frame. Our task prior has no preferred direction, and the initial states and noise are isotropic. Consequently, rotating the observed trajectory rotates the conditional distribution of the next state and hence its mean. This makes the Bayes-optimal predictor under squared error equivariant (Section 2.2). The same reasoning extends beyond our task to many continuous dynamical systems, including nonlinear ones, whenever the task distribution has no preferred direction.
  3. Individual anisotropy. The rotation symmetry belongs to the task prior distribution, not to individual trajectories. Individual trajectories can be highly anisotropic, and rotation rates vary across tasks and modes (governed by HτH_\tau and JτJ_\tau).

Readability. We have revised the presentation throughout to improve readability, making the motivation for the model design, the reasoning connecting empirical observations to our theoretical analysis, and the interpretation of the experiments more explicit. The main revisions are listed below.

  1. Section 2.1 and Appendix A. Task construction and diversity. We explain how the drift decomposition ensures stability while allowing different decay rates and oscillation periods. Appendix A.1 gives the precise scope of the drift parameterization, and the new Figure 6 illustrates the diverse trajectories it can generate even in two dimensions.

  2. Sections 2.2–2.3. Task symmetry and model design. We explain why the Bayes-optimal prediction transforms with the observed trajectory and how normalizing queries and keys while leaving values unnormalized affects the model’s response to input rescaling.

  3. Sections 3–4. From spectral observations to a testable hypothesis. We explain why repeated eigenvalues within heads and shared commuting directions across heads motivate the hypothesis of a shared hidden representation. New block-matrix examples illustrate the parameter structure predicted by Theorem 1. We clarify how the projection and transfer experiments test the predictive role and reuse of this structure.

  4. Revised figures and captions. Figure 2 has a new panel (new Figure 2(b)) showing pretraining MSE alongside the spectral diagnostics. Figure 3(b) uses bar plot to show how much of each operator’s squared norm the projection preserves, and Figure 3(c) directly compares prediction error before and after projection across input positions. The revised axis label and caption for Figure 5(a,b) clarify that each ratio is the MSE with intervention divided by the MSE without intervention for the same projected model.

  5. Appendix B.1. Predictive performance across architectures. In Table 1 and Figures 7–9, we report training and validation loss, position-wise MSE and NMSE, and comparisons with persistence and causal ridge regression.

  6. Appendix E.3. Benefit of longer contexts. In Table 4, we add a comparison of equal-length windows early and late in the same trajectories, complementing the fixed-target test of how much additional history improves prediction.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.