SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.05849 · ACL · 2022

e-CARE: a New Dataset for Exploring Explainable Causal Reasoning

Ting Liu, Li Du, Bing Qin, Kai Xiong, Xiao Ding

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 7 have no contract verdict; 0 failures of our instrument; 1 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/2205.05849.json · badge: /api/ran/2205.05849.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
Waste-Wood/e-CARE canonical (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
cs_sent Ran
ran on a synthesized input
Waste-Wood/e-CARE/CEQ/CEQ.py
code served (permissive licence) · get_code("f6e9f4a613e31300")
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 float, 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.

import torch
import numpy as np

torch.manual_seed(0)

# Build minimal causes and effects dicts
# causes[word1][word2] = count of (word1, word2) co-occurrences
# effects[word] = {word: count, ...}

causes = {
    "run": {"fast": 150000, "slow": 100000},
    "walk": {"away": 80000, "back": 50000},
    "jump": {"high": 120000}
}

effects = {
    "fast": {"run": 150000, "move": 90000},
    "slow": {"crawl": 70000, "walk": 100000},
    "away": {"escape": 60000, "walk": 80000},
    "back": {"return": 45000, "walk": 50000},
    "high": {"reach": 110000, "jump": 120000},
    "move": {"fast": 90000},
    "crawl": {"slow": 70000},
    "escape": {"away": 60000},
    "return": {"back": 45000},
    "reach": {"high": 110000}
}

# Sentence cause words and effect words (lists of word strings)
s_cause = ["run", "jump"]
s_effect = ["fast", "high"]

ARGS = {
    "s_cause": s_cause,
    "s_effect": s_effect,
    "causes": causes,
    "effects": effects,
    "ALPHA": 0.66,
    "LAMBDA": 1
}
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 float, 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
cs_word Ran
ran on a synthesized input
Waste-Wood/e-CARE/CEQ/CEQ.py
code served (permissive licence) · get_code("9ae2cd8383b77a13")
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 float, 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.

# Analyze the function to understand what it needs:
# - w_cause: a word (string) key for causes dict
# - w_effect: a word (string) key for effects dict
# - causes: dict mapping words to dicts of word->count pairs
# - effects: dict mapping words to dicts of word->count pairs
# - ALPHA: float parameter (default 0.66)
# - LAMBDA: float parameter (default 1)

# The function accesses:
# - causes[w_cause].values() - dict with .values() method
# - effects[w_effect].values() - dict with .values() method
# - causes[w_cause][w_effect] - nested dict access
# - len(causes) - length of causes dict

# Create minimal valid arguments
w_cause = "dog"
w_effect = "bark"

# causes dict: maps words to dicts of co-occurrence counts
causes = {
    "dog": {
        "bark": 150,
        "run": 200,
        "jump": 100
    },
    "cat": {
        "meow": 120,
        "sleep": 180
    }
}

# effects dict: maps words to dicts of co-occurrence counts
effects = {
    "bark": {
        "dog": 150,
        "sound": 50
    },
    "run": {
        "dog": 200,
        "fast": 80
    },
    "meow": {
        "cat": 120,
        "sound": 40
    }
}

ALPHA = 0.66
LAMBDA = 1

ARGS = {
    "w_cause": w_cause,
    "w_effect": w_effect,
    "causes": causes,
    "effects": effects,
    "ALPHA": ALPHA,
    "LAMBDA": LAMBDA
}
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 float, 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
evaluate Ran
ran on a synthesized input
Waste-Wood/e-CARE/code/gpt2_discriminate.py
code served (permissive licence) · get_code("926350da5c986279")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 copy

torch.manual_seed(0)

# Define hyperparameters config
class HPS:
    def __init__(self):
        self.cuda = False
        self.attack_rate = 0.1

# Define a minimal model that matches the function's usage
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.model = nn.Module()
        self.model.transformer = nn.Module()
        # embedding with shape [vocab_size, embedding_dim]
        self.model.transformer.wte = nn.Embedding(10, 4)
        self.linear = nn.Linear(4, 1)
    
    def forward(self, input_ids, attention_mask=None, pos=None):
        # Returns logits of shape [batch_size, 1]
        x = self.model.transformer.wte(input_ids)
        x = x.mean(dim=1)
        logits = self.linear(x)
        return logits

# Create model
model = SimpleModel()

# Create loss function (BCEWithLogitsLoss for binary classification)
loss_function = nn.BCEWithLogitsLoss()

# Create optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create dataloader
# Each batch contains: (input_ids, attention_mask, pos, labels)
# The function processes pairs of samples, so we need an even number
batch_size = 2
seq_length = 3

dataloader = [
    (
        torch.randint(0, 10, (batch_size, seq_length)),  # input_ids
        torch.ones((batch_size, seq_length)),            # attention_mask
        torch.zeros((batch_size, seq_length)),           # pos
        torch.randint(0, 2, (batch_size, 1)).float()    # labels
    ),
    (
        torch.randint(0, 10, (batch_size, seq_length)),
        torch.ones((batch_size, seq_length)),
        torch.zeros((batch_size, seq_length)),
        torch.randint(0, 2, (batch_size, 1)).float()
    )
]

hps = HPS()

ARGS = {
    'hps': hps,
    'model': model,
    'dataloader': dataloader,
    'loss_function': loss_function,
    'optimizer': optimizer
}
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, ndim 1, dtype family float — a tuple 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
evaluation_bleu Ran
ran on a synthesized input
Waste-Wood/e-CARE/conceptual_explanation_generation.py
code served (permissive licence) · get_code("eeae6e4512becabf")
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 float, 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.

import torch
import numpy as np
from nltk.translate.bleu_score import sentence_bleu

torch.manual_seed(0)

# The function expects:
# - golds: dict mapping keys to reference sentences (list of tokens)
# - predictions: dict mapping keys to predicted sentences (list of tokens)

# Create sample tokenized sentences
gold_sentence_1 = ['the', 'cat', 'sat', 'on', 'the', 'mat']
gold_sentence_2 = ['a', 'dog', 'ran', 'fast']

prediction_sentence_1 = ['the', 'cat', 'sat', 'on', 'mat']
prediction_sentence_2 = ['a', 'dog', 'runs', 'quickly']

golds = {
    'key_1': gold_sentence_1,
    'key_2': gold_sentence_2,
}

predictions = {
    'key_1': prediction_sentence_1,
    'key_2': prediction_sentence_2,
}

ARGS = {
    'golds': golds,
    'predictions': predictions,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
evaluation_metrics Ran
ran on a synthesized input
Waste-Wood/e-CARE/causal_reasoning.py
code served (permissive licence) · get_code("d4aeb583dd6498c3")
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 float, 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.

import torch

torch.manual_seed(0)

# gold: a dictionary mapping keys to labels
gold = {
    'sample_0': 1,
    'sample_1': 0,
    'sample_2': 1,
}

# predictions: a dictionary mapping keys to predicted labels
predictions = {
    'sample_0': 1,
    'sample_1': 0,
    'sample_2': 0,
}

ARGS = {
    'gold': gold,
    'predictions': predictions,
}
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 float, 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
shuffle_data Ran
ran on a synthesized input
Waste-Wood/e-CARE/code/adversarial_filtering.py
code served (permissive licence) · get_code("1d79ee29f386b615")
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 random

def create_example(label, ask_for, premise, alternative1, alternative2, general_truth):
    return {
        'label': label,
        'ask-for': ask_for,
        'premise': premise,
        'alternative1': alternative1,
        'alternative2': alternative2,
        'general_truth': general_truth
    }

data = [
    create_example(0, 'cause', 'premise_0_0', 'alt1_0_0', 'alt2_0_0', 'truth_0_0'),
    create_example(1, 'cause', 'premise_1_0', 'alt1_1_0', 'alt2_1_0', 'truth_1_0'),
    create_example(0, 'effect', 'premise_0_1', 'alt1_0_1', 'alt2_0_1', 'truth_0_1'),
    create_example(1, 'effect', 'premise_1_1', 'alt1_1_1', 'alt2_1_1', 'truth_1_1'),
    create_example(0, 'cause', 'premise_0_2', 'alt1_0_2', 'alt2_0_2', 'truth_0_2'),
    create_example(1, 'cause', 'premise_1_2', 'alt1_1_2', 'alt2_1_2', 'truth_1_2'),
    create_example(0, 'effect', 'premise_0_3', 'alt1_0_3', 'alt2_0_3', 'truth_0_3'),
    create_example(1, 'effect', 'premise_1_3', 'alt1_1_3', 'alt2_1_3', 'truth_1_3'),
    create_example(0, 'cause', 'premise_0_4', 'alt1_0_4', 'alt2_0_4', 'truth_0_4'),
    create_example(1, 'cause', 'premise_1_4', 'alt1_1_4', 'alt2_1_4', 'truth_1_4'),
    create_example(0, 'effect', 'premise_0_5', 'alt1_0_5', 'alt2_0_5', 'truth_0_5'),
    create_example(1, 'effect', 'premise_1_5', 'alt1_1_5', 'alt2_1_5', 'truth_1_5'),
    create_example(0, 'cause', 'premise_0_6', 'alt1_0_6', 'alt2_0_6', 'truth_0_6'),
    create_example(1, 'cause', 'premise_1_6', 'alt1_1_6', 'alt2_1_6', 'truth_1_6'),
    create_example(0, 'effect', 'premise_0_7', 'alt1_0_7', 'alt2_0_7', 'truth_0_7'),
    create_example(1, 'effect', 'premise_1_7', 'alt1_1_7', 'alt2_1_7', 'truth_1_7'),
    create_example(0, 'cause', 'premise_0_8', 'alt1_0_8', 'alt2_0_8', 'truth_0_8'),
    create_example(1, 'cause', 'premise_1_8', 'alt1_1_8', 'alt2_1_8', 'truth_1_8'),
    create_example(0, 'effect', 'premise_0_9', 'alt1_0_9', 'alt2_0_9', 'truth_0_9'),
    create_example(1, 'effect', 'premise_1_9', 'alt1_1_9', 'alt2_1_9', 'truth_1_9'),
]

ARGS = {
    'data': data,
    'seed': 42
}
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 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
split_data Ran
ran on a synthesized input
Waste-Wood/e-CARE/code/adversarial_filtering.py
code served (permissive licence) · get_code("84fd5ea65b004807")
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
import numpy as np

torch.manual_seed(0)

# The function split_data takes a data parameter and iterates through it,
# appending items to either a training list or a dev list based on index modulo 10.
# It needs to be indexable with len() and support iteration.

# Create a simple list of distinct items as test data
data = [
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
    torch.randn(2, 4),
]

ARGS = {
    "data": data
}
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 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
tokenize Not yet run
unverified (harvested, no recorded run)
Waste-Wood/e-CARE/CEQ/CEQ.py
code served (permissive licence) · get_code("18181b762f463b24")
How it ran

no invocation recorded.

Also present in other papers' code

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

Understanding causality has vital importance for various Natural Language Processing (NLP) applications. Beyond the labeled instances, conceptual explanations of the causality can provide deep understanding of the causal facts to facilitate the causal reasoning process. However, such explanation information still remains absent in existing causal reasoning resources. In this paper, we fill this gap by presenting a human-annotated explainable CAusal REasoning dataset (e-CARE), which contains over 21K causal reasoning questions, together with natural language formed explanations of the causal questions. Experimental results show that generating valid explanations for causal facts still remains especially challenging for the state-of-the-art models, and the explanation information can be helpful for promoting the accuracy and stability of causal reasoning models.

For agents

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

get_harvested_code_for_paper("2205.05849")
get_code_for_paper("2205.05849")
have("2205.05849")

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

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

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

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

Connect an agent — have() is free.