SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.17144 · NAACL · 2025

FactCG: Enhancing Fact Checkers with Graph-Based Multi-Hop Data

Rui Xu, Mingyu Wang, Deren Lei, Siyao Li, Yaxi Li, Mengya Hu, Ken Archer, Emily Ching, Alex Deng

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 3 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/2501.17144.json · badge: /api/ran/2501.17144.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
derenlei/FactCG canonical (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
FunctionStatusWhere it lives
get_scores Ran
ran on a synthesized input
derenlei/FactCG/benchmark.py
code served (permissive licence) · get_code("c1798c50ae7165bb")
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 torch.nn as nn

torch.manual_seed(0)

class MockScorer(nn.Module):
    def __init__(self, scorer_type):
        super().__init__()
        self.scorer_type = scorer_type
    
    def score(self, contexts=None, claims=None, docs=None, **kwargs):
        # Determine batch size from inputs
        if contexts is not None:
            batch_size = len(contexts)
        elif docs is not None:
            batch_size = len(docs)
        else:
            batch_size = 2
        
        if self.scorer_type == 'factcg':
            return [0.8, 0.6][:batch_size]
        elif self.scorer_type == 'minicheck':
            return ('label', [0.8, 0.6][:batch_size], None, None)
        elif self.scorer_type == 'alignscore':
            return [0.75, 0.65][:batch_size]
        elif self.scorer_type in ['summac_zs', 'summac_cv']:
            return {'scores': [0.7, 0.5][:batch_size]}

class MockArgs:
    def __init__(self, factcg=False, minicheck=False, alignscore=False, summac_zs=False, summac_cv=False):
        self.factcg = factcg
        self.minicheck = minicheck
        self.alignscore = alignscore
        self.summac_zs = summac_zs
        self.summac_cv = summac_cv

# Test each branch
premise_list = ["The sky is blue.", "Cats are animals."]
hypothesis_list = ["Sky is blue.", "Cats exist."]

ARGS = {
    'args': MockArgs(factcg=True),
    'scorer': MockScorer('factcg'),
    'premise_list': premise_list,
    'hypothesis_list': hypothesis_list
}
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
get_threshold Ran
ran on a synthesized input
derenlei/FactCG/benchmark.py
code served (permissive licence) · get_code("758353db78d553c4")
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
import pandas as pd
from unittest.mock import Mock

torch.manual_seed(0)

# Create a mock scorer that returns scores
class MockScorer:
    def score(self, contexts=None, claims=None, docs=None, **kwargs):
        # Return scores for factcg, alignscore
        if contexts is not None or docs is not None:
            num_items = len(contexts) if contexts is not None else len(docs)
            return np.array([0.3, 0.7, 0.5, 0.6][:num_items])
        # Return tuple for minicheck
        return (None, np.array([0.3, 0.7, 0.5, 0.6]), None, None)

class MockScorerDict:
    def score(self, docs, claims):
        return {'scores': np.array([0.3, 0.7, 0.5, 0.6][:len(docs)])}

# Create mock args
class MockArgs:
    def __init__(self):
        self.threshold_setting = 'tune'
        self.factcg = False
        self.minicheck = False
        self.alignscore = True
        self.summac_zs = False
        self.summac_cv = False

# Create development dataset
devset_df = pd.DataFrame({
    'doc': ['document one', 'document two', 'document three', 'document four'],
    'claim': ['claim one', 'claim two', 'claim three', 'claim four'],
    'label': [1, 0, 1, 0],
    'dataset': ['test_dataset', 'test_dataset', 'test_dataset', 'test_dataset']
})

ARGS = {
    'args': MockArgs(),
    'scorer': MockScorer(),
    'devset_df': devset_df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn, 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
run_testset Ran
ran on a synthesized input
derenlei/FactCG/benchmark.py
code served (permissive licence) · get_code("d5dae5b168198604")
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
import pandas as pd
from unittest.mock import Mock

torch.manual_seed(0)

# Create a mock scorer that returns scores based on the args
class MockScorer:
    def score(self, contexts=None, claims=None, docs=None, **kwargs):
        # Return mock probabilities between 0 and 1
        if contexts is not None:
            num_items = len(contexts)
        elif docs is not None:
            num_items = len(docs)
        else:
            num_items = 2
        
        probs = np.array([0.3, 0.7] + [0.5] * (num_items - 2))[:num_items]
        
        # Return different formats based on context
        if hasattr(self, '_return_format'):
            if self._return_format == 'minicheck':
                return None, probs, None, None
            elif self._return_format == 'summac':
                return {'scores': list(probs)}
        
        return probs

# Create args object with factcg enabled
args = Mock()
args.factcg = True
args.minicheck = False
args.alignscore = False
args.summac_zs = False
args.summac_cv = False

scorer = MockScorer()
scorer._return_format = 'factcg'

# Create test dataframe with doc and claim columns
testset_df = pd.DataFrame({
    'doc': ['Document about climate change', 'Another document about politics'],
    'claim': ['Climate is changing', 'Politicians make decisions'],
    'label': [1, 0]
})

threshold = 0.5

ARGS = {
    'args': args,
    'scorer': scorer,
    'testset_df': testset_df,
    'threshold': threshold
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn, 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
get_scores Not yet run
unverified (harvested, no recorded run)
derenlei/FactCG/wice_connected_reasoning.py
code served (permissive licence) · get_code("bec4d78405f6ec00")
How it ran

no invocation recorded.

Also present in other papers' code

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

Prior research on training grounded factuality classification models to detect hallucinations in large language models (LLMs) has relied on public natural language inference (NLI) data and synthetic data. However, conventional NLI datasets are not well-suited for documentlevel reasoning, which is critical for detecting LLM hallucinations. Recent approaches to document-level synthetic data generation involve iteratively removing sentences from documents and annotating factuality using LLMbased prompts. While effective, this method is computationally expensive for long documents and limited by the LLM's capabilities. In this work, we analyze the differences between existing synthetic training data used in state-of-theart models and real LLM output claims. Based on our findings, we propose a novel approach for synthetic data generation, CG2C, that leverages multi-hop reasoning on context graphs extracted from documents. Our fact checker model, FactCG, demonstrates improved performance with more connected reasoning, using the same backbone models. Experiments show it even outperforms GPT-4-o on the LLM-AGGREFACT benchmark with much smaller model size. 1 * Equal contributions. 1 https://github.com/derenlei/FactCG On Thursday, October 26, KERA News reported that the House vote on House Bill 4 resulted in its passage. This institute that owned The Collegian was founded in 1960. A Perfect Murder is an American crime film. Sun Raise Sushi opens Friday, Saturday and Sunday. Cassandra, a patient at Connecticut Children's Medical Center, underwent chemotherapy for lymphoma. Different from SMS, MMS enables sending multimedia content such as images, videos.

For agents

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

get_harvested_code_for_paper("2501.17144")
get_code_for_paper("2501.17144")
have("2501.17144")

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

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

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

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

Connect an agent — have() is free.