From States to Dynamics: Detecting Rule Violations in OthelloGPT
Authors: David L. Cao, Sai Sumedh R. Hindupur, Demba Ba
Organizations: Harvard College, Harvard University, Cambridge, MA 02138 · School of Engineering and Applied Sciences, Harvard University, Cambridge, MA 02138 · School of Engineering and Applied Sciences, Kempner Institute, Harvard University, Cambridge, MA 02138
Sequence models trained on game moves have been shown to encode world models, with structured linear probes revealing the underlying game states. World models, however, are inherently dynamic: in deterministic board games, a set of rules constrain how states evolve over time. We therefore ask if and how OthelloGPT, a transformer trained only on Othello move sequences, manifests the rules of the game in its activation space. We divide the rules of Othello, and symmetrically their violations, into three classes: placing a disc on an empty square (R1), flanking an opponent's disc (R2), and moving in turn (R3). We find that linear probes accurately separate legal from illegal moves, and also distinguish between the three kinds of rule violations. We introduce an unsupervised rule-violation detector based on the step length of activations between consecutive moves, which identifies illegal moves above chance. We further improve our detection metric by computing step length in the latent space of select sparse autoencoders. Together, we find that OthelloGPT follows game rules of Othello to a large extent, and that we can detect rule violations using structured detectors on model activations.
Figures & tables
Figure 1: OthelloGPT largely follows the rules of Othello. (a) Board state from a randomly chosen game at move t=16 , with black to move, illustrating a legal move and the three classes of rule violations (R1, R2, R3). (b) Next-token probability of generating an illegal move at move t , separated by violation class and averaged over n=1000 games. This probability remains low throughout the game, reaching 7.1% at t=58 , indicating that OthelloGPT generally generates moves consistent with the rules of Othello.
Figure 2: Rule violations can be distinguished using linear probes. (a) 2D Multidimensional Scaling (MDS) visualization of linear probe directions (ring is linear probe direction, point is re-fitted probe per square) of the five classes (legal, illegal, R1, R2, and R3) (b) Cosine similarity matrix between the five probe directions. Illegal moves are anti-correlated with legal moves, and illegal classes are also anti-correlated with each other. (c) AUROC of linear probes for distinguishing each class. Performance is highest for distinguishing legal from illegal moves and lowest for distinguishing legal from R1 violations.
Figure 3: Step-length metric detects rule violations in residual stream activations. (a) Example Othello game centered at t0=20 , where an R2 violation occurs; the metric correctly classifies 4/5 moves in the displayed window. (b) The detection metric computed from residual stream activations peaks at the illegal move t0 . (c) AUROC for detecting {illegal,R1,R2,R3} against {legal} exceeds the random baseline of 0.50 for all violation classes. (d) Despite this separation, the metric distributions show substantial overlap between legal moves and illegal moves, including each rule-violation class.
Figure 4: Detecting rule violations in SAE latent space. (a) AUROC of the detector applied in the latent spaces of eight SAE architectures. Several SAE representations outperform the raw residual stream, with GatedSAE achieving the highest AUROC ( ∼0.75 ) for distinguishing illegal from legal moves. (b) Less overlap in the distribution of the metric between legal moves and illegal moves is observed for GatedSAE latent space as opposed to that of residual stream activations (see Figure 3 ).
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Accuracy of linear probe trained on Othello board state over each residual stream layer of OthelloGPT. A linear probe classifies each of the 64 squares on the board as {empty,mine,theirs} from the residual stream activations after each block ℓ∈{0,…,7} , scored on n=1000 held-out games ( 58,000 positions).
Figure 6: Hyperparameter sweep of each SAE architecture used in this work across sparsity L0 . Every point is one trained dictionary at expansion factor 16 ( 8192 latents) on layer- 5 activations, scored with Karvonen’s board-game suite [ 17 ] ; all four panels share the x -axis L0 , clipped to [0,400] , and marker shape denotes the architecture. (a) Loss recovered (fidelity) against L0 , each point colored by its coverage of the Othello board state. (b) Coverage of the Othello board state against L0 . (c) As in (a), each point colored by its board state reconstruction F1 . (d) Board state reconstruction F1 against L0 .
Figure 7: Concrete example of OthelloGPT following the rules. (a) Randomly chosen game, board state at move t=25 , white to move. ‘m’ denotes move t=26 , ‘s’ denotes the opponent’s flanked disc, and ‘ m′ ’ denotes the matched control move. (b) Tensor product probe (TPR) on the board state of Othello. The y-axis indicates whether or not a square is occupied, and the x-axis indicates OthelloGPT’s understanding of the relative disc color ( mine versus their directions). The TPR shows that OthelloGPT updates its internal board representation in accordance with the flanking rule, changing the represented color of the flanked disc after the move.
Figure 8: Step length performs the best compared to the other rule violation detection metrics we tested. AUROC comparing three rule violation detection metrics – step length d , representation norm ∥z∥ , and turning angle θ – in residual stream activations and in the SAE latent activations , averaged over n=500 games.
Foundation models must handle multiple generative processes, yet mechanistic interpretability largely studies capabilities in isolation; it remains unclear how a single transformer organizes multiple, potentially conflicting "world models". Previous experiments on Othello playing neural-networks test world-model learning but focus on a single game with a single set of rules. We introduce MetaOthello, a controlled suite of Othello variants with shared syntax but different rules or tokenizations, and train small GPTs on mixed-variant data to study how multiple world models are organized in a shared representation space. We find that transformers trained on mixed-game data do not partition their capacity into isolated sub-models; instead, they converge on a mostly shared board-state representation that transfers causally across variants. Linear probes trained on one variant can intervene on another's internal state with effectiveness approaching that of matched probes. For isomorphic games with token remapping, representations are equivalent up to a single orthogonal rotation that generalizes across layers. When rules partially overlap, early layers maintain game-agnostic representations while a middle layer identifies game identity, and later layers specialize. MetaOthello offers a path toward understanding not just whether transformers learn world models, but how they organize many at once.
Aviral Chawla, Galen Hall, Juniper Lovato
Vermont Complex Systems Institute, University of Vermont, Burlington, VT · University of Michigan, Ann Arbor, MI
World models require state tracking, which is the ability to maintain a correct latent state across action sequences. Existing benchmarks are often synthetic or language-based, limiting their value as tests of structured state updates in realistic domains. We introduce Chess-World-Model, a large-scale state-tracking benchmark built from 10 million real chess games, where models predict the exact board state reached after a sequence of legal moves. Alongside a held-out real-game split, we include an out-of-distribution test set of uniformly random legal play both at its original trajectory lengths and after matching the human-game length distribution. This tests whether models learn the transition rules rather than shortcuts from common human positions. Prior theoretical and empirical work has shown that Transformers struggle to state-track, while input-dependent linear RNNs require expressive state-transition matrices to do so. We therefore benchmark a causal Transformer, block-diagonal SLiCE, Mamba-3, and Gated DeltaNet with negative eigenvalues under a matched interface and training protocol. The recurrent models strongly outperform the Transformer at approximately 3 and 8 million parameters. Real-game performance largely saturates by the 18 million parameter scale, but length-matched random evaluation continues to distinguish architectures through the largest tested scale of approximately 43 million parameters. Additionally, ablations show that less expressive state-transition mechanisms generally reduce performance on the out-of-distribution splits. Together, these results establish Chess-World-Model as a practical large-scale benchmark for state tracking that exposes failures model scale would otherwise conceal.
Benjamin Walker, Terry Lyons
Mathematical Institute, University of Oxford · Department of Mathematics, Imperial College London
While researchers are finding concepts represented as linear directions in language models, a bag of linear directions fails to capture relational structure. To better understand this dichotomy, we study a model with known linear representations, but trained in a highly structured domain -- the board game Othello. While the model's internal board-state representation is linearly decodable, we find additional structure in the form of tensor product representations (TPRs). We train TPR probes to recover shared structure amongst the linear probes, yielding a factorization into square-embeddings, color-embeddings, and a binding matrix that composes them to construct the model's board-state representation. We find geometric signatures within the weights of our TPR probe that align with the structure of the board, but perhaps more importantly, that the linear probes can be recovered directly from the parameters of our TPR probe. Our findings suggest that directional representations may be projections of more structured underlying representations.
Andrew Lee, Fernanda Viégas, Martin Wattenberg
Harvard University · Google DeepMind* · *Work done at Harvard.