SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.08397 · 2026

TrustMargin: Training-Free Arbitration between Parametric Memory and Retrieved Evidence in Large Language Models

Ningyuan Li, Yi Shan, Yunhao Bai, Jingyan Xu, Hong Shi, Penghui Liu, Xueyang Liu

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2606.08397.json · badge: /api/ran/2606.08397.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
mojixu/TrustMargin community
Papers with Code archive
11 ran · 0 no recorded run
FunctionStatusWhere it lives
Block Ran
ran on a synthesized input · constructed an object; no result was computed
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("7b64fbe122b83e35")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ModelBox Ran
ran on a synthesized input · constructed an object; no result was computed
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("e968ea82236a8565")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Segment Ran
ran on a synthesized input · constructed an object; no result was computed
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("b3fba840a5525753")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

TrustMarginModelBox Ran
ran on a synthesized input · constructed an object; no result was computed
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("55a52452866a39c6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

_clean_answer Ran
ran; our contract draft was wrong, not the code
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("cd222b6996af1e97")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_prompt Ran
ran; our contract draft was wrong, not the code
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("1d8f494789547560")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_pred Ran
ran; our contract draft was wrong, not the code
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("34edfa063cd35f41")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

f1_score Ran
ran, honoured the contract we drafted
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("4366274c4d602004")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize_answer Ran
ran; our contract draft was wrong, not the code
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("3dc410d21f1c3741")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

replace_speical_span Ran
ran; our contract draft was wrong, not the code
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("2558981e15eeb126")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

token_f1_value Ran
ran, honoured the contract we drafted
mojixu/TrustMargin/src/trustmargin.py
pointer only (licence: NONE) · get_code("efd8aae7b957a92b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mojixu/TrustMargin when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

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

Large language models answer knowledgeintensive questions using both parametric memory and retrieved evidence, but neither source is uniformly reliable. Retrieval can fill knowledge gaps, yet distracting passages may override correct closed-book answers. We study this post-generation conflict as answer-level source arbitration: given Direct and RAG answers from the same frozen model, decide which source to trust. We propose TRUSTMARGIN, a trainingfree, plug-and-play arbitration layer that scores the two existing candidates with the model's own likelihoods. It combines a parametric-prior margin, which tests whether memory accepts the retrieved answer, with an evidence-binding margin, which discounts passage-only salience and measures question-specific support. TRUSTMAR-GIN selects between Direct and RAG without fine-tuning, external judges, or additional generation. Across 2WIKIMQA and CWQA with three LLaMA scales, TRUSTMARGIN consistently improves over Direct generation and BM25-RAG, recovers part of the Direct/RAG oracle gap, and generalizes to multiple training-free RAG pipelines. * Work done during their internships at Peking University. † Corresponding author 1 We have open-sourced all the code and data at: https:// github.com/mojixu/TrustMargin.git. Figure 1. Motivation for answer-level source arbitration. The Direct/RAG oracle exposes substantial candidate-set headroom across model scales, while disagreement cases are split between Direct-better and BM25-RAG-better examples. The bottleneck is therefore not whether retrieval is globally useful, but when the retrieved answer should override parametric memory.

For agents

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

get_harvested_code_for_paper("2606.08397")
get_code_for_paper("2606.08397")
have("2606.08397")

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

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

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

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

Connect an agent — have() is free.