Learning What to Remember: Test-Time Training via Context Distillation
Not on the map. Why?
Abstract (arXiv)
Effective long-context modeling is not merely about retaining more of the past, but about preserving the information that may prove relevant later. Test-time training (TTT) is an appealing approach that performs online parameter updates for long-context modeling, yet existing TTT methods only optimize either reconstruction or online adaptation objectives without considering the future utility of retained information. In this work, we propose Test-Time Context Distillation (TTCD), a TTT framework that introduces a self-supervised objective for allocating limited memory capacity for future use. Specifically, TTCD uses a long-window teacher to supervise the fast weights of a short-window student, where the hidden-state discrepancy between them offers a dense, self-supervised signal guiding the model to memorize the contextual information crucial for future token predictions. We focus on an in-place variant: In-Place TTCD (IP-TTCD), which uses the existing MLP parameters as the fast weights. Experiments on long-context language modeling tasks show IP-TTCD consistently outperforms DeltaNet, Gated DeltaNet, sliding-window attention, and TTT when pre-trained from scratch. Furthermore, IP-TTCD allows pre-trained transformer models to adapt their parameters during inference through continual pre-training, gaining long-context capabilities with only a lightweight architectural augmentation. Our results position TTCD as a step toward architectural continual learning.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 51 of its 55 references that are in the map. First posted on arXiv 3 Aug 2026.
Builds on
51 of 55 references.
References · 51
- 2017Attention Is All You Needcited by 60,361
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
38 more
- 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,367
- 2018An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modelingcited by 1,476
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2024MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategiescited by 723
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 499
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 474
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 335
- 2024Titans: Learning to Memorize at Test Timecited by 328
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 215
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 200
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 196
- 2024Lessons from the Trenches on Reproducible Evaluation of Language Modelscited by 179
- 2016Using Fast Weights to Attend to the Recent Pastcited by 170
- 2024How to Train Long-Context Language Models (Effectively)cited by 146
- 2022Learning by Distilling Contextcited by 138
- 2025Test-Time Training Done Rightcited by 130
- 2024Transformers are Multi-State RNNscited by 120
- 2025Fantastic Pretraining Optimizers and Where to Find Themcited by 100
- 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 86
- 2025End-to-End Test-Time Training for Long Contextcited by 62
- 2024Mechanistic Design and Scaling of Hybrid Architecturescited by 59
- 2024Learning to Compress Prompt in Natural Language Formatscited by 55
- 2025Log-Linear Attentioncited by 40
- 2026In-Place Test-Time Trainingcited by 20
- 2025KV-Distill: Nearly Lossless Learnable Context Compression for LLMscited by 19
- 2024Characterizing Prompt Compression Methods for Long Context Inferencecited by 18
- 2025RATTENTION: Towards the Minimal Sliding Window Size in Local-Global Attention Modelscited by 10
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2026: 2.
2 papers.