SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.13032 · 2024

Hypothesis Testing the Circuit Hypothesis in LLMs

arXiv · PDF · Open in the Atlas

Code that ran

2 of 4 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.13032.json · badge: /api/ran/2410.13032.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
blei-lab/circuitry canonical (classifier label)
classifier basis: census
2 ran · 2 no recorded run
FunctionStatusWhere it lives
gather_results Ran
ran on a synthesized input
blei-lab/circuitry/paper_experiments/figures/generate_figures.py
code served (permissive licence) · get_code("07119487f732c8aa")
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 DataFrame. 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 os
import pickle
import tempfile
import yaml
import pandas as pd

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create the directory structure: path/task_name/test_name/run_dir/
task_names = ["docstring", "induction"]
test_name = "sufficiency"

for task_name in task_names:
    test_path = os.path.join(temp_dir, task_name, test_name)
    os.makedirs(test_path, exist_ok=True)
    
    # Create a couple of run directories
    for run_idx in range(2):
        run_dir = os.path.join(test_path, f"run_{run_idx}")
        os.makedirs(run_dir, exist_ok=True)
        
        # Create the pickle file with dumped results
        dumped_data = {
            'task_name': task_name,
            'empirical_quantile': 0.75 + run_idx * 0.05,
            'candidate_circuit_size': 10 + run_idx,
            'complete_circuit_size': 20 + run_idx,
        }
        pkl_filename = os.path.join(run_dir, f'{task_name}_{test_name}.pkl')
        with open(pkl_filename, 'wb') as f:
            pickle.dump(dumped_data, f)
        
        # Create the yaml config file
        config_data = {
            'size_random_circuits': 100 + run_idx * 10,
            'other_param': 'value',
        }
        yaml_filename = os.path.join(run_dir, f'{test_name}.yaml')
        with open(yaml_filename, 'w') as f:
            yaml.dump(config_data, f)

# Define ARGS
ARGS = {
    'path': temp_dir,
    'task_names': ["docstring", "induction"],
    'test_name': "sufficiency",
    'dumped_fields': ["empirical_quantile", "candidate_circuit_size", "complete_circuit_size"],
    'test_config_fields': ["size_random_circuits"],
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
hsic_independence_test Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
blei-lab/circuitry/circuitry/hypothesis_testing/non_independence.py
code served (permissive licence) · get_code("13afa78d83255cae")
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
import numpy as np

torch.manual_seed(0)

# Create simple 1D tensors for X and Y
# The function expects 1D arrays that will be reshaped to (n_examples, 1)
n_examples = 2
X = torch.randn(n_examples)
Y = torch.randn(n_examples)

# Create the arguments dictionary
ARGS = {
    'X': X,
    'Y': Y,
    'num_permutations': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jaxtyping, numpy, 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
create_mask_parameters_and_forward_cache_hook_points Not yet run
unverified (harvested, no recorded run)
blei-lab/circuitry/circuitry/circuit/edge_level_masked_transformer.py
code served (permissive licence) · get_code("e1a4225275fe771d")
How it ran

no invocation recorded.

plot_minimality_ablation Not yet run
unverified (harvested, no recorded run)
blei-lab/circuitry/paper_experiments/figures/generate_figures.py
code served (permissive licence) · get_code("6dd2e1581d2bd637")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Large language models (LLMs) demonstrate surprising capabilities, but we do not understand how they are implemented. One hypothesis suggests that these capabilities are primarily executed by small subnetworks within the LLM, known as circuits. But how can we evaluate this hypothesis? In this paper, we formalize a set of criteria that a circuit is hypothesized to meet and develop a suite of hypothesis tests to evaluate how well circuits satisfy them. The criteria focus on the extent to which the LLM's behavior is preserved, the degree of localization of this behavior, and whether the circuit is minimal. We apply these tests to six circuits described in the research literature. We find that synthetic circuits -- circuits that are hard-coded in the model -- align with the idealized properties. Circuits discovered in Transformer models satisfy the criteria to varying degrees. To facilitate future empirical studies of circuits, we created the \textit{circuitry} package, a wrapper around the \textit{TransformerLens} library, which abstracts away lower-level manipulations of hooks and activations. The software is available at \url{https://github.com/blei-lab/circuitry}.

For agents

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

get_harvested_code_for_paper("2410.13032")
get_code_for_paper("2410.13032")
have("2410.13032")

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

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

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

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

Connect an agent — have() is free.