SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.02698 · AAAI · 2024

Causal Walk: Debiasing Multi-Hop Fact Verification with Front-Door Adjustment

Linhai Zhang, Deyu Zhou, Congzhi Zhang

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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; 4 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2403.02698.json · badge: /api/ran/2403.02698.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
zcccccz/CausalWalk canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
convert_examples_to_features Ran
ran; our contract draft was wrong, not the code
zcccccz/CausalWalk/data_load_utils.py
code served (permissive licence) · get_code("dd7effcbb9b3902f")
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

torch.manual_seed(0)

# Stand-in tokenizer class
class SimpleTokenizer:
    def __init__(self):
        self.vocab = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
            'hello': 1,
            'world': 2,
            'this': 3,
            'is': 4,
            'a': 5,
            'test': 6,
            'claim': 7,
            'evidence': 8,
        }
    
    def tokenize(self, text):
        if text is None:
            return None
        # Simple whitespace tokenization
        return text.lower().split()
    
    def convert_tokens_to_ids(self, tokens):
        ids = []
        for token in tokens:
            ids.append(self.vocab.get(token, 0))
        return ids

# Stand-in Example class
class Example:
    def __init__(self, unique_id, text_a, text_b, label, index, is_claim, is_evidence):
        self.unique_id = unique_id
        self.text_a = text_a
        self.text_b = text_b
        self.label = label
        self.index = index
        self.is_claim = is_claim
        self.is_evidence = is_evidence

# Create examples
examples = [
    Example(
        unique_id=0,
        text_a="hello world this is a test",
        text_b="this is evidence",
        label=1,
        index=0,
        is_claim=True,
        is_evidence=False
    ),
    Example(
        unique_id=1,
        text_a="claim test",
        text_b=None,
        label=0,
        index=1,
        is_claim=False,
        is_evidence=True
    ),
]

tokenizer = SimpleTokenizer()
seq_length = 16

ARGS = {
    'examples': examples,
    'seq_length': seq_length,
    'tokenizer': tokenizer,
}
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 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
correct_prediction Ran
ran; our contract draft was wrong, not the code
zcccccz/CausalWalk/train_causal_walk_fever_2way.py
code served (permissive licence) · get_code("b63e4ee270dfdefa")
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 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 torch.nn as nn

torch.manual_seed(0)

# The function expects:
# - output: a tensor with .max(1) method that returns (values, indices)
# - labels: a tensor that can be compared with preds using .eq()

# Create a small batch of logits/scores (batch_size=2, num_classes=4)
output = torch.randn(2, 4)

# Create corresponding labels (batch_size=2)
labels = torch.tensor([1, 3], dtype=torch.long)

ARGS = {
    "output": output,
    "labels": labels,
}
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 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
init_logger Ran
ran; our contract draft was wrong, not the code
zcccccz/CausalWalk/utils.py
code served (permissive licence) · get_code("44cae70d89ff61d4")
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 RootLogger. 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 tempfile
import os

# Create a temporary directory for log files
temp_dir = tempfile.gettempdir()
log_file_path = os.path.join(temp_dir, "test_log.txt")

ARGS = {
    "log_file": log_file_path
}
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 RootLogger — a RootLogger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RootLogger 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
read_examples Ran
ran; our contract draft was wrong, not the code
zcccccz/CausalWalk/data_load_utils.py
code served (permissive licence) · get_code("bc402a7c004d24b7")
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 json
import tempfile
import os

# Create a temporary input file with sample data
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, "test_input.jsonl")

# Write sample JSONL data
sample_data = [
    {
        "index": 0,
        "claim": "The Earth is round",
        "label": "SUPPORTS",
        "evidences": ["The Earth appears round from space", "Gravity causes spherical shapes"],
        "evi_labels": [1, 1]
    },
    {
        "index": 1,
        "claim": "Water freezes at 0 degrees Celsius",
        "label": "SUPPORTS",
        "evidences": ["Freezing point of water is 0C at sea level"],
        "evi_labels": [1]
    }
]

with open(input_file, 'w', encoding='utf-8') as f:
    for item in sample_data:
        f.write(json.dumps(item) + '\n')

# Define ARGS
ARGS = {
    "input_file": input_file,
    "max_evi_num": 3
}
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
load_graph_data Not yet run
unverified (harvested, no recorded run)
zcccccz/CausalWalk/utils.py
code served (permissive licence) · get_code("1881b09a7e0581f0")
How it ran

no invocation recorded.

merage_graph Not yet run
unverified (harvested, no recorded run)
zcccccz/CausalWalk/utils.py
code served (permissive licence) · get_code("5ab6dd7b8f081c6a")
How it ran

no invocation recorded.

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, 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 6 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-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

Multi-hop fact verification aims to detect the veracity of the given claim by integrating and reasoning over multiple pieces of evidence. Conventional multi-hop fact verification models are prone to rely on spurious correlations from the annotation artifacts, leading to an obvious performance decline on unbiased datasets. Among the various debiasing works, the causal inference-based methods become popular by performing theoretically guaranteed debiasing such as casual intervention or counterfactual reasoning. However, existing causal inference-based debiasing methods, which mainly formulate fact verification as a single-hop reasoning task to tackle shallow bias patterns, cannot deal with the complicated bias patterns hidden in multiple hops of evidence. To address the challenge, we propose Causal Walk, a novel method for debiasing multi-hop fact verification from a causal perspective with front-door adjustment. Specifically, in the structural causal model, the reasoning path between the treatment (the input claim-evidence graph) and the outcome (the veracity label) is introduced as the mediator to block the confounder. With the front-door adjustment, the causal effect between the treatment and the outcome is decomposed into the causal effect between the treatment and the mediator, which is estimated by applying the idea of random walk, and the causal effect between the mediator and the outcome, which is estimated with normalized weighted geometric mean approximation. To investigate the effectiveness of the proposed method, an adversarial multi-hop fact verification dataset and a symmetric multi-hop fact verification dataset are proposed with the help of the large language model. Experimental results show that Causal Walk outperforms some previous debiasing methods on both existing datasets and the newly constructed datasets. Code and data will be released at https://github.com/zcccccz/CausalWalk.

For agents

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

get_harvested_code_for_paper("2403.02698")
get_code_for_paper("2403.02698")
have("2403.02698")

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

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

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

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

Connect an agent — have() is free.