TL;DR
K²-Agent is a new hierarchical framework for mobile device control that mimics human cognition by separating "knowing what" (planning) from "knowing how" (execution). By using a self-evolving feedback loop for high-level reasoning and a curriculum-guided reinforcement learning approach for low-level skills, it achieves a state-of-the-art 76.1% success rate on the AndroidWorld benchmark using only raw screenshots and open-source models.
What Problem Does This Paper Address?
Controlling a smartphone via an AI agent is surprisingly difficult. It requires two distinct types of intelligence:
- High-level Planning: Understanding that to "delete a contact," you must first open the Contacts app, find the name, and then locate the trash icon.
- Low-level Execution: The "muscle memory" required to actually click the exact pixel coordinates of a button or perform a steady swipe.
Existing agents usually struggle with one or the other. "Training-free" agents (which use LLMs out-of-the-box) are often smart but clumsy, failing at precise UI interactions. "Learning-based" agents are often precise but brittle, failing when a task requires a long sequence of steps or a new app layout. Furthermore, most top-performing models rely on "Accessibility Trees" (metadata about UI elements), which aren't always available or accurate in the real world. K²-Agent aims to solve these issues using only visual input (screenshots).
Methods
The authors propose a hierarchical architecture that decouples Declarative Knowledge (facts and rules) from Procedural Knowledge (skills).
1. The High-Level Planner (The "Thinker")
The planner uses a Summarize–Reflect–Locate–Revise (SRLR) loop.
- Summarize: It starts with just one human demonstration and distills it into a set of rules (e.g., "The record button is the white circle at the bottom").
- Reflect & Locate: When the agent fails a task, it analyzes the execution trace to find exactly where things went wrong.
- Revise: It updates its internal "rulebook" to avoid that mistake in the future. This allows the planner to evolve without any traditional "training" or fine-tuning.
2. The Low-Level Executor (The "Doer")
The executor is trained using Curriculum-guided Group Relative Policy Optimization (C-GRPO). Two novel features make this work:
- Error-Decoupled Replay Balancing: It categorizes errors into "type errors" (clicking instead of swiping) and "parameter errors" (clicking the wrong spot). It then samples from these error pools to ensure the model practices its specific weaknesses.
- Dynamic Demonstration Injection: To help the model learn in a "sparse reward" environment (where you only get points for finishing the task), the system prepends a few expert steps to the agent's prompt. As the agent gets better, these "hints" are gradually phased out.
Datasets
- AndroidWorld: The primary benchmark for training and evaluation, featuring 116 tasks across 20 apps.
- ScreenSpot-v2: Used to test how well the agent's low-level "grounding" skills transfer to Desktop and Web environments.
- Android-in-the-Wild (AitW): Used to evaluate the agent's ability to generalize its planning to entirely unseen tasks.
Key Insights and Ideas
- Cognitive Inspiration: The paper leans heavily on the psychological distinction between declarative and procedural memory. By treating them as separate systems with different "update rules," the agent becomes more efficient.
- One Demo is Enough: Unlike many RL agents that require thousands of trials to start learning, the SRLR loop allows the planner to bootstrap effectively from a single human example.
- Dual Generalization: The authors discovered that the "Know-What" (rules) can be transferred to different LLMs (like Gemini or GPT-4o) with success, while the "Know-How" (clicking/swiping) transfers across different operating systems (Mobile to Web/Desktop).
- Hierarchy Beats Flatness: Ablation studies showed that a "flat" model (one big LLM doing everything) performed significantly worse (35.3% success) than the hierarchical K²-Agent (76.1%).
Key Results
- New SOTA: K²-Agent reached a 76.1% success rate on AndroidWorld. This is the highest score ever recorded for a model using only screenshots and open-source backbones (Qwen-2.5-VL).
- Efficiency: It achieved these results using a single server with 8x A100 GPUs, whereas many competitors require massive clusters.
- Zero-Shot Transfer: The low-level executor achieved 91.3% accuracy on ScreenSpot-v2, proving that its "muscle memory" for UI elements works even on desktop websites it has never seen before.
- AitW Success: On the Android-in-the-Wild benchmark, it achieved an 86.5% success rate, significantly outperforming prior RL and supervised learning methods.
Limitations and Future Work
- Visual Observability: The agent is "blind" to system-level issues that don't appear on screen, such as network lag, OS freezes, or invisible permission denials.
- Ineffable Grounding: Some UI interactions are hard to describe in words (e.g., "swipe until the list feels right"), making them difficult for the SRLR loop to refine.
- Long-term Memory: The current framework doesn't handle tasks requiring "massive episodic content," such as searching through a year's worth of chat history.
- Future Directions: The authors suggest integrating recurrent perceptual modules to better handle "visual dynamics" (like scrolling) and exploring stronger vision encoders to improve pixel-perfect grounding.
Summary updated