The Canonical Basis: How to Rotate an LLM to Look Inside It

Translated by a model; the original is in Russian.

· Artificial intelligence
A researcher has proposed a reversible change of coordinates for the transformer that leaves its behavior untouched but makes every hidden axis individually measurable and controllable.

cover.svg

A transformer's hidden state is a vector in a space of hundreds of dimensions, but the coordinate system it lives in is arbitrary: it is whatever training happened to leave behind. Taken individually, no single dimension means anything, and they cannot be compared across layers. Gianluca Gernone's project, called CBLL (Canonical Basis for Language Models), offers a way out: rotate the model so that each axis aligns with a specific spectral direction of its own weight matrices.

The key property of the transformation is that it is lossless. The learnable RMSNorm normalization coefficients are first “absorbed” into the neighboring weight matrices, after which the model is rotated by an orthogonal matrix built from singular vectors. The behavior does not change: for Qwen 2.5 0.5B, perplexity and the MMLU score remain literally the same, and for SmolLM2 the discrepancy is at the level of fp16 noise. For families with LayerNorm (Pythia 1.4B, for example), a rotation that preserves the constant component is applied — and again without loss. The author stresses the point: this is a microscope, not a modification.

What can be seen under the microscope

In the new basis, phenomena that were “smeared” across all dimensions become localized on individual axes. Among the findings is a bipolar oscillator: the axes split into positive and negative poles, and 83% of the positive axes have a dedicated inhibitory partner operating in antiphase (the principal pair being axes 62 and 570, with a correlation of −0.97). A kind of “breathing” also turned up: the ratio of the poles oscillates rhythmically across the layers in four phases — encoding, processing, decoding, output — independently of the content of the query. Another effect is homeostasis: any artificial perturbation of the residual stream is erased within a couple of layers through the combined action of normalization, attention softmax, and the working range of SiLU. This, according to the author, is a property of the architecture rather than learned behavior.

Equally striking is the modesty of the real complexity: the effective rank of the correlation matrix of a half-billion-parameter model can drop as low as eleven independent patterns.

The geometry is not decorative

To prove that these structures are functional, the author runs a causal experiment. Zeroing out a single axis 62 — that is 0.11% of the model — collapses MMLU from 47.5% to 21.25%, while perplexity shoots up from 4 to nearly 24 thousand: the output becomes “the the the the...”. Yet this axis has almost zero static activation while holding the maximum centrality in the correlation network — it is a dynamic conductor, not a standalone feature. Control axes produce no effect whatsoever.

All the code and precomputed data have been published, and there is an interactive demo chat with /ablate and /restore commands that lets you feel, live, how the model loses and then regains coherence. The work is accompanied by a paper on Zenodo; the code is under MIT, the data under CC-BY 4.0, and commercial use is covered separately.


Source: Lobsters

Comments

Sign in, to comment.

  • No comments yet.