mlsanityData to 14 Oct 2026

How Do Transformers "Do" Physics? Investigating the Simple Harmonic Oscillator

arXiv 2405.17209 ↗First posted 23 May 2024cs.LG cond-mat.dis-nn cs.AIcited by 4

Not on the map. Why?

Abstract (arXiv)

How do transformers model physics? Do transformers model systems with interpretable analytical solutions, or do they create "alien physics" that are difficult for humans to decipher? We take a step in demystifying this larger puzzle by investigating the simple harmonic oscillator (SHO), ddotx+2γ dotx+ω02x=0, one of the most fundamental systems in physics. Our goal is to identify the methods transformers use to model the SHO, and to do so we hypothesize and evaluate possible methods by analyzing the encoding of these methods' intermediates. We develop four criteria for the use of a method within the simple testbed of linear regression, where our method is y = wx and our intermediate is w: (1) Can the intermediate be predicted from hidden states? (2) Is the intermediate's encoding quality correlated with model performance? (3) Can the majority of variance in hidden states be explained by the intermediate? (4) Can we intervene on hidden states to produce predictable outcomes? Armed with these two correlational (1,2), weak causal (3) and strong causal (4) criteria, we determine that transformers use known numerical methods to model trajectories of the simple harmonic oscillator, specifically the matrix exponential method. Our analysis framework can conveniently extend to high-dimensional linear systems and nonlinear systems, which we hope will help reveal the "world model" hidden in transformers.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 29 of its 36 references that are in the map. First posted on arXiv 23 May 2024.

Builds on

29 of 36 references.

References · 29

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  4. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  5. 2022Emergent Abilities of Large Language Modelscited by 2,512
  6. 2018The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networkscited by 2,262
  7. 2016Understanding intermediate layers using linear classifier probescited by 1,353
  8. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
  9. 2022Toy Models of Superpositioncited by 971
  10. 2022In-context Learning and Induction Headscited by 964
  11. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  12. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
17 more
  1. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
  2. 2019Hamiltonian Neural Networkscited by 712
  3. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  4. 2019AI Feynman: a Physics-Inspired Method for Symbolic Regressioncited by 548
  5. 2023Are Emergent Abilities of Large Language Models a Mirage?cited by 523
  6. 2020Lagrangian Neural Networkscited by 398
  7. 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 334
  8. 2023Language Models Represent Space and Timecited by 316
  9. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 230
  10. 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 156
  11. 2020Probing the Probing Paradigm: Does Probing Accuracy Entail Task Relevance?cited by 151
  12. 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 144
  13. 2018Interactive Supercomputing on 40,000 Cores for Machine Learning and Data Analysiscited by 110
  14. 2020AI Poincar'e: Machine Learning Conservation Laws from Trajectoriescited by 77
  15. 2024LLMs learn governing principles of dynamical systems, revealing an in-context neural scaling lawcited by 32
  16. 2023A Neural Scaling Law from Lottery Ticket Ensemblingcited by 5
  17. 2024OptPDE: Discovering Novel Integrable Systems via AI-Human Collaborationcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 2; 2025: 0; 2026: 2.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Decomposition of Small Transformer Models
  2. 2025Dynamical Properties of Tokens in Self-Attention and Effects of Positional Encoding
  3. 2026Markovian Circuit Tracing for Transformer State Dynamic
  4. 2026Transformer Field Theory: A Response-Theoretic Approach to Mechanistic Interpretability
  5. 2026Circuit Fingerprints: How Answer Tokens Encode Their Geometrical Path
  6. 2026Variance Is Not Importance: Structural Analysis of Transformer Compressibility Across Model Scales
  7. 2025Two-Scale Latent Dynamics for Recurrent-Depth Transformers
  8. 2026The Communication Map of a Transformer