Skip to content
Preprint

Self-Guided Test-Time Training for Long-Context LLMs

Jul 2026 · 0 citations · 28 references
Computer Science

TL;DR

A simple method, Self-Guided TTT (S-TTT), which improves accuracy for both Qwen3-4B-Thinking-2507 and Llama-3.1-8B-Instruct, achieving up to a 15% relative improvement.

Abstract

Long-context processing has become increasingly important for large language models (LLMs), but simply extending the context window does not guarantee effective utilization of long inputs. As input length grows, accuracy often degrades, indicating that models still struggle to identify and use the evidence most relevant to a question. A promising way to improve long-context utilization is test-time training (TTT), which treats the test context as a training example for instance-specific parameter adaptation. However, applying TTT to the entire long context is prohibitively expensive, while adapting on randomly sampled spans introduces severe noise. Because most spans in a long context are irrelevant to the specific question, training on them may even degrade the base model's performance. Our preliminary study shows that TTT is highly sensitive to training-span quality: on LongBench-v2, TTT on randomly sampled spans hurts performance, whereas TTT on oracle spans substantially improves it. Motivated by this, we propose a simple method, Self-Guided TTT (S-TTT): before adaptation, the model identifies the evidence spans it should learn from, and the standard language-modeling training objective is applied only to those selected spans. On two challenging long-context reasoning benchmarks, LongBench-v2 and LongBench-Pro, S-TTT improves accuracy for both Qwen3-4B-Thinking-2507 and Llama-3.1-8B-Instruct, achieving up to a 15% relative improvement.

View source

Similar papers

Preprint Aug 2026

Learning What to Remember: Test-Time Training via Context Distillation

This work proposes TTCD, a TTT framework that introduces a self-supervised objective for allocating limited memory capacity for future use, and focuses on an in-place variant: In-Place TTCD, which uses the existing MLP parameters as the fast weights.

Zi-Xuan Wang, Xingyu Dang, Ruiming Zhu et al. · 0 citations
Preprint Jul 2026

Understanding Axes of Difficulty For Long Context Tasks Via PredicateLongBench

PredicateLongBench is proposed, a benchmark that stress-tests long-context reasoning by asking models to identify the longest contiguous subsequence of words in a long input that satisfies given predicates/constraints drawn from a broader predicate class.

Siddhartha Jain, A. Velingker · 0 citations
#machine learning Preprint Aug 2026

OctoLong: Mid-Training On Cross-Repository Code Contexts Enhances Long-Context Modeling

OctoLong is introduced, a context engineering pipeline that instruments an AST parser, a language server backend, and a package manager to facilitate the recursive retrieval of code references, enabling the curation of dependency-rich code contexts of millions of tokens in length.

Indraneil Paul, F. Helm, Goran Glavas et al. · 1 citation

The Pitfalls of Maximum Likelihood Training of TPMs for Controllable Language Generation

This work finds that likelihood-trained TPMs can result in failed generations due to overly large corrections to the LM’s logits, and trains TPMs with LM-aligned objectives that better align with the LM token-probability space.

Hanzhang Liu, William Zhao, Zi-Lei Shao et al. · 0 citations
Preprint Aug 2026

Rethinking Expressivity and Efficiency in Test-Time Training

Under the standard approximation of taking gradients at the chunk-start weights, a closed-form state transition is derived that exactly reproduces the chunk-end fast-weight and momentum states of the per-token recurrence of Test-Time Training.

Zeyun Zhong, Joya Chen, Manuel Martín et al. · 2 citations
Preprint Aug 2026

From Specialization to Generalization: Instruction-tuned LLMs for Robust Harmful Content Mitigation

By thoroughly unifying 36 English hate speech datasets spanning multiple labeling schemes, this work fine-tune a generalist LLM, based on Qwen3 (Qwen Team, 2025), specifically for hate speech mitigation, demonstrating not only state-of-the-art performance on in-domain benchmarks but also substantial improvements in cro...

Lukas Edman, Daryna Dementieva, Alexander Fraser · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.