From Association to Causation: Improving Retrieval Precision of Retrieval-Augmented Generation via Causal Relations and an Attention Mechanism
Organizations: Hangzhou Innovation Institute, Beihang University, Hangzhou, China
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.
Figures & tables
| Rank | Document |
|---|---|
| Baseline (similarity + rerank), top-8 | |
| 1 | Measures for Security Assessment of Cross-Border Data Transfer (draft) |
| 2 | Measures for Security Assessment of Personal Information and Important Data |
| Cross-Border Transfer (draft) | |
| 3 | Measures for Security Assessment of Personal Information Cross-Border Transfer (draft) |
| 4 | Interpretation of Technical Guidelines for Automotive Collected-Data |
| Theme (target rank ) | Baseline | CE reranker | exact | semantic | Hybrid |
| T1 data-transfer security (zh) | 5 | 5 | 6 | 2 | 2 |
| T2 TCM cough treatment (zh) | 2 | 2 | 1 | 1 | 1 |
| T3 Wason selection task (en) | 3 | 3 | 4 | 2 | 2 |
| T4 LLM pretraining data (zh) | 3 | 3 | 2 | 1 | 1 |
| T5 PI protection assessment (zh) | 4 | 2 | 2 | 1 | 2 |
| T6 ColBERT late interaction (en) | 2 | 2 | 2 | 1 | 1 |
| Dataset | Method | nDCG@10 | P@5 | MRR@10 |
|---|---|---|---|---|
| SciFact | Baseline | 0.642 | 0.159 | 0.608 |
| CE reranker | 0.716 | 0.167 | 0.693 | |
| Ours | 0.157 | 0.033 | 0.115 | |
| Ours-fb (post-hoc) | 0.157 | 0.032 | 0.115 | |
| Hybrid | 0.550 | 0.135 | 0.510 | |
| NFCorpus | Baseline | 0.317 | 0.305 | 0.523 |
| Corpus | Regime | Probes | Correct-decision reliability | Gated outcome |
|---|---|---|---|---|
| SciFact | factoid | 30 | 100% / 99.2% | baseline retained (0.642) |
| NFCorpus | factoid | 30 | 100% / 100% | baseline retained (0.317) |
| ArguAna | factoid | 30 | 99.9% / 95.5% | baseline retained (0.398) |
| Diagnostic (8 themes) | stuffing | 4 | 100% / 100% | enabled; rank |
Retrieval-Augmented Generation
Retrieval-augmented generation connects language models to external knowledge so answers can use current, domain-specific evidence.
See all 796 papers