Paper · 2607.17266 · 2026
Debate-on-Graph: Reliable and Adaptive Reasoning of Large Language Model on Uncertain Knowledge Graph
Xin Chen, Tianxing Wu, Peiji Yu
arXiv · PDF · Open in the Atlas
Code that ran
3 of 3 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; 3 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.
- 0 ran with no instrument failure
0 honoured the contract we drafted, 0 violated it, 0 have no contract verdict
- 3 ran where Syntology's instrument failed
failures of Syntology's instrument, not of the code: 3 where our contract draft was wrong, 0 where the contract check could not run
- 0 have no recorded run
- 0 of those that ran constructed an object rather than computing a result
an executed sample whose run returned an instance of its own class (fixture_out_type equals the entry name): the run built an object and did not compute a result
- 0 are pointer only: the body is not served under this paper's link
"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/2607.17266.json · badge: /api/ran/2607.17266.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.
| Repository | Role | Ran |
|---|
| seucoin/Debate-on-Graph |
canonical (classifier label) classifier basis: census |
3 ran · 0 no recorded run |
| Function | Status | Where it lives |
|---|
| debater_extract_letter |
Ran ran; our contract draft was wrong, not the code |
seucoin/Debate-on-Graph/utils.py code served (permissive licence) · get_code("4d221e4225a71d5a") How it ranRan 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 re
RE_CSQA_DEBATER = RE_CSQA_NO_DEBATE = re.compile('The answer is:\\s*([ABCDE])', re.IGNORECASE)
RE_CSQA = re.compile('\\b([ABCDE])\\b')
RE_OBQA_DEBATER = RE_OBQA_NO_DEBATE = re.compile('The answer is:\\s*([ABCD])', re.IGNORECASE)
RE_OBQA = re.compile('\\b([ABCD])\\b')
RE_CSQA2_DEBATER = RE_CSQA2_NO_DEBATE = re.compile('The answer is:\\s*(Yes|No)', re.IGNORECASE)
RE_CSQA2 = re.compile('(Yes|No)')
RE_MEDQA_DEBATER = RE_MEDQA_NO_DEBATE = re.compile('The answer is:\\s*([ABCD])', re.IGNORECASE)
RE_MEDQA = re.compile('\\b([ABCD])\\b')
def extract_letter(dataset: str, text: str) -> str:
if dataset == 'OBQA':
all_matches = RE_OBQA.findall(text)
elif dataset == 'CSQA':
all_matches = RE_CSQA.findall(text)
elif dataset == 'CSQA_2.0':
all_matches = RE_CSQA2.findall(text)
elif dataset == 'MEDQA':
all_matches = RE_MEDQA.findall(text)
else:
raise ValueError(f'Invalid dataset: {dataset}')
if all_matches:
return all_matches[-1].upper()
return 'Z'
def debater_extract_letter(dataset: str, text: str) -> str:
if dataset == 'OBQA':
match = RE_OBQA_DEBATER.search(text)
elif dataset == 'CSQA':
match = RE_CSQA_DEBATER.search(text)
elif dataset == 'CSQA_2.0':
match = RE_CSQA2_DEBATER.search(text)
elif dataset == 'MEDQA':
match = RE_MEDQA_DEBATER.search(text)
else:
raise ValueError(f'Invalid dataset: {dataset}')
if match:
answer = match.group(1).upper()
return answer
else:
return extract_letter(dataset, text)
ARGS = {
'dataset': 'CSQA',
'text': 'The answer is: A. This is a test response with multiple options A B C D E.'
}
- 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
|
| get_question_and_options |
Ran ran; our contract draft was wrong, not the code |
seucoin/Debate-on-Graph/utils.py code served (permissive licence) · get_code("f9f2dcce0d65bd93") How it ranRan 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. 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 typing import List, Dict, Any, Optional
torch.manual_seed(0)
# Create sample question dictionaries for different datasets
# OBQA format question
obqa_question = {
'question_stem': 'What is the capital of France?',
'choices': {
'label': ['A', 'B', 'C', 'D'],
'text': ['Paris', 'London', 'Berlin', 'Madrid']
}
}
# CSQA format question
csqa_question = {
'question': 'Who is the president of the United States?',
'choices': {
'label': ['A', 'B', 'C', 'D'],
'text': ['Joe Biden', 'Donald Trump', 'Barack Obama', 'George Washington']
}
}
# Other dataset format question
other_question = {
'question': 'Is water wet?'
}
ARGS = {
'dataset': 'OBQA',
'q': obqa_question
}
- 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, 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
|
| moderator_extract_letter |
Ran ran; our contract draft was wrong, not the code |
seucoin/Debate-on-Graph/utils.py code served (permissive licence) · get_code("a1cd290aa3a56e02") How it ranRan 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 re
RE_CSQA_MODERATOR = re.compile('The final decision is:\\s*([ABCDE])', re.IGNORECASE)
RE_CSQA = re.compile('\\b([ABCDE])\\b')
RE_OBQA_MODERATOR = re.compile('The final decision is:\\s*([ABCD])', re.IGNORECASE)
RE_OBQA = re.compile('\\b([ABCD])\\b')
RE_CSQA2_MODERATOR = re.compile('The final decision is:\\s*(Yes|No)', re.IGNORECASE)
RE_CSQA2 = re.compile('(Yes|No)')
RE_MEDQA_MODERATOR = re.compile('The final decision is:\\s*([ABCD])', re.IGNORECASE)
RE_MEDQA = re.compile('\\b([ABCD])\\b')
def extract_letter(dataset: str, text: str) -> str:
if dataset == 'OBQA':
all_matches = RE_OBQA.findall(text)
elif dataset == 'CSQA':
all_matches = RE_CSQA.findall(text)
elif dataset == 'CSQA_2.0':
all_matches = RE_CSQA2.findall(text)
elif dataset == 'MEDQA':
all_matches = RE_MEDQA.findall(text)
else:
raise ValueError(f'Invalid dataset: {dataset}')
if all_matches:
return all_matches[-1].upper()
return 'Z'
def moderator_extract_letter(dataset: str, text: str) -> str:
if dataset == 'OBQA':
match = RE_OBQA_MODERATOR.search(text)
elif dataset == 'CSQA':
match = RE_CSQA_MODERATOR.search(text)
elif dataset == 'CSQA_2.0':
match = RE_CSQA2_MODERATOR.search(text)
elif dataset == 'MEDQA':
match = RE_MEDQA_MODERATOR.search(text)
else:
raise ValueError(f'Invalid dataset: {dataset}')
if match:
answer = match.group(1).upper()
return answer
else:
return extract_letter(dataset, text)
ARGS = {
'dataset': 'CSQA',
'text': 'The final decision is: B'
}
- 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
|
Also present in other papers' code
Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 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 3 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
Large language models (LLMs) have demonstrated remarkable capabilities in natural language processing. However, LLMs often suffer from hallucinations and lack of relevant knowledge when dealing with question answering (QA) tasks. To mitigate these issues, knowledge graphs (KGs) have been utilized to enhance LLM reasoning. Nevertheless, KGs often contain noise and errors, while existing KG-enhanced LLM approaches are generally unable to identify and filter such noisy and erroneous content, which can instead amplify hallucinations and pose challenges for reliable reasoning. Uncertain knowledge graphs (UKGs), which associate each triple with a confidence score to quantify uncertainty, offer a promising direction to address this challenge. Compared with prior work, we investigate how to leverage UKGs to support LLMs for QA. We propose Debate-on-Graph (DoG), a new framework that enables LLMs and UKGs to collaborate adaptively for reliable reasoning. Specifically, we first design a heuristic search algorithm tailored for UKGs to extract reliable and question-relevant subgraphs, thereby reducing noise and errors in retrieved knowledge. We then introduce a Multi-Agent Debate mechanism, which yields reliable answers through adaptive adversarial debates, aiming to fully exploit the knowledge in UKGs while preserving the reliability of retrieved evidence. Extensive experiments on four benchmark QA datasets show that DoG achieves state-of-the-art performance over existing LLM reasoning methods and KG-based baselines, while enabling reliable and adaptive reasoning. Our code is available at https://github.com/seucoin/Debate-on-Graph.
For agents
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2607.17266")
get_code_for_paper("2607.17266")
have("2607.17266")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2607.17266.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2607.17266)
Connect an agent — have() is free.