AndroidGen: Building an Android Language Agent under Data Scarcity

Hanyu Lai, Junjie Gao, Xiao Liu, Yifan Xu, Shudan Zhang, Yuxiao Dong, Jie Tang

Introduction

Deploying Large Language Models (LLMs) as autonomous agents on mobile devices presents a significant challenge, primarily due to data scarcity. Collecting high-quality "trajectories"—the step-by-step sequences of actions required to complete a task—is labor-intensive. Mobile environments are diverse, and tasks are often "long-horizon," requiring dozens of precise steps. Existing automated methods often produce low-quality data or fail to verify task completion. ANDROIDGEN is a novel framework designed to address these bottlenecks by combining automated trajectory generation, fine-grained evaluation, and real-time verification.

Methods

The ANDROIDGEN framework is modular, designed to transform a standard LLM into a high-quality data generator and reliable agent through four key components:

  1. ExpSearch (Experience Search): A retrieval mechanism for in-context learning, allowing the agent to reference similar successful trajectories.
  2. ReflectPlan: A "closed-loop" approach where the agent updates its strategy based on environmental feedback after each step.
  3. AutoCheck: A proactive verification module that checks the validity of actions (e.g., element existence) before execution to prevent hallucinations.
  4. StepCritic: A GPT-4o-based evaluation module that decomposes tasks into sub-goals and provides fine-grained, step-by-step labels for training.
Overview of the AndroidGen framework, illustrating the Preliminary, Task Execution, and Update phases.

Using this framework, the authors generated over 1,000 high-quality trajectories to fine-tune open-source models like GLM-4-9B and Llama-3-70B via LoRA (Low-Rank Adaptation).

Datasets and Evaluation

The framework was rigorously tested across three major benchmarks:

  • AndroidWorld: A dynamic, high-bitrate benchmark for autonomous agents.
  • AitW (Android in the Wild): A large-scale dataset for device control.
  • Popular Apps Benchmark: A new set of tasks involving eight globally popular apps (e.g., Google Maps, YouTube, Spotify) to test real-world applicability.

Key Insights

  • Fine-Grained Evaluation: Traditional binary success/failure metrics are too coarse for effective training. StepCritic enables learning from partially successful attempts by identifying exactly which sub-goals were met.
  • Dynamic Self-Correction: LLMs are prone to overly optimistic planning. The ReflectPlan and AutoCheck modules force the agent to verify its progress against an unpredictable environment rather than following a static script.
  • Synthetic Data Quality: By leveraging a strong teacher model (GPT-4o) within the ANDROIDGEN framework, the authors produced training data that allowed a 70B open-source model to outperform the base teacher model itself.
  • Cost Efficiency: The automated pipeline is 5.85 times more efficient and costs only 5% of the price of human annotation for quality-controlled data generation.

Key Results

ANDROIDGEN significantly improves agent performance across benchmarks. On AndroidWorld, GPT-4o equipped with ANDROIDGEN achieved a 46.8% success rate, a substantial jump from the 27.7% success rate of the base model. Notably, the fine-tuned Llama-3-70B reached a 35.3% success rate*, surpassing the original GPT-4o baseline.

Success rate comparison on AndroidWorld, showing AndroidGen's performance relative to baselines and human level.

On the Popular Apps benchmark, ANDROIDGEN (GPT-4o) reached a 65.0% success rate, outperforming specialized agents like AppAgent (57.5%) and SeeAct (22.5%). Ablation studies highlighted that the ReflectPlan module alone improved success rates by 56.5%, proving that dynamic planning is a critical factor for reliability.

Limitations and Future Work

Despite these gains, the authors identified four primary error categories that persist:

  1. Vision Errors (15%): Difficulty with purely visual UI elements that lack text labels.
  2. Mathematical Reasoning (23%): Challenges with tasks requiring numerical constraints or counting.
  3. Multi-App Workflows (26%): High complexity in tasks requiring seamless switching between different applications.
  4. Horizon Limits (20%): Context loss or capacity issues in extremely long, multi-step tasks.

Future research will focus on enhancing multimodal capabilities and long-term memory to better handle these complex real-world scenarios.

Summary updated

BibTeX
@inproceedings{lai2025androidgen,
  author = {Hanyu Lai and Junjie Gao and Xiao Liu and Yifan Xu and Shudan Zhang and Yuxiao Dong and Jie Tang},
  title = {{AndroidGen: Building an Android Language Agent under Data Scarcity}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure