# Transformers Linearly Represent Highly Structured World Models

*Roman Kniazev, Nathanaël Fijalkow*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/155096) · [Open on the map](../papers.html#p155096)

Category: [Interpretability & Model Adaptation](../pcat/15.md) › [Compositional Generalization in Transformers](../pgroup/496.md) · Type: empirical study · Keywords: transformer interpretability, Sudoku world model, mechanistic analysis, naked-single circuit, combinatorial reasoning

Areas: [LLM Reasoning](../areas/reasoning.md) › Reasoning Mechanisms › Looped Reasoning; [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › Algorithmic Transformers; [Interpretability](../areas/interpretability.md) › Mechanistic Interpretability › Transformer Circuit Interpretation

## Summary
The paper shows that a transformer trained on Sudoku solving traces builds an internal world model organized around Sudoku's rows, columns, and boxes and discovers a sparse, interpretable naked-single circuit in the final MLP that detects possible digits.

## Explained to a 5-year-old
A computer program called a transformer was taught how to solve Sudoku puzzles by watching people solve them. Instead of remembering every single square, it learned to think about groups of squares like rows, columns, and boxes. It also found a tiny group of special brain-like units that notice when only one number can go in a square. When a helper finds such a situation, it tells the computer which number to place. These helpers make the solving process fast and easy to understand.

## Explained to a 5-year-old, longer
A transformer is a kind of computer program that can learn to do many tasks. In this study, researchers gave it lots of Sudoku puzzles that people solved step by step. Sudoku is a game where you fill numbers in a grid so each row, column, and box has no repeats. The researchers wanted to see if the computer built an internal picture of the puzzle that matched the game's rules. They discovered that the computer did not think about each individual square separately. Instead, it organized its knowledge around the groups of squares: rows, columns, and boxes. This helped the computer understand the puzzle in a way that mirrors how the game's constraints work. The study also found a small set of special units inside the computer that act like tiny helpers. Each helper notices when there is only one possible number that can go into a particular square. When a helper finds such a situation, it tells the computer which number to place. These helpers make the solving process fast and easy to understand. Overall, the work shows that we can open up the black box of big AI models and see how they reason about complex problems.

## For a technical reader
The authors trained an 8-layer transformer on sequences of Sudoku solving traces to investigate whether the model constructs an internal world model that reflects the task’s constraint algebra. They performed a mechanistic analysis and found that the representation is organized around rows, columns, and boxes rather than a cell-wise encoding. Additionally, they identified a sparse, monosemantic circuit in the final MLP layer-dubbed the naked-single circuit-where individual neurons detect when a cell has exactly one feasible digit. These findings demonstrate that mechanistic interpretability tools can recover an end-to-end algorithmic account of how a transformer solves a combinatorial reasoning task. The work provides both empirical evidence of structured internal representations and a reproducible analysis pipeline for future model interpretability research.

## Problem
It is unclear whether transformers, when trained on sequential reasoning traces, build internal models that reflect the underlying task structure and whether those representations mirror the domain's constraints.

## Method
We train an 8-layer transformer on Sudoku solving traces and perform a mechanistic analysis of its internal computation, examining how information is organized and identifying dedicated neurons that detect naked singles.

## Results
The approach reveals that the transformer organizes its internal representation around Sudoku's rows, columns, and boxes rather than cell-by-cell, and discovers a sparse, monosemantic naked-single circuit in the final MLP that detects possible digits.

## Contributions
It demonstrates that emergent world models reflect the constraint algebra of the domain and that mechanistic interpretability can recover a fully interpretable decision circuit for a combinatorial reasoning task.

## Research questions this paper is counted under

- [Which transformer components drive performance on reasoning tasks?](../q/447.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/155096)
