mlsanityData to 7 Oct 2026

Doc-to-LoRA: Learning to Instantly Internalize Contexts

arXiv 2602.15902 ↗First posted 13 Feb 2026cs.CL cs.AIcited by 36

On the map: LLM reasoning → Reasoning benchmarks and evaluation

Abstract (arXiv)

Long input sequences are central to in-context learning, document understanding, and multi-step reasoning of Large Language Models (LLMs). However, the quadratic attention cost of Transformers makes inference memory-intensive and slow. While context distillation (CD) can transfer information into model parameters, per-prompt distillation is impractical due to training costs and latency. To address these limitations, we propose Doc-to-LoRA (D2L), a lightweight hypernetwork that meta-learns to perform approximate CD within a single forward pass. Given an unseen prompt, D2L generates a LoRA adapter for a target LLM, enabling subsequent queries to be answered without re-consuming the original context, reducing latency and KV-cache memory consumption during inference of the target LLM. On a long-context needle-in-a-haystack task, D2L successfully learns to map contexts into adapters that store the needle information, achieving near-perfect zero-shot accuracy at sequence lengths exceeding the target LLM's native context window by more than 4x. On real-world QA datasets with limited compute, D2L outperforms standard CD while significantly reducing peak memory consumption and update latency. We envision that D2L can facilitate rapid adaptation of LLMs, opening up the possibility of frequent knowledge updates and personalized chat behavior.

Key facts. Cited by 36 papers in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 45 of its 58 references that are in the map. First posted on arXiv 13 Feb 2026.

Builds on

45 of 58 references.

References · 45

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  3. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  5. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  6. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  7. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  8. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  9. 2025Gemma 3 Technical Reportcited by 1,686
  10. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  11. 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,259
  12. 2021Perceiver: General Perception with Iterative Attentioncited by 1,089
33 more
  1. 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,023
  2. 2019Machine Unlearningcited by 1,020
  3. 2016HyperNetworkscited by 1,003
  4. 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 883
  5. 2023Instruction Tuning for Large Language Models: A Surveycited by 617
  6. 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
  7. 2023Learning to Compress Prompts with Gist Tokenscited by 379
  8. 2023Adapting Language Models to Compress Contextscited by 350
  9. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
  10. 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
  11. 2019Continual learning with hypernetworkscited by 267
  12. 2024Continual Learning of Large Language Models: A Comprehensive Surveycited by 228
  13. 2024Long Context Compression with Activation Beaconcited by 101
  14. 2024Personalization of Large Language Models: A Surveycited by 100
  15. 2019Reasoning Over Paragraph Effects in Situationscited by 79
  16. 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 74
  17. 2025Text-to-LoRA: Instant Transformer Adaptioncited by 50
  18. 2022HyperTuning: Toward Adapting Large Language Models without Back-propagationcited by 45
  19. 2024Unveiling the Secret Recipe: A Guide For Supervised Fine-Tuning Small LLMscited by 39
  20. 2024With Greater Text Comes Greater Necessity: Inference-Time Training Helps Long Text Generationcited by 36
  21. 2024In-Context Editing: Learning Knowledge from Self-Induced Distributionscited by 33
  22. 2022HINT: Hypernetwork Instruction Tuning for Efficient Zero- & Few-Shot Generalisationcited by 28
  23. 2023Propagating Knowledge Updates to LMs Through Distillationcited by 28
  24. 2024Generative Adapter: Contextualizing Language Models in Parameters with A Single Forward Passcited by 26
  25. 2024Efficient Knowledge Injection in LLMs via Self-Distillationcited by 22
  26. 2025Training Plug-n-Play Knowledge Modules with Deep Context Distillationcited by 22
  27. 2022Hyperdecoders: Instance-specific decoders for multi-task NLPcited by 21
  28. 2025Continual Learning via Sparse Memory Finetuningcited by 17
  29. 2025InfiniteICL: Breaking the Limit of Context Window Size via Long Short-term Memory Transformationcited by 16
  30. 2024MEND: Meta dEmonstratioN Distillation for Efficient and Effective In-Context Learningcited by 15
  31. 2024When Context Leads but Parametric Memory Follows in Large Language Modelscited by 10
  32. 2024Generative Prompt Internalizationcited by 6
  33. 2024Prompt Bakingcited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 36.

36 papers.

Sort:

By area:

  1. 2026Understanding LoRA as Knowledge Memory: An Empirical Analysiscited by 11
  2. 2026Skill-to-LoRA: From Using Skills to Learning Behaviors for Token-Efficient LLM Agentscited by 8
  3. 2026LatentSkill: From In-Context Textual Skills to In-Weight Latent Skills for LLM Agentscited by 7
  4. 2026Training Transformers for KV Cache Compressibilitycited by 6
  5. 2026Rethinking Continual Experience Internalization for Self-Evolving LLM Agentscited by 4
  6. 2026Context Distillation as Latent Memory Managementcited by 3
  7. 2026Scaling Self-Evolving Agents via Parametric Memorycited by 3
  8. 2026Position: Weight Space Should Be a First-Class Generative AI Modalitycited by 2
  9. 2026How LoRA Remembers? A Parametric Memory Law for LLM Finetuningcited by 2
  10. 2026MoEGen: Mixture-of-Experts for Instance-Adaptive LoRA Generationcited by 2
  11. 2026The Override Gap: A Magnitude Account of Knowledge Conflict Failure in Hypernetwork-Based Instant LLM Adaptationcited by 1
  12. 2026Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolutioncited by 1
24 more
  1. 2026Doc-to-Atom: Learning to Compile and Compose Memory Atomscited by 1
  2. 2026Teaching agentic AI to generalize expert diagnostic reasoning in rare diseasescited by 1
  3. 2026Parametric Skillscited by 1
  4. 2026Program-as-Weights: A Programming Paradigm for Fuzzy Functionscited by 1
  5. 2026Towards Evolving Context Parameterization for Large Language Modelscited by 1
  6. 2026RPMem: Learning Long-Term Recurrent Parametric Memory Across Sessions for LLM Agentscited by 1
  7. 2026Cartridges++: KV Cache Compression without Off-Context Derailmentcited by 1
  8. 2026PatchKV: Weight-Space Compensation of KV Cachecited by 1
  9. 2026Queryable LoRA: Instruction-Regularized Routing Over Shared Low-Rank Update Atomscited by 0
  10. 2026Good Agentic Friends Do Not Just Give Verbal Advice: They Can Update Your Weightscited by 0
  11. 2026Context Memorization for Efficient Long Context Generationcited by 0
  12. 2026Frames2LoRA: Parametric Video Internalization for Vision-Language Modelscited by 0
  13. 2026Amortizing Federated Adaptation: Hypernetwork Driven LoRA for Personalized Foundation Modelscited by 0
  14. 2026PRISMR: Overcoming Parse Collapse in Multimodal Listwise Ranking via Parameterized Representation Internalizationcited by 0
  15. 2026Compliance2LoRA: Personalizable On-Demand Safety Alignment on Arbitrary Policy Subsets via Hypernetwork-Generated LoRA Adapterscited by 0
  16. 2026Omni2LoRA: Coherence-Preserving Parametric Memory for Efficient Omni Language Modelscited by 0
  17. 2026Infinite-Parameter LLMs: Generating and Adapting Weights from Live Datacited by 0
  18. 2026LoRA-generating hypernetworks for efficient on-device LLM generative personalizationcited by 0
  19. 2026PReCache: Efficient KV Cache Sharing for Multi-LoRA Agents via Low-Rank Precomputation and Neutral Reconstructioncited by 0
  20. 2026BaRe-Mem: Bayesian Reliability Memory for Robust and Adaptive Agent Consultationcited by 0
  21. 2026HyperZip: Efficient Data Compression through Personalized Diffusion LLMs with Hypernetworkscited by 0
  22. 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptationscited by 0
  23. 2026Learning to Predict Distributions over Weight Updates for Test-Time Adaptationcited by 0
  24. 2026DPPM: Dual-Path Parametric Memory for Personalized Language Modelscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026Shuffle the Context: RoPE-Perturbed Self-Distillation for Long-Context Adaptation
  2. 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Models
  3. 2026ReContext: Recursive Evidence Replay as LLM Harness for Long-Context Reasoning
  4. 2025MachineLearningLM: Scaling Many-shot In-context Learning via Continued Pretraining
  5. 2024Leave No Document Behind: Benchmarking Long-Context LLMs with Extended Multi-Doc QA
  6. 2024LLoCO: Learning Long Contexts Offline
  7. 2023Hint-enhanced In-Context Learning wakes Large Language Models up for knowledge-intensive tasks
  8. 2026Learning When to Attend: Conditional Memory Access for Long-Context LLMs