Encoding Context into LLM Weights: What Makes It Context?
Not on the map. Why?
Abstract (arXiv)
Longer contexts allow large language models (LLMs) to condition their predictions on more information, but inference costs grow prohibitively with context length. An emerging alternative uses test-time updates to encode context as temporary changes to model weights. However, encoding this information into weights that already represent general knowledge obscures its role as context, so the LLM may fail to use it properly to condition subsequent inference. To restore this contextual role, we first associate each context with an identifier during encoding, thereby distinguishing the newly encoded information from pre-existing knowledge. Invoking the identifier at inference then enables the LLM to recite the encoded context. Nevertheless, successful recitation does not ensure that the LLM will use the recalled information as context. We therefore further introduce a prompting framework that explicitly guides the LLM to use this information as context. Across diverse controlled tasks and practical benchmarks, our method outperformed the baseline using only off-the-shelf LLMs, showing its advances in context encoding.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 52 of its 60 references that are in the map. First posted on arXiv 13 Oct 2026.
Builds on
52 of 60 references.
References · 52
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
38 more
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2025s1: Simple test-time scalingcited by 1,341
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
- 2021Knowledge Neurons in Pretrained Transformerscited by 601
- 2022Efficiently Scaling Transformer Inferencecited by 539
- 2021Fast Model Editing at Scalecited by 498
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 453
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 379
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2024Titans: Learning to Memorize at Test Timecited by 328
- 2025Qwen2.5-1M Technical Reportcited by 164
- 2025Test-Time Training Done Rightcited by 130
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 127
- 2022A Kernel-Based View of Language Model Fine-Tuningcited by 121
- 2024Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilizationcited by 101
- 2023Test-Time Training on Nearest Neighbors for Large Language Modelscited by 88
- 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 86
- 2023Can Neural Network Memorization Be Localized?cited by 69
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 66
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
- 2025End-to-End Test-Time Training for Long Contextcited by 62
- 2024Softmax is not Enough (for Sharp Size Generalisation)cited by 46
- 2026Doc-to-LoRA: Learning to Instantly Internalize Contextscited by 43
- 2024Uncovering Overfitting in Large Language Model Editingcited by 39
- 2025Training Plug-n-Play Knowledge Modules with Deep Context Distillationcited by 24
- 2026In-Place Test-Time Trainingcited by 20
- 2023RECKONING: Reasoning through Dynamic Knowledge Encodingcited by 18
- 2025Let's (not) just put things in Context: Test-Time Training for Long-Context LLMscited by 18
- 2024Understanding the RoPE Extensions of Long-Context LLMs: An Attention Perspectivecited by 15
- 2026Test-Time Training with KV Binding Is Secretly Linear Attentioncited by 13
- 2022Detecting Unintended Memorization in Language-Model-Fused ASRcited by 10
- 2026GradMem: Learning to Write Context into Memory with Test-Time Gradient Descentcited by 9
- 2026Locas: Your Models are Principled Initializers of Locally-Supported Parametric Memoriescited by 8
- 2026Context Distillation as Latent Memory Managementcited by 6
- 2026Modular TTT: Rethinking Test-Time Training as Composable Modulescited by 3
50 most cited of 52 All 52 (JSON)
Built on by
Not cited yet.