Lines of Thought in Large Language Models

Raphaël Sarfati, Toni J. B. Liu, Nicolas Boullé, Christopher J. Earls · DOI

Introduction

Large Language Models (LLMs) are frequently characterized as inscrutable "black boxes." While the mathematical operations of transformers—self-attention and feed-forward layers—are well-defined, the macroscopic logic governing how information is transformed across dozens of layers remains elusive. This paper proposes a shift from "microscopic" interpretability (individual neuron activations) to a dynamical systems perspective, treating the movement of tokens through latent space as a physical process.

By analyzing token trajectories, the researchers demonstrate that LLMs follow surprisingly simple, low-dimensional paths, which they term "Lines of Thought" (LoT). These paths can be accurately modeled using a physics-inspired stochastic differential equation, suggesting that emergent statistical laws govern the computation of even the most complex neural networks.

The Geometry of Latent Trajectories

The core of this analysis involves tracking the "pilot" token—the specific representation used for next-token prediction—as it passes through successive transformer layers. In high-dimensional embedding space, one might expect these trajectories to disperse chaotically. Instead, the researchers found that they cluster into a tight, non-Euclidean "ribbon" manifold.

Token trajectories in the latent space of an LLM, showing the emergence of a low-dimensional "ribbon" manifold.

This geometric structure is an emergent property of training. In randomly initialized "null" models, tokens move in straight, quasi-parallel lines. The curved, clustered "Lines of Thought" only appear after the model has been trained on language, indicating that the manifold represents the model's learned internal representation of linguistic structure.

Modeling LLM Dynamics

To describe this movement mathematically, the authors propose a model where a token's position at a future layer is a linear transformation of its current position (involving rotation and stretching) plus a stochastic "noise" term. This approach allows the LLM's computation to be treated as a diffusive process with linear drift, akin to Langevin dynamics in statistical physics.

The accuracy of this simple model is striking. A linear classifier trained to distinguish between "real" trajectories and those simulated by the authors' equation performed only slightly better than a coin flip (50-60% accuracy). This suggests that the "average" path represents the collective processing applied to all tokens, while the specific contextual meaning resides in the variability (the "noise") around that path.

Dimensionality Collapse and Statistical Laws

A significant finding of this research is the phenomenon of dimensionality collapse. Despite the high-dimensional nature of the latent space (e.g., 1024 dimensions in GPT-2), the actual "thinking" process is effectively lower-dimensional.

Statistical analysis of latent space dimensionality, showing power-law decay of singular values and KL divergence reduction.

Singular Value Decomposition (SVD) reveals that the intrinsic basis of the embedding space is dominated by a subset of dimensions. In GPT-2, approximately 75% of the latent space dimensions can be discarded with minimal impact on the final output distribution. As shown in the analysis of KL divergence, the model's predictive performance stabilizes quickly as the number of included dimensions ($K$) increases, confirming that the core information transport happens within a reduced-rank subspace.

Conclusion

The discovery that complex neural networks behave like large-scale physical systems—where simple macroscopic properties emerge from complex microscopic interactions—has profound implications for model interpretability and design. The researchers observed that while middle layers follow these statistical norms, the first and last layers often deviate, likely performing specialized re-alignment tasks.

Future work may explore hybrid architectures where the deterministic "average" path is hard-coded, allowing neural networks to focus exclusively on meaningful variability. Such an approach could lead to significantly more efficient and transparent language models.

Summary updated

BibTeX
@inproceedings{sarfati2025lines,
  author = {Raphaël Sarfati and Toni J. B. Liu and Nicolas Boullé and Christopher J. Earls},
  title = {{Lines of Thought in Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=zjAEa4s3sH},
}
Figure