Skip to main content
QUICK REVIEW

[Paper Review] Transformers converge to invariant algorithmic cores

Joshua S. Schiffman|arXiv (Cornell University)|Feb 26, 2026
Natural Language Processing TechniquesComputer Science0 citations
TL;DR

The paper extracts low-dimensional algorithmic cores that are necessary and sufficient for transformer task performance, shows cores converge across independent runs, and demonstrates a one-dimensional subject–verb agreement core across GPT-2 scales, revealing invariant computational structures.

ABSTRACT

Large language models exhibit sophisticated capabilities, yet understanding how they work internally remains a central challenge. A fundamental obstacle is that training selects for behavior, not circuitry, so many weight configurations can implement the same function. Which internal structures reflect the computation, and which are accidents of a particular training run? This work extracts algorithmic cores: compact subspaces necessary and sufficient for task performance. Independently trained transformers learn different weights but converge to the same cores. Markov-chain transformers embed 3D cores in nearly orthogonal subspaces yet recover identical transition spectra. Modular-addition transformers discover compact cyclic operators at grokking that later inflate, yielding a predictive model of the memorization-to-generalization transition. GPT-2 language models govern subject-verb agreement through a single axis that, when flipped, inverts grammatical number throughout generation across scales. These results reveal low-dimensional invariants that persist across training runs and scales, suggesting that transformer computations are organized around compact, shared algorithmic structures. Mechanistic interpretability could benefit from targeting such invariants -- the computational essence -- rather than implementation-specific details.

Motivation & Objective

  • Motivate the problem of nonidentifiability where training targets behavior rather than internal circuitry.
  • Develop a method to extract low-dimensional algorithmic core subspaces that are necessary and sufficient for task performance.
  • Demonstrate that independently trained transformers converge to similar cores despite different internal weights.
  • Apply the core extraction to progressively complex settings including Markov chains, modular addition, and GPT-2 language models.
  • Show that a universal, one-dimensional agreement core governs subject–verb number across GPT-2 scales.

Proposed method

  • Define algorithmic cores as low-dimensional subspaces that are necessary and sufficient for task performance via ablations.
  • Extract cores from model hidden states using ACE (Algorithmic Core Extraction) and test sufficiency/necessity.
  • Fit linear operators within core coordinates to recover the task dynamics and compare spectra with ground-truth dynamics.
  • Compare cores across independently trained models with geometric and statistical alignment (projector overlap, principal angles, CCA).
  • For modular addition, analyze core formation during grokking and track core inflation under weight decay.
  • Apply the core extraction to GPT-2 Small/Medium/Large to identify a one-dimensional agreement core and test causal interventions (necessity, sufficiency, flipping).
Figure 1 : Transformers trained on the same Markov task converge to a low-dimensional, causal algorithmic core. Three one-layer transformer language models with identical architectures ( $d_{\rm model}=64$ , $d_{\rm ff}=256$ , $|V|=4$ ) were initialized with independent random seeds and trained on t
Figure 1 : Transformers trained on the same Markov task converge to a low-dimensional, causal algorithmic core. Three one-layer transformer language models with identical architectures ( $d_{\rm model}=64$ , $d_{\rm ff}=256$ , $|V|=4$ ) were initialized with independent random seeds and trained on t

Experimental results

Research questions

  • RQ1Do low-dimensional algorithmic cores exist in transformers that are necessary and sufficient for task performance?
  • RQ2Are such cores shared across independently trained models with different weights?
  • RQ3Can the internal dynamics within the cores be characterized mechanistically (e.g., as Markovian or rotational operators)?
  • RQ4Does a universal cores exist for linguistic computations like subject–verb agreement across GPT-2 scales?

Key findings

  • Independent one-layer transformers trained on the same Markov task converge to a 3D core that is necessary and sufficient for performance.
  • Cores from independent models are geometrically misaligned yet statistically aligned, with near-unity canonical correlations across core dimensions.
  • Fitting linear dynamics inside the core recovers the ground-truth Markov spectrum with eigenvalues matching the Markov transition matrix (excluding the Perron–Frobenius eigenvalue).
  • For modular addition, cores form at grokking and reveal a rotational mechanism, with core inflation occurring under continued weight decay due to distributed, redundant modes.
  • In GPT-2 models (Small, Medium, Large), a single 1D agreement core governs subject–verb agreement, and perturbing or flipping this core reliably modulates or inverts grammatical number across open-ended generation.
  • Core coordinates across GPT-2 scales align well, indicating a universal, shared encoding of grammatical number across models.
Figure 2 : Modular addition cores form at grokking and are defined by automatically recoverable rotational operations. Three two-layer transformers with equivalent architectures ( $d_{\rm model}=128$ , $d_{\rm ff}=512$ ) were initialized with independent random seeds and trained for $2\times 10^{3}$
Figure 2 : Modular addition cores form at grokking and are defined by automatically recoverable rotational operations. Three two-layer transformers with equivalent architectures ( $d_{\rm model}=128$ , $d_{\rm ff}=512$ ) were initialized with independent random seeds and trained for $2\times 10^{3}$

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.