SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.16689 · 2026

Predictive Statistics Shape Emergent World Representations of Grid Walkers

Nico Scherf, Sasha Brenner, Thomas Knösche

arXiv · PDF · Open in the Atlas

Code that ran

18 of 20 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 14 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2603.16689.json · badge: /api/ran/2603.16689.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
allshaks/grid-walkers canonical (classifier label)
classifier basis: census
18 ran · 2 no recorded run
FunctionStatusWhere it lives
align_pca_signs_to_reference Ran
ran, honoured the contract we drafted
allshaks/grid-walkers/lattice_walk_repro/analysis/geometry.py
code served (permissive licence) · get_code("0bb79bf086db6bff")
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 ndarray, ndim 1, dtype family float, shape (3,) 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

# Create a panel dictionary with ids and coords
panel = {
    'ids': np.array([1, 2, 3, 4, 5]),
    'coords': np.array([
        [0.1, 0.2, 0.3],
        [0.4, 0.5, 0.6],
        [0.7, 0.8, 0.9],
        [1.0, 1.1, 1.2],
        [1.3, 1.4, 1.5]
    ], dtype=float)
}

# Create a reference dictionary with some overlapping ids and coords
# We'll create coords that are correlated with panel so some axes align
reference = {
    'ids': np.array([2, 3, 4, 6, 7]),
    'coords': np.array([
        [0.4, 0.5, 0.6],
        [0.7, 0.8, 0.9],
        [1.0, 1.1, 1.2],
        [1.5, 1.6, 1.7],
        [1.8, 1.9, 2.0]
    ], dtype=float)
}

ARGS = {
    'panel': panel,
    'reference': reference
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) 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
build_state_ids Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/features.py
code served (permissive licence) · get_code("493ca622d0af3180")
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 1, dtype family int, shape (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)

# disp should be [N, ctx_len, 2] containing displacement coordinates
N = 2
ctx_len = 4
disp = torch.randn(N, ctx_len, 2) * 10  # Scale to get varied x, y values

ARGS = {
    "disp": disp,
    "ctx_len": ctx_len,
}
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 1, dtype family int, shape (8,) — shape (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
centered_logits Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/features.py
code served (permissive licence) · get_code("10f796c0ef4bb599")
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 3, dtype family float, shape (2, 3, 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)

# The function takes logits as a tensor and mean-centers them over the last dimension
# We need a tensor with shape (batch_size, ..., vocab_size)
# Let's use a small 3D tensor: (batch=2, sequence_length=3, vocab=4)
logits = torch.randn(2, 3, 4)

ARGS = {
    "logits": logits,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
ckpt_step Ran
ran, honoured the contract we drafted
allshaks/grid-walkers/lattice_walk_repro/analysis/model_loading.py
code served (permissive licence) · get_code("c9c70f5d632fe199")
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 re
from pathlib import Path

def ckpt_step(p: Path) -> int:
    m = re.match('^(\\d+)\\.pt$', p.name)
    return int(m.group(1)) if m else -1

# The function takes a Path object and extracts a step number from the filename
# It uses p.name to get the filename and applies a regex pattern
# We need to provide a Path object with a name matching the pattern "\d+.pt"

ARGS = {
    "p": Path("12345.pt")
}
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
compute_walk_displacements Ran
ran, honoured the contract we drafted
allshaks/grid-walkers/lattice_walk_repro/walk_engine/compute_walk_grid.py
code served (permissive licence) · get_code("1b3c9e4f937bf7f3")
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 3, dtype family int, shape (2, 4, 2) 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 batch of walks
# W=2 walks, d=4 steps per walk
# Each element is in {0,1,2,3} encoding left, right, down, up
steps = torch.tensor(
    [[0, 1, 2, 3],   # Walk 1: left, right, down, up
     [1, 1, 0, 0]],  # Walk 2: right, right, left, left
    dtype=torch.long
)

ARGS = {
    "steps": steps
}
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 3, dtype family int, shape (2, 4, 2) — shape (2, 4, 2) 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
equiv_weights_disp_len Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
allshaks/grid-walkers/lattice_walk_repro/analysis/lattice_metrics.py
code served (permissive licence) · get_code("a2b9ecac75cd2778")
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 tuple. 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 function expects:
# disp: [N, ctx_len, 2] integer cumulative displacements
# Returns weights, counts, and group_ids

N = 2
ctx_len = 4

# Create a small tensor of shape [N, ctx_len, 2] with integer displacements
disp = torch.tensor([
    [[0, 0], [1, 1], [2, 1], [3, 2]],
    [[0, 1], [1, 0], [2, 2], [3, 1]]
], dtype=torch.int64)

ARGS = {
    "disp": disp
}
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 tuple — a tuple output has no array shape of its own; none is 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
find_final_checkpoint Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/model_loading.py
code served (permissive licence) · get_code("75a219d5c0cf7bfa")
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 PosixPath. 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 re
from pathlib import Path
import tempfile
import os

# Create a temporary directory with some checkpoint files
temp_dir = tempfile.mkdtemp()
run_dir = Path(temp_dir)

# Create some checkpoint files with numeric names
(run_dir / "0.pt").touch()
(run_dir / "10.pt").touch()
(run_dir / "5.pt").touch()
(run_dir / "100.pt").touch()
(run_dir / "not_a_checkpoint.txt").touch()
(run_dir / "invalid.pt").touch()

ARGS = {
    "run_dir": run_dir
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
fit_and_evaluate Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/lattice_metrics.py
code served (permissive licence) · get_code("28cbaf3749c57845")
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 float, ndim 0, dtype family float, 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

torch.manual_seed(0)

# Create small tensors for testing
n_samples = 6
d_x = 4
d_y = 3

X = torch.randn(n_samples, d_x, dtype=torch.float32)
y = torch.randn(n_samples, d_y, dtype=torch.float32)
weights = torch.ones(n_samples, dtype=torch.float32)
group_ids = torch.tensor([0, 0, 1, 1, 2, 2], dtype=torch.long)

ARGS = {
    "X": X,
    "y": y,
    "weights": weights,
    "group_ids": group_ids,
}
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 float, ndim 0, dtype family float, 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
gt_cache_key Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
allshaks/grid-walkers/lattice_walk_repro/analysis/ground_truth.py
code served (permissive licence) · get_code("c3387a5ce2a33bbd")
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 tuple. 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - top: converted to int, so can be int or int-like
# - holes: iterable of iterables (or None), each inner iterable becomes tuple
# - intentions: iterable of iterables (or None), each inner iterable becomes tuple
# - n_ctx: converted to int, so can be int or int-like

ARGS = {
    "top": 42,
    "holes": [[1, 2], [3, 4], [5, 6]],
    "intentions": [[7, 8], [9, 10]],
    "n_ctx": 128,
}
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 tuple — a tuple output has no array shape of its own; none is 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
infer_model_type Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/training_core.py
code served (permissive licence) · get_code("898cee532c619b78")
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
import torch.nn as nn
from typing import Any

torch.manual_seed(0)

# Test case 1: config with explicit model_type
config1 = {
    'model_type': 'RNN'
}

# Test case 2: config with model_config containing rnn_type
config2 = {
    'model_config': {
        'rnn_type': 'lstm',
        'hidden_size': 128
    }
}

# Test case 3: config with model_config containing hidden_size
config3 = {
    'model_config': {
        'hidden_size': 256
    }
}

# Test case 4: config that defaults to transformer
config4 = {
    'model_config': {
        'num_layers': 12,
        'dim': 768
    }
}

# Test case 5: empty config defaults to transformer
config5 = {}

# Use the first config as the main test case
ARGS = {
    'config': config1
}
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
joint_ols Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/r2.py
code served (permissive licence) · get_code("3a390bc8cbaff1d6")
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 tuple. 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)

# F: [batch, k] - feature matrix with centered features
# A: [batch, d_model] - target/output matrix
F = torch.randn(2, 4)
A = torch.randn(2, 3)

ARGS = {
    "F": F,
    "A": A,
}
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 tuple — a tuple output has no array shape of its own; none is 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
linear_cka Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/lattice_metrics.py
code served (permissive licence) · get_code("9fa1ca8f048f4513")
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 float, ndim 0, dtype family float, 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

torch.manual_seed(0)

# Create small tensors for X and Y
# X: shape [n_samples=2, n_features=4]
# Y: shape [n_samples=2, n_features=3]
X = torch.randn(2, 4)
Y = torch.randn(2, 3)

# Create weights tensor with shape [n_samples=2]
weights = torch.tensor([0.3, 0.7])

ARGS = {
    "X": X,
    "Y": Y,
    "eps": 1e-12,
    "center": True,
    "weights": weights,
}
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 float, ndim 0, dtype family float, 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
load_median_table Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/effective_field.py
code served (permissive licence) · get_code("04255c9b90a1c706")
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 pandas as pd
from pathlib import Path
import tempfile
import os

# Create a temporary CSV file with the required structure
temp_dir = tempfile.mkdtemp()
csv_path = Path(temp_dir) / "test_data.csv"

# Create sample data with forbidden categories
data = {
    'sweep': ['sweep_1', 'sweep_1', 'sweep_1', 'sweep_1', 'sweep_2', 'sweep_2', 'sweep_2', 'sweep_2'],
    'run': ['run_a', 'run_a', 'run_a', 'run_a', 'run_b', 'run_b', 'run_b', 'run_b'],
    'plot_category': ['forbidden_left', 'forbidden_right', 'forbidden_up', 'forbidden_down',
                      'forbidden_left', 'forbidden_right', 'forbidden_up', 'forbidden_down'],
    'median': [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]
}

df = pd.DataFrame(data)
df.to_csv(csv_path, index=False)

ARGS = {
    'csv_path': csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
medians_vec Ran
ran, honoured the contract we drafted
allshaks/grid-walkers/lattice_walk_repro/analysis/effective_field.py
code served (permissive licence) · get_code("a78fafb45c68f764")
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 1, dtype family float, shape (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)

# The function expects a dict mapping direction strings to float values
# DIR_ORDER is ('L', 'R', 'D', 'U'), so we need those keys
medians_for_run = {
    'L': 0.5,
    'R': 1.2,
    'D': 0.8,
    'U': 1.5
}

ARGS = {
    'medians_for_run': medians_for_run
}
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 1, dtype family float, shape (4,) — shape (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
pca_3d Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/geometry.py
code served (permissive licence) · get_code("48fa29145cc812ae")
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 tuple. 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 numpy as np

np.random.seed(0)

# X is an np.ndarray that gets centered, SVD decomposed, and projected
# We need shape (n_samples, n_features) where n_features >= 3 for the function to work properly
# Using distinct dimensions: 5 samples, 7 features
X = np.random.randn(5, 7).astype(np.float32)

ARGS = {
    "X": X,
}
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 tuple — a tuple output has no array shape of its own; none is 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
regularized_q Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/effective_field.py
code served (permissive licence) · get_code("b547ef5df5602dc5")
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, 3) 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)

# log_probs: Tensor of shape [..., 4] with log-probabilities in (L, R, D, U) order
# Some channels can be blocked (carry -inf)
log_probs = torch.tensor([
    [0.5, -0.3, 0.1, -0.2],
    [-0.1, 0.4, -0.5, 0.3]
], dtype=torch.float32)

# medians: Tensor of shape [4] - per-direction median centered logit
medians = torch.tensor([-0.5, -0.3, -0.2, -0.4], dtype=torch.float32)

ARGS = {
    "log_probs": log_probs,
    "medians": medians,
}
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, 3) — shape (2, 3) 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
torch_dtype Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/training_core.py
code served (permissive licence) · get_code("2f18a7f275206a0a")
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 dtype. 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 function torch_dtype takes a single parameter 'value' of type Any
# It handles: torch.dtype instances, None, strings, and torch attributes
# We need to test with different input types

ARGS = {
    'value': torch.float32
}
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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
variant_label Ran
ran; our contract draft was wrong, not the code
allshaks/grid-walkers/lattice_walk_repro/analysis/model_loading.py
code served (permissive licence) · get_code("fbd28415ffca2bad")
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

torch.manual_seed(0)

ARGS = {
    'holes': [],
    'intentions': ['intention1', 'intention2']
}
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
build_features Not yet run
unverified (harvested, no recorded run)
allshaks/grid-walkers/lattice_walk_repro/analysis/features.py
code served (permissive licence) · get_code("6333e683d4df57fb")
How it ran

no invocation recorded.

build_recurrent_model Not yet run
unverified (harvested, no recorded run)
allshaks/grid-walkers/lattice_walk_repro/rnn_models.py
code served (permissive licence) · get_code("906417f366c52e3a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 20 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.

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

Next-token predictors often appear to develop internal representations of the latent world and its rules. The probabilistic nature of these models suggests a deep connection between the structure of the world and the geometry of probability distributions. In order to understand this link more precisely, we use a minimal stochastic process as a controlled setting: constrained random walks on a twodimensional lattice that must reach a fixed endpoint after a predetermined number of steps. Optimal prediction of this process solely depends on a sufficient vector determined by the walker's position relative to the target and the remaining time horizon; in other words, the probability distributions are parametrized by the world's grid geometry. We train decoder-only transformers and recurrent networks on prefixes sampled from the exact distribution of these walks and compare their hidden activations to sufficient statistics of prediction, by measuring alignment and linear readability across layers. We find that the transformer's computation factors into two stages: the first attention block extracts the sufficient statistic from the input, and later layers transform it into the next-step predictive geometry. Across constraint variants the post-attention representation is universal: a shared world-state of the lattice that can be read directly as a world model, traced to the predictive geometry of the data. Later layers then specialize it to each variant's next-step distribution. Recurrent networks reach the same Bayes-optimal loss but do not isolate this world-state as a separate stage, showing that the world-model geometry also depends on architecture. Although demonstrated in a toy system, the results suggest that the geometry of the predictive distribution is a useful lens on how neural networks internalize the structure of their data.

For agents

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

get_harvested_code_for_paper("2603.16689")
get_code_for_paper("2603.16689")
have("2603.16689")

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

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

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

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

Connect an agent — have() is free.