The Core Question: Do LLMs Understand the World?
There is a heated debate in artificial intelligence: do Large Language Models (LLMs) simply memorize statistical patterns of tokens, or do they build an internal "world model"—a coherent map of rules, states, and logic?
Testing this in natural language is notoriously messy because "truth" and "rules" are often subjective or context-dependent. To get a definitive answer, researchers turned to chess. Chess provides a perfectly defined world model: the rules are absolute, the board state is deterministic, and every move is either strictly legal or illegal.
Previous studies suggested that models trained on chess transcripts "emerge" with an understanding of the board. However, this paper argues that standard metrics—like how often a model plays a legal move in a normal game—are misleading. A model might appear to know the rules simply because it is following a familiar, strategic path it memorized during training. The authors set out to break this illusion using adversarial attacks, testing whether these models truly understand the rules or just mimic typical games.
Methods: Adversarial Sequence Generation
To stress-test the models, the researchers introduced Adversarial Sequence Generation. Instead of letting the model play a standard game, they pitted it against an "adversary." This adversary only plays legal moves, but it chooses them specifically to confuse the model and force it into making an illegal prediction.
They implemented several types of adversaries:
- Illegal Move Oracle (IMO): The strongest attack. It looks ahead and picks the legal move that maximizes the probability of the model responding with an illegal move.
- Board State Oracle (BSO): It picks moves that maximize the error in the model's internal representation of the board (measured by a linear probe).
- Adversarial Detours (AD): A method from prior work that pushes the model into "out-of-distribution" or highly unfamiliar board states.
The team also tested different training objectives. Beyond the standard Next Token (NT) prediction (predicting the single move played in the training data), they used a Probability Distribution (PD) objective, where the model is trained to predict all legal moves in a given state.
Datasets: Quality vs. Randomness
The study used a massive variety of datasets to see how data distribution affects rule learning:
- Curated Datasets: High-quality games from humans (Millionbase-500k, Lichess-16M) and superhuman engines (Stockfish-8M).
- Random Datasets: Games consisting of purely random but legal moves (ranging from 500k to 10M games). While strategically "boring," these provide a much wider variety of board states than standard games.
Key Insights and Results
Soundness is an Illusion
Even models that play legal moves 99% of the time in normal games can be forced into a near 100% failure rate by a clever adversary. None of the models tested were truly "sound" (perfectly rule-abiding in all scenarios).
As seen in the results, the Illegal Move Oracle (IMO) was devastatingly effective. It achieved nearly a 100% Attack Success Rate (ASR) against almost all models trained with the standard Next Token (NT) objective.
The "Probe" Paradox
Researchers often use "linear probes" to extract a board state from a model's hidden layers, claiming this proves the model "knows" where the pieces are. This paper found that these probes have no causal role. The gradients for the board state and the next-move prediction were nearly orthogonal. This means the model might "know" where a piece is in one part of its network, but it completely ignores that information when deciding its next move.
Strategy vs. Rules
Counterintuitively, models trained on high-quality human games (NT objective) are actually less robust than those trained on random games. Strategic games only cover a tiny fraction of possible board states. When the adversary takes the model "off-book" into weird board configurations, the models collapse. Conversely, increasing the dataset size of random games (e.g., from 500k to 10M) reliably improved the model's resilience.
Length Overfitting and the Horizon Effect
Line plots demonstrating Attack Success Rate over move numbers Verification of the Implicit World Model in a Generative Model via Adversarial Sequences, page 8
The models exhibited a bizarre "horizon" effect. Because the training games were capped at 150 moves, the models' ability to follow rules plummeted the moment a game exceeded that length. The sharp spikes in Attack Success Rate near move 140 indicate that the models overfit to the sequence position rather than relying on a robust internal board state.
PD Training is Superior
Training a model to recognize all legal moves (the PD objective) significantly improved its robustness compared to just predicting the "best" next move. This forces the model to learn the actual boundaries of the rules rather than just mimicking a single strategic path.
Limitations and Future Work
The authors acknowledge that their study is limited to a specific model size (86M parameters) due to the high computational cost of training 48 different models. Furthermore, while chess is an excellent proxy for testing formal rules, how these adversarial "rule-breaking" sequences translate to the fuzzy logic and subjective nature of natural language remains an open question.
Future work could involve creating "causal probes"—internal mechanisms that actually force the model to use its extracted world-state knowledge during the decision-making process, rather than allowing it to remain as passive, unused information.
Summary updated