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

arXiv cs.AI Papers

Summary

This paper introduces a causal graph-based attention mechanism to enhance retrieval precision in Retrieval-Augmented Generation (RAG) systems, showing improvements in keyword-stuffing regimes of proprietary knowledge bases.

arXiv:2608.21702v1 Announce Type: new 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.
Original Article
View Cached Full Text

Cached at: 08/25/26, 04:23 AM

# Improving Retrieval Precision ofRetrieval-Augmented Generation via Causal Relations and an Attention Mechanism
Source: [https://arxiv.org/html/2608.21702](https://arxiv.org/html/2608.21702)
Yongxing QiMuchen JiangChengnan HuQingqing PengAffiliation:Haoming Wang, Yuqing Wang, Yang Yu, Xu Zhang, Ting WuAffiliation:Hangzhou Innovation Institute, Beihang University, Hangzhou, ChinaEmail:[1530454772@qq\.com](mailto:)

###### 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 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 causeAA, and the document’s residual keywords form a latent setBBlinking the document to the ideal output\. Since a retrieved document is a collider \(A→d←BA\\\!\\rightarrow\\\!d\\\!\\leftarrow\\\!B\), retrieval itself opens an associational path between the query andBB, which licenses a training\-free, attention\-style re\-scoring rule: the cosine similarity between the query embedding and the weighted centroid embedding ofBB\. Unlike causality\-enhanced RAG variants that model causal relations*inside*the knowledge content at the cost of LLM\-built 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%\\geq 95\\%reliability\. A fully local Qwen3\-4B/BGE\-M3 testbed demonstrates practical deployability\.

## 1Introduction

Large language models \(LLMs\) such as the GPT family have advanced rapidly and attracted worldwide attention\. When deployed in vertical domains, however, LLMs suffer from hallucination, and enterprise data is often too sensitive to be used directly for fine\-tuning\. Retrieval\-Augmented Generation \(RAG\)\[[2](https://arxiv.org/html/2608.21702#bib.bib2),[3](https://arxiv.org/html/2608.21702#bib.bib3)\]has therefore become the standard architecture for knowledge\-intensive applications: internal documents and knowledge bases are first vectorized; given a user query, relevant documents are retrieved and injected into the prompt of the LLM, improving the accuracy and reliability of the generated content\.

A conventional RAG system consists of \(i\) a*retriever*that returns a set of candidate text fragments from a large corpus, typically via vector similarity or semantic matching; \(ii\) a*generator*, usually a Transformer\-based LLM, that produces a coherent answer conditioned on the query and the retrieved fragments; and \(iii\) a*fusion mechanism*—concatenation, attention, or related schemes—that combines the retrieved fragments with the generator input\.

The weak point of this architecture is the end of the retrieval stage \(Figure[1](https://arxiv.org/html/2608.21702#S1.F1)\)\. Both industry and academia predominantly compute the similarity between the query vector and knowledge\-base vectors, optionally followed by reranking\. Through empirical study we observed that, as the knowledge base keeps growing, this pipeline increasingly surfaces documents that contain the query*keywords*but are not truly relevant, so the genuinely useful local information never reaches the LLM\. For example, for the query “How to assess the security of cross\-border data transfer?” \(数据出境的安全如何评估\), a conventional retriever ranked an interpretation of an automotive data\-processing guideline within the top 5, simply because it contains more occurrences of the keywords “data”, “cross\-border”, “security”, and “assessment”\. The genuinely relevant national guideline*Information Security Technology—Guidelines for Security Assessment of Cross\-Border Data Transfer*was ranked only 6th: it mentions these keywords mainly in section titles, while the body paragraphs that actually describe the assessment procedure use different vocabulary\.

We trace this failure to a conceptual gap: similarity\-based retrieval identifies*association*, whereas what the user needs is the document that*causally*contains the answer\. This paper makes the following contributions:

- •We formalize the terminal retrieval stage of RAG with a causal graph built on Reichenbach’s common cause principle, and prove a collider\-opening observation: retrieving a document \(A→d←BA\\\!\\rightarrow\\\!d\\\!\\leftarrow\\\!B\) induces an association between the query and the document’s residual keyword setBB—the set that carries the answer\-bearing vocabulary \(Section[3\.2](https://arxiv.org/html/2608.21702#S3.SS2)\)\.
- •We derive from the graph a practical, training\-free re\-scoring rule with the computational form of attention—the cosine similarity between the query embedding and the weighted centroid embedding of latent keyword setBB—together with a complexity analysis showing that the overhead over a conventional pipeline is negligible \(Section[3\.4](https://arxiv.org/html/2608.21702#S3.SS4)\)\.
- •We position the method against recent work on adaptive, corrective, graph\-structured, and causality\-enhanced RAG \(Section[2](https://arxiv.org/html/2608.21702#S2)\), showing that it is, to the best of our knowledge, the only approach that models the causal structure of the retrieval process itself rather than of the knowledge content\.
- •We show that the construction is consistent with the standard assumptions of causal graphical models \(DAG, causal sufficiency, causal Markov, and faithfulness\), and evaluate the method on three levels: a real 471\-document proprietary knowledge base, a controlled diagnostic experiment reproducing the keyword\-stuffing regime, and three public BEIR benchmarks that delineate its applicability boundary, together with a fully local reproduction testbed based on Qwen3\-4B and BGE\-M3 \(Section[4](https://arxiv.org/html/2608.21702#S4)\)\.

An early version of the method was disclosed in a Chinese invention patent application filed in 2024, since granted\[[1](https://arxiv.org/html/2608.21702#bib.bib1)\]\. The present paper gives the full formalization, the theoretical analysis, and the empirical evaluation, including the semantic\-absorption refinement of Section[3\.4](https://arxiv.org/html/2608.21702#S3.SS4)and the public\-benchmark boundary study of Section[4\.5](https://arxiv.org/html/2608.21702#S4.SS5), which go beyond the disclosure\.

document/chunk 1document/chunk 2document/chunk 3⋮\\vdotscandidate setS1S\_\{1\}\(first\-round retrieval\)colliderqueryqqkeyword setAAshared bythe query andS1S\_\{1\}\(latent\)dot product\(attention\)keyword setBBlinking answer\-bearinginformation toS1S\_\{1\}\(latent\)document set 2\(second\-round retrieval\)promptconstructioninstructiontemplateLLMideal outputyy\(unobserved\)12

Figure 1:Unified view of the proposed method at the terminal retrieval stage of RAG \(redrawn in English from the flow–causal diagram in the underlying invention disclosure\[[1](https://arxiv.org/html/2608.21702#bib.bib1)\]\)\. Solid arrows: data flow\. Red dashed arrows: causal directions among the queryqq, the first\-round candidate setS1S\_\{1\}, the ideal outputyy, and the two latent keyword setsAAandBB\(cf\. the abstract causal graph in Figure[2](https://arxiv.org/html/2608.21702#S3.F2)\)\. Step 1 scores each candidate by the attention\-style dot product between the query embedding and the centroid of its residual keyword setBB; step 2 constructs the prompt from the re\-ranked set\. The candidate setS1S\_\{1\}is a collider \(A→d←BA\\\!\\rightarrow\\\!d\\\!\\leftarrow\\\!B\), which justifies the score of step 1 \(Observation[1](https://arxiv.org/html/2608.21702#Thmobservation1)\)\.
## 2Related Work

#### RAG and its retrieval stage\.

RAG was popularized by\[[2](https://arxiv.org/html/2608.21702#bib.bib2)\]and pretraining\-time variants such as REALM\[[4](https://arxiv.org/html/2608.21702#bib.bib4)\]and RETRO\[[5](https://arxiv.org/html/2608.21702#bib.bib5)\], and has become the standard grounding mechanism for LLMs\[[3](https://arxiv.org/html/2608.21702#bib.bib3)\]\. Work on the retrieval stage improves the encoder \(DPR\[[6](https://arxiv.org/html/2608.21702#bib.bib6)\], Contriever\[[7](https://arxiv.org/html/2608.21702#bib.bib7)\], BGE and BGE\-M3\[[8](https://arxiv.org/html/2608.21702#bib.bib8),[9](https://arxiv.org/html/2608.21702#bib.bib9)\]\) and the reranker \(cross\-encoders, ColBERT\-style late interaction\[[10](https://arxiv.org/html/2608.21702#bib.bib10)\]\)\. All of these optimize an associational score estimated from correlated features; none models why a document is relevant\.

#### Adaptive and corrective RAG\.

A recent line of work lets the system decide*when*and*what*to retrieve and how to recover from retrieval errors: Self\-RAG teaches the generator to retrieve on demand and self\-critique via reflection tokens\[[11](https://arxiv.org/html/2608.21702#bib.bib11)\]; FLARE performs forward\-looking active retrieval during generation\[[12](https://arxiv.org/html/2608.21702#bib.bib12)\]; CRAG grades retrieved documents and routes low\-confidence results to corrective actions\[[13](https://arxiv.org/html/2608.21702#bib.bib13)\]; RA\-DIT dual\-instruction\-tunes the retriever and generator\[[14](https://arxiv.org/html/2608.21702#bib.bib14)\]\. These methods improve robustness around the retrieval stage but still score candidates by learned association; the criterion that decides what enters the prompt remains correlational\.

#### Query expansion and hypothetical documents\.

A classical remedy for vocabulary mismatch is to expand the query: relevance feedback and Rocchio’s method\[[15](https://arxiv.org/html/2608.21702#bib.bib15)\], relevance models \(RM3\)\[[16](https://arxiv.org/html/2608.21702#bib.bib16)\], and, more recently, LLM\-generated pseudo\-content such as HyDE\[[17](https://arxiv.org/html/2608.21702#bib.bib17)\]and Query2doc\[[18](https://arxiv.org/html/2608.21702#bib.bib18)\]\. These methods augment the*query*with hypothetical answer\-bearing content and embed the result\. Our construction is the dual viewpoint: rather than hallucinating content on the query side, we distill each candidate*document*into a residual keyword set whose involvement is justified by a causal graph, and score it against the unmodified query\. The two directions are complementary and could be combined\.

#### Term\-centric and learned sparse retrieval\.

Our use of keyword sets is related to term\-centric neural IR: DeepCT re\-weights terms by contextual importance\[[19](https://arxiv.org/html/2608.21702#bib.bib19)\], doc2query/DocT5Query expand documents with predicted queries\[[20](https://arxiv.org/html/2608.21702#bib.bib20)\], and the SPLADE family learns sparse term\-weight representations end to end\[[21](https://arxiv.org/html/2608.21702#bib.bib21)\]\. These methods learn term weights from relevance supervision, i\.e\., from associational signals; we instead*construct*the term sets \(AA,BB\) from the causal structure of the retrieval process, which is training\-free and works on top of any encoder\.

#### Graph\-structured and causality\-enhanced RAG\.

GraphRAG builds an LLM\-extracted entity graph with community summaries for query\-focused global sensemaking\[[22](https://arxiv.org/html/2608.21702#bib.bib22)\]; LightRAG combines graph indexing with dual\-level retrieval for efficiency\[[23](https://arxiv.org/html/2608.21702#bib.bib23)\]; HippoRAG builds a knowledge\-graph memory with Personalized PageRank for associative retrieval\[[24](https://arxiv.org/html/2608.21702#bib.bib24)\]\. Closest to our theme, CausalRAG integrates causal graphs into retrieval by matching the query to graph nodes, expanding along edges, and using an LLM to trace causal paths*within the document content*into a causal summary\[[25](https://arxiv.org/html/2608.21702#bib.bib25)\]; Samarajeewa et al\. similarly retrieve causal graphs in a pre\-retrieval stage\[[26](https://arxiv.org/html/2608.21702#bib.bib26)\]\. The key difference is where the causality lives: these methods model cause–effect relations*inside the knowledge content*\(e\.g\.,*influence tactics*→\\rightarrow*buyer attention*→\\rightarrow*contract award*\), at the price of LLM\-built graphs and additional LLM calls at query time\. We model the causal structure of the*retrieval process itself*—the generative relations among the query, the retrieved set, and the ideal output—and derive a scoring rule from a collider analysis of that structure\. The two are complementary: our re\-ranker could post\-process the candidate sets produced by any of these systems\.

#### Causal inference\.

Reichenbach’s common cause principle states that if two events are positively correlated and neither causes the other, there exists a common cause that screens them off\[[32](https://arxiv.org/html/2608.21702#bib.bib32)\]\. Modern causal discovery formalizes such reasoning through causal graphs under the causal Markov and faithfulness assumptions\[[35](https://arxiv.org/html/2608.21702#bib.bib35),[36](https://arxiv.org/html/2608.21702#bib.bib36),[33](https://arxiv.org/html/2608.21702#bib.bib33),[37](https://arxiv.org/html/2608.21702#bib.bib37)\], and recent work probes how far LLMs can reason from correlation to causation\[[27](https://arxiv.org/html/2608.21702#bib.bib27)\]\. A collider \(X→Z←YX\\rightarrow Z\\leftarrow Y\) blocks the path between its parents marginally, but conditioning on it induces dependence between them—the “explaining away” effect\[[36](https://arxiv.org/html/2608.21702#bib.bib36)\]\. In recommender systems, causal structure has been used to*remove*bias, e\.g\., intervening on popularity confounders via backdoor adjustment\[[28](https://arxiv.org/html/2608.21702#bib.bib28)\]\. We use causal structure in the opposite direction and with no adjustment at all: we exploit the dependence that a collider*creates*between the query and the residual keyword set\.

#### Positioning\.

Taken together, existing work improves RAG retrieval along associational axes—better encoders, rerankers, query expansion, adaptivity, or graph structure—while causality\-enhanced variants model causality inside the knowledge content and pay for it with LLM\-built graphs and per\-query LLM calls\. To the best of our knowledge, no prior work models the causal structure of the retrieval process itself or derives a re\-scoring rule from a collider/common\-cause analysis of that structure\. The present method is simultaneously causally motivated, training\-free, free of extra LLM calls at query time, and orthogonal to all of the above; its target failure mode—keyword\-stuffing false positives in a growing knowledge base—is the regime where purely associational scores degrade\.

## 3Method

### 3\.1Problem Setting and Notation

Letqqbe a user query and𝒦\\mathcal\{K\}a knowledge base ofNNdocuments\. A standard terminal retrieval stage computes dense embeddingsE⁡\(⋅\)∈ℝhE\(\\cdot\)\\in\\mathbb\{R\}^\{h\}\(e\.g\.,h=1,024h\{=\}1\{,\}024for BGE\-M3\), ranks documents by cosine similarity

ssim​\(d\)=cos⁡\(E⁡\(q\),E⁡\(d\)\),s\_\{\\mathrm\{sim\}\}\(d\)\\;=\\;\\cos\\\!\\big\(E\(q\),\\,E\(d\)\\big\),\(1\)optionally applies a reranker, and returns the candidate set

S1=top​\-​k​\(𝒦,ssim\)∩\{d∈𝒦:ssim​\(d\)≥θ\},S\_\{1\}\\;=\\;\\mathrm\{top\}\\text\{\-\}k\(\\mathcal\{K\},\\,s\_\{\\mathrm\{sim\}\}\)\\;\\cap\\;\\big\\\{d\\in\\mathcal\{K\}:s\_\{\\mathrm\{sim\}\}\(d\)\\geq\\theta\\big\\\},\(2\)wheretop​\-​k​\(𝒦,ssim\)\\mathrm\{top\}\\text\{\-\}k\(\\mathcal\{K\},s\_\{\\mathrm\{sim\}\}\)returns thekkdocuments with the highest scores andθ\\thetais a similarity threshold \(document set 1\)\. Throughout,E⁡\(s\)E\(s\)denotes the encoder’s embedding of any text spanss; in particular, for a keyword termtt,E⁡\(t\)E\(t\)is the embedding of that term treated as a short text\. The failure mode we address:S1S\_\{1\}contains both the documents that genuinely hold the needed information and documents that merely share surface keywords withqq\. Our goal is to re\-rankS1S\_\{1\}so that genuinely informative documents are promoted\. We writekw⁡\(⋅\)\\mathrm\{kw\}\(\\cdot\)for a weighted keyword extractor that maps a text to a set of \(term, weight\) pairs\{\(t,λt\)\}\\\{\(t,\\lambda\_\{t\}\)\\\}; the instantiation is flexible \(TF–IDF, TextRank, KeyBERT, or an LLM\-based extractor\) and is not the contribution of this work\. Duplicate terms returned by the extractor \(e\.g\., surfacing from different chunks\) are collapsed into a single entry with their weights summed, soKqK\_\{q\}andKdK\_\{d\}below are proper sets\.

### 3\.2A Causal View of Terminal Retrieval

We introduce two latent variables defined over keyword sets:

- •Latent setAA— the keywords shared by the queryqqand a retrieved documentd∈S1d\\in S\_\{1\}\. Bothqqandddcan be viewed as generated fromAA\(they are*about*these keywords\), soAAis a common cause:A→qA\\rightarrow qandA→dA\\rightarrow d\.
- •Latent setBB— the document keywords that remain after removingAA, together with their weights\. These keywords connect the retrieved document to the information the user actually wants;BBgenerates both the document and the ideal output textyy:B→dB\\rightarrow dandB→yB\\rightarrow y\.

The*ideal output*yyis the answer an ideal system would produce; it is unobserved at retrieval time\. Sinceyyis generated from the query and keyword setBB, we haveq→y←Bq\\rightarrow y\\leftarrow B; and since a retrieved document is generated from both latent keyword sets, we haveA→d←BA\\rightarrow d\\leftarrow B\. Bothddandyyare therefore*colliders*in the graph \(Figure[2](https://arxiv.org/html/2608.21702#S3.F2)\)\.

Two structural facts follow\. First,*screening off*: conditioning on the common causeAArendersqqandddindependent \(the remaining pathq→y←B→dq\\\!\\rightarrow\\\!y\\\!\\leftarrow\\\!B\\\!\\rightarrow\\\!dis blocked by the unconditioned collideryy\), and conditioning on both latent variables\{A,B\}\\\{A,B\\\}rendersddandyyindependent \(the pathsd←B→yd\\\!\\leftarrow\\\!B\\\!\\rightarrow\\\!yandd←A→q→yd\\\!\\leftarrow\\\!A\\\!\\rightarrow\\\!q\\\!\\rightarrow\\\!yare blocked at the conditioned forks\)\. This matches Reichenbach’s characterization of common causes\. Second, and operationally more important, is the collider\-opening effect:

###### Observation 1\(Retrieval opens the query–BBpath\)\.

In the graph of Figure[2](https://arxiv.org/html/2608.21702#S3.F2), under the causal Markov and faithfulness assumptions:

1. \(i\)qqandBBare marginally independent: the only two paths between them,q←A→d←Bq\\leftarrow A\\rightarrow d\\leftarrow Bandq→y←Bq\\rightarrow y\\leftarrow B, are both blocked by colliders \(ddandyyrespectively\)\.
2. \(ii\)qqandBBare dependent givend∈S1d\\in S\_\{1\}: conditioning on the retrieved document \(the collider\) opens the pathq←A→d←Bq\\leftarrow A\\rightarrow d\\leftarrow B\.

###### Proof sketch\.

Enumerate theqq–BBpaths in Figure[2](https://arxiv.org/html/2608.21702#S3.F2)\. Marginally,ddis a collider onq←A→d←Bq\\\!\\leftarrow\\\!A\\\!\\rightarrow\\\!d\\\!\\leftarrow\\\!Bandyyis a collider onq→y←Bq\\\!\\rightarrow\\\!y\\\!\\leftarrow\\\!B; both paths are blocked, soq⟂Bq\\perp Bby d\-separation, and independence follows by the Markov assumption\. Givendd, the collider on the first path no longer blocks it, andAAis an unconditioned fork on that path; hence the path is active,q⟂̸B\|dq\\not\\perp B\\mid dby d\-connection, and dependence follows by faithfulness\. ∎

Observation[1](https://arxiv.org/html/2608.21702#Thmobservation1)is the central inference based on the causal analysis:*once a document has been retrieved, the query and the document’s residual keyword setBBare expected to be associated*, and this association is informative becauseBBexcludes the keywordsAAthat merely make the document look superficially similar to the query\. Retrieval itself acts as the conditioning event that turns this association on\.

AAqqd∈S1d\\in S\_\{1\}BByyFigure 2:Causal graph of the terminal retrieval stage\.qq: user query;dd: a document of the initially retrieved setS1S\_\{1\};yy: the ideal output text \(unobserved\);AA,BB: latent keyword sets\.dd\(A→d←BA\\\!\\rightarrow\\\!d\\\!\\leftarrow\\\!B\) andyy\(q→y←Bq\\\!\\rightarrow\\\!y\\\!\\leftarrow\\\!B\) are colliders\. Marginallyq⟂Bq\\perp B; conditioning on the retrieved documentddopens the pathq←A→d←Bq\\\!\\leftarrow\\\!A\\\!\\rightarrow\\\!d\\\!\\leftarrow\\\!B\(Observation[1](https://arxiv.org/html/2608.21702#Thmobservation1)\), licensing the attention\-style score of Section[3\.4](https://arxiv.org/html/2608.21702#S3.SS4)\.
### 3\.3Consistency with Causal\-Model Assumptions

The construction is consistent with the standard assumptions of causal graphical models, which lends it a principled interpretation rather than an ad\-hoc one:

1. 1\.Directed acyclic graph \(DAG\) assumption\.The relations among the research objects \(qq,dd,yy,AA,BB\) are described by a DAG \(Figure[2](https://arxiv.org/html/2608.21702#S3.F2)\); the generative direction flows from latent keyword sets to observed texts, with no feedback cycles\.
2. 2\.Causal sufficiency assumption\.All direct common causes of any two variables in the variable set are included in the set\[[33](https://arxiv.org/html/2608.21702#bib.bib33),[34](https://arxiv.org/html/2608.21702#bib.bib34)\]: the two latent keyword setsAAandBBare explicitly modeled as the common causes, and remaining influences are treated as independent exogenous variables\.
3. 3\.Causal Markov assumption\.Given a causally sufficient variable set, every variable is independent of its non\-descendants conditional on its parents\[[35](https://arxiv.org/html/2608.21702#bib.bib35)\]; the DAG in Figure[2](https://arxiv.org/html/2608.21702#S3.F2)is a causal graph iff the joint distribution of its nodes satisfies this Markov condition, which the generative story \(texts generated from keyword sets\) respects by construction\.
4. 4\.Causal faithfulness assumption\.Conditional independencies in the joint distribution correspond exactly to d\-separations in the graph\[[36](https://arxiv.org/html/2608.21702#bib.bib36),[37](https://arxiv.org/html/2608.21702#bib.bib37)\]; no accidental cancellations are assumed, so the collider\-induced association of Observation[1](https://arxiv.org/html/2608.21702#Thmobservation1)is a genuine structural property rather than an artifact of a parameterization\.

### 3\.4Scoring Rule and Algorithm

For each candidate documentd∈S1d\\in S\_\{1\}, letKq=kw⁡\(q\)K\_\{q\}=\\mathrm\{kw\}\(q\)andKd=kw⁡\(d\)K\_\{d\}=\\mathrm\{kw\}\(d\)be the weighted keyword sets\. The latent sets are instantiated as

A⁡\(d\)=\{t∈Kd:t∈Kq∨maxu∈Kq⁡cos⁡\(E⁡\(t\),E⁡\(u\)\)≥τ\},B⁡\(d\)=Kd∖A⁡\(d\),A\(d\)\\;=\\;\\big\\\{t\\in K\_\{d\}:t\\in K\_\{q\}\\ \\lor\\ \\max\_\{u\\in K\_\{q\}\}\\cos\\\!\\big\(E\(t\),E\(u\)\\big\)\\geq\\tau\\big\\\},\\qquad B\(d\)\\;=\\;K\_\{d\}\\setminus A\(d\),\(3\)i\.e\.,AAabsorbs not only exact keyword matches but also document keywords that are*semantically*near the query keywords \(absorption thresholdτ\\tau; we useτ=0\.6\\tau\{=\}0\.6in the experiments\), andBBis the document’s*residual*vocabulary once the shared query–document keywords have been absorbed intoAA\. The semantic\-absorption matters in practice: exact string matching leaves near\-synonymous distractor vocabulary inBB, which measurably degrades the score \(Section[4\.4](https://arxiv.org/html/2608.21702#S4.SS4)\)\. We embedBBinto a single vector by its weighted centroid,

vB​\(d\)=∑\(t,λt\)∈B⁡\(d\)λt​E​\(t\)∑\(t,λt\)∈B⁡\(d\)λt,v\_\{B\}\(d\)\\;=\\;\\frac\{\\sum\_\{\(t,\\lambda\_\{t\}\)\\in B\(d\)\}\\lambda\_\{t\}\\,E\(t\)\}\{\\sum\_\{\(t,\\lambda\_\{t\}\)\\in B\(d\)\}\\lambda\_\{t\}\},\(4\)i\.e\., the weighted mean of the term embeddings—the standard way to aggregate word vectors with weights\[[31](https://arxiv.org/html/2608.21702#bib.bib31)\]\. The disclosure underlying this work specifies pooling over the keyword embeddings without fixing the pooling form; the weighted centroid is our instantiation, using the keyword weights that the extraction step provides\. and define the*causal\-attention score*as

sc​\(d\)=cos⁡\(E⁡\(q\),vB​\(d\)\)\.s\_\{c\}\(d\)\\;=\\;\\cos\\\!\\big\(E\(q\),\\,v\_\{B\}\(d\)\\big\)\.\(5\)By Observation[1](https://arxiv.org/html/2608.21702#Thmobservation1),scs\_\{c\}measures exactly the association that the causal graph predicts to exist between the query and the answer\-bearing residual keywords\. It is an attention mechanism whose query–key pairing is causally motivated rather than heuristic\. Documents that merely repeat the query’s keywords have small or emptyBB\(everything informative was absorbed intoAA\) and are demoted; documents whose residual vocabulary carries the answer receive highscs\_\{c\}and are promoted\. Algorithm[1](https://arxiv.org/html/2608.21702#alg1)summarizes the full refinement stage, which appends to a conventional pipeline \(Figure[1](https://arxiv.org/html/2608.21702#S1.F1)\)\.

Algorithm 1Causal\-attention re\-ranking for RAG terminal retrieval0:query

qq; knowledge base

𝒦\\mathcal\{K\}; embedding model

E⁡\(⋅\)E\(\\cdot\); keyword extractor

kw⁡\(⋅\)\\mathrm\{kw\}\(\\cdot\); LLM

1:Compute

E⁡\(q\)E\(q\)and

E⁡\(d\)E\(d\)for

d∈𝒦d\\in\\mathcal\{K\}and form the candidate set

S1S\_\{1\}by Eqs\. \(1\)–\(2\) \(threshold

θ\\theta, optional reranker\)\.

2:Extract the query keyword set

Kq←kw⁡\(q\)K\_\{q\}\\leftarrow\\mathrm\{kw\}\(q\)\(keyword set 1\)\.

3:foreach document \(or chunk\)

d∈S1d\\in S\_\{1\}do

4:Extract the document keyword set

Kd←kw⁡\(d\)K\_\{d\}\\leftarrow\\mathrm\{kw\}\(d\)with weights \(keyword set 2\)\.

5:Construct

A⁡\(d\)A\(d\)and

B⁡\(d\)B\(d\)by Eq\. \(3\); record

\|A\|\|A\|\.

6:Compute

vB​\(d\)v\_\{B\}\(d\)and

sc​\(d\)s\_\{c\}\(d\)by Eqs\. \(4\)–\(5\)\.

7:endfor

8:Re\-rank

S1S\_\{1\}by

scs\_\{c\}\(optionally interpolated with

ssims\_\{\\mathrm\{sim\}\}or

\|A\|\|A\|; a design choice, cf\. Section[5](https://arxiv.org/html/2608.21702#S5)\); output the top documents as the genuinely informative set\.

9:Build the prompt from the selected documents with the instruction template and feed it to the LLM\.

#### Complexity\.

The refinement adds, per query,kkkeyword extractions andk⋅b¯k\\cdot\\bar\{b\}term embeddings, wherek=\|S1\|k=\|S\_\{1\}\|\(single digits to tens in practice\) andb¯\\bar\{b\}is the average size of the residual keyword sets \(tens of terms\)\. This is negligible compared with theO⁡\(N\)O\(N\)document embeddings of the initial retrieval over a corpus ofN≫kN\\gg kdocuments, requires no training or fine\-tuning, and—in contrast to graph\- or causality\-enhanced RAG variants—adds no LLM calls at query time\.

### 3\.5Implementation

A reference implementation was built in Python: the base LLM and the BGE\-M3 embedding model are loaded \(S1\); instruction templates, document loading, data cleaning, foreign\-language translation, document\-splitting, and keyword\-extraction submodules are implemented \(S2\); the local knowledge base is vectorized with BGE\-M3 \(S3\); the candidate setS1S\_\{1\}is retrieved and re\-ranked by the causal\-attention score \(S4–S8\); and the final prompt is constructed and passed to the LLM \(S9\)\. The pipeline is model\-agnostic: the original deployment used a 6B\-parameter open\-source chat model \(ChatGLM3\-6B\), and we additionally rebuilt the full infrastructure on a laptop with Qwen3\-4B as the base model \(which also serves as the local translation module for foreign\-language documents, replacing an earlier commercial translation API\) and BGE\-M3 for embeddings \(Section[4\.3](https://arxiv.org/html/2608.21702#S4.SS3)\)\.

## 4Experiments

### 4\.1Setup and Evaluation Protocol

The knowledge base contains 471 local files \(2\.95 GB\), spanning laws and regulations, internal reports, professional books, and academic papers, mostly Word and PDF documents\. Documents are parsed, cleaned \(removal of table\-of\-contents dot leaders, URLs, and parsing artifacts\), split into chunks of 4,096 characters with 512\-character overlap, and embedded with BGE\-M3 \(1,024\-dimensional dense vectors, mean\-pooled per file\)\. The baseline terminal retrieval computes query–document cosine similarity, applies a similarity threshold, and takes the top\-kkdocuments—the standard industrial practice\. Our method re\-ranks this candidate set as in Algorithm[1](https://arxiv.org/html/2608.21702#alg1)\.

We report the retrieval outcome as the*rank position of the a\-priori\-known target document*—the document that domain inspection identifies as actually containing the answer—under the baseline and under the proposed re\-ranking\. The evaluation is a real\-deployment case study on a proprietary corpus; quantitative evaluations follow in Sections[4\.4](https://arxiv.org/html/2608.21702#S4.SS4)–[4\.6](https://arxiv.org/html/2608.21702#S4.SS6)\.

### 4\.2Case Study: Cross\-Border Data Transfer Security

Consider the real user query “How to assess the security of cross\-border data transfer?” \(如何评估数据出境的安全\)\. Table[1](https://arxiv.org/html/2608.21702#S4.T1)shows the baseline top\-8 and our top\-3 on the original deployment\. We note for precision that the 2024 deployment used the exact\-matchA/BA/Bconstruction \(keyword\-set intersection as in the invention disclosure\[[1](https://arxiv.org/html/2608.21702#bib.bib1)\]\); the semantic\-absorption refinement of Eq\. 3 was developed later, motivated by the failure analysis in Section[4\.4](https://arxiv.org/html/2608.21702#S4.SS4), and is the form we recommend\.

Table 1:Retrieval results for the query “How to assess the security of cross\-border data transfer?”\. Bold: the document that actually contains the assessment procedure \(《信息安全技术 数据出境安全评估指南》\)\. The baseline buries it at rank 6, behind keyword\-matching automotive\-data documents; our method ranks it within the top 3\. Document titles translated from Chinese; the draft measures at ranks 1–3 \(baseline\) and 1–2 \(ours\) are also relevant regulations, while ranks 4, 5, and 7 of the baseline concern a different domain \(automotive data\)\.The baseline’s failure is diagnostic\. The automotive\-data documents mention “data”, “cross\-border”, “security”, and “assessment” repeatedly in their bodies, so their dense vectors are close to the query vector; the genuinely relevant guideline instead concentrates these terms in section titles and describes the actual assessment procedure with different vocabulary\. Similarity ranking therefore rewards keyword density, not answer\-bearing content\. Under the proposed method, the shared setAA\(“data”, “cross\-border”, “security”, …\) absorbs exactly the keywords that made the automotive documents look relevant, and the residual setBBexposes the difference: the automotive documents’BBcontains domain\-specific terminology unrelated to assessment procedures, while the guideline’sBBcarries the assessment\-procedure vocabulary\. The causal\-attention scorescs\_\{c\}consequently promotes the guideline from rank 6 into the top 3, and demotes the three automotive documents out of the returned set entirely\.

### 4\.3Reproduction Testbed

To make the pipeline inspectable and reproducible without any proprietary service, we re\-implemented the full infrastructure to run entirely on a local machine: Qwen3\-4B \(4B parameters\) serves both as the generator and as the local translation module for foreign\-language documents, and BGE\-M3 provides embeddings\. The testbed performs PDF/Word parsing, cleaning, chunking, thresholded similarity retrieval with single\-document and cross\-document chunk strategies, on\-the\-fly translation of non\-Chinese retrieved chunks, and prompt\-based generation\. The causal re\-ranker of Algorithm[1](https://arxiv.org/html/2608.21702#alg1)is implemented on top of the same embedding backbone and is evaluated in Section[4\.4](https://arxiv.org/html/2608.21702#S4.SS4)\. The complete testbed source code, together with all experiment and analysis scripts reported in this section, is publicly available at[https://github\.com/Silk\-Road/causal\-rag\-rerank](https://github.com/Silk-Road/causal-rag-rerank)\.

Two sanity checks confirm the testbed’s end\-to\-end behavior\. First, on a mixed\-language corpus of books and technical documents, the Chinese query “according to traditional Chinese medicine, how should persistent cough be treated, and what medicine should be taken?” correctly retrieved the formulary volume*A Practical Handbook of TCM Formulas*\(《实用趣味方剂手册》\) from the corpus, and the local model produced a syndrome\-differentiated answer grounded in the retrieved chunks\. Second, the local translation module correctly rendered English retrieval chunks into Chinese with terminology annotations \(e\.g\., translating a passage on the Wason selection task from a psychology\-of\-reasoning volume\)\. These checks confirm that the infrastructure is model\-agnostic: it exhibits the same end\-to\-end behavior with the original ChatGLM3\-6B deployment and with the Qwen3\-4B testbed\.

### 4\.4Controlled Diagnostic Experiment

To make the keyword\-stuffing failure reproducible and inspectable under known ground truth, we built a small controlled corpus of short documents spanning eight themes \(five Chinese, three English\), each containing one a\-priori\-known*target*document that carries the answer, near\-relevant documents, deliberately keyword\-stuffed distractors \(documents that repeat the query keywords without answering the query\), and unrelated documents: \(T1\) cross\-border data\-transfer security assessment, mirroring the case study of Section[4\.2](https://arxiv.org/html/2608.21702#S4.SS2); \(T2\) TCM treatment of cough; \(T3\) findings of the Wason selection task; \(T4\) LLM pretraining\-data cleaning; \(T5\) personal\-information protection impact assessment; \(T6\) ColBERT’s late interaction; \(T7\) TCM treatment of insomnia; \(T8\) SPLADE’s regularization\. The corpus is synthetic by construction and serves to demonstrate the mechanism, not to estimate effect sizes\. The keyword extractorkw⁡\(⋅\)\\mathrm\{kw\}\(\\cdot\)is instantiated with jieba segmentation \+ TF–IDF weights for Chinese and a word tokenizer \+ TF–IDF for English \(top\-15 terms per document, top\-10 per query\);τ=0\.6\\tau\{=\}0\.6for semantic absorption\. We compare five rankings of the candidate set: the similarity baselinessims\_\{\\mathrm\{sim\}\}; a strong trained cross\-encoder reranker \(BGE\-reranker\-v2\-m3\[[9](https://arxiv.org/html/2608.21702#bib.bib9)\]\) applied to the same candidates; the causal\-attention scorescs\_\{c\}with*exact\-match*A/BA/Bconstruction;scs\_\{c\}with*semantic absorption*; and a hybrid12​s~sim\+12​s~c\\tfrac\{1\}\{2\}\\,\\widetilde\{s\}\_\{\\mathrm\{sim\}\}\+\\tfrac\{1\}\{2\}\\,\\widetilde\{s\}\_\{c\}\(min–max normalized\)\. Table[2](https://arxiv.org/html/2608.21702#S4.T2)reports the resulting rank of the target document and of the stuffing distractors\.

Theme \(target rank↓\\downarrow\)BaselineCE rerankerscs\_\{c\}exactscs\_\{c\}semanticHybridT1 data\-transfer security \(zh\)55622T2 TCM cough treatment \(zh\)22111T3 Wason selection task \(en\)33422T4 LLM pretraining data \(zh\)33211T5 PI protection assessment \(zh\)42212T6 ColBERT late interaction \(en\)22211T7 TCM insomnia treatment \(zh\)22111T8 SPLADE regularization \(en\)22311mean target rank2\.882\.632\.631\.251\.38mean stuffing rank2\.002\.063\.004\.503\.13Table 2:Controlled diagnostic experiment \(synthetic corpus, known ground truth; ranks, lower is better\)\. Each theme contains one answer\-bearing target document and two keyword\-stuffed distractors\. A strong trained cross\-encoder reranker \(BGE\-reranker\-v2\-m3\) barely improves over the similarity baseline and leaves the stuffing distractors at the top; the exact\-match variant of ourA/BA/Bconstruction is inconsistent \(T1, T3\); semantic absorption wins on all eight themes, and the hybrid configuration never ranks the target below the baseline\.Four findings emerge\. First, a strong trained cross\-encoder reranker does*not*repair the failure: its mean target rank \(2\.63\) is barely below the baseline \(2\.88\), it leaves the stuffing distractors at the top \(mean stuffing rank 2\.06\), and on T1 it changes nothing at all—a 568M\-parameter supervised model is fooled by keyword stuffing almost exactly as the unsupervised similarity score is\. Second, the exact\-matchA/BA/Bconstruction is fragile: near\-synonymous distractor vocabulary \(e\.g\., automotive\-data terminology in T1, generic “reasoning/experiment” vocabulary in T3\) survives inBBbecause it does not string\-match the query keywords, and the resulting score can rank stuffing distractors above the target—in T1 even below the baseline\. Third, semantic absorption intoAA\(Eq\. 3\) removes exactly this failure: across the eight themes the target document is promoted from a mean rank of 2\.88 to 1\.25, and the stuffing distractors are demoted from a mean rank of 2\.00 to 4\.50\. Fourth, the hybrid ofscs\_\{c\}withssims\_\{\\mathrm\{sim\}\}is nearly as strong \(mean target rank 1\.38\) while never ranking the target below the baseline in these runs, and is the configuration we recommend in practice\. We stress the scope of this evidence: the corpus is small and synthetic, so the experiment demonstrates the mechanism and its failure/repair modes; a quantitative evaluation on public benchmarks follows in Section[4\.5](https://arxiv.org/html/2608.21702#S4.SS5)\.

### 4\.5Public\-Benchmark Evaluation: Boundary of Applicability

To delineate where the method helps and where it does not, we evaluate on three public BEIR\[[29](https://arxiv.org/html/2608.21702#bib.bib29)\]benchmarks with graded relevance judgments: SciFact \(5,183 documents, 300 queries\), NFCorpus \(3,633 documents, 323 queries\), and ArguAna \(8,674 documents, 1,406 queries\)\. The encoder is BGE\-M3 \(identical to the case study\); the candidate window is the baseline top\-20, positions beyond 20 inherit the baseline order;kw⁡\(⋅\)\\mathrm\{kw\}\(\\cdot\)is word\-level TF–IDF \(top\-15 per document, top\-10 per query\);τ=0\.6\\tau\{=\}0\.6was fixed before any benchmark run\. We additionally report a post\-hoc variant \(*ours\-fb*\) in which candidates with an empty residual setBBfall back to theirssims\_\{\\mathrm\{sim\}\}score, to test whether the empty\-BBrule drives the outcome\. Table[3](https://arxiv.org/html/2608.21702#S4.T3)reports nDCG@10, P@5, and MRR@10\.

Table 3:Public BEIR benchmark results \(re\-ranking the baseline top\-20; best per dataset in bold\)\. The trained cross\-encoder reranker \(BGE\-reranker\-v2\-m3\) is the strongest method on all three datasets, while our causal\-attention score underperforms the similarity baseline; the fallback variant is indistinguishable from the plain score, and the hybrid recovers part but not all of the gap\. Compare Table[2](https://arxiv.org/html/2608.21702#S4.T2), where the ordering reverses: the cross\-encoder fails to repair the stuffing failure that our method fixes\.The result is unambiguously negative, and informative\. On these benchmarks, the document that answers the query typically*shares the query’s content vocabulary*: SciFact claims restate the findings of their evidence abstracts, and ArguAna counter\-arguments re\-use the query’s argumentative terms\. Absorbing exactly this shared vocabulary intoAAtherefore removes the true relevance signal, and scoring the residual setBB—the document’s distinctive vocabulary, which by construction is dissimilar to the query—rewards topical but non\-answering documents\. Three observations support this reading\. First, the fallback variant is indistinguishable from the plain score \(empty\-BBcandidates are essentially absent: mean fraction≤0\.4%\\leq 0\.4\\%\), so the degradation stems from the scoring ofBBitself, not from an edge case\. Second, stratifying queries by query–candidate keyword overlap \(median split\) does not reverse the ordering on either stratum, i\.e\., BEIR contains no hidden subset where the method wins\. Third, comparing across our three evaluation levels shows the method’s effect flips sign exactly where the corpus regime flips: it helps precisely when high\-similarity documents are*not*the answer\-bearing ones\.

The cross\-encoder comparison sharpens this boundary further\. The trained reranker is the strongest method on the BEIR benchmarks \(Table[3](https://arxiv.org/html/2608.21702#S4.T3)\) yet barely helps on the stuffing\-regime diagnostic corpus \(Table[2](https://arxiv.org/html/2608.21702#S4.T2)\), where our score wins by a wide margin\. The two methods’ strengths are thus regime\-separated rather than competing: the cross\-encoder exploits soft semantic relevance, which is exactly the signal that is trustworthy on factoid corpora*and*exactly the signal that is confounded in the stuffing regime\. A practical system can treat them as complements, selected or combined per regime \(Section[4\.6](https://arxiv.org/html/2608.21702#S4.SS6)\)\.

We therefore state the applicability boundary explicitly:*the causal\-attention re\-ranker is a guard for the keyword\-stuffing regime—growing proprietary knowledge bases that accumulate many topically adjacent documents sharing the query’s vocabulary—and is not a general\-purpose ranking improvement\.*In mixed or unknown regimes, the hybrid configuration is the safer default, and gating the re\-ranker on a measured stuffing rate of the deployment corpus is the principled way to decide whether to enable it at all\.

### 4\.6Regime Gating for Deployment

Section[4\.5](https://arxiv.org/html/2608.21702#S4.SS5)leaves a practical question: can a system tell, at deployment time, which regime its corpus is in? We first tried to answer it per query, without ground truth, using three cheap statistics computed over the top\-10 retrieved candidates—mean query–candidate keyword\-overlap rate, mean weight share of shared keywords in the candidates’ keyword sets \(AA\-absorption ratio\), and the normalized gap between the top\-1 and the runner\-up similarity scores\. None separates the regimes: e\.g\., the median keyword\-overlap rate is0\.210\.21–0\.370\.37across the three BEIR datasets and0\.250\.25–0\.460\.46across the diagnostic themes, with analogous overlaps for the other two statistics\. The reason is structural: the stuffing regime is defined by a relation between keyword\-drivenness and*true*relevance, which is unobservable without relevance judgments\.

We therefore gate at the corpus level, with a small offline calibration that any deployment can perform: samplennprobe queries from the knowledge base, label them \(human or LLM judgment\), compute the metric differenceΔ\\Deltabetween the re\-ranked and the baseline orderings on the probes, and enable the re\-ranker iffΔ\>0\\Delta\>0\. We evaluate the reliability of this decision by bootstrap resampling \(2,000 draws\) over the per\-query scores of Section[4\.5](https://arxiv.org/html/2608.21702#S4.SS5)and the per\-theme ranks of Section[4\.4](https://arxiv.org/html/2608.21702#S4.SS4)\. Table[4](https://arxiv.org/html/2608.21702#S4.T4)shows that 30 probes suffice to \(correctly\) keep the re\-ranker disabled on all three BEIR datasets with≥95%\\geq 95\\%reliability, while 4 probes suffice to \(correctly\) enable it on the diagnostic corpus with 100% reliability\. The end\-to\-end consequence is the desired one:*on factoid corpora the gated system is indistinguishable from the baseline, and on the stuffing\-regime corpus it retains the full gain*\(mean target rank2\.88→1\.252\.88\\rightarrow 1\.25\)\.

Table 4:Corpus\-level regime gating by offline calibration\. Reliability is the fraction of bootstrap resamples \(2,000 draws\) in which the probe\-based decision matches the correct one \(disable on BEIR, enable on the diagnostic corpus\); the two values per cell are for gatingscs\_\{c\}and the hybrid variant, respectively; numbers in parentheses are nDCG@10\. The gated system never degrades the baseline and retains the full gain where the method applies\.Two caveats are in order: the calibration consumes a small labeled probe set per deployment \(a standard requirement, e\.g\.,n=30n\{=\}30queries\), and its reliability depends on the probe being representative of the corpus regime; continuously drifting corpora would need periodic re\-calibration\.

## 5Discussion and Limitations

The method is training\-free, adds only a keyword\-extraction pass and a light scoring pass over an already small candidate set, and inherits the principled interpretation of its causal graph under the stated assumptions\. Its limitations are now empirically concrete: \(i\) the method helps in the keyword\-stuffing regime \(case study, diagnostic experiment\) and hurts on factoid\-style public benchmarks where relevant documents share the query’s vocabulary \(Section[4\.5](https://arxiv.org/html/2608.21702#S4.SS5)\); deployment should therefore use the hybrid configuration or the calibration gate of Section[4\.6](https://arxiv.org/html/2608.21702#S4.SS6), whose reliability rests on a small labeled probe set being representative of the corpus regime; \(ii\) the quality of the latent setsAAandBBdepends on the keyword extractorkw⁡\(⋅\)\\mathrm\{kw\}\(\\cdot\), and weighted, learned, or LLM\-based keyword representations could refine the score; \(iii\) how best to combinescs\_\{c\}with the similarity scoressims\_\{\\mathrm\{sim\}\}and the shared\-keyword count\|A\|\|A\|\(interpolation weights, thresholds, the absorption thresholdτ\\tau\) deserves a fuller ablation than Section[4\.4](https://arxiv.org/html/2608.21702#S4.SS4); and \(iv\) extending the causal treatment from the terminal retrieval stage to the generation stage—for instance, attributing generated claims back to causal keyword sets—is an open direction\. Finally, combining our process\-level causal re\-ranker with content\-level causal retrieval \(e\.g\., CausalRAG\[[25](https://arxiv.org/html/2608.21702#bib.bib25)\]\) or with query\-side expansion \(HyDE\[[17](https://arxiv.org/html/2608.21702#bib.bib17)\]\) is a natural next step, since the mechanisms operate on disjoint parts of the pipeline\.

## 6Conclusion

We presented a retrieval\-refinement method for RAG that moves the terminal retrieval stage from association toward causation\. Modeling the query, the retrieved document set, and the ideal output with a causal graph grounded in Reichenbach’s common cause principle yields a collider\-opening observation—retrieval itself induces an association between the query and a document’s residual keyword setBB—and from it a principled, training\-free re\-scoring rule: an attention\-style cosine similarity between the query embedding and the weighted centroid embedding ofBB\. Unlike causality\-enhanced RAG systems that model causal relations inside the knowledge content, our graph models the causal structure of the retrieval process itself, at negligible cost and with no additional LLM calls\. On a real, continuously growing enterprise knowledge base, the method corrects a representative failure of similarity retrieval, promoting genuinely answer\-bearing documents over keyword\-matching ones; a controlled diagnostic experiment reproduces the effect, and a public\-benchmark evaluation delineates the boundary—the method guards the keyword\-stuffing regime and is not a general ranking improvement\. The approach is orthogonal to modern retrievers, rerankers, query\-expansion techniques, and graph\-based RAG, and can be combined with them; the fully local Qwen3\-4B/BGE\-M3 testbed demonstrates practical deployability\.

## References

- \[1\]刘晶\.一种用于大模型精准检索的输入信息的获取方法及系统 \(A method and system for obtaining input information for accurate retrieval of large language model\)\.Chinese Invention Patent, Application No\. 202410791744\.3, filed 2024, granted\. Assignees: Hangzhou Innovation Institute, Beihang University; Hangzhou Qixin Zhiguang Technology Co\., Ltd\.
- \[2\]Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen\-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela\.Retrieval\-augmented generation for knowledge\-intensive NLP tasks\.*Advances in Neural Information Processing Systems \(NeurIPS\)*, 33:9459–9474, 2020\.
- \[3\]Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, Meng Wang, and Haofen Wang\.Retrieval\-augmented generation for large language models: A survey\.*arXiv:2312\.10997*, 2023\.
- \[4\]Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming\-Wei Chang\.Retrieval augmented language model pre\-training\.*Proceedings of ICML*, 3929–3938, 2020\.
- \[5\]Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George van den Driessche, Jean\-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, Diego de Las Casas, Aurelia Guy, Jacob Menick, Roman Ring, Tom Hennigan, Saffron Huang, Loren Maggiore, Chris Jones, Albin Cassirer, Andy Brock, Michela Paganini, Geoffrey Irving, Oriol Vinyals, Simon Osindero, Karen Simonyan, Jack W\. Rae, Erich Elsen, and Laurent Sifre\.Improving language models by retrieving from trillions of tokens\.*Proceedings of ICML*, 2206–2240, 2022\.
- \[6\]Vladimir Karpukhin, Barlas Oğuz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen\-tau Yih\.Dense passage retrieval for open\-domain question answering\.*Proceedings of EMNLP*, 6769–6781, 2020\.
- \[7\]Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave\.Unsupervised dense information retrieval with contrastive learning\.*Transactions on Machine Learning Research*, 2022\.
- \[8\]Shitao Xiao, Zheng Liu, Peitian Zhang, and Niklas Muennighoff\.C\-Pack: Packaged resources to advance general Chinese embedding\.*arXiv:2309\.07597*, 2023\.
- \[9\]Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu\.BGE M3\-Embedding: Multi\-lingual, multi\-functionality, multi\-granularity text embeddings through self\-knowledge distillation\.*arXiv:2402\.03216*, 2024\.
- \[10\]Omar Khattab and Matei Zaharia\.ColBERT: Efficient and effective passage search via contextualized late interaction over BERT\.*Proceedings of SIGIR*, 39–48, 2020\.
- \[11\]Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi\.Self\-RAG: Learning to retrieve, generate, and critique through self\-reflection\.*Proceedings of ICLR*, 2024\.
- \[12\]Zhengbao Jiang, Frank F\. Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi\-Yu, Yiming Yang, Jamie Callan, and Graham Neubig\.Active retrieval augmented generation\.*Proceedings of EMNLP*, 7969–7992, 2023\.
- \[13\]Shi\-Qi Yan, Jia\-Chen Gu, Yun Zhu, and Zhen\-Hua Ling\.Corrective retrieval augmented generation\.*arXiv:2401\.15884*, 2024\.
- \[14\]Xi Victoria Lin, Xilun Chen, Mingda Chen, Weijia Shi, Maria Lomeli, Rich James, Pedro Rodriguez, Jacob Kahn, Gergely Szilvasy, Mike Lewis, Luke Zettlemoyer, and Scott Yih\.RA\-DIT: Retrieval\-augmented dual instruction tuning\.*Proceedings of ICLR*, 2024\.
- \[15\]J\. J\. Rocchio\.Relevance feedback in information retrieval\.In G\. Salton, editor,*The SMART Retrieval System—Experiments in Automatic Document Processing*, 313–323\. Prentice\-Hall, 1971\.
- \[16\]Victor Lavrenko and W\. Bruce Croft\.Relevance\-based language models\.*Proceedings of SIGIR*, 120–127, 2001\.
- \[17\]Luyu Gao, Xueguang Ma, Jimmy Lin, and Jamie Callan\.Precise zero\-shot dense retrieval without relevance labels\.*Proceedings of ACL*, 1762–1777, 2023\.
- \[18\]Liang Wang, Nan Yang, and Furu Wei\.Query2doc: Query expansion with large language models\.*arXiv:2303\.07678*, 2023\.
- \[19\]Zhuyun Dai and Jamie Callan\.Context\-aware sentence/passage term importance estimation for first stage retrieval\.*arXiv:1910\.10687*, 2019\.
- \[20\]Rodrigo Nogueira, Wei Yang, Jimmy Lin, and Kyunghyun Cho\.Document expansion by query prediction\.*arXiv:1904\.08375*, 2019\.
- \[21\]Thibault Formal, Benjamin Piwowarski, and Stéphane Clinchant\.SPLADE: Sparse lexical and expansion model for first stage ranking\.*Proceedings of SIGIR*, 2288–2292, 2021\.
- \[22\]Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, and Jonathan Larson\.From local to global: A graph RAG approach to query\-focused summarization\.*arXiv:2404\.16130*, 2024\.
- \[23\]Zirui Guo, Lianghao Xia, Yanhua Yu, Tu Ao, and Chao Huang\.LightRAG: Simple and fast retrieval\-augmented generation\.*arXiv:2410\.05779*, 2024\.
- \[24\]Bernal Jiménez Gutiérrez, Yiheng Shu, Yu Gu, Michihiro Yasunaga, and Yu Su\.HippoRAG: Neurobiologically inspired long\-term memory for large language models\.*Advances in Neural Information Processing Systems \(NeurIPS\)*, 37, 2024\.
- \[25\]Nengbo Wang, Xiaotian Han, Jagdip Singh, Jing Ma, and Vipin Chaudhary\.CausalRAG: Integrating causal graphs into retrieval\-augmented generation\.*arXiv:2503\.19878*, 2025\.
- \[26\]Chamod Samarajeewa, Daswin De Silva, Evgeny Osipov, Damminda Alahakoon, and Milos Manic\.Causal reasoning in large language models using causal graph retrieval augmented generation\.*Proceedings of the 16th International Conference on Human System Interaction \(HSI\)*, 1–6, 2024\.
- \[27\]Zhijing Jin, Jiarui Liu, Zhiheng Lyu, Spencer Poff, Mrinmaya Sachan, Rada Mihalcea, Mona Diab, and Bernhard Schölkopf\.Can large language models infer causation from correlation?*Proceedings of ICLR*, 2024\.
- \[28\]Yang Zhang, Fuli Feng, Xiangnan He, Tianxin Wei, Chonggang Song, Guohui Ling, and Yongdong Zhang\.Causal intervention for leveraging popularity bias in recommendation\.*Proceedings of SIGIR*, 11–20, 2021\.
- \[29\]Nandan Thakur, Nils Reimers, Andreas Rücklé, Abhishek Srivastava, and Iryna Gurevych\.BEIR: A heterogeneous benchmark for zero\-shot evaluation of information retrieval models\.*NeurIPS Datasets and Benchmarks*, 2021\.
- \[30\]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N\. Gomez, Łukasz Kaiser, and Illia Polosukhin\.Attention is all you need\.*Advances in Neural Information Processing Systems \(NeurIPS\)*, 30, 2017\.
- \[31\]Sanjeev Arora, Yingyu Liang, and Tengyu Ma\.A simple but tough\-to\-beat baseline for sentence embeddings\.*Proceedings of ICLR*, 2017\.
- \[32\]Christopher Hitchcock and Miklós Rédei\.Reichenbach’s common cause principle\.*The Stanford Encyclopedia of Philosophy*,[https://plato\.stanford\.edu/entries/physics\-Rpcc/](https://plato.stanford.edu/entries/physics-Rpcc/)\.
- \[33\]Peter Spirtes and Kun Zhang\.Causal discovery and inference: concepts and recent methodological advances\.*Applied Informatics*, 3\(1\):1–28, 2016\.
- \[34\]Marek J\. Druzdzel\.The role of assumptions in causal discovery\.*Proceedings of the 8th Workshop on Uncertainty \(WUPES\-09\)*, Liblice, Czech Republic, 57–68, 2009\.
- \[35\]Peter Spirtes, Clark N\. Glymour, and Richard Scheines\.*Causation, Prediction, and Search*, second edition\.MIT Press, Cambridge, USA, 2000\.
- \[36\]Judea Pearl\.*Causality: Models, Reasoning and Inference*, second edition\.Cambridge University Press, Cambridge, United Kingdom, 2009\.
- \[37\]Shohei Shimizu, Patrik O\. Hoyer, Aapo Hyvärinen, and Antti Kerminen\.A linear non\-Gaussian acyclic model for causal discovery\.*Journal of Machine Learning Research*, 7:2003–2030, 2006\.

Similar Articles

Why Retrieval-Augmented Generation Fails: A Graph Perspective

arXiv cs.CL

This paper investigates why Retrieval-Augmented Generation (RAG) systems fail despite having access to correct evidence. Using circuit tracing and attribution graphs, the authors find that correct predictions exhibit deeper reasoning paths and more distributed evidence flow, while failures show shallow and fragmented patterns. They propose a graph-based error detection framework and targeted interventions to improve RAG reliability.

Structure Over Scale: Schema-Constrained Causal Graphs for RAG

arXiv cs.AI

This paper introduces HCG-RAG, which uses schema-constrained causal graphs for retrieval-augmented generation, achieving 3-20x fewer nodes and 8x-135x fewer LLM calls while matching or exceeding baseline answer quality on medical benchmarks.