SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.00812 · 2024

Generative causal testing to bridge data-driven models and scientific theories in language neuroscience

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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 0 have no contract verdict; 8 failures of our instrument; 3 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.00812.json · badge: /api/ran/2410.00812.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
microsoft/automated-explanations canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
abbrev_question Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/neuro/analyze_helper.py
code served (permissive licence) · get_code("310161a8ecbabb93")
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

def abbrev_question(q):
    q = q.replace('Is time mentioned in the input?', 'Does the input mention time?')
    q = q.replace('express a sense of belonging or connection to a place or community', 'express a connection to a community')
    q = q.replace("express the narrator's opinion or judgment about an event or character", 'express an opinion about an event or character')
    q = q.replace('involve a description of', 'describe a')
    q = q.replace('involve a discussion about', 'discuss')
    q = q.replace('involve an expression of', 'express')
    q = q.replace('involve the mention of', 'mention')
    q = q.replace('that leads to a change or revelation', '')
    q = q.replace(' ?', '?')
    for prefix in ['Does the sentence ', 'Is the sentence ', 'Does the input ', 'Is the input ', 'Does the text ', 'Is there a ', 'Is an ', 'Is a ', 'Is there ']:
        q = q.replace(prefix, '...')
    return q

ARGS = {
    'q': 'Is time mentioned in the input? Does the sentence involve a description of something? Is there a sense of belonging or connection to a place or community?'
}
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
abbrev_questions Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/neuro/analyze_helper.py
code served (permissive licence) · get_code("e04694cbb4b82cd5")
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 float; 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 torch

# The function abbrev_questions takes a list of strings (questions) and applies abbreviations to each
# Let's create a simple list of questions as test input

ARGS = {
    'qs': [
        'Does the sentence involve a description of a character?',
        'Is the input express a sense of belonging or connection to a place or community?',
        'Is time mentioned in the input?',
        'Does the text involve an expression of joy?',
    ]
}
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 list, ndim 1, dtype family float — 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
add_computational_args Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/experiments/02_fit_encoding.py
code served (permissive licence) · get_code("9bbefbf1fe49b884")
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 ArgumentParser. 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 argparse
import os
import tempfile

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

# Create mock parser object
parser = argparse.ArgumentParser()

ARGS = {
    'parser': parser
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
add_computational_args Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/experiments/04_fit_top_correlated_q.py
code served (permissive licence) · get_code("51746ff4a1e417aa")
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 ArgumentParser. 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 argparse
import os
import tempfile

# Create a simple argument parser
parser = argparse.ArgumentParser()

# Set up a temporary directory for save_dir
temp_dir = tempfile.gettempdir()

# Define ARGS dict with all parameters for add_computational_args
ARGS = {
    'parser': parser,
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
add_main_args Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/experiments/04_fit_top_correlated_q.py
code served (permissive licence) · get_code("ef3c075565c3b82d")
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 ArgumentParser. 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 argparse

torch.manual_seed(0)

ARGS = {
    'parser': argparse.ArgumentParser()
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
eval_acc Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/experiments/03_finetune.py
code served (permissive licence) · get_code("52cd62735dc91c81")
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 float64, ndim 0, dtype family float; 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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a small mock model that accepts input_ids and attention_mask
class MockTransformerModel(nn.Module):
    def __init__(self, vocab_size=100, hidden_size=8, num_labels=3):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_size)
        self.classifier = nn.Linear(hidden_size, num_labels)
    
    def forward(self, input_ids, attention_mask):
        # input_ids shape: (seq_len,) or (batch, seq_len)
        embedded = self.embedding(input_ids)  # (seq_len, hidden) or (batch, seq_len, hidden)
        if embedded.dim() == 2:
            pooled = embedded.mean(dim=0)  # (hidden,)
        else:
            pooled = embedded.mean(dim=1)  # (batch, hidden)
        logits = self.classifier(pooled)  # (num_labels,) or (batch, num_labels)
        if logits.dim() == 1:
            logits = logits.unsqueeze(0)  # ensure (1, num_labels)
        return logits

model = MockTransformerModel(vocab_size=50, hidden_size=8, num_labels=3)

# Create a data loader as a list of (inputs_dict, labels) tuples
# Each batch contains input_ids and attention_mask
loader = [
    (
        {
            'input_ids': torch.tensor([[5, 10, 15, 20]]),  # (1, 4)
            'attention_mask': torch.tensor([[1, 1, 1, 1]])  # (1, 4)
        },
        torch.tensor([0])
    ),
    (
        {
            'input_ids': torch.tensor([[7, 12, 18, 25]]),  # (1, 4)
            'attention_mask': torch.tensor([[1, 1, 1, 1]])  # (1, 4)
        },
        torch.tensor([1])
    )
]

# Ground truth labels for all samples
gt_labels = np.array([0, 1])

ARGS = {
    'model': model,
    'loader': loader,
    'gt_labels': gt_labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_results Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/neuro/analyze_helper.py
code served (permissive licence) · get_code("989dd5f550055630")
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 tempfile
import pandas as pd
import pickle

# Create a temporary directory with pickle files for testing
temp_dir = tempfile.mkdtemp()

# Create sample DataFrames and save them as pickle files
sample_data_1 = pd.DataFrame({
    'nonlinearity': ['tanh', 'None', None],
    'model': ['model_a', 'model_b', 'model_c'],
    'perc_threshold_fmri': [0.5, 0.6, 0.7]
})

sample_data_2 = pd.DataFrame({
    'nonlinearity': [None, 'tanh'],
    'model': ['model_d', 'model_e'],
    'perc_threshold_fmri': [0.8, 0.9]
})

# Save pickle files (in reverse order since the function reverses the list)
pickle_path_1 = os.path.join(temp_dir, 'results_001.pkl')
pickle_path_2 = os.path.join(temp_dir, 'results_002.pkl')

with open(pickle_path_1, 'wb') as f:
    pickle.dump(sample_data_1, f)

with open(pickle_path_2, 'wb') as f:
    pickle.dump(sample_data_2, f)

ARGS = {
    'save_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, tqdm — 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
retry Ran
ran; our contract draft was wrong, not the code
microsoft/automated-explanations/neuro/agent.py
code served (permissive licence) · get_code("06adac01803951e8")
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 logging
import time
import functools

def retry(max_attempts=3, delay=1, exceptions=(Exception,)):
    def decorator(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            attempts = 0
            while True:
                try:
                    return func(*args, **kwargs)
                except exceptions as e:
                    attempts += 1
                    if attempts >= max_attempts:
                        raise
                    logging.info(f'Attempt {attempts} failed with error: {e}. Retrying in {delay} seconds...')
                    time.sleep(delay)
        return wrapper
    return decorator


class CustomException(Exception):
    pass


class AnotherException(Exception):
    pass


ARGS = {
    "max_attempts": 5,
    "delay": 0.1,
    "exceptions": (CustomException, AnotherException, ValueError),
}
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 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
call_api Not yet run
unverified (harvested, no recorded run)
microsoft/automated-explanations/experiments/05_run_ngrams_gpt.py
code served (permissive licence) · get_code("91e9d8ef7d0f2766")
How it ran

no invocation recorded.

concatenate_running_texts Not yet run
unverified (harvested, no recorded run)
microsoft/automated-explanations/neuro/decoding.py
code served (permissive licence) · get_code("5079aa51ac8e72ac")
How it ran

no invocation recorded.

get_dfs Not yet run
unverified (harvested, no recorded run)
microsoft/automated-explanations/experiments/03_finetune.py
code served (permissive licence) · get_code("5b2f99ad4deb0364")
How it ran

no invocation recorded.

Also present in other papers' code

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

Representations from large language models are highly effective at predicting BOLD fMRI responses to language stimuli. However, these representations are largely opaque: it is unclear what features of the language stimulus drive the response in each brain area. We present generative causal testing (GCT), a framework for generating concise explanations of language selectivity in the brain from predictive models and then testing those explanations in follow-up experiments using LLM-generated stimuli.This approach is successful at explaining selectivity both in individual voxels and cortical regions of interest (ROIs), including newly identified microROIs in prefrontal cortex. We show that explanatory accuracy is closely related to the predictive power and stability of the underlying predictive models. Finally, we show that GCT can dissect fine-grained differences between brain areas with similar functional selectivity. These results demonstrate that LLMs can be used to bridge the widening gap between data-driven models and formal scientific theories.

For agents

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

get_harvested_code_for_paper("2410.00812")
get_code_for_paper("2410.00812")
have("2410.00812")

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

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

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

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

Connect an agent — have() is free.