Decoding Transformer Dynamics via Koopman Subspaces
Subhradeep Kayal, Ali Dashti
Key points
From the paper's conclusion- We apply Koopman operator theory and Dynamic Mode Decomposition (DMD) to characterise how large language models (LLMs) process different input topics.
Abstract
We apply Koopman operator theory and Dynamic Mode Decomposition (DMD) to characterise how large language models (LLMs) process different input topics. Treating the layer-to-layer evolution of hidden states as a dynamical system, we fit a linear Koopman operator and take the subspace spanned by its dominant modes as a per-topic spectral fingerprint. Four findings emerge. First, the depth map is near-linear: a single linear operator predicts each next-layer state to within approx. 18% relative error (interior variance explained approx. 0.99). Second, over the 57 MMLU subjects the fingerprint is topic-discriminative, matching the MMLU taxonomy at 0.72 nearest-neighbour purity and each subject's semantic neighbourhood at 0.75 any-hit@3. Third, it is a reproducible signature (split-half self-retrieval approx. 0.97$). Finally, these findings are consistent across seven base models (Qwen2.5 0.5-7B, Llama-3 1-8B), with a suggestive trend of alignment rising with MMLU accuracy. The spectral fingerprint thus provides a probe of how transformers process different topics across depth. Code is available at https://github.com/DeepK/koopman-llm-eacl27.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Dynamic System Inspired Continuous Large Language Model for AI4Science TasksarXiv · 2026
- How Language Models Compress and Compare: Understanding Selection with Token Covariance MapsarXiv · 2026
- Large Language Models as Nonlinear Dynamical Systems: The Three Clocks of Depth, Training, and GenerationarXiv · 2026
- Toward purpose-oriented topic model evaluation enabled by large language modelsInternational Journal on Digital Libraries · 2025
- MAPLE: A Multi-Axis Parametric Knowledge Extraction Lens for LLM EvaluationarXiv · 2026
- Surfing the Activation Wave: Analyzing the Information and Geometry of LLM Hidden States for Speculative DecodingarXiv · 2026