Manuscript Offprint

arXiv:2610.06269

Evolving in Thought Space: Training a Small Model at Test Time Unlocks Better Discoveries

Chonghe Jiang, Ao Qu, Siyuan Liu, Ruoyun Ma, Zijian Zhou, Dingyi Zhuang, Bo Liu, Han Zheng, Hanfei Yu, Baichuan Mo, Jinhua Zhao, Paul Pu Liang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Open-ended scientific discovery often requires repeatedly proposing and evaluating candidate solutions. LLM-based systems can support this process by generating and refining executable solutions from verifier feedback. Methods such as TTT-Discover use test-time training (TTT) to update the solution-generating LLM from verifier feedback, adapting its generation policy to improve subsequent proposals on the target problem. However, this becomes expensive when reliable execution requires a large model, since training must maintain gradients, optimizer states, and policy statistics while repeatedly generating long, structured outputs. It also complicates credit assignment: outcome-level verifier feedback must jointly evaluate the high-level strategy and its low-level implementation. In this work, we introduce Guidance-TTT, which separates these roles. A compact guidance model is trained at test time to propose high-level strategic changes, while a frozen execution model implements them as complete executable solutions. At each step, the system selects a promising previously discovered solution, proposes a change, executes and verifies it, and updates only the guidance model using an adaptive group-relative RL objective. This concentrates test-time learning on short strategic decisions while retaining the implementation capability of a substantially stronger model without adapting it. Without web access, Guidance-TTT produces strong solutions across four distinct domains: combinatorial optimization (Polyomino Packing), heuristic programming (AHC058), machine learning (Lasso), and GPU kernel optimization (TriMul). Across these tasks, it outperforms the best solutions reported in prior work while remaining competitive with state-of-the-art results on public online leaderboards. Code is available at https://github.com/Human-Agent-Society/reef/tree/guidance-ttt-support.

Table 1: Discovery results across four domains.

MethodPolyomino (Qu et al., 2026)Lasso (Ye et al., 2026)AHC058 (Ye et al., 2026)TriMul1\text{TriMul}^1 (Cao et al., 2026)
Score ↑\uparrowScore ↑\uparrowAtCoder score ↑\uparrowLatency (μs\mu s) ↓\downarrow
Previous SOTA2^289.400.1243849,325,7501131
Ours91.890.1739850,082,7311129

1^{1}TriMul latencies use an H100 80GB GPU with CUDA 12.8, PyTorch 2.7.1, and Triton 3.3.1. See Section 4.1 and Appendix D.3 for evaluation details.

2^{2}“Previous SOTA” refers to the best solutions reported in prior work, rather than the current best entries on public leaderboards.

1 INTRODUCTION

Scientific discovery can be enhanced by LLMs that iteratively propose, evaluate, and refine candidate solutions (Romera-Paredes et al., 2024; Novikov et al., 2025; Qu et al., 2026). Many existing systems keep the LLM frozen and use verifier feedback to select promising candidates and condition subsequent generations through the prompt (Romera-Paredes et al., 2024; Novikov et al., 2025). This supports inference-time search and in-context adaptation without changing model parameters. Test-time training (TTT) additionally updates model parameters using verifier feedback to adapt the generation policy to the current problem (Wang et al., 2025; Yuksekgonul et al., 2026).

Existing discovery-oriented TTT methods train the same LLM that generates the complete candidate solution (Surina et al., 2025; Wang et al., 2025; Yuksekgonul et al., 2026). This coupling creates two challenges. First, reliable solution generation often requires a large model, making direct test-time adaptation expensive in memory and computation (Hu et al., 2022; Yuksekgonul et al., 2026). Second, verifier feedback is applied to the complete output, so a single outcome-level reward must assign credit across both high-level strategy and low-level implementation (Setlur et al., 2025; Samanta et al., 2026). Consequently, a promising strategy may receive poor feedback simply because its implementation fails. These limitations motivate separating strategic guidance from solution implementation: test-time adaptation focuses on deciding what to change, while a capable executor handles how to realize it. This division also reflects how human experts often solve difficult problems through a small number of critical strategic decisions rather than by reconsidering every implementation detail.

Figure

Figure 1: Test-time learning in plan space. TTT-Discover uses verifier reward to update both plan and code generation. Guidance-TTT applies the reward only to the small guidance model, while a frozen executor translates plan changes into code changes.

We therefore introduce Guidance-TTT (Figure 1), with the full workflow shown in Figure 3. A compact guidance model is trained at test time to propose high-level, parent-conditioned changes, while a stronger execution model remains frozen and implements them as complete candidate solutions. Only the guidance model is updated, reducing adaptation cost and focusing test-time learning on strategic decisions while preserving the implementation capability of the frozen executor. We refer to this as learning in thought space, where the learned actions are explicit natural-language proposals rather than complete programs or latent representations. After each execution, the system stores the resulting candidate together with compact summaries describing the solution and its change from the parent. The guidance model conditions on these summaries and the verifier score, while the execution model receives the exact parent solution together with the proposed guidance.

Across four tasks, we train only 8B or 14B guidance while keeping GLM-5.2 frozen, without web access (Table 2). Polyomino reaches 91.89, exceeding four-agent, web-enabled CORAL's 89.40 by 2.49 points. Our Lasso solver is approximately 1.40×1.40\times faster than SimpleTES under the same correctness tolerance. On AHC058, we obtain 850.08M AtCoder points versus SimpleTES's

849.33M. On TriMul, we reach 1129 μ\mus, close to the public rank-1 reference of 1128 μ\mus. In a separate Polyomino comparison using GPT-OSS-120B for execution, adapting only 8B guidance costs about 58% less than directly adapting the 120B model, with comparable scores of 83.19 and 83.72, respectively (Section 4.3).

We make two contributions:

  1. We introduce Guidance-TTT, a test-time RL framework that decouples strategic adaptation from solution generation: a compact guidance model learns parent-conditioned changes in thought space, while a stronger execution model remains frozen. We demonstrate its performance across four modern tasks ranging from algorithm design to kernel design.

  2. We analyze how guidance learning affects discovery through controlled ablations, model-scale comparisons, search trajectories, and failure-mode studies, revealing the benefits of learning in thought space.

References (22)