How Does Changing the Elo of a Chess Transformer Affect its Computations?

Increasing Skill Level Recruits Deeper Attention Layers in a Frozen Chess Transformer

Paper:https://arxiv.org/abs/2609.23917

TL;DR: Maia-3 is a transformer-based chess model that takes Elo (the standard metric for chess skill) as an input to the pre-trained network, so you can vary the skill the network is conditioned on with no change to its weights. Turning that Elo dial up from 700 to 2500:

  1. Pushes the computation deeper, monotonically, for every chess piece and move type I measured.
  2. This "depth migration" happens most for specific tactics, especially knight forks.
  3. The mechanism appears to consist of deeper (later) heads getting recruited for more specialized computations while shallow (earlier) heads keep a roughly constant contribution.

One reason to care about this for safety research is that even in relatively small models, important circuits observed in one condition may not stay where they were in another condition, such as in, possibly, different reasoning settings of an LLM.

1. A falsifiable prediction

One might predict that the migration would be to shallower layers as skill increased. In a neural network, the more layers there are after a feature is computed, the more opportunities there are to use that feature in subsequent computations. So a more advanced and skilled network should learn features like forks earlier on to reuse them in later layers. Prof. Tom Griffiths suggested this as one plausible prediction to me, and I found it convincing. The opposite occurs in this data.

2. The setup

Maia-3 is a transformer-based chess model (chessformer) built to mimic human play across skill levels. The single model was trained on millions of online games to predict the move a human actually played at a position, given their rating. So at inference you can give it any position and rating and get back what a player of that strength would likely do. It has 8 layers. Each token maps to one chessboard square, and it plays from policy alone without search (looking ahead at different move sequences). The output is a pair of tokens: from_square and to_square, for the move.

More details about the model and tokenization can be found in "Methodology" in the original paper.

Every plot and most analysis comes from a library I built called chessformer-lens, DOI 10.5281/zenodo.21877655.

In the model, the variable Elo rating is a linear combination of two learned 128-d vectors:

This is combined with the 64 square tokens for the forward pass. What is especially notable is that the skill conditioning is a walk along a single straight line in the high dimensional space of the model. One can move along it while keeping every learned weight and bias frozen and force the network to reorganize.

A terminology list is at the end of the post, so if you are unfamiliar with terms like logit or ablation, they are defined there.

3. The headline: four for four for forks

I started by looking at "royal forks", a single move that attacks the king and queen at once, because I have done other mech interp work on them.

I first performed a "head ablation sweep" on 500 forks for each piece type (besides king and queen), across Elo points spanning from 700 to 2500 by intervals of 100.

The table below reports on the subset of the 500 positions where the fork is the model's top move at every Elo, serving as a control that the move being measured is the move the model plays throughout. I ran a permutation test against the null hypothesis that Elo carries no information about the center of mass, shuffling the Elo labels within each position 1,000 times. (p < 0.001 for every piece).

piece

n

total ∆COM 700→2500 (layers)

Elo steps rising

permutation p

pawn

261

+0.519 ± 0.040

18/18

< 0.001

bishop

243

+0.547 ± 0.040

18/18

< 0.001

knight

368

+0.880 ± 0.028

18/18

< 0.001

rook

238

+0.522 ± 0.041

18/18

< 0.001

The full 100-step increments are in the paper's appendix.

The results I obtained paint a consistent picture of a monotonic deepening of the heads' causal center of mass in all four pieces. I visualize it as follows.

Each panel shows the 16 heads per layer “L” with causal mass as brightness. So a brighter head means that ablating it changes the move’s logit more on average. In the 1500 column for knight forks, for example, you can see that layer 2 (L2 column) head 8 (the eighth line in each box) has a fair amount of causal mass and head 5 has some but less. This is plotted against Elo on the x axis. The orange line is the center of mass.

4. Does everything cause depth migration?

Now the most interesting question is: does everything migrate like forks?

I ran the same head-ablation sweep on swathes of other data including the original knight "fork", a "check-only" knight move without the queen attack, a "queen attack only" knight move without the check, and another "double-attack" knight move that hits two pieces except the king or queen. I kept everything else in the position relatively constant as a control.

Below is an example of this 2x2 surgery. The original move is highlighted and its favorability/probability in Maia-3's policy is readable:

I also ran head-ablation sweeps for the model's best alternative move and for its most preferred "quiet" move, to give a lower bound for the global movement.

These innocuous and inert quiet moves rely on later and later layers so the global effect is not primarily about tactics. Even outright blunders migrate later. More on that later.

5. Is there meaningful structure to the depth migration?

I sought to examine the depth of computation in a variety of pre-labeled chess puzzles. I thought that perhaps the number of moves needed to look ahead, a temporary material loss, or some other tactic might reveal a new interesting pattern.

Using a Lichess.org supplied puzzle database, I ran a simplified head-ablation sweep on a list of puzzle concepts like "double attack" and "checkmate in 3."

The number reported for each concept is the excess migration of the puzzle's solution move compared to the migration of the model's best other move in that same position.

concept

n

excess

95% CI

description

smotheredMate

350

+0.300

[+0.258, +0.344]

knight-delivered checkmate

discoveredAttack

350

+0.279

[+0.220, +0.344]

uncovers an attack by moving a piece

hangingPiece

350

+0.235

[+0.182, +0.286]

fork

350

+0.202

[+0.156, +0.249]

any piece that attacks any two targets

discoveredCheck

350

+0.178

[+0.133, +0.226]

mateIn1

350

+0.154

[+0.112, +0.196]

guaranteed checkmate in one move

mateIn3

350

+0.115

[+0.062, +0.164]

doubleCheck

350

+0.111

[+0.070, +0.159]

mateIn2

350

+0.098

[+0.053, +0.143]

veryLong

350

+0.097

[+0.044, +0.145]

a long solution but with no checkmate

skewer

350

+0.087

[+0.038, +0.135]

pin

350

+0.084

[+0.039, +0.131]

sacrifice

350

+0.012

[−0.037, +0.063]

not distinguishable from zero

my royal knight fork

500

+0.513

[+0.480, +0.546]

None of the puzzle concepts migrated more than my king-queen fork, and puzzle difficulty did not correlate with depth migration considering mateIn1, mateIn2 and mateIn3 have overlapping confidence intervals. Also, veryLong proved indistinguishable from them as well. The five deepest migrations include the smothered mate (a knight checkmate) and three concepts involving two pieces: discovered attack, discovered check, and the general fork. Those are each related in a way to my knight fork. Sacrifice is the only concept whose interval covers zero.

So puzzle difficulty does not predict how far a move migrates, but the make-up of the move does.

This parallels findings by Hu, Zhou and Zhang (2025) who studied model depth in the Qwen-2.5 LLMs. They found that increasingly difficult reasoning problems on a math exam database do not activate deeper layers for their tested reasoning model.

I believe there are more connections to make to cognitive science and computational neuroscience literature, but at this point most claims I might make feel like a reach. If others see such connections I would enjoy discussing them.

6. A first pass at a mechanistic explanation

Mechanistic interpretations are harder than describing mathematical relationships, but I made a first pass at one by analyzing specific heads' trajectories as Elo is dialed up.

Consider, to start, L2H8 (layer 2, head 8). Its absolute contribution is more or less constant for each piece across Elos, and lies between −0.5 and −0.75 logit. Because the total causal mass increases with Elo, this head starts as an important carrier of forks and is relied upon less and less in relative terms (note its decline in the relative-mass plots).

Now consider L5H2 and L7H12 on the knight's plots. They contribute more and more as skill increases, growing four to eight times in absolute contribution and ending up responsible for 30% of the total causal mass on knight forks at Elo 2500.

A candidate interpretation of the above facts is that L2H8, being located on an early layer, is an early specialization head that all forking pieces rely on in low skill settings. As skill conditioning increases, the network relies less and less on the computations from that early layer, though still a constant amount, and rapidly recruits more specialized heads for more precise computations. The layer 2 head could be computing a reusable primitive and the later heads could be piece specific or deal with more abstract features of a position.

As mentioned earlier, attention maps from a square correspond to the 8x8 board, so you can naturally view the attention heads on any position, with color representing the strength of the softmaxed attention maps.

Now I will focus more on each head individually.

On a randomly generated position from Maia-3 self-play, I made an "attention atlas" with chessformer_lens for the heads above:

Considering the analysis of those three heads, the skill conditioning that gives rise to depth migration is (at least for knights) likely not a result of computations being routed to wholly new circuits. It is a result of the model relying less on shallower heads' primitive calculations like "where are the forkable pieces" and more on deeper heads with more specialized, geometry-specific computations.


7. Ruling out confounding variables

One might object: "What is being measured is not related to the moves themselves, such as forks; it is a function of the model's confidence in a strong move, which by design increases with Elo."

If depth were a function of confidence, a move whose probability decreases as Elo rises should migrate shallower, or possibly not at all. This does not occur.

As hinted at earlier, outright blunders, the policy's highest percentage piece-hanging move in the same positions, have this trend. For pawns, knights, and rooks they more than halve in probability and for bishops they decrease by a third. Yet each blunder deepens by +0.209 ± 0.031 (pawn), +0.249 ± 0.030 (bishop), +0.318 ± 0.030 (knight) and +0.218 ± 0.029 (rook) layers.

This shows that the global depth migration effect still occurs as the model likes a move less and less. It is not only a function of confidence.

8. Conclusion

One immediate takeaway is that even in relatively small models, circuits may not stay where they were first observed under one condition. If conditioning inputs can move them this much, circuit-level safety analysis done under one setting may not transfer to another. How far my results generalize to other settings, such as raising the reasoning effort of a large language model, is an exciting topic for future investigations.

This work was inspired by previous results on where concepts are represented in a network, my favorite of which is McGrath et al.'s Acquisition of Chess Knowledge in AlphaZero (2022). They investigated DeepMind's AlphaZero (a superhuman chess model that learns only from playing against itself). They used simple probes that read a concept out of a layer's activations across both depth of the model and across checkpoints of training to produce "What When Where" plots. These plots showed, for example, that some chess concept X is represented in the network the most clearly in very late training points in middle to late layers. The most fascinating thing is that human concepts are decodable in AlphaZero despite it never actually having been trained on a human chess game.

9. Limitations

  • The scripts I wrote to mine chess databases for specific types of moves is surely improvable. They were iteratively written, for instance by realizing that I might be eliding discovered checks and adding a conditional for them, so further improvements may yield cleaner results. This is an especially important area to focus on since the predicates form the basis of my sampling and thus are upstream of every figure and datum.
  • I used one Maia model size at 23 million parameters (though very preliminary results suggest the finding holds in the 5M and 79M models).
  • There are other ways to quantify depth of computation and zero-ablation is just one of them. In the paper, however, I use another method that yields similar results, though slightly smaller in magnitude. I would be interested in how other methods pan out.

10. Future questions, acknowledgements

  • What do the recruited deeper heads compute, and how do suppression heads figure into the model's circuitry? I take this up in forthcoming work.
  • Does this result hold in other models with an analogue to skill conditioning, inside and outside of chess?
  • Do SAEs on attention outputs give a more clear picture of how deeper heads specialize?

Acknowledgements:

I am grateful to Professor Terry Sejnowski for feedback on this write-up and for his experienced intuitions about the results and how to best square them with larger scientific ideas. I thank Professor Tom Griffiths for generous discussions of these ideas at Princeton.

11. Appendix

Paper: https://arxiv.org/abs/2609.23917

Notebook: https://github.com/David-31415/maia-depth-migration/blob/main/README.md

Library used: https://github.com/chessformer-lens/chessformer_lens

Earlier chess mechanistic interpretability posts I made: https://www.lesswrong.com/posts/Cke4aTXGB7aG8zCsx/fork-around-and-find-out-part-3-interpreting-the-knight

Terminology:

  • layer 0–7 — the eight transformer blocks; each contains an attention sublayer and a feed-forward (MLP) sublayer.
  • logit — the raw score the network gives each move before scores are turned into probabilities. A logit for a move has meaning independent of the status of alternative moves. Ablation effects in this paper are measured by the change in a single move’s logit.
  • policy — the network's output distribution over all 4352 possible chess moves, then pruned to only all legal moves. The term is also used for a single move in the output.
  • ablation — subtract an attention head's output on a given position from the residual stream, and measure how the model's output changes.
  • check — a chess move that attacks the enemy king. A check has to be addressed immediately, which is why a fork wins material: the king has to address the check and the other attacked piece is simply captured the next move.
  • attacked, defended, hanging — a piece is attacked if an enemy piece could capture it next move, defended if you could recapture on that square, and hanging if it is attacked but not defended, meaning it is free to take.
  • causal center of mass — (COM) a metric for the average depth at which computation happens. Given a move, measure the absolute change in its logit when ablating every head in the model individually to get their causal masses. Then compute the mass-weighted average layer (the sum of the layer number times mass in that layer divided by the total mass). It is a weighted metric, so even though causal mass may increase, it only changes if it gets added deeper.
  • Head ablation sweeps — Over a stack of input positions, I ablate each of the model's 8×16 attention heads in turn and record the change it makes to the logit of the move of interest. Repeating this at every Elo input gives, per position, a tensor of shape (Elo, layer, head). Its mean over the positions is an 8×16 grid of logit changes at each Elo.
添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论