SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.00941 · 2023

Emergent Linear Representations in World Models of Self-Supervised Sequence Models

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2309.00941.json · badge: /api/ran/2309.00941.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ajyl/mech_int_othellogpt canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
get_min_boardstate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ajyl/mech_int_othellogpt/mech_int/figures/movefirst.sync.py
code served (permissive licence) · get_code("3091fdb6313cdccd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (8, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a valid board state for Othello/Reversi
# The board is 8x8, with values: 0 (empty), 1 (opponent), 2 (player)
board = torch.zeros((8, 8))
# Set up a simple board configuration
board[3, 3] = 2  # player piece
board[3, 4] = 1  # opponent piece
board[4, 3] = 1  # opponent piece
board[4, 4] = 2  # player piece
# Add some more pieces to make valid moves possible
board[3, 5] = 1
board[4, 5] = 2
board[2, 4] = 1
board[5, 4] = 2

# Define some valid moves (as board indices 0-63)
# Move 20 corresponds to row 2, col 4 (20 // 8 = 2, 20 % 8 = 4)
# Move 19 corresponds to row 2, col 3 (19 // 8 = 2, 19 % 8 = 3)
moves = [20, 19]

ARGS = {
    "board": board,
    "moves": moves,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (8, 8) — shape (8, 8) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample Ran
ran; our contract draft was wrong, not the code
ajyl/mech_int_othellogpt/mingpt/utils.py
code served (permissive licence) · get_code("958673f09e3e1cd0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torch.nn import functional as F

torch.manual_seed(0)

# Create a minimal model that satisfies the sampling function's requirements
class MinimalModel(nn.Module):
    def __init__(self, vocab_size=8, block_size=16, embed_dim=4):
        super().__init__()
        self.block_size = block_size
        self.vocab_size = vocab_size
        self.embedding = nn.Embedding(vocab_size, embed_dim)
        self.linear = nn.Linear(embed_dim, vocab_size)
    
    def get_block_size(self):
        return self.block_size
    
    def forward(self, x):
        # x shape: (batch, seq_len)
        embedded = self.embedding(x)  # (batch, seq_len, embed_dim)
        logits = self.linear(embedded)  # (batch, seq_len, vocab_size)
        # Return logits and dummy value (function only uses logits)
        return logits, None

model = MinimalModel(vocab_size=8, block_size=16, embed_dim=4)
model.eval()

# Create initial conditioning sequence: (batch_size=2, seq_len=3)
x = torch.randint(0, 8, (2, 3))

# Number of steps to sample
steps = 5

# Temperature parameter for controlling randomness
temperature = 1.0

# Whether to sample from distribution or take argmax
sample_flag = False

# Top-k filtering parameter (None means no filtering)
top_k = 3

ARGS = {
    "model": model,
    "x": x,
    "steps": steps,
    "temperature": temperature,
    "sample": sample_flag,
    "top_k": top_k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 8) — shape (2, 8) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_int Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ajyl/mech_int_othellogpt/mech_int/tl_othello_utils.py
code served (permissive licence) · get_code("a86092ab76b2c3fe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function to_int has a single parameter: x
# Looking at the function body, x can be:
# - a torch.Tensor with numel() == 1
# - a list, np.ndarray, or torch.Tensor (will recurse)
# - an int (will look up in stoi dict)
# - a str (will convert to uppercase and process)

# Let's create test cases for each branch
# We'll test with a list of different types to exercise the recursion

ARGS = {
    'x': [0, 1, 5, 10, 15, 20, 25]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_string Ran
ran, honoured the contract we drafted
ajyl/mech_int_othellogpt/mech_int/tl_othello_utils.py
code served (permissive licence) · get_code("e574d1f8da6a87ad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

ALPHA = 'ABCDEFGH'

# Build the itos (index to string) mapping that to_string uses
itos = {i: ALPHA[i // 8] + str(i % 8) for i in range(64)}

# Test cases for different input types
ARGS = {
    'x': 'A1'  # string input - valid board position
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
top_k_logits Ran
ran; our contract draft was wrong, not the code
ajyl/mech_int_othellogpt/mingpt/utils.py
code served (permissive licence) · get_code("0f0021cdea13e4da")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small logits tensor with shape (batch_size=2, vocab_size=4)
logits = torch.randn(2, 4)

# Set k to a small value less than the vocabulary dimension
k = 2

ARGS = {
    "logits": logits,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
patch_heads Not yet run
unverified (harvested, no recorded run)
ajyl/mech_int_othellogpt/mech_int/intervene.py
code served (permissive licence) · get_code("e36a53a69e491ff4")
How it ran

no invocation recorded.

patch_heads Not yet run
unverified (harvested, no recorded run)
ajyl/mech_int_othellogpt/mech_int/intervene_blank.py
code served (permissive licence) · get_code("dcd1382d3cffc38e")
How it ran

no invocation recorded.

state_stack_to_one_hot Not yet run
unverified (harvested, no recorded run)
ajyl/mech_int_othellogpt/mech_int/train_flipped.py
code served (permissive licence) · get_code("344163c42c92bc3b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
top_k_logits 16 other papers
9 dated earlier, 7 later
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.02039 (2021-06)
Offline Reinforcement Learning as One Big Sequence Modeling Problem
2106.14131 (2021-06)
SymbolicGPT: A Generative Transformer Model for Symbolic Regression
and 13 more not named here
sample 4 other papers
3 dated earlier, 1 later
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2107.08037 (2021-07)
CCVS: Context-aware Controllable Video Synthesis
2210.13382 (2022-10)
Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task
and 1 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

How do sequence models represent their decision-making process? Prior work suggests that Othello-playing neural network learned nonlinear models of the board state (Li et al., 2023). In this work, we provide evidence of a closely related linear representation of the board. In particular, we show that probing for "my colour" vs. "opponent's colour" may be a simple yet powerful way to interpret the model's internal state. This precise understanding of the internal representations allows us to control the model's behaviour with simple vector arithmetic. Linear representations enable significant interpretability progress, which we demonstrate with further exploration of how the world model is computed.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2309.00941")
get_code_for_paper("2309.00941")
have("2309.00941")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2309.00941.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2309.00941.svg)](https://syntology.ai/paper/2309.00941)

Connect an agent — have() is free.