SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.08809 · NeurIPS · 2023

Interpretability at Scale: Identifying Causal Mechanisms in Alpaca

Noah Goodman, Christopher Potts, Atticus Geiger, Thomas Icard, Zhengxuan Wu

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 (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 0 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/2305.08809.json · badge: /api/ran/2305.08809.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
stanfordnlp/pyvene canonical (classifier label)
classifier basis: classifier_2025
6 ran · 0 no recorded run
FunctionStatusWhere it lives
BoundlessRotatedSpaceIntervention Ran
ran on a synthesized input · constructed an object; no result was computed
stanfordnlp/pyvene/pyvene/models/interventions.py
code served (permissive licence) · get_code("974fabbaf7583922")
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 an instance of its own class, BoundlessRotatedSpaceIntervention: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Define ARGS dictionary with all parameters for BoundlessRotatedSpaceIntervention
ARGS = {
    'embed_dim': 4,
    'keep_last_dim': False,
    'use_fast': False,
    'subspace_partition': None,
    'source_representation': None,
    'hidden_source_representation': None,
}
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 BoundlessRotatedSpaceIntervention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BoundlessRotatedSpaceIntervention 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
DistributedRepresentationIntervention Ran
ran on a synthesized input · constructed an object; no result was computed
stanfordnlp/pyvene/pyvene/models/interventions.py
code served (permissive licence) · get_code("5eccf455e2ee03fd")
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 an instance of its own class, DistributedRepresentationIntervention: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

ARGS = {}
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 DistributedRepresentationIntervention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DistributedRepresentationIntervention 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
Intervention Ran
ran on a synthesized input · constructed an object; no result was computed
stanfordnlp/pyvene/pyvene/models/interventions.py
code served (permissive licence) · get_code("7db73871d3f0493e")
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 an instance of its own class, Intervention: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Since Intervention is abstract, we need to create a concrete subclass
class ConcreteIntervention(torch.nn.Module):
    """Concrete implementation of Intervention for testing."""
    
    def __init__(self, **kwargs):
        super().__init__()
        self.trainable = False
        self.is_source_constant = False
        self.keep_last_dim = kwargs.get('keep_last_dim', False)
        self.use_fast = kwargs.get('use_fast', False)
        self.subspace_partition = kwargs.get('subspace_partition', None)
        
        if self.subspace_partition is not None:
            expanded_subspace_partition = []
            for subspace in self.subspace_partition:
                if len(subspace) == 2 and isinstance(subspace[0], int):
                    expanded_subspace_partition.append([i for i in range(subspace[0], subspace[1])])
                else:
                    expanded_subspace_partition.append(subspace)
            self.subspace_partition = expanded_subspace_partition
        
        if 'embed_dim' in kwargs and kwargs['embed_dim'] is not None:
            self.register_buffer('embed_dim', torch.tensor(kwargs['embed_dim']))
            self.register_buffer('interchange_dim', torch.tensor(kwargs['embed_dim']))
        else:
            self.embed_dim = None
            self.interchange_dim = None
        
        if 'source_representation' in kwargs and kwargs['source_representation'] is not None:
            self.is_source_constant = True
            self.register_buffer('source_representation', kwargs['source_representation'])
        elif 'hidden_source_representation' in kwargs and kwargs['hidden_source_representation'] is not None:
            self.is_source_constant = True
        else:
            self.source_representation = None
    
    def forward(self, base, source, subspaces=None):
        """Concrete forward implementation."""
        return base

# Create test tensors
base_tensor = torch.randn(2, 4)
source_tensor = torch.randn(2, 4)
source_repr = torch.randn(2, 4)

ARGS = {
    'keep_last_dim': False,
    'use_fast': False,
    'subspace_partition': [[0, 2], [2, 4]],
    'embed_dim': 4,
    'source_representation': source_repr,
    'hidden_source_representation': None,
}
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 Intervention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Intervention 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
RotateLayer Ran
ran on a synthesized input · constructed an object; no result was computed
stanfordnlp/pyvene/pyvene/models/interventions.py
code served (permissive licence) · get_code("a4d4d1ca75101467")
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 an instance of its own class, RotateLayer: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# RotateLayer takes two parameters: n and init_orth
# n: int, the dimension of the square weight matrix
# init_orth: bool, whether to initialize with orthogonal initialization

ARGS = {
    "n": 4,
    "init_orth": True,
}
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 RotateLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RotateLayer 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
TrainableIntervention Ran
ran on a synthesized input · constructed an object; no result was computed
stanfordnlp/pyvene/pyvene/models/interventions.py
code served (permissive licence) · get_code("0922e0b85aa7fa5c")
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 an instance of its own class, TrainableIntervention: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Since TrainableIntervention.__init__ calls super().__init__(**kwargs),
# we need to provide all parameters that Intervention expects

ARGS = {
    'keep_last_dim': False,
    'use_fast': False,
    'subspace_partition': None,
    'embed_dim': 4,
    'source_representation': None,
    'hidden_source_representation': None,
}
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 TrainableIntervention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TrainableIntervention 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
sigmoid_boundary Ran
ran; our contract draft was wrong, not the code
stanfordnlp/pyvene/pyvene/models/interventions.py
code served (permissive licence) · get_code("39eceb45250b08ff")
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 small tensor inputs
_input = torch.randn(2, 4)
boundary_x = torch.randn(2, 4)
boundary_y = torch.randn(2, 4)
temperature = torch.tensor(0.5)

ARGS = {
    "_input": _input,
    "boundary_x": boundary_x,
    "boundary_y": boundary_y,
    "temperature": temperature
}
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

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, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 5 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
sigmoid_boundary
brick of this paper's assembly: helper
1 other paper
1 later
2403.07809 (2024-03)
pyvene: A Library for Understanding and Improving PyTorch Models via Interventions

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

Obtaining human-interpretable explanations of large, general-purpose language models is an urgent goal for AI safety. However, it is just as important that our interpretability methods are faithful to the causal dynamics underlying model behavior and able to robustly generalize to unseen inputs. Distributed Alignment Search (DAS) [23] is a powerful gradient descent method grounded in a theory of causal abstraction that has uncovered perfect alignments between interpretable symbolic algorithms and small deep learning models fine-tuned for specific tasks. In the present paper, we scale DAS significantly by replacing the remaining brute-force search steps with learned parameters -an approach we call Boundless DAS. This enables us to efficiently search for interpretable causal structure in large language models while they follow instructions. We apply Boundless DAS to the Alpaca model (7B parameters), which, off the shelf, solves a simple numerical reasoning problem. With Boundless DAS, we discover that Alpaca does this by implementing a causal model with two interpretable boolean variables. Furthermore, we find that the alignment of neural representations with these variables is robust to changes in inputs and instructions. These findings mark a first step toward faithfully understanding the inner-workings of our ever-growing and most widely deployed language models. Our tool is extensible to larger LLMs and is released publicly at https://github.com/stanfordnlp/pyvene.

For agents

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

get_harvested_code_for_paper("2305.08809")
get_code_for_paper("2305.08809")
have("2305.08809")

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

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

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

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

Connect an agent — have() is free.