Table of Contents
Fetching ...

As Language Models Scale, Low-order Linear Depth Dynamics Emerge

Buddhika Nettasinghe, Geethu Joseph

Abstract

Large language models are often viewed as high-dimensional nonlinear systems and treated as black boxes. Here, we show that transformer depth dynamics admit accurate low-order linear surrogates within context. Across tasks including toxicity, irony, hate speech and sentiment, a 32-dimensional linear surrogate reproduces the layerwise sensitivity profile of GPT-2-large with near-perfect agreement, capturing how the final output shifts under additive injections at each layer. We then uncover a surprising scaling principle: for a fixed-order linear surrogate, agreement with the full model improves monotonically with model size across the GPT-2 family. This linear surrogate also enables principled multi-layer interventions that require less energy than standard heuristic schedules when applied to the full model. Together, our results reveal that as language models scale, low-order linear depth dynamics emerge within contexts, offering a systems-theoretic foundation for analyzing and controlling them.

As Language Models Scale, Low-order Linear Depth Dynamics Emerge

Abstract

Large language models are often viewed as high-dimensional nonlinear systems and treated as black boxes. Here, we show that transformer depth dynamics admit accurate low-order linear surrogates within context. Across tasks including toxicity, irony, hate speech and sentiment, a 32-dimensional linear surrogate reproduces the layerwise sensitivity profile of GPT-2-large with near-perfect agreement, capturing how the final output shifts under additive injections at each layer. We then uncover a surprising scaling principle: for a fixed-order linear surrogate, agreement with the full model improves monotonically with model size across the GPT-2 family. This linear surrogate also enables principled multi-layer interventions that require less energy than standard heuristic schedules when applied to the full model. Together, our results reveal that as language models scale, low-order linear depth dynamics emerge within contexts, offering a systems-theoretic foundation for analyzing and controlling them.
Paper Structure (7 sections, 17 equations, 4 figures)

This paper contains 7 sections, 17 equations, 4 figures.

Figures (4)

  • Figure 1: Overview of the framework. For a prompt $p$, transformer depth is treated as discrete time and the state is the last non-padding token representation $x_\ell(p)$. Around a prompt-conditioned operating trajectory, the frozen-context last-token map is locally linearized and projected onto a concept-anchored reduced basis to obtain a low-dimensional LLV surrogate. The surrogate predicts layerwise steering gains and yields low-energy multi-layer intervention schedules that are validated in the full transformer.
  • Figure 2: Predicted and empirical layerwise steering gains on GPT-2-large at reduced order $d=32$ and evaluation magnitude $\epsilon=0.1$. Each panel shows the gain profile over depth for one dataset. The LLV surrogate predicts the full gain curve rather than only the identity of a best layer.
  • Figure 3: Scaling of LLV identifiability at fixed reduced order $d=32$ and evaluation magnitude $\epsilon=0.1$. Aggregate Spearman and Pearson agreement increase monotonically from GPT-2 to GPT-2-medium to GPT-2-large. By GPT-2-large, the identified low-order surrogate nearly saturates the gain-prediction task.
  • Figure 4: Minimal-energy steering on GPT-2-large. Left, energy required to reach target concept shifts $\Delta y$ for the LLV-optimal schedule and heuristic baselines. Right, the same quantities normalised by the LLV-optimal energy. The LLV-derived policy is consistently lowest-energy or tied-lowest-energy across datasets and target shifts, while uniform injection is the strongest non-model baseline and single-layer or random schedules are often much worse.