TL;DR
When language model agents encounter an environment error, they often get stuck in a loop of futilely rephrasing the same failed step. The World State Generator (WSG) solves this by training open ~30B parameter models on a massive dataset of 226K synthetic failure-and-repair trajectories. This teaches the agent to ground its plans in actual world constraints and successfully replan when things go wrong, matching or exceeding the performance of proprietary models zero-shot.
What Problem Does This Paper Address?
Large Language Models (LLMs) are highly capable planners, but they struggle when their plans hit a wall in the real world. If an environment refuses an action—for instance, if an agent tries to submit an invoice that is still marked as a "draft"—a standard prompted agent typically reacts by rewriting the command in different words (e.g., changing "submit the invoice" to "send the invoice").
Because the agent's internal plan is just a string of text unaligned with the actual physical limits, logical dependencies, or hidden rules of the environment, it meets the exact same refusal, loops repeatedly, and burns its token budget. The authors address this lack of alignment between an agent's linguistic imagination and the hard rules of the world it operates in.
Methods
The authors build on the State-Centric Decision Process (SDP) framework. Instead of predicting raw, low-level actions, the planner writes its plan as a sequence of checkable world states described in natural language predicates.
To teach a model how to fix a broken plan based on environmental feedback, they developed a three-step pipeline:
- Synthetic World Construction: They programmatically built self-contained environments across 7 domains with explicit entities, rules, and goals. Crucially, an "admission check" verified that every goal was mathematically reachable before letting an agent try it.
- Grounded Trajectory Collection: Agents ran tasks inside these worlds. When a state failed, a validator recorded a refutation $\tau$ (the failed state plus the raw observation of what actually happened). The agent then attempted to repair the plan.
- Strict Filtering: They kept a failure-repair pair only if the rewritten plan successfully brought the agent to a state certified by the world.
Using this dataset of verified fixes, they trained the World State Generator (WSG) using LoRA fine-tuning on open backbones (Gemma4-31B and Qwen3.6-27B). Crucially, they trained the model only on the repair steps. Leaving the initial plan generation to the base prompted model prevented the network from overfitting to specific plan shapes and losing its general planning capabilities.
Datasets
- Training Corpus: The authors generated a massive dataset of 226,316 episodes, yielding 238,563 clean repair examples across 7 synthetic domains: Physical, Software, Web search, Tool use, Constraint, Reasoning, and Math.
- Evaluation Benchmarks: To test true generalization, they evaluated WSG zero-shot on 7 completely independent public benchmarks: $\tau^2$-bench, ScienceWorld, ToolSandbox, PlanBench-XL, REAL, DeepPlanning, and AgentBoard (PDDL). None of these benchmarks contributed any data to the training set.
Key Insights and Ideas
- Bending to the World vs. Paraphrasing: Prompted models search the language of the plan for fixes, leading to useless rewordings. WSG learns to treat the environment's feedback as an explicit rule, keeping the failed state intact but rewriting the surrounding plan to accommodate the constraint.
- The Danger of Training on First Plans: Counterintuitively, including successful initial plans (which lack failure context) in the fine-tuning data caused the model to overfit rapidly and lose its flexibility. Training exclusively on the repair call preserves the model's reasoning.
- Synthetic-to-Real Transfer: Even though the training data came entirely from programmatically generated synthetic worlds, the abstract skill of "reading a refutation and adjusting a state chain" transferred seamlessly to diverse, human-designed public benchmarks.
Key Results
WSG significantly closed the gap between open-source models and state-of-the-art proprietary systems:
- Massive Performance Gains: Qwen3.6-27B saw a massive +31.9 point accuracy jump on PlanBench-XL compared to standard prompting. Gemma4-31B improved by +13.8 points on $\tau^2$-bench.
- Competitive with Proprietary Models: On ToolSandbox, Gemma4-31B with WSG achieved a score of 72.5, nearly matching GPT-4o (73.0) and beating GPT-4 (64.3). On $\tau^2$-bench, Qwen3.6-27B hit 76.6, outperforming Claude 3.5 Sonnet (53.7).
- Efficiency Gains: Because WSG avoids infinite rephrasing loops, wall-clock execution times dropped dramatically—by up to 55% on the REAL benchmark for Gemma4-31B.
Limitations and Future Work
While WSG revolutionizes the replanning step, it leaves the other components of the agent system untouched. A manual error analysis revealed that the remaining failures lie outside the repair call:
- Realizer Failures: In 45% of failed episodes, the realizer (the module executing actions to reach a planned state) simply failed to achieve a correctly written state.
- Validator Errors: In 20% of cases, the validator falsely refuted a state that actually held true, triggering an unnecessary repair.
The authors note that the next logical step is to extend this supervised training pipeline to the realizer and validator roles using the same logged execution data from their synthetic worlds.
Summary updated