Learning What to Remember: Test-Time Training via Context Distillation
Zixuan Wang, Xingyu Dang, Rui-Jie Zhu, Zixin Wen, Hengyu Fu, Wenhao Chai, Jason D. Lee
NeurIPS 2026
Abstract. 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 explicitly optimizes the allocation of 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 tasks. 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.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:44 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The paper introduces Test-Time Context Distillation (TTCD) and its in-place variant, IP-TTCD, which use a long-window teacher to train the fast weights of a short-window student to retain distant context according to its future utility, with promising results across synthetic tasks, pretraining, and continual pretraining. The paper received mixed reviews but is currently leaning toward rejection, primarily because the main comparison against IP-TTT may use a reconstruction objective rather than the NTP-aligned objective central to that baseline, potentially undermining the principal empirical claim (see Reviewer ezRc Weakness 1). The author response should establish that this comparison is faithful or provide compelling existing evidence that the conclusions remain valid under the proper baseline. The response should also clarify the method’s practical scope given the limited model sizes and context lengths, weak gains—and even degradation—on Qwen3, and the absence of compute- or throughput-normalized comparisons (see Reviewer wRM3 Questions 1 and 3; Reviewer 6dJG Questions 1 and 2). Finally, the authors should more carefully distinguish TTCD from prior test-time context-distillation methods such as Cartridges and clarify the novelty beyond this work (see Reviewer ezRc Weakness 3). Addressing these concerns convincingly would materially improve the paper’s prospects for acceptance.
Post Rebuttal/Discussion Meta-Review
The rebuttal satisfactorily addresses the three critical concerns identified in the initial meta-review:
- The allegedly crippled IP-TTT baseline was largely a misunderstanding. The from-scratch experiments used the original LM-aligned IP-TTT implementation. The authors acknowledged and corrected an error in the continual-pretraining configuration, reran those experiments, and IP-TTCD remained stronger.
- The limited-scale concern was addressed with an 8B/64K experiment. The improvement over IP-TTT is small there, but the stronger gains in the controlled from-scratch experiments remain meaningful, especially at longer contexts.
- The efficiency concern was addressed unusually well through FLOP accounting and fused-kernel measurements. IP-TTCD costs roughly 10% more FLOPs than IP-TTT, while optimized prefill overhead is only about 1.4–6.7%. This makes the performance–cost tradeoff defensible.
I also find the authors’ position on Cartridges persuasive. It is closely related conceptually and deserves careful discussion, but its offline, corpus-specific, synthetic-data-based, multi-query setting is sufficiently different that the absence of a direct comparison should not be rejection-determining.
The residual weaknesses are real: continual-pretraining gains over IP-TTT are modest, the teacher–student window ratio is not ablated, and no fully compute-matched training comparison is provided. However, these now look like limitations rather than fatal deficiencies. Importantly, Reviewer ezRc’s original primary objection was resolved, while the subsequent “on par” characterization does not adequately account for the substantial from-scratch RULER improvements. Reviewer wRM3’s remaining objections are also fairly general and partially answered by the new 8B and efficiency results.
Final justification
Taking into account the reviews, author response, and reviewer discussion, I recommend Accept (Poster), although the paper remains borderline. The paper proposes an original and practically relevant context-distillation objective for test-time training, and the rebuttal substantially addressed the principal concerns identified in the initial meta-review. In particular, the authors clarified that the from-scratch IP-TTT baseline uses the original LM-aligned objective, corrected and reran the affected continual-pretraining experiments, and showed that IP-TTCD remains stronger under the corrected comparison. They also extended the evaluation to LLaMA-3.1-8B at 64K context and provided both FLOP accounting and fused-kernel measurements, showing that the optimized prefill overhead over IP-TTT is modest. Although the continual-pretraining gains are sometimes small, the controlled from-scratch experiments show substantial improvements at longer contexts. The authors also convincingly clarified that Cartridges addresses a materially different offline, corpus-specific, multi-query setting, although this distinction should be explained carefully in the final paper. Remaining limitations include the absence of a fully compute-matched pretraining comparison and a systematic teacher–student window-ratio ablation, but I do not view these as sufficient grounds for rejection given the originality of the method and the evidence provided.
Read meta-review
Meta-review
The paper introduces Test-Time Context Distillation (TTCD) and its in-place variant, IP-TTCD, which use a long-window teacher to train the fast weights of a short-window student to retain distant context according to its future utility, with promising results across synthetic tasks, pretraining, and continual pretraining. The paper received mixed reviews but is currently leaning toward rejection, primarily because the main comparison against IP-TTT may use a reconstruction objective rather than the NTP-aligned objective central to that baseline, potentially undermining the principal empirical claim (see Reviewer ezRc Weakness 1). The author response should establish that this comparison is faithful or provide compelling existing evidence that the conclusions remain valid under the proper baseline. The response should also clarify the method’s practical scope given the limited model sizes and context lengths, weak gains—and even degradation—on Qwen3, and the absence of compute- or throughput-normalized comparisons (see Reviewer wRM3 Questions 1 and 3; Reviewer 6dJG Questions 1 and 2). Finally, the authors should more carefully distinguish TTCD from prior test-time context-distillation methods such as Cartridges and clarify the novelty beyond this work (see Reviewer ezRc Weakness 3). Addressing these concerns convincingly would materially improve the paper’s prospects for acceptance.
Post Rebuttal/Discussion Meta-Review
The rebuttal satisfactorily addresses the three critical concerns identified in the initial meta-review:
- The allegedly crippled IP-TTT baseline was largely a misunderstanding. The from-scratch experiments used the original LM-aligned IP-TTT implementation. The authors acknowledged and corrected an error in the continual-pretraining configuration, reran those experiments, and IP-TTCD remained stronger.
- The limited-scale concern was addressed with an 8B/64K experiment. The improvement over IP-TTT is small there, but the stronger gains in the controlled from-scratch experiments remain meaningful, especially at longer contexts.
- The efficiency concern was addressed unusually well through FLOP accounting and fused-kernel measurements. IP-TTCD costs roughly 10% more FLOPs than IP-TTT, while optimized prefill overhead is only about 1.4–6.7%. This makes the performance–cost tradeoff defensible.
I also find the authors’ position on Cartridges persuasive. It is closely related conceptually and deserves careful discussion, but its offline, corpus-specific, synthetic-data-based, multi-query setting is sufficiently different that the absence of a direct comparison should not be rejection-determining.
The residual weaknesses are real: continual-pretraining gains over IP-TTT are modest, the teacher–student window ratio is not ablated, and no fully compute-matched training comparison is provided. However, these now look like limitations rather than fatal deficiencies. Importantly, Reviewer ezRc’s original primary objection was resolved, while the subsequent “on par” characterization does not adequately account for the substantial from-scratch RULER improvements. Reviewer wRM3’s remaining objections are also fairly general and partially answered by the new 8B and efficiency results.
Final justification
Taking into account the reviews, author response, and reviewer discussion, I recommend Accept (Poster), although the paper remains borderline. The paper proposes an original and practically relevant context-distillation objective for test-time training, and the rebuttal substantially addressed the principal concerns identified in the initial meta-review. In particular, the authors clarified that the from-scratch IP-TTT baseline uses the original LM-aligned objective, corrected and reran the affected continual-pretraining experiments, and showed that IP-TTCD remains stronger under the corrected comparison. They also extended the evaluation to LLaMA-3.1-8B at 64K context and provided both FLOP accounting and fused-kernel measurements, showing that the optimized prefill overhead over IP-TTT is modest. Although the continual-pretraining gains are sometimes small, the controlled from-scratch experiments show substantial improvements at longer contexts. The authors also convincingly clarified that Cartridges addresses a materially different offline, corpus-specific, multi-query setting, although this distinction should be explained carefully in the final paper. Remaining limitations include the absence of a fully compute-matched pretraining comparison and a systematic teacher–student window-ratio ablation, but I do not view these as sufficient grounds for rejection given the originality of the method and the evidence provided.
- Rating
- 3/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors propose Test-Time Context Distillation (TTCD), a test-time training (TTT) framework that leverages a context-distillation objective instead of standard reconstruction or next-token prediction losses for long-context language modeling. Specifically, TTCD uses a teacher with a long sliding window to update the fast weights of a short-window student using the reconstruction loss of the MLP output projections. This allows the student to compress and store distant contextual information that it could not infer locally. The authors focus on an in-place variant (IP-TTCD) that updates the existing MLP down-projection parameters online. They evaluate their approach on pre-training from scratch (up to 760M parameters) and continual pre-training (up to 1.7B parameters), demonstrating improvements in long-context modeling perplexity and synthetic recall tasks compared to sliding-window attention and selected TTT baselines.
Strengths and weaknesses
Strengths
- The paper is nicely written, and the proposed IP-TTCD approach is simple, intuitive, and easy to follow.
- Combining context distillation with test-time training is a very neat idea to ensure that models allocate memory capacity for distant information with future utility.
Weaknesses
My main concerns of the paper are related to its experiments:
-
I think the main TTT baseline, IP-TTT, is implemented sub-optimally which undermines the main claims of the paper. In Section 4.2 (Footnote 2), the authors state that they use "In-Place TTT with the target as input embedding" which effectively is a reconstruction loss. However, the original IP-TTT paper explicitly argues against generic reconstruction objectives and introduces a carefully designed Next-Token-Prediction (NTP) aligned update objective to achieve its strong performance. By stripping IP-TTT of its core mechanism and forcing it to use a reconstruction target, the authors are evaluating a crippled baseline. The authors need to run the proper IP-TTT baseline with the correct NTP-aligned objective to solidify their claims of improvement.
-
The model sizes used in the experiments are quite small (up to 760M for pre-training and 1.7B for continual pre-training). In the current literature, it is standard to evaluate such test-time adaptation methods on much larger models to demonstrate practical viability. For instance, the original IP-TTT paper evaluates on models up to the 14B scale (e.g., Qwen-14B). Could the authors scale their evaluation to more competitive model sizes?
-
Context distillation for test-time training is a concept that has been actively explored in the literature, yet the authors do not thoroughly compare against these related approaches. For instance, the Cartridges paper (Eyuboglu et al., 2025) directly utilizes a context distillation objective during test-time training (which they refer to as "self-study"). However, the authors simply brush it off in the related work (Line 113) as training "small document weights from synthetic QA pairs" without comparing against it as a TTT + context distillation baseline.
Minor writing comments:
- Eq.6: The weight gradient has a typo: negative sign is missing.
- Eq. 10: Eq. 10 typo on the right -> \bar{Z_i}^{(S)}
Questions
See the weaknesses section above.
Limitations
See the weaknesses section above.
Final justification
After engaging with the authors during the rebuttal, I still feel that the experimental results are weak (I detailed that in my review and during the discussion with the authors). Based on that, I'd recommend borderline rejection. I understand that this makes the AC job difficult but as a reviewer I'd have to (internally) calibrate against the other NeurIPS papers in my batch and this paper is clearly better in quality than other papers that were clear reject for me.
Formatting concerns
No concerns.
4 comments
Read the rebuttal
I thank the authors for clarifying how the main baseline is implemented which was my major concern. However, I do note that even in this rebuttal and in the paper, the results are mixed and improvement of IP-TTCD over the main baseline IP-TTT is very marginal (if at all). If you add the complexity of adding an additional long-context model call, in IP-TTCD, to get the context-distilling targets, IP-TTT seems much simpler yet on par.
Also, I am not sure if I fully buy the rationale in the rebuttal as to why Cartridges is not the right baseline for IP-TTCD. One aspect of IP-TTCD is compressing a long-context in a shorter-context model parametrically (you say so in the introduction). From that aspect, Cartridges is just the right baseline. Whether the updates are offline in their case and online in yours, or whether Cartridges update the soft-kv through synthetic queries, is besides the point. You'd at least want to compare how well IP-TTCD compresses the long-context compared to Cartridges.
Anyway, I thank the authors for putting in the effort to prepare the rebuttal.
Further Clarification
Thank you for the follow-up. We agree that the wider-context view introduces additional architectural complexity, and that Cartridges is conceptually relevant to the broad problem of representing long context compactly. However, we would like to clarify the following points.
Firstly, “marginal, if at all” (on performance) does not characterize our main controlled comparison with IP-TTT.
In the pretrain-from-scratch 340M/760M experiment, the sliding window perplexity improvement of IP-TTCD is significant: in Figure 2, the improvement between IP-TTCD and IP-TTT is similar to or even more than the improvement between IP-TTT and Gated DeltaNet. On RULER benchmarks, the 760M IP-TTCD improves average RULER NIAH from 33.88 to 46.92 at 8K, from 23.92 to 41.75 at 16K, and from 9.29 to 21.96 at 32K. The 32K result is a 2.36x improvement. This is clearly not marginal.
We agree that the continual-pretraining average improvements are more modest, which is unavoidable given the quality of open-source data and limited compute budget. Nevertheless, our average score improvement over IP-TTT is generally very close to IP-TTT's improvement over the naive CPT baseline, which should not be seen as marginal.
Secondly, the inner teacher + student views are not independent long-context model calls. It is a fused architectural design.
The teacher and student share the model weights and Q/K/V, and the student window is a strict subset of the teacher window. Our fused dual-window kernel computes both outputs in one KV sweep. In direct end-to-end measurements, IP-TTCD’s prefill overhead relative to IP-TTT is only 1.3%–6.6% on the FlashAttention-3 stack. We agree that IP-TTCD is more involved architecturally, but given these measured costs and the from-scratch improvements above, we do not think “simpler yet on par” accurately describes the quality–runtime comparison because our improvement is substantial.
Finally, about lack of comparison with Cartridges.
We believe the reviewer’s statement that the offline/online distinction is “besides the point” is due to serious misunderstandings. The distinction is precisely why Cartridges cannot be fairly compared to our method under our current data format. In fact, the paper of Cartridges already pointed out the distinction to TTT methods when they discussed related works. We list the key differences in detail below.
Difference 1: What are the contexts to compress?
-
Cartridges: A complete, fixed corpus (C). The entire corpus is available before compression or evaluation starts.
-
IP-TTCD: Receives a causal sequence chunk by chunk. At chunk (i), neither future chunks nor queries are available.
Simply using the Cartridges corpus as a causal sequence for IP-TTCD does not resolve the difference. For example, IP-TTCD’s evaluation is online and chunk-by-chunk, if one wants to perform a fair comparison, one needs to perform the same chunk-by-chunk compression for Cartridges to produce chunk-wise Cartridges states. If not, not only is the information compressed by IP-TTCD and Cartridges very different, one cannot evaluates the perplexity on each chunk as well. Implementing this would be a substantial extension of the original Cartridges method and well beyond our scope.
Difference 2: How is the training data used for compression constructed?
-
Cartridges: Samples many sub-corpora from (C), applies several seed-prompt templates, and asks the LLM to generate both sides of synthetic conversations about those sub-corpora. This produces a new corpus-specific training dataset (D_C).
-
IP-TTCD: Does not generate any synthetic data. Its teacher and student process the actual incoming tokens with different causal window sizes to obtain the hidden states. The difference between their representations provides the update signal immediately.
In order to perform Cartridges, the model needs to be capable of self-instruction-type synthetic data generation, while IP-TTCD does not use synthetic or augmented inputs. It is not obvious how to perform the same synthetic data generation or SFT with synthetic data for IP-TTCD while maintaining a fair comparison.
Difference 3: How is the method evaluated?
-
Cartridges: Freezes the learned KV states after training and reuses them for many held-out queries about the same corpus. Its preparation cost is justified and amortized by this multi-query setting.
-
IP-TTCD: Uses its evolving fast weights immediately for subsequent tokens in the same sequence. Each new sequence produces a new state through the same pretrained update rule.
Cartridges's performance is measured by evaluating on a held-out dataset, while IP-TTCD evaluates the perplexity improvement on subsequent tokens in the same sequence. The goals are already substantially different and should not simply be thought of as “compression methods” without careful distinction.
Further Clarification (Continued)
To sum up, at a high level, Cartridges asks: Given a complete corpus and time to study it, how can we build a reusable and detachable memory for unseen questions? IP-TTCD asks: While reading an unseen sequence once, how should the model update its internal memory to adapt to what comes immediately next? The former synthesizes training data to perform multiple training steps; the latter learns on the fly via internal TTT updates. Calling both “context compression” does not make them comparable in reality, as their similarity is more on the philosophical side. A direct comparison is possible only after changing one method significantly and, therefore, changing the research question itself.
This distinction is also consistent with the taxonomy in the related work section of the Cartridges paper itself, which discusses linear attention, Titans, and TTT as architectural approaches that learn how to maintain long-context state through model training, while positioning Cartridges as an offline cache-compression/post-training method applied separately to each complete corpus. IP-TTCD clearly belongs to the former line.
We are happy to clarify or expand this distinction further. If the reviewer has a concrete protocol that preserves the defining assumptions of both methods, we would appreciate details on how full-corpus access, synthetic-data generation, optimization steps, intermediate causal states, and multi-query amortization should be controlled.
- Rating
- 3/6
- Confidence
- 4/5
- Quality
- 4/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 4/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes Test-Time Context Distillation (TTCD) and its in-place variant, In-Place TTCD (IP-TTCD) for effective long-context modelling. TTCD uses a context distillation framework with a long-window teacher and short-window student to adapt existing MLP parameters as the fast weights to store distant information useful for future prediction. IP-TTCD is evaluated on synthetic tasks, pre-training from scratch, and continual pre-training demonstrating improved performance compared to baselines on various models (with 340M, 360M, 760M, and 1.7B parameters).
Strengths and weaknesses
Quality
The use of a context distillation teacher-student framework for long-context modelling is an interesting direction. The framework can potentially bridge the gap between long-context models and short-context models but as per my understanding does not necessarily offer benefit to long-context models.
The models used and evaluated in the experiments are small. Pre-training from Scratch involved 340M and 760M parameter models and continual pre-training involved 360M and 1.7B model parameter models and similarly the maximum context lengths ranged from 32K to 64K. Compared with recent work in TTT, this limited scale is a weakness in evaluation.
The paper briefly and coarsely mentions computational overhead in the limitations section but fails to present a clear study on this especially compared to baselines.
Clarity
The paper is well written but the presentation and organisation of the experiments could be improved. The figures and tables are overly compressed due to page limits which makes it difficult to follow at times.
Significance
An interesting direction which can be more impactful with stronger evaluation including larger models, longer contexts, and computational performance.
Originality
This work is original.
Minor Issues:
- Theorem 1 is more of a preposition than a theorem.
- Figure 3A is a table.
- Appendices not clearly referenced in the main text, for example, Theorem 1 proof not referenced.
Questions
- What are the benefits of IP-TTCD for SOTA / long-context models?
- Does the choice of (delta) context length for the teacher and student impact performance?
- How does the proposed method compare to baselines (including vanilla Transformer) computationally?
Limitations
Yes.
Final justification
After taking into consideration my own initial assessment, the authors' rebuttal, and the other reviews and rebuttals, I will maintain my score. The new results presented are somewhat mixed and require contextualisation within the paper. It is not clear to me how the paper will be edited to include the new results or address concerns raised. Additional studies (for example, teacher:student window ratio) should also be included.
Formatting concerns
No paper formatting concerns to report.
3 comments
Rebuttal
We thank the reviewer for the detailed feedback and for recognizing the originality of our work. We are encouraged that the reviewer described our work as “a very neat idea”. We address each point below and welcome further discussion.
W1/Q1: Limited Scale/Benefits for state-of-the-art long-context models
The framework bridges short- and long-context models, but it does not appear to benefit models that already possess strong long-context capability.
Response:
We thank the reviewer for this constructive comment. To evaluate whether the benefits extend beyond small models, we added continual-pretraining experiments on LLaMA-3.1-8B, a substantially larger pretrained model with native long-context support. The results show that IP-TTCD remains effective at the 8B scale.
| Base Model | Method | 4K | 8K | 16K | 32K | 64K | Avg |
|---|---|---|---|---|---|---|---|
| Llama-3.1-8B | Base | 94.26 | 90.59 | 81.71 | 19.74 | 0.03 | 57.26 |
| Llama-3.1-8B | CPT | 93.87 | 92.58 | 87.32 | 65.19 | 25.30 | 72.85 |
| Llama-3.1-8B | IP-TTT | 93.95 | 92.31 | 88.04 | 66.17 | 26.50 | 73.39 |
| Llama-3.1-8B | IP-TTCD | 93.72 | 92.32 | 88.59 | 66.48 | 27.65 | 73.75 |
| Bold denotes the best result among the continual-pretraining variants. |
For Qwen3-1.7B, all continual-pretraining variants are affected by the same limited 10B-token book-domain training recipe, while IP-TTCD remains the strongest matched variant. We believe that this result reflects the interaction between the continual-training distribution and the base model, rather than a limitation specific to IP-TTCD.
Prior work has shown that abrupt changes in the training distribution during continual pre-training can produce a stability gap and degrade previously acquired capabilities [1]. This consideration is particularly relevant for Qwen3 [2], which was pretrained on approximately 36T tokens of diverse multilingual and multi-domain mixture. Our continual-pretraining corpus is much narrower and substantially smaller. We therefore expect the data mixture and training budget to be important factors, although evaluating broader long-context mixtures remains future work.
[1] Continual Pre-Training of Large Language Models: How to (re)warm your model? https://arxiv.org/abs/2308.04014
[2] Qwen3 Technical Report https://arxiv.org/abs/2505.09388
W3/Q3: Computational comparison
The paper mentions overhead only briefly in the limitations and lacks a clear computational comparison against the baselines, including the vanilla Transformer.
Response:
Thank you for your constructive question! We emphasize that our comparisons are matched in parameter scale and training-token budget, while we acknowledge that our method uses slightly more compute compared to vanilla sliding window transformer and IP-TTT. Based on our experimental setting, we report the FLOPs overhead below:
| Model size | Method | GFLOPs/token | Relative Compute |
|---|---|---|---|
| 340M | Transformer | 0.818 | 1.000× |
| 340M | IP-TTT | 0.849 | 1.038× |
| 340M | IP-TTCD | 0.935 | 1.144× |
| 760M | Transformer | 1.661 | 1.000× |
| 760M | IP-TTT | 1.730 | 1.042× |
| 760M | IP-TTCD | 1.906 | 1.148× |
The additional FLOPs cost arises primarily from computing the long and short-context views and constructing the context-distillation update, which cannot be reduced by kernel level optimization. As for wall-clock time, relative to the corresponding Transformer backbone, our current implementation requires approximately 1.1–1.2× the training time and 1.3–1.5× the prefill time. We believe that the training pipeline may be hard to further optimize much, but the prefill overhead can be significantly reduced through kernel-level optimization.
W4 (minor): Presentation
Figures and tables are overly compressed; Theorem 1 is more appropriately a proposition; Figure 3(a) is a table; and the main text does not sufficiently reference the appendices.
Response.
We thank the reviewer for identifying these presentation issues. We have renamed Theorem 1 as Proposition 1, reformatted Figure 3(a) as a table, added explicit appendix references throughout the experimental section, and improved the layout of the figures and tables. We will make further layout refinements in the camera-ready version.
Q2: Choice of teacher and student context lengths
Does the choice of teacher and student context lengths affect performance?
Response:
Thank you for the great question. In our from-scratch experiments, we fix the teacher and student windows to 2K and 1K, respectively. In continual pretraining, the teacher uses full attention while the student uses a 2K window. These choices are fixed across models and benchmarks rather than tuned separately for each evaluation. Our present experiments do not include a systematic sweep over the teacher–student window ratio, so we have also identified this as an important ablation for our further revision.
Follow-up to W3/Q3: computational comparison against the baselines
We re-implemented IP-TTCD's attention and convolution paths with fused inference kernels. The key observation is that the student's window is contained in the teacher's, so one pass over the KV can produce both windowed outputs — recovering the student's contribution via online-softmax rescaling (FA2) or an exact log-sum-exp combination (FA3). We also replaced the depthwise short convolutions with a chunked kernel.
Kernel-level (64K, H100):
| Kernel | Baseline | Ours |
|---|---|---|
| Dual-window attention, FA2 | 13.2 ms (one FA2 SWA call) | 11.3 ms (both outputs) |
| Dual-window attention, FA3 | two separate calls | ~30% less time |
| Depthwise short conv | cuDNN | 11.6× faster |
FA2 re-applies the sliding-window mask on every KV block, which is why our kernel computes both outputs faster than even a single FA2 SWA call.
Table R3 — End-to-end prefill throughput (K tokens/s), FlashAttention-3 stack. Data of Fig. 5; mean of 4 repeats on H100; teacher window w_T, student = w_T/2; IP-TTCD uses our fused LSE-combination kernel.
| Setting | Model | w_T=2K | w_T=4K | w_T=8K | w_T=16K |
|---|---|---|---|---|---|
| 64K, bs=1 | Transformer (SWA) | 363 | 291 | 215 | 144 |
| IP-TTT | 334 | 273 | 208 | 141 | |
| IP-TTCD | 313 | 263 | 201 | 139 | |
| 64K, bs=4 | Transformer (SWA) | 362 | 292 | 216 | 146 |
| IP-TTT | 319 | 269 | 205 | 141 | |
| IP-TTCD | 305 | 258 | 198 | 137 | |
| 256K, bs=1 | Transformer (SWA) | 366 | 293 | 212 | 137 |
| IP-TTT | 334 | 279 | 206 | 135 | |
| IP-TTCD | 316 | 265 | 197 | 131 |
Relative to IP-TTT this is a +1.4% to +6.7% prefill cost, and relative to the vanilla sliding-window Transformer 1.04×–1.19×, in both cases shrinking as the window grows; on the FA2 stack the corresponding ranges are −1.3% to +3.2% and 1.00×–1.11× (IP-TTCD is slightly faster than IP-TTT at the largest window since FA2 is not optimized on H100 for SWA, and matches the Transformer at w_T=16K). End-to-end, the fused kernels shorten 64K prefill by 10–14% over our original implementation.
Together with the per-token FLOPs table in our earlier response, this provides the computational comparison against the baselines — including the vanilla Transformer — that you asked for: the inference gap was largely implementation slack rather than intrinsic cost, and at inference IP-TTCD is now essentially on par with IP-TTT on prefilling. We will include the details in the new appendix "Inference Efficiency: Fused Dual-Window Attention" of the revision.
Thank you for the comprehensive response. I have no further questions or comments.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 4/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper introduces a new framework to the Test-Time Training (TTT) approach by trying to consolidate the two well-known TTT objectives of either emphasizing compression of past context without regard to future utility, or adaptation-based objectives (like Next Token Prediction) that adapt to recent context but ignore distant content. Inspired by prior literature in Context Distillation, the paper proposes: Test-Time Context Distillation (TTCD), a single TTT objective framework that compresses past context according to its future utility. To achieve this, the paper utilizes a long-window "teacher" and a short-window "student" over the same shared backbone, using the discrepancy between their hidden states as a dense self-supervised signal to update the student's fast weights, thereby training the model to memorize whatever the short window misses but the long window finds useful. The paper uses a specific instance of TTCD called In-Place Test-Time Context Distillation (IP-TTCD), which applies the discrepancy as a low-rank correction to the existing MLP down-projection (following the in-place TTT design), backed by a theoretical argument that the update can transfer an in-context solution learned earlier in a sequence to a related later query. The paper further shows empirically, the validation of IP-TTCD through from-scratch pretraining at 340M/760M scales (outperforming other similar frameworks), synthetic MAD benchmark diagnostics, and the "drop-in" augmentation of IP-TTCD via continual pretraining on off-the-shelf models (SmolLM2, Qwen3) to extend their usable context length.
Strengths and weaknesses
Strengths
1. Quality
- Broad Empirical Validation: The paper contains multiple experiments including two pretraining scales (340M/760M), multiple benchmark families (sliding-window PPL on Books, RULER NIAH, BABILong, MAD synthetic tasks, common-sense QA), and two deployment regimes (from-scratch pretraining and continual pretraining on SmolLM2/Qwen3). These empirical validations showcases the improvement provided by TTCD over other TTT frameworks.
- Useful Ablations: These help in understanding the contribution of specific architectural choices such as convolution, projection, layer count, and chunk size in performance of TTCD.
2. Clarity
- Well Structured - The overall structure is easy to follow, and Figure 1 gives a good at-a-glance summary of the teacher/student setup. The extensive coverage of prior works and the motivation of the work helps in understanding the novelty of the proposed framework.
- Correct Notation usage: Notation is mostly introduced before use and stays consistent through the derivation of the update rule.
3. Significance
- Important framework considered: Deciding what to retain for future utility, not just compressing everything uniformly targets a genuine gap between reconstruction-style and NTP-style TTT objectives, and the RULER/BABILong gains at longer contexts (e.g., roughly doubling IP-TTT's 32K NIAH score) are large enough to matter in practice.
- Drop-In placement for off-the shelf models: Showing the method works as a continual-pretraining add-on to off-the-shelf models (SmolLM2-360M/1.7B) rather than only from-scratch is a meaningful practicality signal, since most practitioners can't afford from-scratch pretraining.
4. Originality
- Combining context distillation to an online TTT framework: CD is an offline, post-hoc compression technique, with online test-time training is a genuinely fresh combination; prior TTT objectives (reconstruction or NTP) don't have an explicit forward-looking "will this be useful later" signal, and the teacher/student sliding-window construction is a clean way to manufacture that signal without extra supervision.
Weakness
-
The reported 1.3–1.5× prefill and 1.1–1.2× training slowdown is significant for a method whose competitive set is efficiency-motivated (DeltaNet, Gated DeltaNet, SWA); there's no throughput-normalized or FLOP-matched comparison showing the accuracy gain is worth the overhead relative to, say, simply widening the SWA window or using a larger baseline model at equal cost.
-
The continual-pretraining gains largely evaporate on Qwen3, a base model that already has decent native long-context ability (Table 6), suggesting the method's benefit may be concentrated in "fixing" weak long-context base models rather than improving already-strong ones, which narrows the claimed significance.
Questions
Q1. Compute/efficiency overhead relative to optimized baselines.
The paper reports a 1.3–1.5× prefill and 1.1–1.2× training slowdown but attributes this entirely to lacking kernel-level optimization, without giving readers a way to judge whether the accuracy gains justify the overhead once optimized. Could the authors either (a) apply comparable kernel-level optimizations (or at least equivalent-effort implementations) to a subset of the baselines, or (b) provide a small-scale kernel-optimized version of IP-TTCD itself (even at 340M) to show how much of the current overhead is implementation slack versus fundamental to the method? A wall-clock or FLOPs-normalized comparison (e.g., accuracy at matched training budget rather than matched token count) would let readers judge whether IP-TTCD's gains hold up once compute cost is accounted for, or whether a bigger/longer-trained baseline at equal cost would close the gap. This would strengthen the paper's significance claim substantially if the overhead turns out to be mostly an unoptimized-kernel artifact; conversely, if the gap persists even under a fairer comparison, it would meaningfully temper the practical case for adoption.
Q2. Explaining the Qwen3 results, where continual pretraining underperforms the raw base model.
In Table 6, all continual-pretraining variants (CPT, IP-TTT, IP-TTCD) underperform the raw Qwen3 base models, and IP-TTCD's advantage over the other CPT variants is marginal (e.g., 78.09 vs. 77.81/77.83 on 1.7B). This is a notably different pattern from the SmolLM2 results, where CPT variants clearly help. Do the authors have a hypothesis for why continual pretraining hurts Qwen3 specifically? Is IP-TTCD's benefit essentially conditional on the base model having weak native long-context ability to begin with?
Limitations
yes
Final justification
The paper has unique contributions to the field of Test time training by combining context distillation and an online TTT algorithm. The only important concern was the performance of the algorithm, which the authors had optimised during the rebuttal period. But the concern was from the point of real world usability of the algorithm, thus I strongly feel like the paper can be given a score no higher than 5.
Formatting concerns
None
3 comments
Rebuttal
We sincerely thank the reviewer for their careful reading and constructive feedback. We are encouraged that the reviewer found the paper well written and the direction original, describing the combination of context distillation and test-time training as “a genuinely fresh combination”. We address each point below and welcome further discussion.
Q1 Compute/efficiency overhead relative to optimized baselines.
Response: Thank you for explicitly pointing out our limitations and providing constructive comments! We totally agree that the extra computational overhead should be stated more clearly, which cannot be entirely attributed to lacking kernel-level optimization. We acknowledge that though our comparisons are matched in parameter scale and training-token budget, our method uses slightly more compute compared to vanilla sliding window transformer and IP-TTT. Based on our experimental setting with ⅙ layers of IP-TTCD layer, we report the FLOPs overhead below:
| Model | Method | GFLOPs/token | Relative Compute |
|---|---|---|---|
| 340M | Transformer | 0.818 | 1.000× |
| 340M | IP-TTT | 0.849 | 1.038× |
| 340M | IP-TTCD | 0.935 | 1.144× |
| 760M | Transformer | 1.661 | 1.000× |
| 760M | IP-TTT | 1.730 | 1.042× |
| 760M | IP-TTCD | 1.906 | 1.148× |
IP-TTCD therefore introduces approximately 14–15% additional FLOPs relative to the Transformer and approximately 10% relative to IP-TTT in these configurations. The additional arithmetic primarily arises from computing the long- and short-context views and constructing the context-distillation update. These operations are intrinsic to the method and cannot be eliminated through kernel optimization, although optimized kernels can reduce their wall-clock overhead.
With our current implementation, IP-TTCD requires approximately 1.1–1.2× the training time and 1.3–1.5× the prefill time of the corresponding Transformer backbone. The training overhead is already relatively close to the theoretical FLOPs overhead, while prefill has greater potential for improvement through kernel fusion and implementation-level optimization. We have expanded the efficiency discussion in the revision to report both theoretical compute and measured wall-clock overhead.
We agree that a fully FLOPs-matched pretraining comparison would provide complementary evidence. Such a comparison would require retraining the baselines with adjusted model sizes or token budgets and is beyond our rebuttal compute budget. We therefore clarify the scope of our current claim: IP-TTCD consistently improves long-context quality under matched parameter and token budgets, at a measurable but moderate additional computational cost.
Q2: Continual pretraining underperforms raw Qwen3
Response: We first clarify that this behavior is not always the case across the Qwen3 family. On Qwen3-0.6B, IP-TTCD improves the raw-model average from 69.70 to 70.66. On Qwen3-1.7B, all three continual-pretraining variants perform below the raw model, but IP-TTCD remains the strongest matched variant, achieving 78.09, compared with 77.83 for IP-TTT and 77.81 for standard CPT. The fact that the effect also appears for attention-only CPT suggests that it is associated with the continual-pretraining recipe rather than being specific to TTCD.
This behavior is consistent with distribution shift during continual pretraining. Prior work shows that adapting to a new training distribution can degrade previously acquired capabilities, depending on the data mixture, learning-rate schedule, and training budget [1]. Qwen3 [2] was originally pretrained on approximately 36T tokens from a diverse multilingual and multi-domain mixture, including a dedicated long-context stage. In contrast, our controlled continual-pretraining setting uses only 10B tokens from a substantially narrower book-domain corpus. We therefore view the Qwen3-1.7B result as an interaction between the base model and our limited continual-training distribution. More importantly, our new LLaMA-3.1-8B experiments show that degradation is not an inherent consequence of continual pretraining on a larger pretrained model with native long-context support. Standard CPT improves average RULER accuracy from 57.26 to 72.85, while IP-TTT and IP-TTCD further improve it to 73.39 and 73.75, respectively. At 32K and 64K, IP-TTCD improves the scores from 19.74 and 0.03 to 66.48 and 27.65.
Together, these results show that IP-TTCD’s benefit is not conditional on a weak base model. The absolute effect of continual pretraining depends on the base model and training distribution, but under matched continual-pretraining conditions, IP-TTCD consistently performs competitively with or improves over CPT and IP-TTT.
| Base Model | Method | 4K | 8K | 16K | 32K | 64K | Avg |
|---|---|---|---|---|---|---|---|
| Llama-3.1-8B | Base | 94.26 | 90.59 | 81.71 | 19.74 | 0.03 | 57.26 |
| Llama-3.1-8B | CPT | 93.87 | 92.58 | 87.32 | 65.19 | 25.30 | 72.85 |
| Llama-3.1-8B | IP-TTT | 93.95 | 92.31 | 88.04 | 66.17 | 26.50 | 73.39 |
| Llama-3.1-8B | IP-TTCD | 93.72 | 92.32 | 88.59 | 66.48 | 27.65 | 73.75 |
[1] Continual Pre-Training of Large Language Models: How to (re)warm your model? https://arxiv.org/abs/2308.04014
[2] Qwen3 Technical Report https://arxiv.org/abs/2505.09388
Follow-up to Q1: kernel-optimized IP-TTCD
Following your suggestion (b), we re-implemented IP-TTCD's attention and convolution paths with fused inference kernels. The key observation is that the student's window is contained in the teacher's, so one pass over the KV can produce both windowed outputs — recovering the student's contribution via online-softmax rescaling (FA2) or an exact log-sum-exp combination (FA3). We also replaced the depthwise short convolutions with a chunked kernel.
Kernel-level (64K, H100):
| Kernel | Baseline | Ours |
|---|---|---|
| Dual-window attention, FA2 | 13.2 ms (one FA2 SWA call) | 11.3 ms (both outputs) |
| Dual-window attention, FA3 | two separate calls | ~30% less time |
| Depthwise short conv | cuDNN | 11.6× faster |
FA2 re-applies the sliding-window mask on every KV block, which is why our kernel computes both outputs faster than even a single FA2 SWA call.
Table R3 — End-to-end prefill throughput (K tokens/s), FlashAttention-3 stack. Data of Fig. 5; mean of 4 repeats on H100; teacher window w_T, student = w_T/2; IP-TTCD uses our fused LSE-combination kernel.
| Setting | Model | w_T=2K | w_T=4K | w_T=8K | w_T=16K |
|---|---|---|---|---|---|
| 64K, bs=1 | Transformer (SWA) | 363 | 291 | 215 | 144 |
| IP-TTT | 334 | 273 | 208 | 141 | |
| IP-TTCD | 313 | 263 | 201 | 139 | |
| 64K, bs=4 | Transformer (SWA) | 362 | 292 | 216 | 146 |
| IP-TTT | 319 | 269 | 205 | 141 | |
| IP-TTCD | 305 | 258 | 198 | 137 | |
| 256K, bs=1 | Transformer (SWA) | 366 | 293 | 212 | 137 |
| IP-TTT | 334 | 279 | 206 | 135 | |
| IP-TTCD | 316 | 265 | 197 | 131 |
Relative to IP-TTT this is a +1.4% to +6.7% prefill cost, shrinking as the window grows; on the FA2 stack the corresponding range is −1.3% to +3.2% (IP-TTCD is slightly faster at the largest window since FA2 is not optimized on H100 for swa). End-to-end, the fused kernels shorten 64K prefill by 10–14% over our original implementation.
So the inference gap you flagged was largely implementation slack rather than intrinsic cost: at inference IP-TTCD is now essentially on par with IP-TTT on prefilling. We'll include the details are in the new appendix "Inference Efficiency: Fused Dual-Window Attention" of the revision.
Thanks for clarifying the questions
Dear Authors,
Thanks a lot for clarifying my questions. No further questions or comments. I maintain my score.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We thank the reviewer for the careful reading and important comments regarding the IP-TTT baseline, evaluation scale, and related work.
W1: IP-TTT baseline and the NTP-aligned objective
Response:
We believe this concern arose from imprecise wording, and we appreciate the opportunity to clarify it. First, the baseline in Section 4.2 is using IP-TTT’s implementation and the LM-aligned formulation. For the from-scratch experiments in Section 4.2, our baseline follows IP-TTT’s recommended input_embed configuration using IP-TTT's original codebase. In IP-TTT, “input embedding” denotes the source representation X0, not the final optimization target. The actual LM-aligned target is $V=Conv1D(X0)Wtarget$ where the Conv1D transformation introduces future-token information. The fast-weight update is applied only to subsequent chunks, preserving causal inference. This differs fundamentally from the reconstruction target Vt=Ext, which the IP-TTT paper explicitly contrasts with its LM-aligned target.
Moreover, we have replaced the misleading phrase “target as input embedding” with the more precise description “the LM-aligned Conv1D target constructed from input embeddings.” Under this baseline, IP-TTCD continues to outperform IP-TTT across the evaluated context lengths.
For the continual-pretraining experiments in Section 4.3, we did identify an implementation error as noted in the submission. Our initial IP-TTT configuration used a strictly past-only short convolution, which removed the intended future-token information and therefore did not correctly instantiate the LM-aligned target. We have already corrected this configuration after submission, reran the IP-TTT experiments, and updated all corresponding results. With the corrected baseline, IP-TTCD remains stronger below. We hope the clarification and these additional results address your concern.
SmolLM2-360M
SmolLM2-1.7B
W2: Evaluation at larger model scales
Response:
We agree and have added continual-pretraining experiments on LLaMA-3.1-8B with 64K sequences. In the following table, IP-TTCD achieves an average RULER score of 73.75, compared with 73.39 for IP-TTT and 72.85 for standard CPT. At 64K, IP-TTCD achieves 27.65, compared with 26.50 and 25.30, respectively.
These experiments substantially extend our original evaluation and show that the advantage persists at the 8B scale.
W3: Relationship and comparison with Cartridges
Response:
We agree that Cartridges is closely related and have substantially expanded its discussion in the revised related-work section. Both methods use context distillation to encode long-context information into a compact trainable representation, but they operate under fundamentally different computational and evaluation settings.
Cartridges performs offline, corpus-specific optimization to compress contexts. It generates synthetic conversations about a fixed corpus and optimizes a compact KV cache, which is frozen and reused across downstream queries about that corpus. Its preparation cost can therefore be amortized over those queries.
In contrast, TTCD is pretrained end-to-end to learn an online test-time update. At inference, it updates the existing MLP down-projection weights causally and chunk by chunk as the sequence arrives. These fast weights function as an evolving recurrent state, rather than as a fixed representation prepared before querying. TTCD also does not require synthetic questions–answer generations for each test corpus.
Therefore a direct numerical comparison is not meaningful without defining a substantially different evaluation protocol. Such a protocol would need to specify whether offline corpus optimization is allowed, whether synthetic supervision is permitted, whether the corpus/contexts is known in advance and how many downstream queries are used to amortize the preparation cost. Allowing these assumptions would depart from TTCD’s online setting and is out of the scope of this paper, whereas removing them would change the central Cartridges protocol.
We will add these distinctions to the paper and agree that developing a controlled benchmark encompassing both offline corpus compression and online test-time memory would be valuable future work.
Minor: typos
Response:
We thank the reviewer for catching these errors. We will add the missing negative sign in Equation 6 and corrected Equation 10 to use Zˉi(S) in the final revision.