SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.03689 · 2024

Evaluating the World Model Implicit in a Generative Model

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/2406.03689.json · badge: /api/ran/2406.03689.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
keyonvafa/world-model-evaluation canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran; our contract draft was wrong, not the code
keyonvafa/world-model-evaluation/model.py
code served (permissive licence) · get_code("441ba8cbd04d2d26")
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 dict. 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

torch.manual_seed(0)

# The collate_fn expects a batch parameter which is a list of dicts
# Each dict should have 'input_ids' and 'attention_mask' keys with list values
# The function pads them all to the same length and returns tensors

batch = [
    {
        'input_ids': [1, 2, 3],
        'attention_mask': [1, 1, 1]
    },
    {
        'input_ids': [4, 5],
        'attention_mask': [1, 1]
    },
    {
        'input_ids': [6, 7, 8, 9],
        'attention_mask': [1, 1, 1, 1]
    }
]

ARGS = {
    'batch': batch
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
permit Ran
ran, honoured the contract we drafted
keyonvafa/world-model-evaluation/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
keyonvafa/world-model-evaluation/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_game_from_board Ran
ran, honoured the contract we drafted
keyonvafa/world-model-evaluation/othello_world/utils.py
code served (permissive licence) · get_code("03fcfa1178193c7f")
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 numpy as np

class MockBoard:
    def __init__(self):
        self.move_count = 0
        self.max_moves = 5
    
    def get_valid_moves(self):
        if self.move_count >= self.max_moves:
            return []
        return np.array([0, 1, 2, 3])
    
    def update(self, move):
        self.move_count += 1

board = MockBoard()

ARGS = {
    "board": board
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
str_to_int Ran
ran, honoured the contract we drafted
keyonvafa/world-model-evaluation/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
keyonvafa/world-model-evaluation/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

Also present in other papers' code

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

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

Recent work suggests that large language models may implicitly learn world models. How should we assess this possibility? We formalize this question for the case where the underlying reality is governed by a deterministic finite automaton. This includes problems as diverse as simple logical reasoning, geographic navigation, game-playing, and chemistry. We propose new evaluation metrics for world model recovery inspired by the classic Myhill-Nerode theorem from language theory. We illustrate their utility in three domains: game playing, logic puzzles, and navigation. In all domains, the generative models we consider do well on existing diagnostics for assessing world models, but our evaluation metrics reveal their world models to be far less coherent than they appear. Such incoherence creates fragility: using a generative model to solve related but subtly different tasks can lead to failures. Building generative models that meaningfully capture the underlying logic of the domains they model would be immensely valuable; our results suggest new ways to assess how close a given model is to that goal.

For agents

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

get_harvested_code_for_paper("2406.03689")
get_code_for_paper("2406.03689")
have("2406.03689")

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

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

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

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

Connect an agent — have() is free.