{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2608-21702","title":"From Association to Causation: Improving Retrieval Precision of Retrieval-Augmented Generation via Causal Relations and an Attention Mechanism","arxiv_id":"2608.21702","date":"2026-08-22","proceeding":null,"authors":["Jing Liu","Yongxing Qi","Muchen Jiang","Chengnan Hu","Qingqing Peng","Haoming Wang","Yuqing Wang","Yang Yu","Xu Zhang","Ting Wu"],"abstract":"Retrieval-Augmented Generation (RAG) grounds LLM generation on retrieved documents, but the standard terminal retrieval stage--dense-vector similarity, optionally followed by reranking--often returns documents that 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, our graph models the causal structure of the retrieval process itself. On a real 471-document enterprise knowledge base, the method promotes a 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 testbed demonstrates deployability.","url_abs":"https://arxiv.org/abs/2608.21702","url_pdf":"https://arxiv.org/pdf/2608.21702","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2608.21702","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.21702"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/Silk-Road/causal-rag-rerank","reach":null}],"summary":{"ran":12,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":14,"ran":12,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":14,"samples":[{"code_sha256_prefix":"51fee9c386ba43e8","entry":"boot_reliability","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"gate_analysis.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/gate_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"51fee9c386ba43e8"}},{"code_sha256_prefix":"3c39341b2d76ace9","entry":"dcg","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_reranker.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_reranker.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3c39341b2d76ace9"}},{"code_sha256_prefix":"180dee8147c41817","entry":"en_tokenizer","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_causal_rerank.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_causal_rerank.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"180dee8147c41817"}},{"code_sha256_prefix":"35014f97cf3e5d16","entry":"extract_kw_tfidf","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_causal_rerank.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_causal_rerank.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"35014f97cf3e5d16"}},{"code_sha256_prefix":"ab44db6a027e3532","entry":"gate_decision","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"gate_analysis.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/gate_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ab44db6a027e3532"}},{"code_sha256_prefix":"2a94ac4c170abfe3","entry":"generate_prompt","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"rag_pipeline.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/rag_pipeline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"2a94ac4c170abfe3"}},{"code_sha256_prefix":"894027225acd0498","entry":"metrics_from_rankings","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_reranker.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_reranker.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"894027225acd0498"}},{"code_sha256_prefix":"5d8d846d7eea6b45","entry":"minmax","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_reranker.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_reranker.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5d8d846d7eea6b45"}},{"code_sha256_prefix":"f1a03c4c6870d905","entry":"overlap_and_absorption","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"gate_signal_analysis.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/gate_signal_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f1a03c4c6870d905"}},{"code_sha256_prefix":"70d91dfb31d8760e","entry":"score_gaps","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"gate_signal_analysis.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/gate_signal_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"70d91dfb31d8760e"}},{"code_sha256_prefix":"695e7a21fa49aa80","entry":"strict_generate_prompt","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"rag_pipeline.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/rag_pipeline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"695e7a21fa49aa80"}},{"code_sha256_prefix":"fd2b1051f09bda3d","entry":"topk_pairs","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"gate_signal_analysis.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/gate_signal_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"fd2b1051f09bda3d"}},{"code_sha256_prefix":"3b044ca27b4e3391","entry":"encode_with_cache","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_beir.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_beir.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3b044ca27b4e3391"}},{"code_sha256_prefix":"025d7e46bbafd7b8","entry":"load_dataset","repo":"Silk-Road/causal-rag-rerank","repo_kind":"found_in_text","path":"experiment_beir.py","file_url":"https://github.com/Silk-Road/causal-rag-rerank/blob/HEAD/experiment_beir.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"025d7e46bbafd7b8"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}