SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.04350 · NeurIPS · 2023

CLADDER: Assessing Causal Reasoning in Language Models

Bernhard Schölkopf, Luigi Gresele, Felix Leeb, Mrinmaya Sachan, Max Kleiman-Weiner, Zhijing Jin, Fernando Gonzalez, Ojasv Kamal, Zhiheng Lyu, Yuen Chen, Kevin Blin

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 11 failures of our instrument; 4 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/2312.04350.json · badge: /api/ran/2312.04350.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
causalNLP/cladder canonical (classifier label)
classifier basis: census
13 ran · 3 no recorded run
causalnlp/cladder canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
strong-ai-lab/counterfactual-llm-inference community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Query Ran
ran on a synthesized input · constructed an object; no result was computed
strong-ai-lab/counterfactual-llm-inference/src/causal/counterfactual_inference.py
code served (permissive licence) · get_code("f6b9303334b7eb26")
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, Query: 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 networkx as nx
from typing import List, Union, Optional, Callable

def oracle_fn(node: str) -> str:
    """Mock oracle function that returns node values"""
    return f"value_{node}"

# Create a simple causal graph
graph = nx.DiGraph()
graph.add_nodes_from(["A", "B", "C", "D"])
graph.add_edges_from([("A", "B"), ("B", "C"), ("A", "D")])

# Add node attributes for the graph
for node in graph.nodes():
    graph.nodes[node]["value"] = f"default_{node}"

ARGS = {
    "graph": graph,
    "oracle": oracle_fn,
    "target_node": "C",
    "observation_nodes": ["A"],
    "observation_values": ["obs_value_A"],
    "intervention_nodes": None,
    "intervention_values": None,
    "compute_counterfactuals": False,
    "traversal_cutoff": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Query — 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 Query 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
convert_to_norm Ran
ran, honoured the contract we drafted
causalNLP/cladder/causalbenchmark/eval/run_alpaca.py
code served (permissive licence) · get_code("a968c2f0fc097703")
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 torch
import numpy as np

torch.manual_seed(0)

# The function convert_to_norm takes a single parameter 'value'
# It converts the value to a string, lowercases it, strips whitespace and quotes,
# then checks if it starts with 'yes' or 'no' prefixes
# Returns 1 for 'yes', 0 for 'no', -1 for invalid

# Test with a simple string value
ARGS = {
    'value': 'Yes'
}
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 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
extract_summary_data Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/generator.py
code served (permissive licence) · get_code("1f6cf03d7898a1a8")
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
import numpy as np
from tqdm import tqdm

# Create sample data that matches the function's expectations
data = [
    {
        'meta': {
            'story_id': 'story_001',
            'graph_id': 'graph_001',
            'query_type': 'causal',
            'simpson': False,
            'variable_mapping': {'x': 'y'}
        },
        'sensical': True,
        'answer': 'yes',
        'background': 'Some background text',
        'given_info': 'Some given information',
        'question': 'Is this true?',
        'reasoning': 'Because of this reason',
    },
    {
        'meta': {
            'story_id': 'story_002',
            'graph_id': 'graph_002',
            'query_type': 'counterfactual',
            'simpson': True,
            'variable_mapping': {}
        },
        'sensical': False,
        'answer': 'no',
        'background': 'Another background',
        'given_info': 'More info',
        'question': 'Is that true?',
        'reasoning': 'For another reason',
    }
]

ARGS = {
    'data': data,
    'pbar': True
}
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 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
find_gold Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/formatting.py
code served (permissive licence) · get_code("50bbddac8ac5110e")
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

# Create a small RNG (numpy random generator)
rng = np.random.RandomState(seed=42)

# Create options dict with combo keys mapping to lists of UIDs
options = {
    "combo_a": [0, 1, 2, 3, 4],
    "combo_b": [10, 11, 12, 13, 14, 15],
    "combo_c": [20, 21, 22, 23]
}

# num should be a positive integer, and at most the minimum length of any uid list
num = 3

ARGS = {
    "options": options,
    "num": num,
    "rng": rng
}
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
format_prompt Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/eval/generate_data_llama.py
code served (permissive licence) · get_code("a5a90249b782a1b6")
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 numpy as np

torch.manual_seed(0)

datum = {
    'background': '  The Earth orbits the Sun.  ',
    'given_info': '  This takes approximately 365 days.  ',
    'question': '  Does the Earth complete one full orbit in a year?  '
}

system_prompt = 'You are a helpful assistant answering factual questions.'

ARGS = {
    'datum': datum,
    'system_prompt': system_prompt
}
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 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
generate_all_bit_strings Ran
ran, honoured the contract we drafted
causalNLP/cladder/causalbenchmark/util.py
code served (permissive licence) · get_code("13efc95e9f29e8d6")
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 2, dtype family int, shape (8, 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

# The function takes n (length of bit strings) and dtype parameters
# n should be a positive integer
# dtype should be a numpy dtype

ARGS = {
    "n": 3,
    "dtype": int
}
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 2, dtype family int, shape (8, 3) — shape (8, 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
generate_prompt Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/eval/run_alpaca.py
code served (permissive licence) · get_code("d9793b16bbddeedb")
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

# Set random seed for reproducibility
torch.manual_seed(0)

# Define arguments for generate_prompt function
ARGS = {
    'instruction': 'Summarize the following text in one sentence.',
    'input_ctxt': 'The quick brown fox jumps over the lazy dog. This is a classic pangram used in typography and font testing.'
}
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
generate_prompts Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/eval/generate_data_llama.py
code served (permissive licence) · get_code("9a82e2d14a589b26")
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 2, 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.

# Setup code for format_prompt and generate_prompts

# Define the system prompt
system_prompt = "You are a helpful assistant answering yes/no questions based on given information."

# Define sample data
data = [
    {
        'question_id': 'q1',
        'answer': 'Yes',
        'rung': 1,
        'background': 'In a typical garden, plants need water and sunlight to grow.',
        'given_info': 'A tomato plant is placed in a sunny location.',
        'question': 'Will the tomato plant grow if given adequate water?'
    },
    {
        'question_id': 'q2',
        'answer': 'No',
        'rung': 2,
        'background': 'Water boils at 100 degrees Celsius at sea level.',
        'given_info': 'A pot of water is heated to 80 degrees Celsius.',
        'question': 'Is the water boiling?'
    }
]

# Construct ARGS dictionary
ARGS = {
    'data': data,
    'system_prompt': system_prompt
}
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 list, ndim 2, 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
getOriginalDataset Ran
ran; our contract draft was wrong, not the code
causalnlp/cladder/causalbenchmark/eval/eval_llms.py
code served (permissive licence) · get_code("df7bdd730e865d39")
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) 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 json
import tempfile
import os

# Create a temporary JSON file with sample data
sample_data = [
    {
        "ID": "q1",
        "background": "In a study of treatment effects",
        "given_info": "we observed that patients who received treatment X showed improvement",
        "question": "Does treatment X cause improvement?",
        "sensical": True,
        "answer": "Yes",
        "meta": {
            "query": {
                "rung": "3",
                "query_type": "causal"
            }
        }
    },
    {
        "ID": "q2",
        "background": "Consider a scenario with two variables",
        "given_info": "Variable A and Variable B are correlated",
        "question": "Does A cause B?",
        "sensical": True,
        "answer": "No",
        "meta": {
            "query": {
                "rung": "2",
                "query_type": "observational"
            }
        }
    },
    {
        "ID": "q3",
        "background": "In a randomized controlled trial",
        "given_info": "the control group showed no change",
        "question": "What is the treatment effect?",
        "sensical": False,
        "answer": "Unknown",
        "meta": {
            "query": {
                "rung": "1",
                "query_type": "experimental"
            }
        }
    }
]

# Create temporary file
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
json.dump(sample_data, temp_file)
temp_file.close()

ARGS = {
    "originalFile": temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas, sklearn — 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
getOriginalDataset Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/eval/eval_llms.py
code served (permissive licence) · get_code("130d3a3bae1d92a1")
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 json
import tempfile
import os

# Create a temporary JSON file with sample data
sample_data = [
    {
        "ID": "q1",
        "background": "In a clinical trial, patients receive either treatment A or a placebo.",
        "given_info": "We observe that patients receiving treatment A have better outcomes.",
        "question": "Does treatment A cause better outcomes?",
        "sensical": True,
        "answer": "Yes",
        "meta": {
            "query": {
                "rung": "2",
                "query_type": "causal"
            }
        }
    },
    {
        "ID": "q2",
        "background": "A study examines the relationship between education and income.",
        "given_info": "People with higher education tend to have higher incomes.",
        "question": "Does education cause higher income?",
        "sensical": True,
        "answer": "Partially",
        "meta": {
            "query": {
                "rung": "1",
                "query_type": "associational"
            }
        }
    }
]

# Create a temporary file
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
json.dump(sample_data, temp_file)
temp_file.close()

ARGS = {
    "originalFile": temp_file.name
}
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 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
parse_given_info Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/util.py
code served (permissive licence) · get_code("94c9fff6118c5bb5")
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 numpy as np

# Analyzing parse_given_info:
# - Takes 'info' parameter which is a dict
# - Keys are strings that get parsed by parse_mechanism_str
# - Values are array-like that get converted to numpy arrays
# - The function iterates over info.items() and processes each

# Constructing a valid info dict:
# - Keys should be mechanism strings like "P(var)" or "P(var|parent1,parent2)"
# - Values should be arrays of probabilities

info = {
    "P(X)": [0.3, 0.7],
    "P(Y|X)": [0.1, 0.9, 0.4, 0.6],
    "P(Z|X,Y)": [0.2, 0.8, 0.5, 0.5, 0.3, 0.7, 0.6, 0.4]
}

ARGS = {
    "info": info
}
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 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
parse_mechanism_str Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/util.py
code served (permissive licence) · get_code("b5a6553f772f87db")
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

ARGS = {
    "raw": "P(X|Y,Z)"
}
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
read_data Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/eval/generate_data_llama.py
code served (permissive licence) · get_code("030aa16d0b1ec724")
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 json
import tempfile
import os

# Create a temporary JSON file with sample data
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, "test_data.json")

sample_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "data"},
    "key4": 42
}

with open(input_file, 'w') as f:
    json.dump(sample_data, f)

ARGS = {
    "input_file": input_file
}
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 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
sample_data_points Ran
ran; our contract draft was wrong, not the code
causalNLP/cladder/causalbenchmark/eval/data_for_poster.py
code served (permissive licence) · get_code("5bc9c80796cce905")
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 os
import json
import tempfile
import random

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

# Create a sample JSON file with data points grouped by phenomenon
sample_data = [
    {
        "meta": {"phenomenon": "phenomenon_a"},
        "value": 1
    },
    {
        "meta": {"phenomenon": "phenomenon_a"},
        "value": 2
    },
    {
        "meta": {"phenomenon": "phenomenon_a"},
        "value": 3
    },
    {
        "meta": {"phenomenon": "phenomenon_b"},
        "value": 4
    },
    {
        "meta": {"phenomenon": "phenomenon_b"},
        "value": 5
    },
    {
        "meta": {"phenomenon": "phenomenon_c"},
        "value": 6
    }
]

# Write sample data to a temporary file
test_file_path = os.path.join(temp_dir, "test_data.json")
with open(test_file_path, 'w') as f:
    json.dump(sample_data, f)

# Set random seed for reproducibility
random.seed(42)

ARGS = {
    "file_path": test_file_path,
    "num": 2
}
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 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
tf_scorer Ran
ran, honoured the contract we drafted
causalNLP/cladder/causalbenchmark/eval/eval_for_poster.py
code served (permissive licence) · get_code("2210535f064aacd1")
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 torch
import numpy as np

# Analyze the function: tf_scorer takes two string parameters (pred, truth)
# and checks if they belong to certain string families using substring matching.
# The function returns 1 or 0 based on whether pred and truth are in the same family.

# Create valid test cases
pred_value = "yes"
truth_value = "true"

ARGS = {
    "pred": pred_value,
    "truth": truth_value,
}
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 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
eval_direct_dataset Not yet run
unverified (harvested, no recorded run)
causalNLP/cladder/causalbenchmark/eval/eval_for_poster.py
code served (permissive licence) · get_code("39a599872519e96d")
How it ran

no invocation recorded.

eval_graph_dataset Not yet run
unverified (harvested, no recorded run)
causalNLP/cladder/causalbenchmark/eval/eval_for_poster.py
code served (permissive licence) · get_code("f261606cedd728c1")
How it ran

no invocation recorded.

removeIDSNotReady Not yet run
unverified (harvested, no recorded run)
causalnlp/cladder/causalbenchmark/eval/eval_llms.py
code served (permissive licence) · get_code("94cd3da8f74a72a2")
How it ran

no invocation recorded.

removeIDSNotReady Not yet run
unverified (harvested, no recorded run)
causalNLP/cladder/causalbenchmark/eval/eval_llms.py
code served (permissive licence) · get_code("d816d4383e5fec5d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 16 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
generate_prompt 1 other paper
1 dated earlier
2306.05836 (2023-06)
Can Large Language Models Infer Causation from Correlation?

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

The ability to perform causal reasoning is widely considered a core feature of intelligence. In this work, we investigate whether large language models (LLMs) can coherently reason about causality. Much of the existing work in natural language processing (NLP) focuses on evaluating commonsense causal reasoning in LLMs, thus failing to assess whether a model can perform causal inference in accordance with a set of well-defined formal rules. To address this, we propose a new NLP task, causal inference in natural language, inspired by the "causal inference engine" postulated by Judea Pearl et al. We compose a large dataset, CLADDER, with 10K samples: based on a collection of causal graphs and queries (associational, interventional, and counterfactual), we obtain symbolic questions and ground-truth answers, through an oracle causal inference engine. These are then translated into natural language. We evaluate multiple LLMs on our dataset, and we introduce and evaluate a bespoke chain-of-thought prompting strategy, CAUSALCOT. We show that our task is highly challenging for LLMs, and we conduct an in-depth analysis to gain deeper insights into the causal reasoning abilities of LLMs. 1 * Main contributors.

For agents

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

get_harvested_code_for_paper("2312.04350")
get_code_for_paper("2312.04350")
have("2312.04350")

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

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

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

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

Connect an agent — have() is free.