ANTE: Anticipate, Then Execute -- Learning Internal World Models for Coding Agents from Verified Beliefs
summary
The gist
Detailed Research Summary of ANTE (Anticipate, Then Execute) Framework As a diligent researcher, I have meticulously synthesized the provided excerpts to construct a comprehensive and detailed
In short
ANTE is an agentic Reinforcement Learning framework that trains coding agents to build internal world models. It formalizes knowledge as a belief state containing what has happened, what is true now, and what actions will achieve. This allows agents to predict outcomes before acting and learn effectively from execution feedback.
Key concepts
- Belief State ($eta_{i,t}$)
- This is the agent's internal representation of its knowledge at any moment. It includes a summary of the task state, a prediction of likely outcomes for tests and execution, and a decision on whether to trust or abstain from an action.
- Belief-Anchored Policy Optimization (BAPO)
- This is the core learning method that assigns credit to actions by anchoring it to the agent's own verified forecasts. It groups steps with similar predicted outcomes across different trials, turning settled predictions into tangible per-step advantages for training.
- ANTE-TTO
- This is a test-time optimization technique used during inference. Instead of relying on an external scorer, the agent ranks candidate actions based solely on the belief state they carry to select the best action dynamically.
Terminology used across episodes
This episode discusses
- ANTE: Anticipate, Then Execute -- Learning Internal World Models for Coding Agents from Verified Beliefs · Paper Radio
- SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agents
- PatchWorld: Gradient-Free Optimization of Executable World Models for Agent Environments
- SkyRL-Agent: Efficient RL Training for Multi-turn LLM Agent
- CodeT: Code Generation with Generated Tests
- SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-training
- Training Verifiers to Solve Math Word Problems
- Process Reinforcement through Implicit Rewards
- DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models
- Endless Terminals: Scaling RL Environments for Terminal Agents
- CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution
- Measuring Mathematical Problem Solving With the MATH Dataset
- Qwen2.5-Coder Technical Report
- Tmax: A simple recipe for terminal agents
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code
- R2E-Gym: Procedural Environments and Hybrid Verifiers for Scaling Open-Weights SWE Agents
- Solving Quantitative Reasoning Problems with Language Models
- Let's Verify Step by Step
- Understanding R1-Zero-Like Training: A Critical Perspective
- Policy and World Modeling Co-Training for Language Agents · Paper Radio
- Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvement
The paper
ANTE: Anticipate, Then Execute -- Learning Internal World Models for Coding Agents from Verified Beliefs · Read on arXiv
Yi Ge, Kangrui Ruan, Jifan Chen, Manish Prajapat, Christian Bock, Xiaoyang Wang, Rein Houthooft, Aritra Sengupta
University of Maryland, College Park
Rapid advances in large language models have made software engineering agents capable of tackling complex coding tasks. Within a containerized environment, a coding agent receives tool responses or execution results, and determines its later actions by those earlier results. However, most existing coding agents never look ahead: their policies do not anticipate the consequences of actions, and the terminal reward barely attributes a failure to certain earlier steps, so an ill-judged edit can corrupt the repository state irreversibly before any signal arrives. Recent code world models aim to address these challenges, but they are either trained and then frozen before reinforcement learning (RL), or reduced to an auxiliary next-token loss on the environment's outputs. We present ANTE (Anticipate, Then Execute), an agentic RL framework that verifies the policy's pre-action predictions by real execution and turns them into per-step credit for its actions and trust-or-abstain decisions. With an internal belief stated before each action, Belief-Anchored Policy Optimization (BAPO) turns the settled predictions into per-step advantages by anchoring credit on the policy's own forecasts. To turn the trained forecasts into better actions at inference, thereby facilitating effective test-time scaling, ANTE-TTO (test-time optimization) selects among candidate actions without an external scorer. ANTE raises Qwen3-32B from 25.0% to 57.2% pass@1 on SWE-bench Verified, 6.2% above a matched GRPO baseline trained without the belief state; its world model's accuracy climbs from 44% to 69% during RL, and the learned foresight capability transfers across harnesses and out-of-distribution domains. In summary, we aim to build a code world model that knows what has happened, what holds now, and what the next action will achieve.
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Today's paper: "ANTE: Anticipate, Then Execute -- Learning Internal World Models for Coding Agents from Verified Beliefs".
Jane: Detailed Research Summary of ANTE (Anticipate, Then Execute) Framework As a diligent researcher,
Tom: First, who's behind it and why it matters.
Paper summary: Tom: So, looking back at "ANTE: Anticipate, Then Execute -- Learning Internal World Models for Coding Agents from Verified Beliefs," the authors are pushing a framework where the agent has an internal world model that knows what has happened, what is happening now, and what its next action will achieve.
Jane: The authors are showing how this internal belief structure isn't just about predicting things; it’s about making that prediction actionable by forcing the agent to trust or abstain based on its own confidence before acting.
Lu: They introduce the ANTE framework which includes ANTE-SFT to learn the belief format, ANTE-RL for making that belief accurate and trustworthy through BAPO, and ANTE-TTO for self-scoring inference.
Meng: The implication I see from this is that we move away from purely reactive execution where we rely only on the final result, toward agents that have genuine foresight.
Tom: Exactly. It gives the agent a mechanism to anticipate consequences and optimize its execution strategy in real time based on what it already knows about the task context.
Jane: For someone just listening, this means thinking about how complex AI systems can be structured so they don't just react blindly but actually build a model of the world around them to guide their choices.
Conclusion: Jane: So, we've gone through how this ANTE framework sets up an agent to predict what will happen before it acts, using these internal beliefs about the past and future.
Tom: Right. The title is "ANTE: Anticipate, Then Execute -- Learning Internal World Models for Coding Agents from Verified Beliefs." It sounds like they’re putting a lot of emphasis on that loop between thinking ahead and actually doing the work.
Lu: They frame it as training these coding agents to build a world model that has foresight—knowing what happened, what's happening now, and what the next action will achieve.
Meng: I mean, for us in production, that internal model needs to be really reliable because if it guesses wrong when we deploy code, things break fast. What makes this ANTE approach different is that they are verifying those forecasts against real execution feedback during the training process itself.
Lalam: From my perspective reading the literature, this verification step is key. It’s not just guessing what might happen; it's being supervised by actual outcomes as they happen, which gives the internal world model a much stronger grounding.
Jane: So if we boil it down, this paper is about moving coding agents from just reacting to execution results to actually building an internal picture of how the code will behave before they run it.
Tom: Exactly. And the structure they use—with those belief states that include a summary of what's broken and a prediction for test versus execution outcomes—that’s how you build that foresight capability in the first place.
Lu: The methodology involves three stages: first learning the format with ANTE-SFT, then optimizing with Belief-Anchored Policy Optimization or BAPO, and finally using Test-Time Optimization or TTO for actual inference.
Meng: From a deployment standpoint, I’m curious about the cost there. If this model needs to maintain that belief state structure at every step just to make a decision—is that memory footprint manageable when you're running things at scale?
Lalam: The paper shows they use BAPO to anchor credit on the policy's own forecasts and trust decisions, which means the learning signal is tied directly to how accurate the prediction was, not just whether the final result passed or failed.
Jane: So what does this mean for someone listening who isn't a coder—it means we’re building AI that can plan ahead like a human engineer trying to debug a system before they hit 'run'.
Tom: It suggests that if you can give an AI the right internal structure—the belief state—you can train it to anticipate consequences and adjust its strategy based on those predictions, instead of just guessing.
Lu: The implication is that this foresight capability transfers, as the results show it works across different harnesses and even outside the specific domains they trained on.
Meng: I'm still skeptical about how robust this is when we hit truly novel problems in production traffic; we need to know if these learned world models hold up under real-world stress.
Lalam: The paper does acknowledge that the agents still have to learn a lot, but they show substantial performance gains, like raising Qwen3-32B from twenty-five percent pass@one to fifty-seven point two percent on SWE-bench Verified.
Jane: So the big picture is this: we're getting AI that doesn't just run code; it anticipates the failures and adjusts its plan in real time based on what it thinks will happen.
Tom: We’ll be looking at how they handle those limitations in the next piece, specifically where their training stops or where the model might struggle with really complex, unseen execution paths.
More episodes
- 2610.14612-LLM-Augmented Bayesian Optimization with Adaptive Policies for Chiplet Design Space Exploration
- 2610.14860-Terrarium: Growing Personal Assistants via Scalable Synthesis of App Worlds
- 2610.14894-Pro-t-VAE: Closed-Form Student's t Mixtures for Robust Prototype Discovery
- 2610.14899-FDTD Model of Noise Pollution from an AI Data Center
- 2610.14964-Cross-Material Magnetic Core Loss Prediction via Operating-Condition Matching and Partial Optimal Transport
- 2610.14935-BSIPipe: Bidirectional Sequence-Level Interleaved Pipeline Parallelism for Long-Sequence Large Language Model Training
- 2610.14999-DiffGA: Steering Frozen Diffusion Models for Materials Design via Evolutionary Search
- 2610.14683-Triage-PiEvo: Evidence Admission for Principle-Evolving Scientific Agents
- 2610.15011-Conformal Sequential Decision Making With Cost and Sublinear Policy Regret Guarantees
- 2610.14688-Accelerating Cross-Model LLM Inference via Attention Map Reuse