TL;DR
RING (Retrieval-Internalized Generation) eliminates the heavy engineering overhead and latency of conventional Retrieval-Augmented Generation (RAG) by internalizing the entire retrieval process directly into the LLM's parameters. By co-designing a sparse Mixture-of-Memory Experts architecture with a three-stage training pipeline (including reinforcement learning), RING matches or exceeds RAG accuracy while delivering a massive 3×–19× speedup at inference time.
What Problem Does This Paper Address?
Retrieval-Augmented Generation (RAG) has become the industry standard for reducing LLM hallucinations and injecting up-to-date knowledge. However, RAG comes with a steep price tag: maintaining external vector databases, embedding models, and cross-encoder rerankers introduces significant engineering complexity and inference latency.
To avoid this runtime overhead, researchers have explored parametric knowledge injection—storing facts directly inside the model's weights. Unfortunately, existing parametric methods hit severe bottlenecks: they either suffer from catastrophic forgetting during sequential updates, or they rely on rigid, hand-designed routing mechanisms that scale poorly. The authors of RING argue that the true bottleneck of parametric knowledge injection isn't how to store knowledge in weights, but how to search those weights efficiently at inference time.
Methods
RING addresses this challenge through a holistic co-design of model architecture and a three-stage training pipeline:
1. Architecture: Mixture-of-Memory Experts
RING transforms a standard dense LLM into a sparse Mixture-of-Experts (MoE) structure consisting of:
- Basic Expert: Retains the original pre-trained LLM weights to preserve general reasoning and prevent catastrophic forgetting.
- Knowledge Expert: Parametrically stores and indexes the new external corpus. Crucially, its parameters are split into Memory layers (storing the data) and a Search Gate (a parametric index that reweights memories based on the query).
- Router: A learnable module that decides per-token whether to pull from the Basic Expert or the Knowledge Expert.
2. Three-Stage Training Pipeline
- Stage 1: Continued Pre-training (CPT) for Memorization: The new corpus is injected into the Knowledge Expert using a novel Dual Causal Attention (DCA) mechanism. DCA allows the model to learn bidirectional context during training (which is much more effective for memorization) without breaking the autoregressive causal masking required at inference time.
- Stage 2: Supervised Fine-Tuning (SFT) for Behavior: The model is trained on synthesized data to adopt a "search-then-answer" pattern, explicitly generating a
<retrieval>block containing the internal memory fragment before outputting the final answer in an<answer>block. - Stage 3: Reinforcement Learning (RL) for Policy Optimization: Using Group Sequence Policy Optimization (GSPO), RING optimizes the retrieval policy end-to-end. It employs hierarchical rewards based on format compliance, answer correctness, and a dense search reward (using Longest Common Substring matching) to train the router and search gate to surface the exact right memory fragments.
Datasets
To rigorously evaluate knowledge injection without the risk of pre-training data contamination, the authors constructed News-2025. This bilingual (Chinese/English) benchmark consists of approximately 170k news documents (341M tokens) spanning June to July 2025—strictly post-dating the base LLM’s pre-training cutoff.
The dataset was partitioned into subsets for CPT (the entire corpus), SFT (synthesized QA pairs), RL training, and a held-out test set of 10k QA pairs generated via GPT-5.
Key Insights and Ideas
- Learning to Search Weights: Instead of treating internal memory routing as a static lookup (like standard MoE routing or kNN approaches), RING treats retrieval as a trainable behavior optimized via RL task signals.
- RL Bridges the Gap Between Memorization and Utilization: A key finding is that simply memorizing text (achieving low perplexity) isn't enough for an LLM to answer questions accurately. Reinforcement learning dramatically steepens the perplexity-to-accuracy curve, teaching the model how to reliably activate and ground its generations in its own internal weights.
- Variational Inference Framework: The authors provide a solid theoretical grounding, proving that the CPT-SFT-RL pipeline acts as a variational inference mechanism that maximizes the Evidence Lower Bound (ELBO), mathematically approximating the classical RAG objective without the physical search engine.
Key Results
Evaluated against Qwen3-8B and Qwen3-14B backbones on the News-2025 benchmark, RING demonstrated impressive capabilities:
- Outperforming Parametric Baselines: On Qwen3-8B, RING achieved 35.08% (EN) / 32.36% (ZH) accuracy, outperforming the strongest prior parametric injection baseline (SR-KI) by over 3 percentage points.
- Matching Strong RAG Pipelines: RING matched or closely trailed heavy RAG pipelines (which use top-k retrieval and cross-encoder rerankers).
- Massive Speedups: Because it completely eliminates external database queries and context prepending, RING achieved a Time To First Token (TTFT) of 0.40 seconds, making it 3× to 19× faster than conventional RAG variants at inference time.
- Mitigating Forgetting: In sequential injection tests up to 100k documents, RING remained highly stable, keeping accuracy above 30% while standard full fine-tuning collapsed down to ~12%.
Limitations and Future Work
- Static vs. Dynamic Updates: Unlike conventional RAG, where updating a database is as simple as deleting or adding a vector, RING requires parameter updates (retraining stages) to refresh its knowledge base. It is currently less suited for highly dynamic, rapidly changing data.
- Fidelity and Auditing: The
<retrieval>block generated by RING is a parametric reconstruction rather than a verbatim document pull. The model can occasionally paraphrase or compress the text, making strict citation tracking and legal provenance auditing more challenging than in standard RAG. - Upfront Training Cost: The three-stage pipeline (CPT + SFT + RL) demands significant upfront computational resources, meaning the inference-time savings must be weighed against the initial training costs.
Summary updated