UI-Copilot: Advancing Long-Horizon GUI Automation via Tool-Integrated Policy Optimization

Zhengxi Lu, Fei Tang, Guangyi Liu, Jin Ma, Kaitao Song, Xu Tan, Wenqi Zhang, Weiming Lu, Jun Xiao, Yueting Zhuang, Yongliang Shen

TL;DR

UI-Copilot introduces a collaborative framework for long-horizon GUI automation that offloads memory retrieval and numerical computation from a primary execution agent to a lightweight copilot model. By decoupling persistent memory from transient execution context and optimizing tool use via a novel reinforcement learning pipeline (TIPO), UI-Copilot achieves state-of-the-art performance on complex, multi-step user interface tasks.

What Problem Does This Paper Address?

While Multimodal Large Language Model (MLLM) agents excel at short-horizon graphical user interface (GUI) tasks, they struggle significantly in long-horizon, memory-intensive scenarios (e.g., tasks requiring dozens of steps or navigating across multiple applications).

The authors identify three interconnected failure modes that plague existing 7B-scale models:

  1. Memory Degradation: Overloaded context windows cause agents to lose track of critical information gathered in earlier steps.
  2. Progress Confusion: Interleaving complex reasoning traces with long action histories obscures the current task state, leading to redundant actions, infinite loops, or premature termination.
  3. Math Hallucination: Numerical reasoning errors compound as incorrect intermediate results propagate through subsequent steps.

Existing fixes, such as rigid multi-agent workflows or standard Retrieval-Augmented Generation (RAG), are either prohibitively expensive due to calling external modules at every single step, or they fail to resolve progress confusion.

Inference case demonstrating how standard models fail due to memory degradation, progress confusion, and math hallucinations compared to UI-Copilot.

Methods

To solve these challenges, the authors present UI-Copilot, a collaborative framework consisting of a primary policy agent (Qwen2.5VL-7B) and a lightweight copilot model (Qwen3-4B). The framework relies on three core innovations:

  • On-Demand Tool Invocation: The primary agent focuses purely on task execution and GUI navigation. It selectively invokes the copilot model as either a Retriever (to fetch historical information) or a Calculator (to execute Python code for precise math) only when the task demands it.
  • Memory Decoupling: Instead of maintaining full reasoning traces in the multi-turn dialogue history, UI-Copilot introduces a Multi-Turn Summary (MS) paradigm. The dialogue context only holds concise progress updates (e.g., "I have finished sub-task A"), keeping the context window lightweight. Detailed observations and reasoning traces are saved locally in a structured text file and retrieved on-demand.
  • Tool-Integrated Policy Optimization (TIPO): To train the agent effectively without environment feedback for tool calls, the authors propose TIPO. This reinforcement learning pipeline decouples tool prediction (trained via single-turn prediction on off-policy data) from action generation (trained via multi-turn on-policy rollouts using Group Relative Policy Optimization).

Datasets

The framework was trained and evaluated using several key datasets:

  • Training Data Curation: The authors collected human-annotated trajectories from AndroidControl and used GPT-4o to synthesize expert tool calls, reasoning traces, and progress summaries to create a hybrid SFT/RL dataset ($D_0$).
  • MemGUI-Bench: A highly challenging benchmark specifically designed to test long-term memory in dynamic environments. It consists of 70.3% memory-intensive and 19.5% math-intensive tasks, averaging 36 steps per task.
  • AndroidWorld & MiniWob++: Standard dynamic benchmarks used to evaluate multi-turn execution and generalization.
  • Single-Turn Benchmarks: ScreenSpot-V2, AC-High, and GUI Odyssey were used to ensure the agent maintained strong baseline GUI grounding and understanding capabilities.

Key Insights and Ideas

  • Less is More in Context Windows: Restricting the agent's active context to concise progress summaries dramatically reduces planning hallucinations and action loops. Detailed history is better treated as an external database than active working memory.
  • The Importance of On-Policy History for RL: Training action generation on self-generated histories (on-policy) aligns much better with deployment conditions than training on clean, expert-collected histories (off-policy), effectively mitigating compounding execution errors.
  • Adaptive vs. Rigid Multi-Agent Systems: Rather than forcing an expensive multi-agent pipeline to execute at every step, teaching a single agent when to delegate tasks to a specialized tool yields a much more efficient and scalable architecture.

Key Results

  • SOTA on MemGUI-Bench: UI-Copilot-7B achieved a 16.4% pass@1 and 20.3% pass@3 accuracy, substantially outperforming strong 7B baselines like GUI-Owl-7B (6.2%) and UI-TARS-1.5-7B (3.1%).
  • Strong Generalization on AndroidWorld: It attained 39.1% accuracy on AndroidWorld—a 17.1% absolute improvement over the base Qwen model, outperforming proprietary models like GPT-4o (34.5%).
  • Error Reduction: Error analysis revealed that the combination of memory decoupling and TIPO cut progress confusion errors nearly in half while significantly mitigating math hallucinations and memory degradation.

Limitations and Future Work

  • Limited Toolset: Currently, the copilot is restricted to acting as a Calculator or a Retriever. Real-world GUI automation often requires a broader spectrum of tools, such as web search engines or visual cropping modules.
  • Perception and Spatial Reasoning: The model still suffers from occasional visual perception limitations, sometimes getting trapped in repetitive loops during complex spatial tasks like maze navigation. The authors suggest exploring stronger vision encoders or explicit spatial priors as a next step.

Summary updated

Abstract

MLLM-based GUI agents have demonstrated strong capabilities in complex user interface interaction tasks. However, long-horizon scenarios remain challenging, as these agents are burdened with tasks beyond their intrinsic capabilities, suffering from memory degradation, progress confusion, and math hallucination. To address these challenges, we present UI-Copilot, a collaborative framework where the GUI agent focuses on task execution while a lightweight copilot provides on-demand assistance for memory retrieval and numerical computation. We introduce memory decoupling to separate persistent observations from transient execution context, and train the policy agent to selectively invoke the copilot as Retriever or Calculator based on task demands. To enable effective tool invocation learning, we propose Tool-Integrated Policy Optimization (TIPO), which separately optimizes tool selection through single-turn prediction and task execution through on-policy multi-turn rollouts. Experimental results show that UI-Copilot-7B achieves state-of-the-art performance on challenging MemGUI-Bench, outperforming strong 7B-scale GUI agents such as GUI-Owl-7B and UI-TARS-1.5-7B. Moreover, UI-Copilot-7B delivers a 17.1% absolute improvement on AndroidWorld over the base Qwen model, highlighting UI-Copilot's strong generalization to real-world GUI tasks.
BibTeX
@inproceedings{lu2026ui,
  author = {Zhengxi Lu and Fei Tang and Guangyi Liu and Jin Ma and Kaitao Song and Xu Tan and Wenqi Zhang and Weiming Lu and Jun Xiao and Yueting Zhuang and Yongliang Shen},
  title = {{UI-Copilot: Advancing Long-Horizon GUI Automation via Tool-Integrated Policy Optimization}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.904},
}

Loading related content...

Figure