SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.21702 · 2026

From Association to Causation: Improving Retrieval Precision of Retrieval-Augmented Generation via Causal Relations and an Attention Mechanism

Jing Liu, Yongxing Qi, Muchen Jiang

arXiv · PDF · Open in the Atlas

Code that ran

12 of 14 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; 3 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 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/2608.21702.json · badge: /api/ran/2608.21702.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
Silk-Road/causal-rag-rerank canonical (classifier label)
classifier basis: census
12 ran · 2 no recorded run
FunctionStatusWhere it lives
boot_reliability Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Silk-Road/causal-rag-rerank/gate_analysis.py
pointer only (licence: NOASSERTION) · get_code("51fee9c386ba43e8")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

dcg Ran
ran, violated the contract we drafted
Silk-Road/causal-rag-rerank/experiment_reranker.py
pointer only (licence: NOASSERTION) · get_code("3c39341b2d76ace9")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

en_tokenizer Ran
ran; our contract draft was wrong, not the code
Silk-Road/causal-rag-rerank/experiment_causal_rerank.py
pointer only (licence: NOASSERTION) · get_code("180dee8147c41817")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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_kw_tfidf Ran
ran; our contract draft was wrong, not the code
Silk-Road/causal-rag-rerank/experiment_causal_rerank.py
pointer only (licence: NOASSERTION) · get_code("35014f97cf3e5d16")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

gate_decision Ran
ran, violated the contract we drafted
Silk-Road/causal-rag-rerank/gate_analysis.py
pointer only (licence: NOASSERTION) · get_code("ab44db6a027e3532")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

generate_prompt Ran
ran; our contract draft was wrong, not the code
Silk-Road/causal-rag-rerank/rag_pipeline.py
pointer only (licence: NOASSERTION) · get_code("2a94ac4c170abfe3")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

metrics_from_rankings Ran
ran, honoured the contract we drafted
Silk-Road/causal-rag-rerank/experiment_reranker.py
pointer only (licence: NOASSERTION) · get_code("894027225acd0498")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

minmax Ran
ran, violated the contract we drafted
Silk-Road/causal-rag-rerank/experiment_reranker.py
pointer only (licence: NOASSERTION) · get_code("5d8d846d7eea6b45")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

overlap_and_absorption Ran
ran, honoured the contract we drafted
Silk-Road/causal-rag-rerank/gate_signal_analysis.py
pointer only (licence: NOASSERTION) · get_code("f1a03c4c6870d905")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

score_gaps Ran
ran, honoured the contract we drafted
Silk-Road/causal-rag-rerank/gate_signal_analysis.py
pointer only (licence: NOASSERTION) · get_code("70d91dfb31d8760e")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

strict_generate_prompt Ran
ran; our contract draft was wrong, not the code
Silk-Road/causal-rag-rerank/rag_pipeline.py
pointer only (licence: NOASSERTION) · get_code("695e7a21fa49aa80")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

topk_pairs Ran
ran; our contract draft was wrong, not the code
Silk-Road/causal-rag-rerank/gate_signal_analysis.py
pointer only (licence: NOASSERTION) · get_code("fd2b1051f09bda3d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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.

encode_with_cache Not yet run
unverified (harvested, no recorded run)
Silk-Road/causal-rag-rerank/experiment_beir.py
pointer only (licence: NOASSERTION) · get_code("3b044ca27b4e3391")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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. No invocation recorded.

load_dataset Not yet run
unverified (harvested, no recorded run)
Silk-Road/causal-rag-rerank/experiment_beir.py
pointer only (licence: NOASSERTION) · get_code("025d7e46bbafd7b8")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Silk-Road/causal-rag-rerank (NOASSERTION). 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. No invocation recorded.

Also present in other papers' code

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

Retrieval-Augmented Generation (RAG) grounds LLM generation on retrieved documents, but the standard terminal retrieval stage-dense-vector similarity, optionally followed by rerankingoften returns documents that merely share keywords with the query without containing the needed information, a failure mode that grows with the knowledge base. We trace it to a conceptual gap: similarity captures only associational relations, whereas the documents that matter are linked to the query causally. We model the terminal retrieval stage with a causal graph grounded in Reichenbach's common cause principle: the keywords shared by the query and a retrieved document form a latent common cause A, and the document's residual keywords form a latent set B linking the document to the ideal output. Since a retrieved document is a collider (A → d ← B), retrieval itself opens an associational path between the query and B, which licenses a training-free, attention-style re-scoring rule: the cosine similarity between the query embedding and the weighted centroid embedding of B. Unlike causality-enhanced RAG variants that model causal relations inside the knowledge content at the cost of LLMbuilt graphs and extra LLM calls, our graph models the causal structure of the retrieval process itself. On a real 471-document enterprise knowledge base, the method promotes a genuinely relevant guideline from rank 6 to the top 3; on a controlled diagnostic corpus reproducing the keyword-stuffing regime, it improves the mean target rank from 2.88 to 1.25, while a trained cross-encoder reranker barely helps (2.63). Conversely, on three BEIR benchmarks the score underperforms the similarity baseline, delineating the applicability boundary: the method guards the keyword-stuffing regime of growing proprietary knowledge bases and complements neural rerankers; a corpus-level calibration gate selects the correct regime with ≥ 95% reliability. A fully local Qwen3-4B/BGE-M3 testbed demonstrates practical deployability.

For agents

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

get_harvested_code_for_paper("2608.21702")
get_code_for_paper("2608.21702")
have("2608.21702")

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

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

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

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

Connect an agent — have() is free.