Test-Time Deep Thinking to Explore Implicit Rules

Wentong Chen, Xin Cong, Zhong Zhang, Yaxi Lu, Siyuan Zhao, Yesai Wu, Qinyu Luo, Haotian Chen, Yankai Lin, Zhiyuan Liu, Maosong SunarXiv 2026

TL;DR

Current LLM agents frequently fail when encountering environments with hidden, unwritten constraints, falling into repetitive trial-and-error loops. To solve this, Test-Time Exploration (TTExplore) decouples an agent into an "actor" that executes actions and a specialized "thinker" (Exp-Thinker) that infers implicit rules from interaction history. By training this 7B thinker model using a stable reinforcement learning pipeline that isolates single thinking nodes, the framework boosts baseline agent performance by 14–19 points across complex text-based embodied tasks.

What Problem Does This Paper Address?

When large language model (LLM) agents interact with complex environments, they rely heavily on pre-trained general knowledge. However, real-world or specialized environments are often governed by implicit rules—latent dynamics and hidden constraints that aren't explicitly stated in the prompt. For example, in a virtual household task, an agent might fail with a generic "Nothing happened" response because it doesn't realize it must stand directly in front of an object before interacting with it, or that it cannot hold two items simultaneously.

Without a way to dynamically update its internal world model at test time, the agent gets trapped in local exploration loops. Traditional methods like ReAct or Reflexion either operate within a fixed world model or scale poorly due to heavy computational overhead from backtracking and multiple rollouts.

Figure 1: Three task examples of the Alfworld environment. We annotate the “implicit rule” of each task, which are deduced by humans but the agents can not see. Without understanding these environmental implicit rules, the agent tends to fail.

Methods

The authors introduce TTExplore, a framework that splits agent behavior into two distinct roles:

  1. The Actor ($\pi_{actor}$): Generates fast, intuitive, ReAct-style actions and short thoughts at every environment step.
  2. The Thinker ($\pi_{thinker}$): Acts as a meta-level reasoning engine. Instead of running at every step, it is triggered periodically (e.g., every $n$ steps) to analyze the interaction history, hypothesize hidden environmental rules, and formulate a revised plan. This deep thought is then prepended to the actor's context to guide subsequent actions.
Figure 2: The actor role and the thinker role in our TTExplore framework.

Training the Thinker (Exp-Thinker)

Training a model to perform "deep thinking" is notoriously difficult because intermediate thoughts lack direct reward signals. To overcome this, the authors designed a stable RL pipeline using the Group Relative Policy Optimization (GRPO) algorithm:

  • Sub-task Division & Filtering: Successful trajectories are split into sub-tasks based on intermediate process scores. "Easy" sub-tasks are filtered out using a weak model so the thinker focuses only on challenging scenarios.
  • Single Thinking Node Isolation: Assigning a single trajectory-level reward across multiple thinking steps makes RL highly unstable. To eliminate this noise, the pipeline restricts training rollouts to contain only a single thinking node per trajectory, transforming a complex credit assignment problem into a clear, one-to-one causal judgment.

Datasets

The framework was evaluated on five text-based embodied benchmarks from Agentboard:

  • In-Domain Tasks: ALFworld (household navigation) and Sciworld (science lab simulations), which were used to generate the sub-tasks for training the thinker.
  • Out-of-Domain Tasks: BabyAI, PDDL, and Jericho, used strictly to test the cross-domain generalization of the thinker.

Key Insights and Ideas

  • System 1 vs. System 2 Decoupling: Explicit, fast actions are best handled by an intuitive "System 1" actor, while implicit rule discovery requires a reflective "System 2" thinker. Interleaving them prevents the agent from breaking its execution flow while still allowing for strategic course corrections.
  • The Power of Specialization: Instead of relying on massive general-purpose models, the authors showed that a targeted training pipeline can turn a smaller 7B model (Exp-Thinker) into a reasoning engine that matches or outperforms a 72B model at rule inference.
  • Density Destabilizes RL: Trying to optimize multiple deep-thinking steps simultaneously in a single trajectory leads to training collapse. Restricting the optimization to a single critical decision point per trajectory is the key to stable agentic RL.

Key Results

  • Substantial Performance Gains: Equipped with Exp-Thinker, base models like LLaMA3-8B and Qwen2.5-7B saw average performance increases of 14 to 19 points across all tasks. On in-domain tasks, LLaMA3-8B's score more than doubled on ALFworld (32.15 to 63.49) and Sciworld (20.31 to 55.43).
  • Complementary to Agent Training: Even when paired with an actor already heavily fine-tuned on in-domain data (Qwen2.5-Actor), the thinker still significantly boosted out-of-domain performance, pushing BabyAI success from 50.62 to 60.25.
  • Computational Efficiency: Unlike test-time scaling methods like Reflexion (4.7× slower than ReAct) or Best-of-N sampling (5.0× slower), TTExplore integrates its reasoning directly into a single rollout, incurring a modest overhead of only 1.4× slower than standard ReAct.

Limitations and Future Work

  • Fixed Thinking Frequency: The thinker is currently triggered at a rigid interval (every $n=6$ steps). The authors note that this fixed frequency is likely sub-optimal across varying task complexities and suggest that developing mechanisms to dynamically adjust thinking frequency is a vital next step.
  • Dependence on Process Scores: The sub-task division step currently relies on environments providing intermediate process scores. For environments that only offer final outcome rewards (success/failure), alternative strategies like manual rule-splitting or LLM-guided milestone identification will need to be explored.

Summary updated

BibTeX
@misc{chen2026test,
  author = {Wentong Chen and Xin Cong and Zhong Zhang and Yaxi Lu and Siyuan Zhao and Yesai Wu and Qinyu Luo and Haotian Chen and Yankai Lin and Zhiyuan Liu and Maosong Sun},
  title = {{Test-Time Deep Thinking to Explore Implicit Rules}},
  year = {2026},
  eprint = {2605.24828},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.24828},
}
Figure