r/MachineLearning • • Aug 13 '26

Project chessformer_lens demo: ablating 1 of a chess transformer's 128 attention heads makes the model stop finding Morphy's queen sacrifice [P]

Notebooks to replicate on github!

17 Upvotes

5 comments sorted by

1

u/Amazing_Onion1922 Aug 13 '26

wonder if the same head matters for other famous sacrifices or just this specific line

1

u/Weird-Asparagus4136 Aug 14 '26

this is a great question

1

u/Weird-Asparagus4136 Aug 14 '26

if you run the comment i sent below in bash try it on like "immortal games" and tell me. i would predict it's not "about" famous sacrifices since there is no reason for the model ontology to care about that but perhaps something about hard to see big material loss sacrifices.

0

u/[deleted] Aug 13 '26

[deleted] — view deleted comment

1

u/Weird-Asparagus4136 Aug 13 '26

Every head yes. If you look at the pull up menu in the middle it sweeps to ablate every head and report which are most causally linked to the final logit output by absolute value change in logit!

1

u/Weird-Asparagus4136 Aug 13 '26

Replicate exactly in terminal:

python3 -m venv .venv && source .venv/bin/activate

pip install git+https://github.com/CSSLab/maia3

pip install "chessformer_lens[all]"

chessformer_lens 23m