UI-Mem: Self-Evolving Experience Memory for Online Reinforcement Learning in Mobile GUI Agents

Han Xiao, Guozhi Wang, Hao Wang, Shilong Liu, Yuxiang Chai, Yue Pan, Yufeng Zhou, Xiaoxin Chen, Yafei Wen, Hongsheng LiarXiv 2026

TL;DR

UI-Mem introduces a Hierarchical Experience Memory framework that supercharges online reinforcement learning for mobile GUI agents. By storing abstract workflows, subtask skills, and failure patterns as parameterized templates, it enables cross-task knowledge transfer and prevents repetitive errors. This approach achieves state-of-the-art performance on mobile agent benchmarks, outperforming even prominent closed-source commercial models.

What Problem Does This Paper Address?

Multi-modal Large Language Models (MLLMs) are increasingly deployed as autonomous GUI agents capable of executing multi-step tasks on smartphones. To refine their decision-making, researchers turn to online Reinforcement Learning (RL). However, standard online RL in GUI environments faces two major bottlenecks:

  1. Inefficient Credit Assignment: GUI tasks often require long sequences of actions. If an agent executes 19 steps perfectly but makes a single mistake on the 20th step, it receives a final reward of zero. Standard RL struggles to recognize and reinforce the partial success of those first 19 steps.
  2. Repetitive Errors Across Tasks: Agents lack a mechanism to retain and transfer experience. If an agent encounters a tricky confirmation popup in one app, it doesn't store that lesson, forcing it to rediscover how to handle similar popups from scratch in every new task.
Figure 1. Comparison of RL paradigms for GUI agents. (a) Standard Online RL suffers from sparse rewards. (b) Experience Replay and (c) Dense Reward address sample efficiency and credit assignment respectively, but both lack mechanisms for Cross-Task Transfer. (d) Our Framework introduces an Evolving Memory that provides hierarchical guidance for exploration and continuously updates itself by abstracting successful plans and failure patterns from new trajectories, enabling cross-task knowledge transfer.

Methods

The authors propose UI-Mem, a framework that integrates a structured, self-updating memory into the online RL loop (specifically using Group Relative Policy Optimization, or GRPO).

The architecture consists of three core pillars:

  • Hierarchical Experience Memory: Instead of saving raw, rigid state-action trajectories, UI-Mem stores structured knowledge at three levels: High-Level Workflows (global plans), Mid-Level Subtask Skills (atomic actions like filling a form), and Failure Patterns (what to avoid). Crucially, these are abstracted into parameterized templates (e.g., "Send email to {{recipient}}"), making them highly reusable across different applications.
  • Stratified Group Sampling: Simply feeding the same memory guidance to every rollout in a GRPO training batch destroys the advantage variance needed for policy gradients (if every agent succeeds due to strong hints, the model learns nothing). UI-Mem solves this by partitioning each rollout group into Strong-Guidance, Weak-Guidance, and No-Guidance subgroups. This maintains outcome diversity and forces the unguided policy to internalize the guided behaviors over time.
  • Self-Evolving Loop: At the end of each training iteration, successful trajectories are automatically parsed to extract new abstract workflows, while failed trajectories generate failure diagnoses. These are dynamically integrated back into the memory pool.
Figure 2. Overview of the proposed UI-Mem framework. Given a task instruction, the agent retrieves hierarchical experience including Workflows, Subtask Skills, and Failure Patterns. We employ Stratified Group Sampling to generate a group of trajectories under varying levels of guidance (Strong, Weak, and No Guidance), enabling effective advantage estimation for Policy Optimization. Finally, a Self-Evolving Loop extracts abstract plans from successful trajectories and diagnoses from failures to update the memory, facilitating continuous refinement and cross-task transfer.

Additionally, the retrieval process uses an Upper Confidence Bound (UCB) scoring mechanism to balance the exploitation of historically successful plans with the exploration of newer, less-tested strategies.

Figure 3. Illustration of the Hierarchical Experience Retrieval process. Given a task instruction, the system performs template matching to extract specific variables (e.g., city names). The retrieved experience is instantiated with the extracted variables to form a concrete, actionable plan for the current rollout.

Datasets

  • Training Data: The authors compiled 256 training queries by filtering and aggregating task instructions from AMEX, AndroidLab, and UI-Genie, using GPT-4o to augment instruction diversity.
  • Evaluation Benchmarks:
  • AndroidWorld: 116 programmatic tasks across 20 real-world apps, characterized by long-horizon dependencies (>10 steps).
  • AndroidLab: 138 tasks simulating daily user interactions (managing events, editing notes).
  • Cross-Application Generalization: To test strict out-of-domain transfer, the framework was evaluated on 5 completely unseen apps: Bluecoins, Cantook, Maps.me, Pi-Music, and Zoom.

Key Insights and Ideas

  • Templates Over Raw Trajectories: Storing experiences as abstract templates with semantic placeholders is the secret to cross-app generalization. A subtask skill like "searching for an item" looks similar across shopping, music, and settings apps once the specific query text is decoupled.
  • The Guidance Paradox: Too much guidance during RL training creates a "crutch" effect where the model overfits to following external instructions rather than developing autonomous reasoning. Stratified sampling elegantly maintains the necessary contrast for policy optimization.
  • Negative Constraints Matter: Explicitly extracting and storing "Failure Patterns" acts as a powerful guardrail. Preventing known catastrophic errors is often computationally cheaper and more effective than purely optimizing for positive rewards.

Key Results

  • State-of-the-Art Performance: On the challenging AndroidWorld benchmark, UI-Mem-8B (equipped with inference-time memory retrieval) achieved a 71.1% success rate, outperforming top closed-source commercial models like Gemini-2.5-Pro (69.7%).
  • Scale Agnostic Improvements: UI-Mem-4B achieved a 58.2% success rate (boosting to 62.5% with retrieval), significantly outperforming its vanilla Qwen3-VL-4B baseline (45.3%) and even beating the larger UI-Venus-7B model.
  • Robust Generalization: In zero-shot evaluations on entirely unseen applications, UI-Mem consistently outperformed baseline models, proving that the skills and workflows abstracted during training successfully transfer to novel software environments.

Limitations and Future Work

  • The Plan-Execution Gap: Even when the high-level workflow is perfectly retrieved and instantiated, the agent can still fail due to low-level visual grounding errors (e.g., failing to click the exact pixel coordinates of a tiny bounding box).
  • Safety Risks in Live Environments: Because online RL requires direct interaction with environments, exploratory actions can accidentally trigger destructive behaviors (e.g., deleting user data or executing unintended financial transactions). Developing safe exploration boundaries remains an open challenge.
  • Privacy Concerns: Processing continuous screenshot sequences raises data privacy issues if personal or sensitive information is captured during the online rollout phase.

Summary updated

BibTeX
@misc{xiao2026ui,
  author = {Han Xiao and Guozhi Wang and Hao Wang and Shilong Liu and Yuxiang Chai and Yue Pan and Yufeng Zhou and Xiaoxin Chen and Yafei Wen and Hongsheng Li},
  title = {{UI-Mem: Self-Evolving Experience Memory for Online Reinforcement Learning in Mobile GUI Agents}},
  year = {2026},
  eprint = {2602.05832},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05832},
}
Figure