SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.07582 · 2023

Linear Latent World Models in Simple Transformers: A Case Study on Othello-GPT

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2310.07582.json · badge: /api/ran/2310.07582.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
deanhazineh/emergent-world-representations-othello canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
permit Ran
ran, honoured the contract we drafted
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/mechanistic_interpretability/mech_interp_othello_utils.py
code served (permissive licence) · get_code("1a0f3a6c603d52ed")
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.

rows = list('abcdefgh')
columns = [str(_) for _ in range(1, 9)]

def permit(s):
    s = s.lower()
    if len(s) != 2:
        return -1
    if s[0] not in rows or s[1] not in columns:
        return -1
    return rows.index(s[0]) * 8 + columns.index(s[1])

ARGS = {
    's': 'a1'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
permit_reverse Ran
ran; our contract draft was wrong, not the code
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/mechanistic_interpretability/mech_interp_othello_utils.py
code served (permissive licence) · get_code("1484fe530bc561e5")
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 str. The image it ran in was not recorded. If your copy returns the same type 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.

rows = list('abcdefgh')
columns = [str(_) for _ in range(1, 9)]

def permit_reverse(integer):
    r, c = (integer // 8, integer % 8)
    return ''.join([rows[r], columns[c]])

# The function takes a single parameter 'integer' which is used to:
# - Divide by 8 to get row index (r)
# - Take modulo 8 to get column index (c)
# - Index into rows and columns lists
# Valid integers should be in range [0, 63] to map to valid board positions
# Let's use a valid integer in the middle of the range

ARGS = {
    'integer': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/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
str_to_int Ran
ran, honoured the contract we drafted
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/mechanistic_interpretability/tl_initial_exploration.py
code served (permissive licence) · get_code("371f505cf3526d45")
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 torch
import numpy as np

# The function str_to_int takes a single parameter 's' which is used as a key
# to look up in the 'stoi' dictionary, and then subtracts 1 from the result.
# 's' should be a valid key in the stoi dict.

# Valid keys in stoi are: -100, -1, 0, 1, 2, ..., 26, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63

# Let's pick a simple valid key from the stoi dictionary
s = 0  # This is a valid key that maps to 1 in stoi, so str_to_int(0) returns 1 - 1 = 0

ARGS = {
    "s": s
}
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
to_board_label Ran
ran; our contract draft was wrong, not the code
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/mechanistic_interpretability/mech_interp_othello_utils.py
code served (permissive licence) · get_code("0a2c0f55c57d9f48")
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 str. The image it ran in was not recorded. If your copy returns the same type 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

alpha = 'ABCDEFGH'

def to_board_label(i):
    return f'{alpha[i // 8]}{i % 8}'

ARGS = {
    'i': 0
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/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
seq_to_state_stack Not yet run
unverified (harvested, no recorded run)
deanhazineh/emergent-world-representations-othello/EWOthello/othello_world/mechanistic_interpretability/tl_probing_v1.py
code served (permissive licence) · get_code("413cb1289813ae5f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 5 later) and 1 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
10 dated earlier, 6 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
4 dated earlier
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
permit 3 other papers
1 dated earlier, 2 later
2210.13382 (2022-10)
Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task
2403.15498 (2024-03)
Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models
2406.03689 (2024-06)
Evaluating the World Model Implicit in a Generative Model
permit_reverse 3 other papers
1 dated earlier, 2 later
2210.13382 (2022-10)
Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task
2403.15498 (2024-03)
Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models
2406.03689 (2024-06)
Evaluating the World Model Implicit in a Generative Model
to_board_label 3 other papers
1 dated earlier, 2 later
2210.13382 (2022-10)
Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task
2403.15498 (2024-03)
Emergent World Models and Latent Variable Estimation in Chess-Playing Language Models
2406.03689 (2024-06)
Evaluating the World Model Implicit in a Generative Model
str_to_int 2 other papers
1 dated earlier, 1 later
2210.13382 (2022-10)
Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task
2406.03689 (2024-06)
Evaluating the World Model Implicit in a Generative Model

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-22.

Repositories linked to this paper

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

Abstract

Foundation models exhibit significant capabilities in decision-making and logical deductions. Nonetheless, a continuing discourse persists regarding their genuine understanding of the world as opposed to mere stochastic mimicry. This paper meticulously examines a simple transformer trained for Othello, extending prior research to enhance comprehension of the emergent world model of Othello-GPT. The investigation reveals that Othello-GPT encapsulates a linear representation of opposing pieces, a factor that causally steers its decision-making process. This paper further elucidates the interplay between the linear world representation and causal decision-making, and their dependence on layer depth and model complexity. We have made the code public.

For agents

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

get_harvested_code_for_paper("2310.07582")
get_code_for_paper("2310.07582")
have("2310.07582")

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

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

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

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

Connect an agent — have() is free.