Abstract
The development of Multimodal Virtual Agents has made significant progress through the integration of Multimodal Large Language Models. However, mainstream training paradigms face key challenges: Behavior Cloning is simple and effective through imitation but suffers from low behavioral diversity, while Reinforcement Learning is capable of discovering novel strategies through exploration but heavily relies on manually designed reward functions. To address the conflict between these two methods, we present CORE, a Code-based Inverse Self-Training Framework with Graph Expansion that bridges imitation and exploration, offering a novel training framework that promotes behavioral diversity while eliminating the reliance on manually reward design. Specifically, we introduce Semantic Code Abstraction to automatically infers reward functions from expert demonstrations without manual design. The inferred reward function, referred to as the Label Function, is executable code that verifies one key step within a task. Building on this, we propose Strategy Graph Expansion to enhance in-domain behavioral diversity, which constructs a multi-path graph called Strategy Graph that captures diverse valid solutions beyond expert demonstrations. Furthermore, we introduce Trajectory-Guided Extrapolation, which enriches out-of-domain behavioral diversity by utilizing both successful and failed trajectories to expand the task space. Experiments on Web and Android platforms demonstrate that CORE significantly improves both overall performance and generalization, highlighting its potential as a robust and generalizable training paradigm for building powerful virtual agents.
Introduction
Training Multimodal Virtual Agents (MVAs) to navigate complex digital interfaces typically relies on two paradigms: Behavior Cloning (BC) and Reinforcement Learning (RL). BC is stable but limited to mimicking specific "golden paths," leading to poor generalization in novel scenarios. Conversely, RL enables exploration but is bottlenecked by the need for labor-intensive, manually designed reward functions for complex, multi-step tasks.
CORE (Code-based Inverse Self-Training) resolves this tension by automating reward synthesis and enabling agents to learn from diverse successful and unsuccessful trajectories. By translating expert demonstrations into executable code, CORE provides a precise verification mechanism that facilitates autonomous exploration and self-improvement.
The CORE Framework
The CORE framework consists of three synergistic components designed to maximize behavioral diversity and training efficiency.
1. Semantic Code Abstraction
To eliminate manual reward design, CORE employs Semantic Code Abstraction. Using Large Language Models (LLMs), the framework extracts semantic descriptions from expert demonstrations and identifies critical "key steps." These steps are then synthesized into Label Functions—executable Python snippets that programmatically verify if a specific objective has been met. This turns expert demonstrations into a set of objective, verifiable rewards.
2. Strategy Graph Expansion
Rather than viewing a task as a linear sequence, CORE organizes Label Functions into a Strategy Graph (a Directed Acyclic Graph). During exploration, if an agent discovers a novel but valid sequence of actions to reach a goal, this new path is integrated into the graph. This allows the agent to internalize multiple strategies for the same task, significantly increasing in-domain robustness.
3. Trajectory-Guided Extrapolation
To enhance out-of-domain generalization, CORE "recycles" exploration data through two methods:
- Success-Based Task Augmentation: If an agent solves a task different from its original assignment, that trajectory is saved as a "pseudo-expert" demonstration for the discovered task.
- Failure-Driven Task Exploration: When an agent fails, CORE uses an LLM to analyze the trajectory and determine what was actually achieved. The failed attempt is then relabeled with a new, aligned intent, transforming a mistake into a successful training example for a different goal.
Experimental Results
The researchers evaluated CORE on two rigorous benchmarks: VisualWebArena (web navigation) and AndroidWorld (mobile app operations).
- Performance Gains: CORE achieved a score of 11.76 on VisualWebArena, significantly outperforming the BC baseline of 8.24.
- Superior Generalization: On AndroidWorld, CORE's generalization score reached 14.29, a nearly five-fold increase over the baseline's 2.86.
- Learning Efficiency: Using the Normalized Gain per Trajectory (NGPT) metric, CORE demonstrated higher data efficiency, extracting more utility from each training iteration compared to existing self-training methods like BAGEL.
Conclusion
CORE represents a significant step forward in training autonomous virtual agents. By bridging the gap between imitation and exploration through code-based rewards and graph expansion, it enables agents to achieve high behavioral diversity without the burden of manual reward engineering. The framework's ability to learn from both success and failure makes it a robust paradigm for developing general-purpose digital assistants.
Summary updated