Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models. Karvonen, A. In First Conference on Language Modeling, 2024.
Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models [link]Paper  abstract   bibtex   
Language models have shown unprecedented capabilities, sparking debate over the source of their performance. Is it merely the outcome of learning syntactic patterns and surface level statistics, or do they extract semantics and a world model from the text? Prior work by Li et al. investigated this by training a GPT model on synthetic, randomly generated Othello games and found that the model learned an internal representation of the board state. We extend this work into the more complex domain of chess, training on real games and investigating our model's internal representations using linear probes and contrastive activations. The model is given no a priori knowledge of the game and is solely trained on next character prediction, yet we find evidence of internal representations of board state. We validate these internal representations by using them to make interventions on the model's activations and edit its internal board state. Unlike Li et al's prior synthetic dataset approach, our analysis finds that the model also learns to estimate latent variables like player skill to better predict the next character. We derive a player skill vector and add it to the model, improving the model's win rate by up to 2.6 times.
@inproceedings{karvonen:2024:emergent-world-models-latent-variable-estimation-in-chess-playing-language-models,
  title         = {Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models},
  author        = {Adam Karvonen},
  year          = {2024},
  booktitle     = {First Conference on Language Modeling},
  url           = {https://openreview.net/forum?id=PPTrmvEnpW},
  tldr          = {We train a GPT model from scratch to play chess and  find that it learns to compute board state and estimate player Elo. We use these representations to edit the GPT's internal board state and increase or decrease its chess-playing ability.},
  abstract      = {Language models have shown unprecedented capabilities, sparking debate over the source of their performance. Is it merely the outcome of learning syntactic patterns and surface level statistics, or do they extract semantics and a world model from the text? Prior work by Li et al. investigated this by training a GPT model on synthetic, randomly generated Othello games and found that the model learned an internal representation of the board state. We extend this work into the more complex domain of chess, training on real games and investigating our model's internal representations using linear probes and contrastive activations. The model is given no a priori knowledge of the game and is solely trained on next character prediction, yet we find evidence of internal representations of board state. We validate these internal representations by using them to make interventions on the model's activations and edit its internal board state. Unlike Li et al's prior synthetic dataset approach, our analysis finds that the model also learns to estimate latent variables like player skill to better predict the next character. We derive a player skill vector and add it to the model, improving the model's win rate by up to 2.6 times.},
  keywords      = {GPT, large language model, interpretability, world model},
  affiliation   = {Independent},
  code          = {https://github.com/adamkarvonen/chess_llm_interpretability},
  dataset       = {https://huggingface.co/datasets/adamkarvonen/chess_games},
  huggingface   = {https://huggingface.co/adamkarvonen/chess_llms},
}

Downloads: 0