cs.LGAug 29, 2025

The Algorithm Is Not the Behavior: Learned Priors Override Look-Ahead in a Chess-Playing Neural Network

Authors: Elias Sandmann, Sebastian Lapuschkin, Wojciech Samek

Organizations: Fraunhofer HHI · TU Dublin · TU Berlin

Abstract

Recent mechanistic work has uncovered learned algorithms within neural networks, from modular arithmetic to search and planning in game-playing agents. But does algorithmic structure guarantee algorithmic behavior? We investigate this in Leela Chess Zero, the strongest neural chess engine, where prior work identified learned look-ahead. By extending the logit lens to its move-selecting policy network, we discover that correct puzzle solutions--including immediate checkmates--often appear in intermediate layers but are systematically overridden in the final output, a phenomenon we term "forgotten puzzles". Replicating prior analyses on these positions, we find that look-ahead operates normally--future moves of the correct continuation are represented, causally important, and linearly decodable--ruling out a failure of the algorithm. Instead, late layers increasingly shift toward safe play over aggression. To test whether this shift drives the override, we steer the model against these preferences and recover 71.7% of forgotten puzzles, providing causal evidence that safety priors override algorithmically computed solutions. These findings show that algorithmic structure does not guarantee algorithmic behavior: a model can internally solve a problem and still output the wrong answer.

Figures & tables

Appendix figures & tables70 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Beyond Search-Imitation: Prior-Directed Exploration for Searchless Chess

    Aug 27, 2026Szymon Miłosz, Piotr Duch, Szymon GrabowskiChessRL Exploration

  2. Chessformer: A Unified Architecture for Chess Modeling

    May 18, 2026Daniel Monroe, George Eilender, Philip Chalmers +2Transformer InterpretabilityGame-Playing Agents

  3. Do Chess Explanations Reflect Model Decisions? Behavioral and Token-Level Tests of LLM Reasoning Faithfulness

    Sep 5, 2026Angelina ParfenovaFaithfulness of Language Model ExplanationsLLM Reasoning