Large Language Models as Nonlinear Dynamical Systems: The Three Clocks of Depth, Training, and Generation

Maor FaridarXiv 2026 · arXiv

This paper, "Large Language Models as Nonlinear Dynamical Systems," proposes a fascinating bridge between the cutting-edge world of Transformers and the century-old field of nonlinear dynamics. By treating Large Language Models (LLMs) as iterated maps, the author provides a unified vocabulary to describe why models loop, why training spikes, and why "temperature" is more than just a heuristic.

TL;DR

LLMs operate on three distinct "clocks"—depth, training, and generation—each exhibiting classical nonlinear behaviors like fixed points, chaos, and synchronization. By mapping these to physical systems (like pendulums and springs), the paper derives a "Three-Clock Dictionary" that explains phenomena like repetition loops as particles escaping potential wells via the Arrhenius law.

What Problem Does This Paper Address?

The machine learning community frequently rediscovers well-understood dynamical phenomena under new names. For instance, a "repetition loop" in generation is essentially a "periodic orbit" or an "attractor."

The author argues that because these two communities rarely meet, we lack a formal, predictive theory for model behavior. The paper seeks to solve this by providing a unified framework that treats the forward pass, the optimizer, and the sampling process as three coupled dynamical systems, allowing researchers to use the mature tools of physics to predict and control LLM behavior.

Figure 1: The three clocks of a transformer language model. Clock 1 (blue) iterates the residual update over layers for a fixed input and fixed weights. Clock 2 (green) iterates the optimizer over the weights; it hands its current weights to the model. Clock 3 (orange) iterates sampling: each new token is appended to the context and the whole stack runs again. One tick of clock 3 contains a full run of clock 1, and clock 2 changes the map that both of them iterate. Typical behavior studied on each clock is listed next to it; Table 1 maps it onto dynamical-systems concepts.

Methods

The author builds a Three-Clock Dictionary (Table 1 in the paper), mapping 15 concepts from nonlinear dynamics onto the three timescales of an LLM. To validate these mappings, the paper uses:

  1. Reduced-Order Models: Simplifying complex Transformer math into equivalent physical systems. For example, the Softmax function is shown to be mathematically identical to a Boltzmann distribution, where logits act as energy levels.
  2. Lyapunov Exponents: Measuring how fast nearby trajectories in the model's hidden states separate, a classic test for chaos and stability.
  3. Arrhenius Law Analysis: Applying the physics of chemical reaction rates to predict how likely a model is to "escape" a repetition loop based on its sampling temperature.
  4. Empirical Testing: All experiments were performed on open-source models (GPT-2 and Pythia) using nothing more than a standard laptop CPU, proving that deep theoretical insights don't always require massive compute.

Datasets

The study utilizes several open-source model families and benchmarks:

  • Models: GPT-2 (small) and the Pythia suite (70M to 1B parameters).
  • Benchmarks: GSM8K (for testing reasoning models like Qwen3-0.6B) and OpenWebText (to establish a human baseline for text coherence).
  • Checkpoints: The authors used public training checkpoints of Pythia to observe how dynamical properties evolve during the training process.

Key Insights and Ideas

  • Softmax is Physics: The sampling temperature $T$ isn't just a scaling factor; it is the "noise intensity" that allows a particle (the model's state) to hop out of a potential well (a repetition loop).
  • Repetition is a Deepening Well: The paper shows that repetition loops are self-reinforcing. The more a model repeats a phrase, the "deeper" the logit gap becomes, making it exponentially harder to escape.
  • The Goldilocks Window: Coherent text exists in a very narrow temperature band. Too low, and the model falls into a "fixed point" (repetition); too high, and the system becomes "chaotic" (incoherent gibberish).
  • Training as Expansion: As models train, their layers become more "expansive" (higher Lyapunov exponents), meaning they become more sensitive to small changes in input, yet the alignment between consecutive layers actually decreases.
Physical systems and their language-model twins, showing shared governing equations.

Key Results

  • Arrhenius Law Confirmation: The probability of escaping a repetition loop follows the Arrhenius law: $r(T) \approx m e^{-\Delta/T}$, where $\Delta$ is the logit gap.
  • Locking Temperature: In saturating loops, the temperature needed to leave a loop falls like $1/\ln N$ (where $N$ is generation length). Larger models "dig deeper wells," requiring higher temperatures to avoid looping.
  • Edge of Stability: The paper confirms that Transformers train at a "multi-mode edge of stability," where the Hessian eigenvalues sit just above the theoretical divergence threshold ($2/\eta$), but the system self-stabilizes through oscillations.
  • Reasoning Models: In models like Qwen3, accuracy on math problems (GSM8K) peaks exactly at the vendor-recommended temperature ($T=0.6$). Below this, the model gets stuck "rethinking" the same step until it runs out of tokens.

Limitations and Future Work

  • Control is Hard: While the authors developed controllers to "kick" models out of loops based on their escape analysis, these controllers did not yet outperform simple fixed-temperature sampling in terms of overall text coherence.
  • Contextual Traps: The paper notes that the "trap" of repetition is stored in the context (the KV cache), not just the sampler. Future work needs to address how to manipulate the context dynamically.
  • Clock 1 Asymptotics: Because Transformers have a fixed, small number of layers (depth), classical asymptotic notions like "attractors" are only approximations.
  • Open Problems: The paper concludes with 12 open problems, including whether the "fractal boundary" of trainability persists in models trained with Adam and how to measure the "attractor dimension" of a full language model.
A reduced model of a repetition loop as a well that deepens over time.

Summary updated

Abstract

Language models are dynamical systems. A transformer is iterated over its layers, over the steps of its training and over the tokens it generates, and on each of these three clocks it shows behavior that nonlinear dynamics has studied for a century: fixed points, bifurcations, synchronization, chaos and noise-driven escape from potential wells. The two communities rarely meet, so this behavior is often rediscovered under new names. We build a bridge between them. To describe, we condense about 200 papers into the Three-Clock Dictionary, which maps fifteen concepts of nonlinear dynamics onto each clock and marks every correspondence as proved, measured or conjectured, and we show each concept in a mechanical system and in a language model side by side. To explain, we derive reduced-order models: the softmax is a Boltzmann distribution, gradient descent an Euler step on a nonlinear spring, a loss spike a ball thrown out of a stiff valley, attention on the circle a Kuramoto model, and a repetition loop a well that deepens while it is occupied. We then test these explanations on open language models, on a laptop CPU. Escape from repetition loops in GPT-2 and Pythia follows the Arrhenius law with the logit gap as the barrier, and the barrier deepens and then saturates, so the temperature needed to leave a loop falls like $1/\ln N$ with the generation length $N$ and rises with model size. Coherent text lives in a narrow window of temperatures, which a small reasoning model shares at its recommended temperature. Training makes each Pythia layer more expansive, and a small transformer trains at a multi-mode edge of stability. The third step, solving problems of language models, is still ahead: controllers derived from the escape analysis remove loops but do not yet beat the best fixed temperature. We state twelve open problems where nonlinear dynamics could get there.
BibTeX
@misc{farid2026large,
  author = {Maor Farid},
  title = {{Large Language Models as Nonlinear Dynamical Systems: The Three Clocks of Depth, Training, and Generation}},
  year = {2026},
  eprint = {2611.21983},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.21983},
}
Figure