GAM-RAG: Gain-Adaptive Memory for Evolving Retrieval in Retrieval-Augmented Generation
Organizations: 1Fudan University.
Abstract
Retrieval-Augmented Generation (RAG) grounds large language models with external evidence, but many implementations rely on pre-built indices that remain static after construction. Related queries therefore repeat similar multi-hop traversal, increasing latency and compute. Motivated by schema-based learning in cognitive neuroscience, we propose GAM-RAG, a training-free framework that accumulates retrieval experience from recurring or related queries and updates retrieval memory over time. GAM-RAG builds a lightweight, relation-free hierarchical index whose links capture potential co-occurrence rather than fixed semantic relations. During inference, successful retrieval episodes provide sentence-level feedback, updating sentence memories so evidence useful for similar reasoning types becomes easier to activate later. To balance stability and adaptability under noisy feedback, we introduce an uncertainty-aware, Kalman-inspired gain rule that jointly updates memory states and perplexity-based uncertainty estimates. It applies fast updates for reliable novel signals and conservative refinement for stable or noisy memories. We provide a theoretical analysis of the update dynamics, and empirically show that GAM-RAG improves average performance by 3.95% over the strongest baseline and by 8.19% with 5-turn memory, while reducing inference cost by 61%. Our code and datasets are available at: https://anonymous.4open.science/r/GAM_RAG-2EF6.
Figures & tables
| Methods | 2Wiki | HotpotQA | MuSiQue | TimeQA | Medical | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| GPT-Acc | Contain-Acc. | GPT-Acc | Contain-Acc. | GPT-Acc | Contain-Acc. | GPT-Acc | Contain-Acc. | GPT-Acc | F1. | |
| Standard LLM | ||||||||||
| Direct Answering | 30.20 | 33.70 | 40.00 | 37.60 | 14.90 | 13.20 | 30.18 | 31.85 | 42.10 | 32.16 |
| Chain-of-Thought (CoT) | 31.40 | 34.50 | 39.80 | 38.20 | 15.80 | 13.60 | 30.62 | 33.67 | 42.52 | 34.50 |
| Vanilla RAG | ||||||||||
| GritLM / GritLM-7B | 42.10 | 44.80 | 55.20 | 51.30 | 28.50 | 25.80 | 41.81 | 42.68 | 58.83 | 54.21 |
| Methods | Indexing | Same Query | Similar Query | Different Query | ||||
|---|---|---|---|---|---|---|---|---|
| Tokens(M) | Time(ks) | GPT-Acc | Time(s) | GPT-Acc | Time(s) | GPT-Acc | Time(s) | |
| GFM-RAG | 4.16 | 3.57 | 59.80 | 4.16 | 57.40 | 4.07 | 56.30 | 4.23 |
| HippoRAG2 | 5.36 | 3.48 | 55.70 | 4.82 | 54.10 | 4.75 | 54.10 | 5.10 |
| LinearRAG | 0 | 0.54 | 61.70 | 1.32 | 60.30 | 1.45 | 60.60 | 1.52 |
| PoG | 4.97 | 3.57 | 54.10 | 20.43 | 51.90 | 20.10 | 51.10 | 21.32 |
| DyG-RAG | 9.54 | 7.75 | 40.70 | 9.86 | 40.20 | 8.45 | 39.80 | 9.71 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Setting | Corpus | Eval. questions |
|---|---|---|---|
| HotpotQA ( Yang et al., 2018 ) | Multi-hop QA | Same as HippoRAG | 1,000 (val) |
| 2Wiki ( Ho et al., 2020 ) | Multi-hop QA | Same as HippoRAG | 1,000 (val) |
| MuSiQue ( Trivedi et al., 2022 ) | Multi-hop QA | Same as HippoRAG | 1,000 (val) |
| TimeQA ( Chen et al., 2021 ) | Time-sensitive QA | Provided corpus | 3,078 (test-hard) |
| Medical ( Xiao et al., 2025 ) | Domain QA | GraphRAG-Bench | 4,076 (all) |
| Methods | 2Wiki | HotpotQA | MuSiQue | TimeQA | Medical |
|---|---|---|---|---|---|
| GPT-Acc | GPT-Acc | GPT-Acc | GPT-Acc | GPT-Acc | |
| GritLM-7B ( Muennighoff et al., 2024 ) | 64.00 | 75.10 | 43.10 | 49.11 | 65.24 |
| NV-Embed-v2 ( Lee et al., 2024 ) | 64.10 | 74.60 | 43.20 | 48.75 | 64.98 |
| all-mpnet-base-v2 ( Song et al., 2020 ) | 64.20 | 74.90 | 43.30 | 49.45 | 65.47 |
| all-MiniLM-L6-v2 ( Wang et al., 2020 ) | 63.70 | 73.70 | 42.80 | 48.11 | 65.22 |
| bge-large-en-v1.5 ( Xiao et al., 2024 ) | 64.10 | 74.30 | 43.10 | 48.73 | 64.28 |
Retrieval-Augmented Generation
Retrieval-augmented generation connects language models to external knowledge so answers can use current, domain-specific evidence.
See all 792 papers