UI-MOPD: Multi-Platform On-Policy Distillation for Continual GUI Agent Learning

Niu Lian, Alan Chen, Zhehao Yu, Chengzhen Duan, Fazhan Liu, Hui Liu, Pei Fu, Jian Luan, Yaowei Wang, Shu-Tao Xia, Jinpeng Wang

UI-MOPD uses platform-conditioned on-policy distillation to train a single GUI agent across heterogeneous desktop and mobile environments.

How can we train a single GUI agent to perform effectively on both desktop and mobile platforms without the behavioral interference that occurs when naively merging platform-specific models?

GUI agents struggle to adapt across heterogeneous platforms like desktop and mobile because different interaction conventions—such as mouse-based windowing versus touch-based navigation—cause behavioral pattern mixing and catastrophic forgetting during training. UI-MOPD addresses this by routing platform-specific rollouts to corresponding expert teachers during online reinforcement learning, using multi-teacher on-policy distillation to anchor the shared policy to native interaction patterns. This approach achieves task success rates of 38.2% on OSWorld and 12.0% on MobileWorld, significantly outperforming standard mixed-data fine-tuning and static model merging.

Paper Primer

The core challenge is that a shared policy trained on mixed desktop and mobile data tends to "average out" interaction styles, leading to poor performance on both. UI-MOPD solves this by treating multi-teacher integration as a conditional behavioral constraint: the student samples rollouts online, and the system applies a platform-specific teacher penalty only to the states actually visited by the student.

UI-MOPD is a platform-conditioned distillation framework: it routes rollouts to the appropriate expert teacher based on the environment, effectively pinning the shared policy to platform-specific behavioral anchors while allowing it to improve via reinforcement learning. This is like a student learning two different sports from two specialized coaches, where the student practices both but receives feedback from the coach relevant to the specific court they are currently on.

UI-MOPD significantly improves cross-platform task success rates compared to base models and integration baselines.

Evaluations on OSWorld and MobileWorld benchmarks show consistent gains over mixed-SFT and model-merging strategies. 38.2% success on OSWorld (12.7% relative improvement) and 12.0% on MobileWorld (55.8% relative improvement) for an 8B student model.

Platform-conditioned distillation preserves static GUI grounding better than static parameter merging.

On grounding benchmarks like ScreenSpot-Pro and OSWorld-G, UI-MOPD maintains performance near the base model, whereas TIES merging shows a clear decline. Maintains 90.88% on ScreenSpotV2 compared to 88.60% for TIES merging.

Why is this approach better than simply merging two specialized models?

Static merging (like weight averaging) often leads to interference between heterogeneous interaction patterns, causing a drop in performance. UI-MOPD uses online distillation to align the shared policy with expert behaviors only on the states it actually visits, which prevents the "averaging" effect and preserves platform-specific interaction modes.

Does this method require multiple models at inference time?

No. The platform-specific teachers are only used during the training stage to provide behavioral anchors. At inference time, the student is a single, unified policy that has internalized the interaction patterns of both platforms.

The primary assumption is that high-quality, platform-specific expert teachers can be pre-trained via supervised fine-tuning to serve as stable anchors for the distillation process.

For researchers building multi-platform agents, UI-MOPD demonstrates that platform-conditioned on-policy distillation is a more robust way to handle heterogeneous action spaces than simple data aggregation or weight-based model merging.

Motivation and Problem Framing

We expose why naïve cross‑platform training collapses distinct GUI behaviors and outline the UI‑MOPD solution.

Training a single GUI agent on both desktop and mobile environments forces the model to reconcile incompatible interaction conventions, which leads to behavioral pattern mixing, platform‑specific capability loss, and catastrophic forgetting when new platforms are added.

When one policy is forced to imitate both desktop‑style clicks and mobile‑style swipes, it produces a blended behavior that satisfies neither platform’s conventions.

UI‑MOPD tackles this entanglement by routing each rollout to a platform‑specific teacher and distilling the teacher’s behavior into a single shared policy, thereby preserving platform‑specific priors while still learning a unified model.

**Figure 1.** Motivation of UI-MOPD. Naively combining desktop and mobile signals, as in model merging or mixed SFT, can mix platform-specific behavioral conventions and produce an averaged policy. UI-MOPD uses platform-conditioned routing and multi-teacher on-policy distillation to integrate platform-specific expertise into a shared GUI agent.

Naïve model merging or mixed supervised fine‑tuning collapses platform‑specific interaction conventions, yielding an averaged policy that fails on both desktop and mobile tasks.

The UI-MOPD Training Pipeline

Method details the two‑stage UI‑MOPD pipeline, on‑policy distillation, and platform‑conditioned routing.

Training a single agent on both desktop and mobile forces it to blend distinct interaction conventions, so it loses fidelity on each platform. The remedy must keep platform‑specific behaviors separate while still sharing a single model.

The method proceeds in two stages: first we fine‑tune separate teacher policies for each platform, then we distill their expertise into one shared student via on‑policy reinforcement learning.

How does UI‑MOPD differ from simply averaging the logits of two teachers?

Averaging mixes the distributions before the student sees any data, erasing platform‑specific peaks. UI‑MOPD routes each rollout to the teacher that matches its platform, so the KL penalty preserves the distinct shape of each teacher’s distribution for the states the student actually visits.

Collect unified cross‑platform trajectories with the harness (desktop + mobile).

Fine‑tune a vision‑language model on each platform’s trajectories → obtain teachers $\pi$ᵈ and $\pi$ᵐ.

Initialize the shared student $\pi$_$\theta$ (e.g., from the foundation model).

Sample a minibatch of rollouts from mixed‑platform prompts using the current student.

Partition the batch by platform label and compute teacher log‑probabilities with the matching teacher.

Apply the K3 estimator to obtain token‑level KL estimates and mask them with the adaptive KL mask.

Compute the clipped policy‑gradient loss and combine with the masked KL loss (Eq 9‑11).

Update $\pi$_$\theta$ with a gradient step; repeat.

During online rollouts the student is nudged toward the platform‑specific teacher by minimizing a KL divergence computed on the very states it just visited.

Why not compute the full KL over the vocabulary instead of using K3?

Full KL requires summing over thousands of tokens for every time step, which is prohibitively expensive in RL. K3 uses only the sampled token’s probabilities, giving an unbiased estimate at a fraction of the cost.

Compute the log‑ratio: $\delta$ = log 0.6 − log 0.4 ≈ 0.405.

Exponentiate: $\rho$ = exp($\delta$) ≈ 1.5.

Apply K3 formula: Ď_KL = $\rho$ − $\delta$ − 1 ≈ 1.5 − 0.405 − 1 = 0.095.

The estimate is non‑negative and reflects that the teacher is modestly more confident in the sampled token.

K3 gives a cheap, unbiased KL estimate using only the sampled token, avoiding a full‑vocab sum while still penalizing the student when its confidence lags behind the teacher.

Each rollout is sent to the teacher that matches its platform label, so the KL penalty never mixes desktop and mobile logits.

Is platform‑conditioned routing just a fancy way of training two separate agents?

No. The student remains a single set of parameters; routing only selects which teacher’s logits are used for the KL term. At inference time the student operates without any teacher, unlike training two independent agents.

Routing selects the desktop teacher for rollout 1 and the mobile teacher for rollout 2 (Eq 6).

Compute $\delta$ for rollout 1: log 0.7 − log 0.5 ≈ 0.336; for rollout 2: log 0.6 − log 0.3 ≈ 0.693.

Apply K3 to each: Ď_KL₁≈exp(0.336) − 0.336 − 1≈0.058; Ď_KL₂≈exp(0.693) − 0.693 − 1≈0.099.

Masking ($\mu$) may zero out either estimate if the corresponding rollout already achieved high reward.

Routing guarantees that each KL estimate reflects the correct platform’s expert, so the student receives distinct corrective signals for desktop and mobile behaviors.

**Figure 2** Overview of UI-MOPD training pipeline. In Stage 1, platform-specific desktop and mobile teachers are obtained by supervised fine-tuning on Uni-GUI trajectories collected from a unified cross-platform harness. In Stage 2, a shared student policy is trained with multi-teacher on-policy distillation, where platform-conditioned routing selects the corresponding teacher to provide reverse-KL guidance together with rule-based rollout rewards.

Beyond routing, the method defines a structured outcome reward and a combined optimization objective that balances task success with platform‑specific constraints.

The final loss adds a clipped policy‑gradient term (for task reward) to a masked KL distillation term (for platform fidelity), weighted by $\beta$.

What would happen if the KL mask $\mu$ were always set to 1?

The student would be constantly pulled toward the teacher distributions, suppressing exploration and potentially preventing it from discovering higher‑reward strategies that differ from the teachers.

Performance Evaluation

UI‑MOPD delivers the strongest cross‑platform success rates.

UI‑MOPD improves cross‑platform task success more than any baseline.

Table 1 shows UI‑MOPD (8B student) at 38.2 % on OSWorld and 12.0 % on MobileWorld, beating Mixed‑SFT and TIES‑merging.

OSWorld is a desktop GUI benchmark that measures how often an agent completes 361 scripted tasks.

What does a “task‑success” percentage actually count?

It counts a task as successful only if the agent reaches the final goal state without timing out or triggering an error, matching the benchmark’s strict success definition.

MobileWorld evaluates mobile GUI agents on 117 tasks, reflecting touch‑centric interaction patterns.

Why is MobileWorld performance typically lower than OSWorld?

Mobile interactions involve additional modalities (swipes, virtual keyboards) and tighter screen real‑estate, making the same policy harder to transfer without platform‑aware adaptation.

TIES‑merging statically averages the weights of two platform‑specific models to produce a single multi‑platform policy.

How does TIES‑merging differ from UI‑MOPD’s platform‑conditioned distillation?

UI‑MOPD keeps the teachers separate during online distillation and routes rollouts to the appropriate teacher, preserving distinct interaction patterns, whereas TIES‑merging collapses them into a single static weight vector.

**Table.** Performance comparison of different models and integration strategies on OSWorld and MobileWorld.

**Table 2.** Teacher-student analysis on OSWorld and MobileWorld.

**Table 3.** General GUI grounding, visual understanding, and AndroidControl* results. The star denotes the evaluated subset. The Model Merge row corresponds to the TIES-merging checkpoint.

UI‑MOPD outperforms TIES‑merging and mixed SFT across both platforms.

Data Collection and Harness

We describe the unified harness that builds a clean cross‑platform GUI dataset.

Cross‑platform GUI training suffers from noisy, mismatched demonstrations because desktop and mobile environments differ in observation formats, action primitives, and UI layouts. Without a disciplined pipeline, many collected trajectories are unusable for learning.

The harness enforces a strict four‑stage workflow that turns raw, platform‑specific interactions into a single, clean dataset usable by a unified student policy.

Step 2 appears twice → malformed step structure detected.

“swipe” action is not in the unified action set → unmappable action filtered out.

Remaining steps count = 5 (< 40) → length filter passes.

Query “open settings” matches a known functional point on the desktop environment → query‑environment check passes.

Gemini‑3.1‑Pro judges the cleaned trajectory, verifies all sub‑tasks (e.g., “click Settings”, “navigate back”) succeed → trajectory retained.

The cleaning pipeline guarantees that every kept demonstration is both syntactically well‑formed and semantically executable by the student policy.

How does this harness differ from a naïve data‑collection script that simply records every interaction?

The naïve script would capture all raw actions, including malformed sequences, platform‑specific primitives the student cannot imitate, and failed tasks. Our harness inserts four explicit quality controls—syntactic validation, action‑space mapping, length capping, and sub‑task verification—so only clean, executable demonstrations survive.

**Figure 4.** Overview of Unified Cross-Platform Data Collection Harness.

Applying the harness yields the Uni‑GUI dataset: ≈95 K desktop steps (self‑collected) + 13 K OpenCUA steps, and ≈17 K mobile steps (self‑collected) + 35 K OpenMobile steps, totaling about 160 K steps and 11.5 K trajectories.

The table summarizes the dataset composition across different platforms and source types, detailing the number of steps and trajectories for each category, culminating in a total of approximately 160K steps and 11.5K trajectories.

The harness enables consistent data collection across heterogeneous environments.

Qualitative Analysis

Fine‑grained performance of UI‑MOPD across mobile and desktop benchmarks.

Training a single GUI agent across desktop and mobile platforms often leads to Behavioral Pattern Mixing, where platform‑specific interaction conventions become entangled. UI‑MOPD mitigates this by routing inputs through platform‑conditioned modules and distilling knowledge on‑policy from specialized teachers.

UI‑MOPD attains the highest overall accuracy on the OSWorld‑G grounding benchmark, reaching 90.88%.

Table 7 shows UI‑MOPD at 90.88% versus 87.02% for the Base model and 88.33% for Model Merge.

**Figure 3.** Mobile task execution example of UI-MOPD.

**Figure 5.** Desktop task execution example of UI-MOPD.

Table 7 reveals that Model Merge consistently degrades mobile metrics, while UI‑MOPD preserves or improves performance across all benchmarks. On ScreenSpot‑Pro and ScreenSpotV2, UI‑MOPD matches the Base model and outperforms it on Creative, Scientific, and desktop grounding sub‑categories. The overall trend confirms that multi‑teacher on‑policy distillation retains fine‑grained GUI understanding while boosting cross‑platform interaction.

Training Configuration

Details of action formatting, trajectory storage, and training hyperparameters for both platforms.

We re‑annotate grounding bounding boxes for actions that refer to visual UI elements. These boxes are later used by a rule‑based evaluation stage to verify that each action targets the correct region. Consequently, the harness outputs a set of successful, executable, action‑compatible, reasoning‑normalized, and visually grounded GUI trajectories for both mobile and desktop platforms.

The prompt templates (see Appendix F) define platform‑specific tool interfaces used by Qwen3‑VL policies. Desktop trajectories employ the `computer_use` interface with mouse and keyboard actions, while mobile trajectories use the `mobile_use` interface with touchscreen actions. Table 5 summarizes the full action spaces.

The table lists the platforms, tools, and available actions for computer and mobile use.

Each trajectory is stored as an episode directory. A mobile episode contains a normalized trajectory file task.json, a raw generation record `task_raw`.json, and step‑indexed screenshots (e.g., 0.jpg, 1.jpg). The normalized file records metadata such as task source, application name, screen resolution, user query, device type, and train/test split, plus a data field with per‑step records (index, query, normalized reasoning, tool‑call plan, grounding boxes, screenshot path, and flags). The raw file preserves the original prompt, model response, and conversion details for traceability.

Table 6 aggregates the hyperparameters used throughout training. The student policy starts from Qwen3‑VL‑8B‑Thinking, while platform‑specific teachers are initialized from Qwen3‑VL‑32B‑Thinking. Both teacher SFT and student training run for a single epoch.

**Table 6.** Training hyperparameters. TP, PP, and DP denote tensor, pipeline, and data parallelism, respectively.

Student training uses a GRPO‑based DAPO objective with multi‑teacher on‑policy distillation; each prompt samples eight rollouts and the OPD auxiliary KL loss is weighted by $0.01$. Visual inputs during training consist of the current screenshot only, whereas inference incorporates four historical screenshots plus the current one and the full text action history. Optimization runs on $64$ NVIDIA H100 GPUs (8 nodes × 8 GPUs) with tensor, pipeline, and data parallelism configured as TP$=2$, PP$=1$, DP$=32$ for the student and TP$=8$, DP$=8$ for the teacher. Learning rate is $1\!\times\!10^{-6}$ in bfloat16 precision, and rollout sampling is performed asynchronously by SGLang.

System Prompts

Four system prompts define desktop and mobile interfaces and trajectory‑collection formats.

The Desktop System Prompt for Qwen3‑VL lists a single function “`computer_use`” with actions such as `mouse_move`, `left_click`, and wait, and mandates a two‑part response: an imperative Action line followed by a JSON block.

The Mobile System Prompt for Qwen3‑VL defines a “`mobile_use`” function supporting touch actions like click, swipe, and `long_press`, and requires three‑part output: Thought, Action, and a JSON block.

The Desktop Trajectory Collection Prompt (Kimi‑K2.6) instructs the agent to emit a Thought line, a “## Action:” line, and a “## Code:” block containing either pyautogui code or calls to helper functions such as computer.wait or computer.terminate.

The Mobile Trajectory Collection Prompt (Gemini‑3.1‑Pro) defines an Android operator role, an action‑framework table mapping verbs to JSON schemas, and a set of Execution Principles and Decision Process steps that shape the single‑JSON output.

Questions & answers

What is the main contribution of UI-MOPD?

UI-MOPD introduces a multi-teacher on-policy distillation framework for training a single GUI agent across heterogeneous platforms (desktop and mobile) by routing each rollout to a platform-specific expert teacher and applying a KL-based behavioral constraint only on states the student actually visits during reinforcement learning.

What problem does UI-MOPD address?

UI-MOPD addresses the problem of behavioral pattern mixing and catastrophic forgetting that occurs when a single GUI agent is trained on both desktop and mobile environments, where incompatible interaction conventions (e.g., mouse-based windowing vs. touch-based navigation) cause the policy to 'average out' and perform poorly on both platforms.

Why is training a single GUI agent on mixed desktop and mobile data problematic?

Mixed training forces the model to reconcile incompatible interaction conventions, leading to an 'averaged' policy that loses fidelity on both platforms, collapses platform-specific interaction patterns, and suffers from catastrophic forgetting when new platforms are added.

How does UI-MOPD's training pipeline work?

During online reinforcement learning, the student policy samples rollouts from both desktop and mobile environments; each rollout is routed to the matching platform-specific teacher, and a KL divergence penalty (using the K3 estimator) anchors the student's distribution to that teacher's behavior only for the states actually visited, while a GRPO-based DAPO objective drives task-success rewards.

What is the K3 estimator and why is it used instead of full KL divergence?

K3 is an approximation of KL divergence that uses only the sampled token's probabilities rather than summing over the entire vocabulary, providing an unbiased estimate at a fraction of the computational cost—full KL over thousands of tokens per time step would be prohibitively expensive in a reinforcement learning setting.

Does UI-MOPD require multiple models at inference time?

No. The platform-specific teachers are used only during training to provide behavioral anchors; at inference time, the student operates as a single unified policy without any teacher models.

What are the key performance results reported for UI-MOPD?

UI-MOPD achieves task success rates of 38.2% on OSWorld (desktop) and 12.0% on MobileWorld (mobile), significantly outperforming standard mixed-data fine-tuning and static model merging baselines such as TIES-merging.

Why is MobileWorld performance lower than OSWorld performance?

Mobile interactions involve additional modalities such as swipes and virtual keyboards, as well as tighter screen real-estate, making it harder to transfer a policy without platform-aware adaptation compared to desktop environments.

How does UI-MOPD compare to TIES-merging and mixed supervised fine-tuning?

UI-MOPD outperforms both TIES-merging and mixed SFT across both platforms; TIES-merging collapses platform-specific interaction patterns into a single static weight vector and consistently degrades mobile metrics, while UI-MOPD's online distillation preserves distinct interaction modes by keeping teachers separate and routing rollouts appropriately.

What dataset was constructed for this work, and how large is it?

The paper introduces the Uni-GUI dataset, totaling approximately 160,000 steps and 11,500 trajectories, comprising roughly 95,000 self-collected desktop steps plus 13,000 OpenCUA steps, and approximately 17,000 self-collected mobile steps plus 35,000 OpenMobile steps.

What quality controls does the data collection harness apply?

The harness applies four explicit quality controls—syntactic validation, action-space mapping, length capping, and sub-task verification—to filter out malformed sequences, platform-incompatible primitives, and failed tasks, ensuring only clean, executable demonstrations are retained.

What model architectures and hyperparameters are used in training?

The student policy is initialized from Qwen3-VL-8B-Thinking and the platform-specific teachers from Qwen3-VL-32B-Thinking; both teacher SFT and student training run for one epoch, each prompt samples eight rollouts, the OPD auxiliary KL loss is weighted at 0.01, and optimization runs on 64 NVIDIA H100 GPUs.

What are the platform-specific action interfaces used in UI-MOPD?

Desktop trajectories use the 'computer_use' interface with actions such as mouse_move, left_click, and wait, while mobile trajectories use the 'mobile_use' interface with touchscreen actions including click, swipe, and long_press.

What is the role of the KL mask μ in the training objective?

The KL mask μ controls when the distillation penalty is applied; if it were always set to 1, the student would be constantly pulled toward the teacher distributions, suppressing exploration and potentially preventing discovery of higher-reward strategies that differ from the teachers.

What assumption does UI-MOPD rely on regarding the teacher models?

The primary assumption is that high-quality, platform-specific expert teachers can be pre-trained via supervised fine-tuning to serve as stable behavioral anchors for the distillation process.

What benchmarks are used to evaluate UI-MOPD beyond OSWorld and MobileWorld?

The paper also reports results on ScreenSpot-Pro and ScreenSpotV2 grounding benchmarks, where UI-MOPD matches or outperforms the base model on sub-categories including Creative, Scientific, and desktop grounding.

What agents were used for trajectory data collection?

Desktop trajectories were collected using a Kimi-K2.6-based agent, and mobile trajectories were collected using a Gemini-3.1-Pro-based agent, each with platform-specific prompt templates and action frameworks.

What is the difference in visual input between training and inference?

During training, visual inputs consist of the current screenshot only, whereas at inference time the model incorporates four historical screenshots plus the current one along with the full text action history.

Key terms

GUI agent
An AI system that interacts with graphical user interfaces by perceiving screenshots and executing actions such as clicks, typing, or swipes to complete tasks.
on-policy distillation (OPD)
A training technique where a student model learns from a teacher model's behavior specifically on the states the student itself visits during its own rollouts, rather than on a fixed offline dataset.
multi-teacher distillation
A knowledge distillation setup where multiple specialized teacher models each provide guidance to a single student model, typically with each teacher covering a different domain or task.
platform-conditioned routing
A mechanism that selects which teacher's behavioral signal to apply based on the platform (e.g., desktop or mobile) from which a given rollout was collected.
behavioral pattern mixing
The undesirable entanglement of platform-specific interaction conventions in a shared policy when it is trained on data from multiple heterogeneous environments simultaneously.
catastrophic forgetting
The tendency of a neural network to lose previously learned knowledge when trained on new data, a particular concern when adding new platforms to a GUI agent.
KL divergence
A measure of how different one probability distribution is from another, used here as a penalty to keep the student policy close to the teacher's action distribution.
K3 estimator
An approximation of KL divergence that uses only the probability of the sampled token rather than summing over the full vocabulary, making it computationally efficient for use in reinforcement learning.
GRPO-based DAPO objective
A reinforcement learning optimization objective combining Group Relative Policy Optimization (GRPO) with the DAPO variant, used here to train the student policy for task success.
TIES-merging
A static model merging technique that combines the weights of multiple models into a single weight vector, which can cause interference between heterogeneous interaction patterns.
OSWorld
A benchmark for evaluating desktop GUI agents on task success in a computer operating system environment.
MobileWorld
A benchmark for evaluating mobile GUI agents on task success in a touchscreen-based mobile environment.
ScreenSpot-Pro / ScreenSpotV2
Benchmarks that evaluate a GUI agent's ability to accurately ground (locate) UI elements on a screen, used here to assess fine-grained GUI understanding.
Uni-GUI dataset
The cross-platform GUI trajectory dataset constructed for this work, containing approximately 160,000 steps and 11,500 trajectories spanning both desktop and mobile environments.
Qwen3-VL
A vision-language model family used in this work, with the 8B-Thinking variant serving as the student and the 32B-Thinking variant serving as the platform-specific teachers.
computer_use interface
The desktop-specific action interface used by the Qwen3-VL policy, supporting actions such as mouse_move, left_click, and wait.
mobile_use interface
The mobile-specific action interface used by the Qwen3-VL policy, supporting touchscreen actions such as click, swipe, and long_press.
supervised fine-tuning (SFT)
A training procedure that adapts a pre-trained model to a specific task by training it on labeled demonstration data, used here to initialize the platform-specific teacher models.
rollout
A complete sequence of actions taken by an agent in an environment from a starting state to a terminal state, used to generate training data in reinforcement learning.

Read the original paper

Open the simplified reader on Paperglide

Browse all simplified papers