How Qwen-AgentWorld Trains a Language World Model
1. What Is Being Modeled?
1. 模型到底在学什么?
Most agent training work focuses on the policy:
\[\pi(a_t \vert h_t)\]where the model reads a history \(h_t\) and chooses an action \(a_t\). Qwen-AgentWorld trains the complementary object:
\[\hat{o}_{t+1}=f_\theta(c,o_{\le t},a_{\le t})\]Here \(c\) is the task and environment instruction, \(o_{\le t}\) are prior observations, and \(a_{\le t}\) includes the current action. In plain terms: if the agent does this, what will the environment say next?
The word “world” needs a narrow reading. This is not a pixel-level physical world model. It is a language world model for digital environments. The seven domains are MCP, Search, Terminal, SWE, Android, Web, and desktop OS. Even the GUI domains are converted into language: accessibility trees, UI hierarchies, or renderable HTML, not raw screenshots. That design choice is the whole point. If the relevant state transition can be expressed as structured text, then a language model can be trained directly on environment dynamics.
2. The Training Recipe
2. 训练 recipe
The paper’s own slogan can be compressed as:
- CPT injects environment dynamics and domain knowledge.
- SFT activates explicit next-state reasoning.
- RL sharpens the generated observation using realism and correctness rewards.
This is a useful framing because the base next-token objective never disappears. What changes is the presentation of the same transition prediction problem.
The disclosed post-training mixture is small enough to inspect, but important enough not to hand-wave.
| Domain | SFT | RL | Avg. tokens | Avg. turns |
|---|---|---|---|---|
| MCP | 179 | 4,156 | 62,702 | 28.9 |
| Search | 1,042 | 20,004 | 18,873 | 6.2 |
| Terminal | 1,580 | 34,125 | 5,805 | 12.0 |
| SWE | 249 | 8,181 | 36,734 | 24.7 |
| Android | 1,337 | 11,498 | 30,064 | 19.3 |
| Web | 1,605 | 8,716 | 19,417 | 10.2 |
| OS | 1,102 | 5,628 | 25,439 | 12.4 |
| Total | 7,094 | 92,308 | 19,443 | 13.4 |
The full training story is larger than this table: the paper reports more than 10 million real-environment interaction trajectories overall. But CPT counts by source and domain are not disclosed, so the table above should be read as the public SFT/RL part of the recipe, not as the full corpus.
3. CPT: Inject Dynamics Before Reasoning
3. CPT:先注入动力学,再谈推理
CPT is the least glamorous stage and probably the most important one. The model is exposed to real action-observation traces from sandboxes, MCP servers, stateful terminals, software repositories, Android/browser/desktop emulators, and open public traces. The paper also adds specialized knowledge corpora covering industrial control, cybersecurity, law, medicine, finance, current affairs, and encyclopedic knowledge.
Why mix factual corpora into a world model? Because many digital environments are not just state machines. They also contain domain facts. A finance tool, a medical interface, or a legal search system can return observations whose correctness depends on knowledge outside the local UI state. CPT tries to make those facts available before asking the model to simulate the environment explicitly.
The key technical detail is turn-level loss masking. Not every observation token teaches the same amount. Boilerplate, echoes, or unchanged GUI trees can dominate the loss while teaching little about dynamics. Qwen-AgentWorld classifies turns using overlap, novelty, Jaccard similarity, and length-ratio features, then downweights low-information categories.
| Turn type | Keep rate in loss | Intuition |
|---|---|---|
| Retrieval / expansion / action / other | 100% | likely contains new state or useful environment response |
| Transform | 50% | partly new, partly mechanical rewrite |
| Boilerplate | 10% | mostly repetitive shell, UI, or formatting material |
| Echo | 5% | often repeats user or action content |
Notice the subtlety: masked turns are still kept in context. The model still sees them when predicting later observations; they just do not dominate the loss. That is the right bias for a simulator. State history matters even when a particular state description is not itself a good training target.
4. SFT: Activate Explicit Simulation
4. SFT:激活显式模拟
After CPT, the model may have absorbed many transition regularities, but that does not mean it knows how to present them as a controlled next-observation prediction. SFT changes the interface. The model is shown demonstrations that reason about the prior state, the action semantics, the expected output format, and the likely next observation.
The SFT data construction is also a quality filter. The authors use ten prompt variants, generate three candidate reasoning traces per query from a stronger reasoning model, then use an independent judge to select the best candidate and discard low-quality examples. The final retained set is 7,094 examples from 10,250 candidates, a 69.2% retention rate.
This stage matters because next-observation prediction is not just “continue the transcript.” The output must respect environment-specific format constraints. A terminal should return stdout, stderr, exit-code-like behavior, and a plausible prompt. A browser observation should preserve UI structure. An MCP server should follow the tool protocol. SFT teaches the model to put the latent dynamics from CPT into the right response shape.
5. RL: Sharpen Realism Without Collapsing
5. RL:打磨真实感,同时避免 collapse
RL is where the paper has the most useful engineering details. The setup is awkward for standard language-model RL because the prompt can be tens of thousands of tokens, while the generated next observation is often only a few hundred or a few thousand tokens. Qwen-AgentWorld uses GSPO, caps prompts at 128K tokens, and samples one target turn per trajectory.
The reward is a hybrid:
\[r = 0.9\,r_{\operatorname{rubric}} + 0.1\,r_{\operatorname{rule}}\]The rubric is a five-axis LLM judge: format, factuality, consistency, realism, and quality. Each axis is scored from 1 to 5, and the mean is scaled to the 5-25 range. The rule reward is an executable verifier where possible, scaled to the same range; invalid generations receive 0.
The one-turn sampling choice is not cosmetic. The authors report that expanding every trajectory into many training turns creates a shared-prefix failure mode: the model sees many highly correlated prompts and learns to echo or overfit the prefix instead of modeling the next transition. They call this the Echo Trap. Sampling exactly one target turn per trajectory reduces that correlation.
The other reward-design lesson is that an LLM rubric alone is too easy to game. The paper reports self-praise and content-type failures in early experiments, then adds strict tag extraction, content classification, and rule anchors. This is the same pattern that shows up across agent RL: open-ended judges help with dense feedback, but executable checks are needed to keep the judge attached to the environment.
6. What the Evaluation Actually Proves
6. 评测实际证明了什么?
AgentWorldBench contains 2,170 turn-level samples from seven domains and nine source benchmarks. The input is a real prior trajectory prefix plus the current action; the target is the real next observation. This is the right benchmark for the paper’s objective, but it is important to keep the protocol in mind: it is teacher-forced one-step prediction, not long free-running rollout. It tests whether the model can predict the next observation given real history, not whether it remains stable after simulating 30 self-generated steps.
The headline rubric results are:
| Model | Overall rubric score | Reading |
|---|---|---|
| Qwen-AgentWorld-397B-A17B | 58.71 | best average rubric score |
| GPT-5.4 | 58.25 | essentially tied on the headline number |
| Qwen-AgentWorld-35B-A3B | 56.39 | open model, large gain over its base |
| Qwen3.5-397B-A17B base | 54.74 | strong base, smaller delta |
| Qwen3.5-35B-A3B base | 47.73 | baseline for the open model |
The open 35B model gains +8.66 over its base. That is strong evidence that the recipe works as a whole. The closed 397B model gains +3.97 over its base. But the paper does not publish a clean CPT-only, CPT+SFT, and CPT+SFT+RL ablation on AgentWorldBench, so we should not over-attribute the final gain to any single stage.
The domain pattern is also revealing. Qwen-AgentWorld-397B scores high on MCP, Terminal, SWE, and OS, but is weaker in GUI-heavy settings and Search remains hard.
| Domain | Qwen-AgentWorld-397B score |
|---|---|
| MCP | 68.24 |
| Search | 37.82 |
| Terminal | 57.73 |
| SWE | 68.49 |
| Android | 60.20 |
| Web | 50.98 |
| OS | 67.89 |
This pattern matches the training interface. Text-structured environments are easier for a language world model. GUI environments are represented as text trees rather than pixels, which helps with language modeling but loses visual information. Search is especially hard because the observation depends on retrieval, freshness, ranking, and external knowledge, not just local transition mechanics.
7. Why the Applications Matter
7. 为什么应用实验重要?
The downstream experiments are not just demos. They explain why one would train this model in the first place.
Decoupled simulation. On synthetic OpenClaw environments, replacing a weaker simulator with Qwen-AgentWorld-397B improves the downstream agent from 65.4 to 69.7 on the base benchmark and from 47.9 to 55.0 on QwenClaw. This is the cleanest use case: train the policy against a learned environment model when the real environment is expensive.
Controlled MCP simulation. In MCP tasks, uncontrolled simulation does not reliably help. Controlled simulation, where the world model is constrained by the real server state, improves Tool Decathlon from 32.4 to 36.1 and MCPMark from 21.5 to 33.8. This is the main lesson: a language world model becomes much more useful when anchored to executable state.
Fictional search. For generated databases, simulation-based RL improves WideSearch substantially for the 35B model. The interesting behavior is not just score increase: the simulator-trained agent learns to call the extractor more often, while the real-environment-trained agent calls it less. The world model is shaping exploration style, not merely providing cheaper labels.
8. Where This Fits in the Agent Trend
8. 它在 Agent 趋势中的位置
I would place Qwen-AgentWorld between three environment strategies:
| Environment strategy | Strength | Weakness |
|---|---|---|
| Real environment | highest fidelity | expensive, slow, hard to control |
| Code/verifier environment | deterministic and checkable | narrow domain and sparse interface |
| Learned language world model | cheap, scalable, controllable | can drift, hallucinate, or miss hidden state |
The likely future is hybrid. Use the learned simulator for breadth, curriculum, and counterfactual rollouts; use real environments and executable verifiers as anchors. That is also why the controlled MCP result matters more than the uncontrolled one. Pure imagination is brittle. Anchored imagination is a training tool.
9. Takeaways
9. 总结
The most important idea in Qwen-AgentWorld is that environment modeling can be made native to language-model training. The model is not merely prompted to role-play a terminal, browser, or MCP server. It is continually pretrained on real transitions, supervised to reason about next states, and reinforced against reference-grounded realism signals.
The most important limitation is attribution. The paper gives a convincing full-recipe result and useful RL diagnostics, but not a clean public decomposition of CPT vs SFT vs RL on the main benchmark. So the right conclusion is not “RL alone creates a world model.” It is: a long-context language model can become a useful digital-environment simulator when its entire post-training pipeline is organized around next-observation prediction.