OS-Genesis: Automating GUI Agent Trajectory Construction via Reverse Task Synthesis

Qiushi Sun, Kanzhi Cheng, Zichen Ding, Chuanyang Jin, Yian Wang, Fangzhi Xu, Zhenyu Wu, Chengyou Jia, Liheng Chen, Zhoumianze Liu, Ben Kao, Guohao Li, Junxian He, Yu Qiao, Zhiyong Wu

TL;DR

Training AI agents to operate graphical user interfaces (GUIs) like phones and web browsers usually requires either expensive human demonstrations or feeding pre-written tasks to a model and hoping it figures them out. OS-Genesis flips this script: it lets an agent poke around an app or website first, see what happens, and then retrospectively invent the tasks it just discovered. Combined with a graded "reward model" that salvages useful partial attempts, this interaction-first pipeline nearly doubles agent success rates on live mobile benchmarks compared to standard synthetic data methods.

What Problem Does This Paper Address?

Vision-Language Models (VLMs) are increasingly capable of acting as digital assistants—clicking buttons, typing text, and navigating menus. To train these GUI agents end-to-end, you need trajectories: sequences containing a high-level goal (e.g., "Mark 'Avocado Toast with Egg' as a favorite"), step-by-step low-level instructions, the actual UI actions (CLICK, TYPE), and the before-and-after screen states.

Figure 1: Ideal GUI trajectory format, including High- Level Instructions, States (visual + textual representa- tion), Low-Level Instructions, and Actions.

Collecting these trajectories is a major bottleneck. Hiring humans to label every click is slow and expensive. The alternative—task-driven synthetic data generation—starts by having an LLM brainstorm a list of high-level tasks and then tries to execute them. This runs into two walls:

  1. Limited diversity: Pre-defined task lists rarely cover the full, quirky range of features hidden inside real apps.
  2. Brittle execution: Abstract instructions often clash with dynamic interfaces, leading to failed or incoherent trajectories that get thrown away.

Methods

OS-Genesis replaces the traditional "task-first" pipeline with a three-stage, interaction-driven approach:

  1. Interaction-Driven Functional Discovery: Instead of starting with a goal, a rule-based explorer systematically clicks, types, and scrolls through live Android emulators and Chrome browsers (calling GPT-4o only when it needs realistic text for an input field). Every interaction is recorded as a triplet: $\langle \text{pre-action screen}, \text{action}, \text{post-action screen} \rangle$.
OS-Genesis interaction-driven exploration
  1. Reverse Task Synthesis: An annotation model (GPT-4o) looks at each triplet and writes a concrete low-level instruction describing what just happened (e.g., "click the dropdown to display options"). It then zooms out and associates that step with a plausible, goal-oriented high-level task (e.g., "configure application settings"). Finally, GPT-4o executes these newly minted high-level tasks in the live environment to generate complete trajectories.
  2. Trajectory Reward Model (TRM): Rather than using a binary pass/fail filter that discards incomplete trajectories, OS-Genesis uses a GPT-4o-based TRM to score every trajectory from 1 to 5 based on Completion and Coherence (inspecting the low-level instructions and the final three states). During training, trajectories are sampled proportionally to their reward scores—so even imperfect explorations still teach the agent how the UI works.

The authors fine-tune three open-source VLMs (InternVL2-4B, InternVL2-8B, and Qwen2-VL-7B-Instruct) using two supervised objectives: Planning Training (predicting both the next low-level instruction and action) and Action Training (predicting the action given a low-level instruction).

Datasets

OS-Genesis is evaluated across both mobile and web environments, using screenshots and accessibility trees (a11ytree) as inputs:

  • AndroidWorld: An online benchmark running in a live Pixel 6 emulator to test real-world daily tasks.
  • AndroidControl: A benchmark spanning 833 apps. Because only 20 of these apps were seen during OS-Genesis data synthesis, this serves as a strong test of out-of-distribution (OOD) generalization across both high-level planning and low-level execution.
  • WebArena: An online web benchmark covering functional websites across five domains: Shopping, CMS, Reddit, GitLab, and Maps.

For fair comparison, both OS-Genesis and the standard Task-Driven baseline use 1,000 training trajectories, while a Self-Instruct baseline uses 1,500.

Key Insights and Ideas

  • Exploration beats imagination: Even when human-written high-level instructions are used to seed synthetic trajectories, they underperform OS-Genesis's reverse-synthesized instructions. Pre-defined tasks often misalign with what an app's live UI actually supports, whereas reverse task synthesis is grounded in real, observed state transitions.
  • Humans are creatures of habit: Measuring embedding diversity via Sentence-BERT, the authors found that human-annotated data has high instruction diversity but surprisingly low trajectory diversity—humans imagine many goals, but rely on a narrow set of familiar UI habits to achieve them. OS-Genesis achieves high diversity in both.
  • Incomplete trajectories still have value: Binary filtering throws away a huge chunk of synthetic data. Graded reward modeling (TRM) preserves useful exploration steps, boosting high-level planning without hurting low-level action accuracy.

Key Results

  • AndroidWorld (Online Mobile): OS-Genesis nearly doubles success rates over task-driven baselines. Qwen2-VL-7B jumps from 6.25% (Task-Driven) and 9.82% (Self-Instruct) to 17.41%, narrowing the gap toward GPT-4o's 23.70%. InternVL2-4B and 8B leap from ~4% to 15.18% and 16.96%, respectively.
  • AndroidControl (OOD Generalization): OS-Genesis consistently outperforms baselines in both high-level and low-level settings. On low-level task success rate, Qwen2-VL-7B reaches 74.17%, surpassing even GPT-4o (69.59%).
  • WebArena (Online Web): Overall success rates improve across all models, with Qwen2-VL-7B reaching 10.79% (up from 7.47% zero-shot and 7.05% task-driven).
  • Closing the Human Gap: Compared to training on 1,000 crowdsourced human trajectories from AndroidControl, OS-Genesis retains over 80% of the average success rate.

Limitations and Future Work

  • Reliance on proprietary models: While the resulting agents are open-source VLMs, the pipeline still depends on GPT-4o for input generation, reverse task synthesis, and reward modeling, as current open-source VLMs struggle with proactive online exploration.
  • Input modality coupling: All experiments use both screenshots and a11ytree text. Adapting the pipeline for vision-only agents is left for future work.
  • Execution ceiling: Because trajectories are ultimately materialized by a task-executing model, the quantity and complexity of successful trajectories remain bounded by that model's capabilities.

Summary updated

BibTeX
@inproceedings{sun2025os,
  author = {Qiushi Sun and Kanzhi Cheng and Zichen Ding and Chuanyang Jin and Yian Wang and Fangzhi Xu and Zhenyu Wu and Chengyou Jia and Liheng Chen and Zhoumianze Liu and Ben Kao and Guohao Li and Junxian He and Yu Qiao and Zhiyong Wu},
  title = {{OS-Genesis: Automating GUI Agent Trajectory Construction via Reverse Task Synthesis}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure