Reference. Transformers Use Causal World Models in Maze-Solving Tasks

Recent studies in interpretability have explored the inner workings of transformer models trained on tasks across various domains, often discovering that these networks naturally develop highly structured representations. When such representations comprehensively reflect the task domain’s structure, they are commonly referred to as “World Models” (WMs). In this work, we identify WMs in transformers trained on maze-solving tasks. By using Sparse Autoencoders (SAEs) and analyzing attention patterns, we examine the construction of WMs and demonstrate consistency between SAE feature-based and circuit-based analyses. By subsequently intervening on isolated features to confirm their causal role, we find that it is easier to activate features than to suppress them. Furthermore, we find that models can reason about mazes involving more simultaneously active features than they encountered during training; however, when these same mazes (with greater numbers of connections) are provided to models via input tokens instead, the models fail. Finally, we demonstrate that positional encoding schemes appear to influence how World Models are structured within the model’s residual stream.

Cite

Cite as @spies-2024-transformers (helia, typst) · \cite{spies-2024-transformers} (LaTeX)
BibTeX
bibtex · 8 lines
@misc{spies-2024-transformers,
  author = {Alexander F. Spies and William Edwards and Michael Ivanitskiy and Adrians Skapars and Tilman Räuker and Katsumi Inoue and Alessandra Russo and Murray Shanahan},
  title = {Transformers Use Causal World Models in Maze-Solving Tasks},
  year = {2024},
  month = {12},
  eprint = {2412.11867},
  archiveprefix = {arXiv}
}
hayagriva YAML (typst)
yaml · 15 lines
spies-2024-transformers:
  type: misc
  title: Transformers Use Causal World Models in Maze-Solving Tasks
  author:
  - Spies, Alexander F.
  - Edwards, William
  - Ivanitskiy, Michael
  - Skapars, Adrians
  - Räuker, Tilman
  - Inoue, Katsumi
  - Russo, Alessandra
  - Shanahan, Murray
  date: 2024-12
  serial-number:
    arxiv: '2412.11867'
Cited by (1)

maze-dataset: Maze Generation with Algorithmic Variety and Representational Flexibility ivanitskiy-2025-maze

DOI
Cites 28 works (1 here)
With notes (1)

A Configurable Library for Generating and Manipulating Maze Datasets ivanitskiy-2023-a

Understanding how machine learning models respond to distributional shifts is a key research challenge. Mazes serve as an excellent testbed due to varied generation algorithms offering a nuanced platform to simulate both subtle and pronounced distributional shifts. To enable systematic investigations of model behavior on out-of-distribution data, we present 𝚖𝚊𝚣𝚎-𝚍𝚊𝚝𝚊𝚜𝚎𝚝, a comprehensive library for generating, processing, and visualizing datasets consisting of maze-solving tasks. With this library, researchers can easily create datasets, having extensive control over the generation algorithm used, the parameters fed to the algorithm of choice, and the filters that generated mazes must satisfy. Furthermore, it supports multiple output formats, including rasterized and text-based, catering to convolutional neural networks and autoregressive transformer models. These formats, along with tools for visualizing and converting between them, ensure versatility and adaptability in research applications.
arXiv
External (27)
spies-2024-transformers reference entries/refs/spies-2024-transformers/spies-2024-transformers.hel