Gated Differentiable Working Memory for Long-Context Language Modeling
Not on the map. Why?
Abstract (arXiv)
Long contexts challenge transformers: attention scores dilute across thousands of tokens, critical information is often lost in the middle, and models struggle to adapt to novel patterns at inference time. Recent work on test-time adaptation addresses this by maintaining a form of working memory -- transient parameters updated on the current context -- but existing approaches rely on uniform write policies that waste computation on low-utility regions and suffer from high gradient variance across semantically heterogeneous contexts. In this work, we reframe test-time adaptation as a budget-constrained memory consolidation problem, focusing on which parts of the context should be consolidated into working memory under limited computation. We propose Gdwm (Gated Differentiable Working Memory), a framework that introduces a write controller to gate the consolidation process. The controller estimates Contextual Utility, an information-theoretic measure of long-range contextual dependence, and allocates gradient steps accordingly while maintaining global coverage. Experiments on ZeroSCROLLS and LongBench v2 demonstrate that Gdwm achieves comparable or superior performance with 4× fewer gradient steps than uniform baselines, establishing a new efficiency-performance Pareto frontier for test-time adaptation.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 146 of its 198 references that are in the map. First posted on arXiv 19 Jan 2026.
Builds on
146 of 198 references.
References · 146
- 2017Attention Is All You Needcited by 59,932
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
38 more
- 2025A-MEM: Agentic Memory for LLM Agentscited by 1,000
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 814
- 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
- 2019Passage Re-ranking with BERTcited by 629
- 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 622
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
- 2022Efficient Test-Time Model Adaptation without Forgettingcited by 467
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 428
- 2023Adapting Language Models to Compress Contextscited by 350
- 2021Entity-Based Knowledge Conflicts in Question Answeringcited by 349
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
- 2021ZeRO-Offload: Democratizing Billion-Scale Model Trainingcited by 339
- 2023Trusting Your Evidence: Hallucinate Less with Context-aware Decodingcited by 319
- 2025Memory in the Age of AI Agentscited by 285
- 2023RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentationcited by 253
- 2020AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Promptscited by 246
- 2025Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactionscited by 236
- 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 235
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
- 2016Using Fast Weights to Attend to the Recent Pastcited by 161
- 2023Large Language Models for Automated Data Science: Introducing CAAFE for Context-Aware Automated Feature Engineeringcited by 125
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Tokencited by 123
- 2025Optimizing Test-Time Compute via Meta Reinforcement Fine-Tuningcited by 121
- 2025From Human Memory to AI Memory: A Survey on Memory Mechanisms in the Era of LLMscited by 119
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 118
- 2024A Survey on Large Language Model-Based Game Agentscited by 106
- 2024Long Context Compression with Activation Beaconcited by 101
- 2024AriGraph: Learning Knowledge Graph World Models with Episodic Memory for LLM Agentscited by 100
- 2025MemGen: Weaving Generative Latent Memory for Self-Evolving Agentscited by 99
- 2025How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behaviorcited by 95
- 2025AgentFold: Long-Horizon Web Agents with Proactive Context Managementcited by 95
- 2025MemInsight: Autonomous Memory Augmentation for LLM Agentscited by 84
- 2025MemEvolve: Meta-Evolution of Agent Memory Systemscited by 81
- 2024From Isolated Conversations to Hierarchical Schemas: Dynamic Tree Memory Representation for LLMscited by 77
- 2024ToolGen: Unified Tool Retrieval and Calling via Generationcited by 72
- 2025Remember Me, Refine Me: A Dynamic Procedural Memory Framework for Experience-Driven Agent Evolutioncited by 65
- 2024Steering Knowledge Selection Behaviours in LLMs via SAE-Based Representation Engineeringcited by 60
50 most cited of 146 All 146 (JSON)
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026Semantic-Aware Adaptive Visual Memory for Streaming Video Understandingcited by 8
- 2026VideoStir: Understanding Long Videos via Spatio-Temporally Structured and Intent-Aware RAGcited by 5
- 2026Memory for Large Language Modelscited by 2
- 2026Self-Manager: Parallel Agent Loop for Long-form Deep Researchcited by 1
- 2026SR-TTT Does Not Learn Retrieval: A Correction and Mechanistic Post-Mortem of Surprisal-Aware Residual Test-Time Trainingcited by 0
- 2026V-DEAL: Diagnosing Video Safety De-Calibration as an Understanding-Refusal Coupling Failurecited by 0
- 2026Memory for Large Language Models28 Jul 2026
- 2026V-DEAL: Diagnosing Video Safety De-Calibration as an Understanding-Refusal Coupling Failure23 Jul 2026
- 2026Semantic-Aware Adaptive Visual Memory for Streaming Video Understanding8 May 2026
- 2026VideoStir: Understanding Long Videos via Spatio-Temporally Structured and Intent-Aware RAG7 Apr 2026
- 2026SR-TTT Does Not Learn Retrieval: A Correction and Mechanistic Post-Mortem of Surprisal-Aware Residual Test-Time Training26 Feb 2026
- 2026Self-Manager: Parallel Agent Loop for Long-form Deep Research25 Jan 2026