Research map / Large language models / Reasoning and chain of thought
Let's (not) just put things in Context: Test-time Training for Long-context LLMs
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes query-only test-time training (qTTT), which caches K/V with one prefill and takes a few gradient steps on query projections over short spans, to counter attention score dilution in long-context LLMs under FLOP-matched budgets.
Problem
Long-context LLMs under-allocate attention to buried evidence as context grows (score dilution), and inference-time thinking tokens give diminishing returns for long contexts.
Approach
Instead of generating more thinking tokens with frozen weights, perform a single prefill to cache keys/values and then a few gradient updates only on the query projection matrices using short random spans, reusing the KV cache so the target-distractor logit margin increases at inference time.
Key results
- On LongBench-v2 with Qwen3-8B, qTTT raises the average from 42.3 (thinking) to 48.8, and Code Repositories goes 30.0 in-context to 52.0.
- On ZeroScrolls with Qwen3-4B under FLOP-matched budgets, qTTT averages 32.5 versus 23.9 for thinking and 18.4 for in-context.
- On synthetic Bank Transactions at 9,560 context tokens (Qwen3-4B), in-context thinking drops to 1.00% accuracy while qTTT reaches 8.40%, with attention mass 0.25 vs 0.04.
Surprising findings
- Thinking tokens sometimes trail plain in-context decoding on very long contexts (e.g., Qwen3-4B MuSiQue 17.1 in-context vs 7.5 thinking).
- Wall-clock latency of qTTT is roughly comparable to thinking and best-of-N at matched FLOPs, dominated by prefill time.
Limitations
- Gains are task-dependent; summarization tasks show smaller improvements comparable to thinking.
- Only a single (k, N_TTT) setting is evaluated; the trade-off schedule is unexplored.
- Compute-matched comparisons are based on FLOP approximations and a single run per configuration.
Experimental setup
Datasets: LongBench-v2 ZeroScrolls OLMo code repository (synthetic bug localization) synthetic bank transaction logs
Benchmarks: LongBench-v2 ZeroScrolls synthetic bug localization synthetic bank transaction logs
Metrics: accuracy EM/F1 ROUGE attention mass
Baselines: In-context Thinking (chain-of-thought) Self-consistency (SC-N) Beam search
Builds on: test-time training chain-of-thought best-of-n ZeroScrolls LongBench-v2
Closest papers by meaning
- e3: Learning to Explore Enables Extrapolation of Test-Time Compute for LLMs (ICLR 2026 · similarity 0.92)
- Think Deep, Not Just Long: Measuring LLM Reasoning Effort via Deep-Thinking Tokens (ICML 2026 · similarity 0.90)
- Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for LLM Problem-Solving (ICLR 2025 · similarity 0.90)
- Rethinking Expressivity and Efficiency in Test-Time Training (NeurIPS 2026 · similarity 0.90)
- Learning What to Remember: Test-Time Training via Context Distillation (NeurIPS 2026 · similarity 0.90)
- The Surprising Effectiveness of Test-Time Training for Few-Shot Learning (ICML 2025 · similarity 0.90)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
