Evidence of Learned Look-Ahead in a Chess-Playing Neural Network

Erik Jenner, Shreyas Kapur, Vasil Georgiev, Cameron Allen, Scott Emmons +1 more
6/2/2024
cs.LGcs.AI

No official code found. Best implementation: HumanCompatibleAI/leela-interp (29 stars, GPL-3.0, last commit 2024-06-04).

Abstract

Do neural networks learn to implement algorithms such as look-ahead or search "in the wild"? Or do they rely purely on collections of simple heuristics? We present evidence of learned look-ahead in the policy network of Leela Chess Zero, the currently strongest neural chess engine. We find that Leela internally represents future optimal moves and that these representations are crucial for its final output in certain board states. Concretely, we exploit the fact that Leela is a transformer that treats every chessboard square like a token in language models, and give three lines of evidence (1) activations on certain squares of future moves are unusually important causally; (2) we find attention heads that move important information "forward and backward in time," e.g., from squares of future moves to squares of earlier ones; and (3) we train a simple probe that can predict the optimal move 2 turns ahead with 92% accuracy (in board states where Leela finds a single best line). These findings are an existence proof of learned look-ahead in neural networks and might be a step towards a better understanding of their capabilities.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Code for "Evidence of Learned Look-Ahead in a Chess-Playing Neural Network"

2910Python, Jupyter NotebookMay 25, 20242 years agoGPL-3.0

Similar Papers

Cite this paper

@article{jenner2024evidence,
  title  = {Evidence of Learned Look-Ahead in a Chess-Playing Neural Network},
  author = {Erik Jenner and Shreyas Kapur and Vasil Georgiev and Cameron Allen and Scott Emmons and Stuart Russell},
  year   = {2024},
  eprint = {2406.00877},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.00877},
  url    = {http://arxiv.org/abs/2406.00877v1},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.00877.svg)](https://codeofpaper.com/paper/2406.00877)

Discussion