SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.11779 · NeurIPS · 2024

Compact Proofs of Model Performance via Mechanistic Interpretability

Lawrence Chan, Jason Gross, Rajashree Agrawal, Thomas Kwa, Euan Ong, Chun Hei, Alex Gibson, Soufiane Noubir

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 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.11779.json · badge: /api/ran/2406.11779.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
JasonGross/guarantees-based-mechanistic-interpretability canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
jasongross/guarantees-based-mechanistic-interpretability-with-data canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_batch_probabilities Ran
ran; our contract draft was wrong, not the code
jasongross/guarantees-based-mechanistic-interpretability-with-data/gbmi/exp_indhead/data_utils.py
code served (permissive licence) · get_code("a2d6312ed019908d")
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, 5, 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
from jaxtyping import Bool, Float, Integer

torch.manual_seed(0)

# Create a small batch of token sequences
# Shape: (batch_size=2, seq_length=5)
# Each element is a token ID in range [0, num_tokens)
batch_input = torch.tensor([
    [0, 1, 2, 1, 0],
    [1, 0, 1, 2, 1]
], dtype=torch.long)

num_tokens = 3

ARGS = {
    "batch_input": batch_input,
    "num_tokens": num_tokens,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, 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, 5, 3) — shape (2, 5, 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
cat_bos_token Ran
ran; our contract draft was wrong, not the code
jasongross/guarantees-based-mechanistic-interpretability-with-data/gbmi/exp_indhead/data_utils.py
code served (permissive licence) · get_code("afa604c69b95c968")
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, 6) 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 typing import Optional

torch.manual_seed(0)

# Test case 1: with bos token
tokens_1 = torch.randint(0, 100, (2, 5), dtype=torch.long)
bos_1 = 50

# Test case 2: without bos token (None)
tokens_2 = torch.randint(0, 100, (3, 7), dtype=torch.long)
bos_2 = None

# We'll use the first test case for ARGS
ARGS = {
    "tokens": tokens_1,
    "bos": bos_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, 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, 6) — shape (2, 6) 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
check_source_in_git_dir Ran
ran, violated the contract we drafted
JasonGross/guarantees-based-mechanistic-interpretability/etc/setup-alternates.py
code served (permissive licence) · get_code("1e8d0fdaa8ed2d56")
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 bool, 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.

from pathlib import Path

ARGS = {
    'git_dir': Path('/home/user/project/.git'),
    'source': 'max_of_4.py',
}
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 bool, 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
hf_sanitize Ran
ran; our contract draft was wrong, not the code
JasonGross/guarantees-based-mechanistic-interpretability/notebooks_jason/max_of_K_all_models.py
code served (permissive licence) · get_code("88f43fafc05219e7")
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

ARGS = {
    "s": "hello-world=test+value"
}
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
hook_function_attention Ran
ran; our contract draft was wrong, not the code
JasonGross/guarantees-based-mechanistic-interpretability/notebooks_soufiane/FineTuneSubtract.py
code served (permissive licence) · get_code("608d7669ae6b34d1")
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 function. 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 hook_function_attention takes a parameter 'alpha'
# Looking at the body, alpha is used in arithmetic operations:
# alpha / attnscore.shape[-1] + (1 - alpha) * attnscore
# So alpha should be a numeric scalar (float or tensor scalar)

alpha = 0.5

ARGS = {
    "alpha": alpha
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
increment_zero_counts Ran
ran, honoured the contract we drafted
jasongross/guarantees-based-mechanistic-interpretability-with-data/gbmi/exp_indhead/data_utils.py
code served (permissive licence) · get_code("415042a6d0a48f2d")
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
from torch import Tensor

torch.manual_seed(0)

# Create a small tensor with some zeros and some non-zero values
# This will test both branches of the conditional
table = torch.tensor([[0.0, 1.0, 2.0, 3.0],
                      [0.0, 0.0, 1.5, 2.5]], dtype=torch.float32)

ARGS = {
    "table": table
}
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
noise Ran
ran; our contract draft was wrong, not the code
JasonGross/guarantees-based-mechanistic-interpretability/gbmi/exp_indhead/realmodeltest.py
code served (permissive licence) · get_code("42b722deb4782413")
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)

# The function 'noise' takes a single parameter M
# It uses torch.rand_like(M) and arithmetic operations on M
# M should be a tensor

M = torch.randn(2, 4)

ARGS = {
    "M": M
}
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
resolve_git_dir_recursively Ran
ran; our contract draft was wrong, not the code
JasonGross/guarantees-based-mechanistic-interpretability/etc/setup-alternates.py
code served (permissive licence) · get_code("90f877ab0478795e")
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.

from pathlib import Path
import tempfile
import os

# Create a temporary directory structure to test with
temp_dir = tempfile.mkdtemp()
git_dir_path = Path(temp_dir) / ".git"

# Test case 1: git_dir is a regular directory
regular_dir = Path(temp_dir) / "regular_git_dir"
regular_dir.mkdir(exist_ok=True)

# Test case 2: git_dir is a file pointing to another git directory
# Create a worktree-style .git file that contains "gitdir: <path>"
git_file = Path(temp_dir) / ".git_file"
actual_git_dir = Path(temp_dir) / "actual_git"
actual_git_dir.mkdir(exist_ok=True)
git_file.write_text("gitdir: actual_git\n", encoding='utf-8')

# Use the regular directory as the main test case
ARGS = {
    "git_dir": regular_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
get_git_dir Not yet run
unverified (harvested, no recorded run)
JasonGross/guarantees-based-mechanistic-interpretability/etc/setup-alternates.py
code served (permissive licence) · get_code("0224309a1eec4045")
How it ran

no invocation recorded.

maybe_parallel_map Not yet run
unverified (harvested, no recorded run)
JasonGross/guarantees-based-mechanistic-interpretability/notebooks_jason/max_of_4_all_models.py
code served (permissive licence) · get_code("b4e6f11d1f2cffc0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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

We propose using mechanistic interpretability -techniques for reverse engineering model weights into human-interpretable algorithms -to derive and compactly prove formal guarantees on model performance. We prototype this approach by formally proving accuracy lower bounds for a small transformer trained on Max-of-K, validating proof transferability across 151 random seeds and four values of K. We create 102 different computer-assisted proof strategies and assess their length and tightness of bound on each of our models. Using quantitative metrics, we find that shorter proofs seem to require and provide more mechanistic understanding. Moreover, we find that more faithful mechanistic understanding leads to tighter performance bounds. We confirm these connections by qualitatively examining a subset of our proofs. Finally, we identify compounding structureless errors as a key challenge for using mechanistic interpretability to generate compact proofs on model performance.

For agents

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

get_harvested_code_for_paper("2406.11779")
get_code_for_paper("2406.11779")
have("2406.11779")

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

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

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

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

Connect an agent — have() is free.