mlsanityData to 14 Oct 2026

Memory Grafting: Scaling Language Model Pre-training via Offline Conditional Memory

arXiv 2605.20948 ↗First posted 20 May 2026cs.CLcited by 5

On the map: Mixture-of-experts → MoE large language models

Abstract (arXiv)

Scaling conditional memory offers a promising way to increase language-model capacity, but existing methods such as Engram learn large memory tables from scratch during pre-training, making memory scaling expensive and sometimes ineffective. We propose Memory Grafting, a conditional memory scaling method that utilizes frozen hidden states from a grafting model as conditional n-gram memory. Given frequent local n-grams, we run the grafting model offline, store final-token hidden representations as memory values, and let the recipient model retrieve them through exact longest-match suffix lookup. Retrieved memories are adapted by lightweight projections and gates, while a hash-based Engram fallback preserves coverage for unmatched contexts. Since the grafting model is only run offline and exact lookup has expected O(1) complexity with respect to memory-bank size, Memory Grafting expands external latent capacity with limited training and inference overhead. Experiments under matched recipient architectures and pre-training budgets show that Memory Grafting improves over both MoE and vanilla Engram baselines. In the 2.8B-scale setting, it improves the average benchmark score from 51.95 for MoE and 52.43 for vanilla Engram to 53.86. In the 0.92B-scale setting, all grafting-model variants improve over the baselines, with Qwen3.5-35B-A3B giving the strongest gains. These results suggest that pretrained models can serve as reusable constructors of external latent memory, providing a practical step toward scaling future language models beyond trainable parameters alone.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in MoE large language models, one of 12 directions in Mixture-of-experts. Builds on 42 of its 53 references that are in the map. First posted on arXiv 20 May 2026.

Builds on

42 of 53 references.

Closest ancestors · 4

Same direction, newest first

  1. 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models12 Jan
  2. 2024Open-RAG: Enhanced Retrieval-Augmented Reasoning with Open-Source Large Language Models2 Oct
  3. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model7 May
  4. 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models11 Jan

Other references · 38

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  5. 2020Scaling Laws for Neural Language Modelscited by 6,586
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  7. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  8. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
  9. 2022Training Compute-Optimal Large Language Modelscited by 3,019
  10. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  11. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
  12. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
26 more
  1. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
  2. 2019Root Mean Square Layer Normalizationcited by 1,480
  3. 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,121
  4. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  5. 2017Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learningcited by 950
  6. 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
  7. 2025GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Modelscited by 467
  8. 2024Nemotron-CC: Transforming Common Crawl into a Refined Long-Horizon Pretraining Datasetcited by 160
  9. 2024Infini-gram: Scaling Unbounded n-gram Language Models to a Trillion Tokenscited by 153
  10. 2019Large Memory Layers with Product Keyscited by 124
  11. 2022Reliability of CKA as a Similarity Measure in Deep Learningcited by 87
  12. 2023ReLLa: Retrieval-enhanced Large Language Models for Lifelong Sequential Behavior Comprehension in Recommendationcited by 77
  13. 2025Whoever Started the Interference Should End It: Guiding Data-Free Model Merging via Task Vectorscited by 62
  14. 2025Modeling Multi-Task Model Merging as Adaptive Projective Gradient Descentcited by 39
  15. 2024Pre-training Distillation for Large Language Models: A Design Space Explorationcited by 27
  16. 2023Chameleon: a Heterogeneous and Disaggregated Accelerator System for Retrieval-Augmented Language Modelscited by 23
  17. 2024Multi-Task Model Merging via Adaptive Weight Disentanglementcited by 22
  18. 2024Accelerating Retrieval-Augmented Language Model Serving with Speculationcited by 20
  19. 2024Ultra-Sparse Memory Networkcited by 19
  20. 2025HS-STaR: Hierarchical Sampling for Self-Taught Reasoners via Difficulty Estimation and Budget Reallocationcited by 18
  21. 2025Mixture of Lookup Expertscited by 12
  22. 2026STEM: Scaling Transformers with Embedding Modulescited by 12
  23. 2025Learning to Pose Problems: Reasoning-Driven and Solver-Adaptive Data Synthesiscited by 8
  24. 2025Distilled Pretraining: A modern lens of Data, In-Context Learning and Test-Time Scalingcited by 7
  25. 2025How Users Who are Blind or Low Vision Play Mobile Games: Perceptions, Challenges, and Strategiescited by 3
  26. 2025Understanding How Visually Impaired Players Socialize in Mobile Gamescited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 5.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Memory Decoder at Scale: A Pretrained, Parametric Long-Term Memory
  2. 2026Hidden Decoding at Scale: Latent Computation Scaling for Large Language Models
  3. 2025Pretraining with hierarchical memories: separating long-tail and common knowledge
  4. 2025Efficient Pretraining Length Scaling
  5. 2026TransMem: Transforming Hidden States into Memory for Large Language Models
  6. 2024Memory3: Language Modeling with Explicit Memory
  7. 2026MoME: Mixture-of-Memory Embeddings for Context-Aware Sparse Lookup
  8. 2026TF-Engram: A Train-Free Engram with SSD-Backed Memory for Large Language Models