Manuscript Offprint
arXiv:2608.24099Are Android GUI Agents Robust Against Runtime Anomalies? AnTrap: Evaluating Agents in Dynamic Adversarial Environments
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
Abstract
GUI agents often encounter dynamic anomalies when deployed on Android devices, from unexpected pop-ups to action misuse, yet existing benchmarks lack systematic evaluation of agent robustness against runtime anomalies. We introduce ANTRAP, a comprehensive benchmark that injects dynamic perturbations into agent execution trajectories. We propose a taxonomy organizing real-world anomalies into four layers (State, Thinking, Action and Round) with ten fine-grained subcategories, and develop a construction pipeline that preserves task solvability while introducing realistic adversarial conditions. Evaluating 16 leading GUI models, we reveal universal vulnerability to dynamic anomalies, with even the strongest models suffering significant performance degradation. Furthermore, we conduct GRPO training in both original and adversarial environments to validate our benchmark, separating environment-learnable anomalies from reasoning-bottlenecked ones. Our findings show that while single-step traps at state and action layers are largely addressable through adversarial reinforcement learning, deep contextual traps, like state deadlock, expose intrinsic limitations that cannot be resolved by training in environments with traps alone.
1 Introduction
Android agents aim to accomplish complex device operation tasks given instructions from human users (Bai et al., 2024; Chen et al., 2025a; Wang et al., 2025; Gan et al., 2026). Recently-released agentic models have shown remarkable long-sequence planning and execution performance on dynamic benchmarks, including AndroidLab (Xu et al., 2025), AndroidWorld (Rawles et al., 2025), and MobileWorld (Kong et al., 2025).
Despite these contributions, the robustness of agents against Android runtime anomalies remains largely unexplored. This gap is critical since GUI agents frequently encounter runtime anomalies from two sources that require recovery in real-world mobile execution. First, agents face external environment perturbations such as application ad pop-ups, system glitches and rendering delays that often disrupt correct task execution (Xu et al., 2026c; Zhang et al., 2025; Xu et al., 2026b). Second, agents make internal errors themselves during operation, such as hallucinating GUI elements in reasoning, grounding inaccurately or misusing actions, yet they consistently struggle to recover independently (Yuan et al., 2025; Wu et al., 2025a). Consequently, the ability to recover from both types of anomalies is essential for the real-world deployment of Android agents (Zhang et al., 2026; Zhai et al., 2026; Wu et al., 2025b). However, existing benchmarks either use predefined adversarial static trajectories for single-step testing (Xu et al., 2026c; Wei et al., 2026b), or lack systematic anomaly injection in dynamic settings, thus failing to cover the full spectrum of real-world runtime challenges we discussed (Sun et al., 2026; Gong et al., 2026).
To bridge this gap, we propose ANTRAP, a novel benchmark suite designed with challenging dynamic Android TRAPs to assess agent recovery capabilities against external environmental perturbations and internal errors. We construct an original set of 236 tasks within a dynamic environment extended from AndroidWorld (Rawles et al., 2025). To systematically test the robustness of agents against runtime anomalies, we conduct a pilot study in real-world scenarios and introduce a comprehensive taxonomy for granular adversarial evaluation on Android. As detailed in Figure 1, it consists of four primary layers containing state, thinking, action, and round based on the execution loop principle, along with ten specific subcategories for constructing adversarial tasks.
Corresponding author: Hong Zhou zhouhong_zju@zju.edu.cn. Our code will be available at https://github.com/gguogan/AnTrap.
Scenario I: Full screen pop-up occurs in screen.

While booking a hotel, the agent is misled by a full-screen pop-up which appeared on the screen.
Scenario II: Visual interpretation error in reasoning.

When adding a work phone number, the reasoning failed to recognize the current setting was still mobile rather than work, which misled the action.
Scenario III: Error occurs in agent action.

When trying to adjust the alarm volume via the slider, agent keeps missing the target due to a grounding error.
Scenario IV: Accident occurs in a long sequence.
When entering a health app, a shake-to-jump ad redirects to a food delivery app, causing the agent to lose direction in the task.
Can GUI agents recover from these anomalies?
Figure 1: Four scenarios of runtime anomalies in Android agent tasks from our pilot study, including pop-ups, reasoning errors, grounding errors, and long-sequence accidents. ANTRAP taxonomy organizes such anomalies into four layers (State, Thinking, Action, Round) and ten subcategories.
On ANTRAP, we conduct extensive experiments, evaluating 16 agentic models from 7 organizations known for their leading performance in GUI tasks. Our experiment results reveal that current agents generally exhibit performance drops when facing adversarial perturbations under dynamic traps. We attribute this to the agents' inadequate integration of historical trajectory context, and a scarcity of adversarial training environments and data.
Consequently, to analyze the unique challenges presented by ANTRAP, we conduct online Group Relative Policy Optimization (GRPO) in both the original and adversarial environments. The resulting performance separates environment-learnable challenges from reasoning-bottlenecked ones: state and action perturbations are largely recovered through adversarial training, whereas multi-step contextual traps such as execution loops resist improvement even under dedicated training.
The contributions are summarized as follows:
• We introduce a comprehensive taxonomy of runtime anomalies for Android GUI agents, categorizing real-world deployment challenges into four layers and ten subcategories.
• We design the ANTRAP suite, which includes an online environment and a benchmark with dynamic traps to evaluate agent performance under runtime anomalies.
• We analyze current agents using ANTRAP, revealing their vulnerability to runtime anomalies.
• We conduct GRPO experiments that provide insights for future agent development by distinguishing between environment-learnable challenges and reasoning-bottlenecked issues.
2.1 Benchmarks for Mobile Usage
Benchmarks for GUI agents generally fall into static and dynamic categories as shown in Table 1. Static benchmarks (Rawles et al., 2023; Zhang et al., 2024; Li et al., 2024; Lu et al., 2025) focus on single-step operations and grounding accuracy, neglecting the capacity of agents for long-sequence tool utilization within dynamic environments. Dynamic benchmarks including Android-Lab (Xu et al., 2025), AndroidWorld (Rawles et al., 2025), and MobileWorld (Kong et al., 2025) construct interactive frameworks with foundational Android emulators, which assess agent performance through continuous task execution within a live operating system (Wu et al., 2026). However, these benchmarks primarily evaluate the overall performance of mobile agents under stable and clean conditions while overlooking their robustness. Some works have acknowledged this issue, but they either focus solely on visual noise (Zhao et al., 2025b; Xu et al., 2026c) or the ambiguity of instructions (Sun et al., 2026), lacking a systematic evaluation of agents' recovery capabilities when facing runtime anomalies. To address this, ANTRAP introduces a granular taxonomy of runtime anomalies which cover both external environment perturbations and agent internal error cases.
2.2 Agent Robustness to Anomalies
Across diverse domains, evaluating and improving the robustness of agents against anomalies has become an important research direction. Literatures
| Benchmark | Online Env | Stochastic Tasks | Intervention | Task Target |
|---|---|---|---|---|
| Computer Agentic Systems | ||||
| ScreenSpot Pro (Li et al., 2025) | ✕ | - | N/A | Grounding |
| WebArena (Zhou et al., 2024) | ✓ | ✕ | N/A | General Execution |
| OSWorld (Xie et al., 2024) | ✓ | ✕ | N/A | General Execution |
| It's a TRAP! (Korgul et al., 2025) | ✓ | ✕ | Dynamic | Safety |
| AutoElicit (Jones et al., 2026) | ✓ | ✕ | Dynamic | Safety |
| LPS Bench (Chen et al., 2026) | ✓ | ✕ | Dynamic | Safety |
| Robustness ScreenSpot (Zhao et al., 2025a) | ✕ | - | Static | Robustness |
| Mobile Agentic Systems | ||||
| ScreenSpot V2(Wu et al., 2024) | ✕ | - | N/A | Grounding |
| AITW (Rawles et al., 2023) | ✕ | - | N/A | General Execution |
| AndroidControl (Li et al., 2024) | ✕ | - | N/A | General Execution |
| GUI Odyssey (Lu et al., 2025) | ✕ | - | N/A | General Execution |
| AndroidLab (Xu et al., 2025) | ✓ | ✕ | N/A | General Execution |
| AndroidWorld (Rawles et al., 2025) | ✓ | ✓ | N/A | General Execution |
| MobileWorld (Kong et al., 2025) | ✓ | ✕ | N/A | General Execution |
| MobileBench-OL (Wu et al., 2026) | ✓ | ✕ | Dynamic | General Execution |
| AmbiBench (Sun et al., 2026) | ✓ | ✕ | Dynamic | Ambiguity |
| SMAN Bench (Xu et al., 2026c) | ✕ | - | Static | Robustness |
| ANTRAP (Ours) | ✓ | ✓ | Dynamic | Robustness |
Table 1: Comparison of recent graphical user interface benchmarks. Unlike prior evaluation suites that predominantly focus on general execution or passive robustness, ANTRAP injects runtime anomalies during execution to assess agent robustness in mobile environments with stochastic instructions.
on computer usage (Jones et al., 2026; Zhao et al., 2025a; Wei et al., 2026a) evaluate agent robustness against anomalies in desktop environments across diverse dimensions, such as visual (Chen et al., 2025c), semantic (Korgul et al., 2025), and privacy aspects (Chen et al., 2026). In coding domains, RoTBench (Ye et al., 2024) evaluates the robustness of agents against dynamic perturbations, particularly focusing on noisy execution environments and tool interfaces. However, in mobile scenarios, relevant benchmarks (Xu et al., 2026c; Sun et al., 2026; Gong et al., 2026; Wu et al., 2026) are either static or dynamic but only focus on limited anomalies as we mention in Section 2.1. Several methods focus on robust execution (Zhang et al., 2026). Methods like Agent-R (Yuan et al., 2025) enhance general agents by pre-collecting error recovery trajectories for supervised fine-tuning, while the mobile-scenario method GUI-Reflection (Wu et al., 2025a) focuses on improving agent recovery by identifying errors, undoing actions, and getting back on track. However, these methods only capture random errors and accidents, lacking controllable environments and systematic analysis across different anomaly types. Our work fills this gap by injecting fine-grained exogenous environmental and endogenous cognitive perturbations in a dynamic manner, specifically designed to evaluate the recovery capabilities of agents.
3 Android Trap
In this section, we first present the preliminary for benchmark design (Section 3.1). Second, we introduce taxonomy of dynamic traps (Section 3.2). Then, we present ANTRAP construction including original task curation and adversarial traps injection (Section 3.3). Finally, we provide data analysis including benchmark statistics and human validation for the reliability of ANTRAP. (Section 3.4).
3.1 Preliminary
Task Formulation. We propose ANTRAP, a benchmark designed to assess the robustness of GUI agents against runtime anomalies. A conventional GUI task expects an agent to fulfill a user instruction via an execution loop of multiple interaction rounds , comprising the environment-provided state S, the agent's internal thinking T, and the executed action A. However, real-world execution frequently involves dynamic anomalies including environmental disturbances and agents' own errors. Formally, to simulate these anomalies, we inject dynamic perturbations into the execution loop at step t, converting clean environments into adversarial ones as follows:
where denotes the perturbed counterpart of , is the window size of consecutive steps.
(a) Original Environment
Clean Environment
with emulators
Parallel environments
236 original tasks
Tasks with stochastic parameters
Sparse simulator accidents
Uncontrollable agent error
(b) Trap Construction
(c) Diversity Settings
Original Environment
Trap Type
Injection Timing
Trap Frequency
Content variation
Trap Environment
Fine-grained robustness

a. State-layer: Pop-up windows, full screen advertise...
b. Thinking-layer: vision hallucination, reasoning error...
c. Action-layer: Grounding error, wrong action type...
d. Round-layer: stuck in loop, context disruption ...
② Call toolbox
Trap Category
Trap Toolbox
S trap
T trap
A trap
R trap
Figure 2: Overview of ANTRAP. (a) Original Environment: a base emulator that supports parallel evaluation over base tasks and environments. (b) ANTRAP Construction: during dynamic execution, we intercept the agent's loop and inject four-layer anomalies through the trap toolbox. (c) Diversity Settings: trap type, injection timing, frequency, and content source can be flexibly configured to create diverse and realistic dynamic traps.
Prerequisite and Desiderata. Evaluating robustness against runtime anomalies introduces two challenges not addressed by existing benchmarks (Xu et al., 2026c). First, the evaluation suite requires fine-grained, category-level diversity to reflect a broad range of real-world anomalies which agents encounter upon deployment, rather than relying on sparse anomalies incidentally triggered within standard dynamic environments. Second, constructing these adversarial conditions requires a systematic and scalable methodology so that each injected perturbation remains controllable and aligned with the intended evaluation signal. To realize these, we introduce a taxonomy of runtime anomalies that trap GUI agents. Subsequently, we detail an injection pipeline that systematically constructs scenarios with traps for each taxonomy category to ensure expansive task diversity.
3.2 Taxonomy of Dynamic Traps
Through a pilot analysis of agents’ trajectories collected from real-device deployment tasks as described in Appendix B, our taxonomy STAR consists of four layer-based categories: State, Thinking, Action, and Round layers based on the GUI agent execution loop. As shown in Figure 1 and Table 2: (1) State Layer focuses on one-step anomalies at the state level, including unexpected pop-up windows, rendering errors, and transient UI glitches; (2) Thinking Layer focuses on errors at the thinking level, such as temporal misalignments and visual hallucinations; (3) Action Layer focuses on issues in action selection, including grounding errors, action type errors, and inconsistencies between actions and thinking; (4) Round Layer indicates errors spanning several steps, like long-time deadlocks, system interruptions, and falling into loops. These four categories are further divided into ten subcategories.
3.3 ANTRAP Construction
Original Task Curation. We use Android-World (Rawles et al., 2025) as our base clean environment due to its dynamic nature and extensive usage. To enhance the diversity of the baseline tasks, we manually augment the original suite of 116 tasks by introducing new scenarios within this environment, yielding a total of 236 tasks with stochastic variations, all of which undergo meticulous manual checking to ensure their operational feasibility and technical soundness. Specific details are provided in the Appendix A.
Dynamic Trap Construction. To simulate authentic dynamic anomalies, we build a runtime pipeline that injects traps during agent execution, guided by the STAR taxonomy. Specifically, as shown in Figure 2, for state traps , we directly modify the emulator's state. This is achieved by applying image-level edits via native UI elements on screenshots or broadcasting a customized
| Subcategory | Definition |
|---|---|
| Category 1: State Layer | |
| (1) External Interruption | Unexpected windows, system alerts or application jumps. |
| (2) Visual Obscuration | Rendering errors or image loading failures obscuring critical interface. |
| Category 2: Thinking Layer | |
| (3) Temporal Conflict | False or outdated observations that lead the agent to reason about a misaligned state. |
| (4) Visual Hallucination | Hallucinate text, icons, buttons, relationships, or details that do not exist on the screenshot. |
| Category 3: Action Layer | |
| (5) Grounding Error | Executed action coordinates deviating from the intended target UI components. |
| (6) Type Mismatch | Misuse of action types, including confusing click, long press, and double-click; or calling undefined tools in action space. |
| (7) Intent Deviation | Executed actions diverging from the generated internal reasoning and planning logic. |
| Category 4: Round Layer | |
| (8) State Deadlock | An unresponsive interface where environment state updates stall completely despite actions. |
| (9) Context Disruption | Sudden desktop jumps or unrelated application switches breaking execution. |
| (10) Loop | Loop in a repeated state cycle. |
Table 2: Systematic taxonomy of dynamic traps in the ANTRAP benchmark. Comprehensive programmatic implementation details are provided in the Appendix A.
APK that triggers pop-ups, which support both predefined templates and real-time LLM-generated contents. The changed observations are recorded in the agent's history. For thinking traps , we substitute single-step observations with incorrect ones to induce hallucinations or temporal conflicts, simulating cognitive challenges. Notably, the changed observation is excluded from the history, while the agent's induced output is permanently logged. Consequently, the agent must navigate subsequent states burdened by its own hallucinated context, which necessitates autonomous recovery from internal thinking errors. For action traps , we intercept the agent's output to dynamically override coordinates or action types before execution, with the edited physical actions logged. For round traps , we hijack the true execution flow across multiple steps, utilizing predefined trajectories or runtime execution history segments to disrupt multi-step reasoning and execution. The entirety of these prolonged disruptions is recorded in the history. All the implementation adheres to two principles. First, we enforce dynamic intervention, which means perturbations are injected stochastically along the trajectory rather than applied to static trajectories. Second, we guarantee solvability preservation, indicating that the injection never renders the user instruction impossible to complete, so that any performance degradation is attributable solely to the agent's inadequate robustness to runtime anomalies. Full implementation details are provided in the Appendix A.
3.4 Data analysis
Statistics. Our benchmark pairs the 236 original tasks with their adversarial counterparts, which all have stochastic elements in instructions and environments. The benchmark supports the evaluation of all four-layer and ten-subcategory anomalies across every task, enabling a granular assessment of agent robustness. We additionally expose configurable parameters for trigger time and injection frequency, allowing users to adjust task difficulty as detailed in Appendix A.
Human Validation. To validate the reliability of ANTRAP, we conduct a human study on all tasks across ten subcategories. Expert annotators are instructed to verify three criteria: (1) the solvability of the original task, (2) the preserved solvability after perturbation injection, and (3) the validity of the trap (i.e., whether it plausibly occurs in real mobile environments). Across the validated sample, 91% of tasks satisfy all three criteria. Failing tasks are revised before inclusion.
4 Main Experiments
4.1 Experiment Setup
Metrics in Evaluation. Following previous work (Xu et al., 2025; Rawles et al., 2025), we use task rule-based success rate as the evaluation metric with Pass@3 and unified settings as detailed in Appendix A. We also demonstrate the performance drop compared to the original environment without traps to reflect the robustness against perturbations.
Evaluated Models. We evaluate a wide range of multimodal models which possess agent capabilities as follows: (1) Thinking Models including Gemini-3-Pro (Google, 2025), Claude-Sonnet-4.6 (Anthropic, 2026), GPT-5.4, and GPT-5.4-Mini (OpenAI, 2026). UI-TARS-1.5-7B (Qin et al., 2025); MAI-UI (Zhou et al., 2025), for which we include 2B and 8B versions; GUI-Owl-7B (Ye et al., 2025); GUI-Owl-1.5-Think (Xu et al., 2026a), for which we include 32B and 8B versions; Qwen3-VL-Thinking (Team, 2025), for which we include 4B and 8B versions. (2) Instruct Models including GUI-Owl-1.5-Instruct (Xu et al., 2026a), for which we include 8B and 32B versions; Qwen3-VL-Instruct (Team, 2025), for which we include
| Model | Orig | S-Layer | T-Layer | A-Layer | R-Layer | Avg | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ext.I. | Vis.O. | Tmp.C. | Vis.H. | Grd.E. | Typ.M. | Int.D. | St.DL. | Ctx.D. | Loop | |||
| Human Baseline | ||||||||||||
| Human Annotator | 94.1 | 94.1 | 92.4 | - | - | 94.1 | 93.6 | - | 93.2 | 92.8 | - | 93.4 |
| Proprietary Models | ||||||||||||
| Claude-Sonnet-4.6 | 74.2 | 64.8 | 66.1 | 66.9 | 72.0 | 69.9 | 67.8 | 69.5 | 63.1 | 63.1 | 61.9 | 66.5 |
| Gemini-3-Pro | 72.9 | 61.9 | 68.6 | 60.2 | 62.7 | 68.6 | 60.6 | 66.1 | 63.6 | 61.4 | 62.3 | 63.6 |
| GPT-5.4 | 65.3 | 55.1 | 53.8 | 57.6 | 64.8 | - | 61.9 | 61.9 | 50.0 | 52.5 | 51.7 | 56.6 |
| GPT-5.4-Mini | 42.8 | 31.4 | 25.0 | 40.3 | 29.7 | - | 29.2 | 33.1 | 31.8 | 34.7 | 39.4 | 32.7 |
| Open-Source Instruct Models | ||||||||||||
| GUI-Owl-1.5-32B-Instruct | 68.2 | 58.1 | 62.7 | 57.2 | 65.3 | 63.1 | 64.0 | 66.1 | 63.6 | 62.7 | 61.0 | 62.4 |
| GUI-Owl-1.5-8B-Instruct | 64.8 | 55.1 | 66.9 | 58.1 | 65.3 | 65.7 | 63.1 | 60.2 | 55.1 | 57.2 | 58.5 | 60.5 |
| Qwen3-VL-4B-Instruct | 54.7 | 37.7 | 52.1 | 47.9 | 31.4 | 50.8 | 50.8 | 49.2 | 42.8 | 43.2 | 52.1 | 45.8 |
| Qwen3-VL-8B-Instruct | 52.1 | 38.1 | 53.8 | 41.5 | 47.0 | 49.6 | 50.0 | 48.3 | 41.5 | 45.3 | 47.9 | 46.3 |
| Open-Source Thinking Models | ||||||||||||
| GUI-Owl-1.5-32B-Think | 69.5 | 60.2 | 67.8 | 52.5 | 67.4 | 67.4 | 65.7 | 65.3 | 55.5 | 54.2 | 68.2 | 62.4 |
| GUI-Owl-1.5-8B-Think | 66.1 | 53.0 | 66.5 | 58.5 | 60.2 | 67.4 | 62.3 | 63.6 | 63.1 | 57.2 | 65.3 | 61.7 |
| GUI-Owl-7B | 63.1 | 43.2 | 57.6 | 40.7 | 58.9 | 59.3 | 55.5 | 57.2 | 42.4 | 26.3 | 35.6 | 47.7 |
| MAI-UI-2B | 33.5 | 27.5 | 31.8 | 26.7 | 34.3 | 30.9 | 26.3 | 27.5 | 29.2 | 25.8 | 30.1 | 29.0 |
| MAI-UI-8B | 53.4 | 40.3 | 51.7 | 47.0 | 54.2 | 52.5 | 50.0 | 51.3 | 50.0 | 44.5 | 45.8 | 48.7 |
| Qwen3-VL-4B-Thinking | 57.2 | 45.3 | 50.0 | 41.1 | 50.0 | 50.8 | 53.8 | 55.5 | 47.9 | 43.2 | 46.6 | 48.4 |
| Qwen3-VL-8B-Thinking | 62.7 | 59.3 | 61.0 | 48.7 | 61.9 | 64.4 | 61.0 | 60.2 | 54.2 | 58.9 | 36.9 | 56.6 |
| UI-TARS-1.5-7B | 29.7 | 28.0 | 27.1 | 21.6 | 22.9 | 17.8 | 21.2 | 21.2 | 23.7 | 13.6 | 20.8 | 21.8 |
Table 3: Success rates (%) of GUI agents on original tasks and under each trap subcategory of ANTRAP. Cell color intensity indicates performance drop from the original baseline. Abbreviations: Ext.I. = External Interruption, Vis.O. = Visual Obscuration, Tmp.C. = Temporal Conflict, Vis.H. = Visual Hallucination, Grd.E. = Grounding Error, Typ.M. = Type Mismatch, Int.D. = Intent Deviation, St.DL. = State Deadlock, Ctx.D. = Context Disruption.
4B and 8B versions. Notably, there are some special considerations regarding the inference method of GPT models and thinking-layer trap design for instruct models as detailed in Appendix A.
Baseline and Human-level Performance. We utilize original environment as baseline without traps to evaluate agent robustness based on performance degradation. We also assess human performance on ANTRAP. Human annotators receive prior training and complete tasks relying solely on visual screen observations and environmental interactions. To prevent data leakage from identical original set, we randomly assign tasks without perturbation hints and ensure each evaluator completes exactly one task per subcategory. Note that some categories are not applicable to humans.
4.2 Experiment Results
ANTRAP presents substantial challenges for current agentic models. The results reveal a universal vulnerability among current GUI agents when exposed to runtime anomalies. Across all evaluated models, ranging from proprietary models to open source ones, the average success rate under trapped conditions consistently falls below the original baseline performance. Even the most capable models, such as Claude-Sonnet-4.6 and GUI-Owl-1.5-32B-Think, experience notable performance degradations, dropping from 74.2% to 66.5% and 69.5% to 62.4% respectively. This uniform decline shows that existing agents are primarily optimized for ideal execution paths and lack the robustness required to deal with unexpected anomalies.
Models struggle more with contextual anomalies than single-layer ones. The four trap layers differ markedly in difficulty. Based on the subcategory results in Table 3, most models experience a significant performance degradation under R-layer traps. Conversely, their performance is relatively better preserved under single-step anomalies, including A-layer traps, Visual Obscuration in S-layer, and Visual Hallucination in T-layer. This observation suggests that models can tolerate simple, immediate disturbances better but struggle with complex scenarios requiring cross-step reasoning and long-term dependencies, including Round-layer tasks and Temporal Conflicts in T-layer. Additionally, the substantial performance drop caused by External Interruption indicates a weak capacity for addressing unexpected events. We hypothesize that this vulnerability stems from a lack of unexpected
GUI-Owl-7B

UI-TARS-7B

Figure 3: Layer-level performance comparison across training regimes. Grouped bars show the results of baseline, original-env GRPO, and ANTRAP-env GRPO for each trap layer.
anomaly data during model training, as well as the agents’ tendency to prioritize the current observation over long-horizon historical context, which we further explore more in Section 5.
Reasoning capabilities do not equate to robustness. While reasoning mechanisms raise the general performance in clean environments, they do not improve robustness against runtime anomalies. As illustrated in Table 3, thinking models establish higher original baselines than their standard instruct versions. For example, Qwen3-VL-8B-Thinking achieves an original success rate of 62.7% compared to the 52.1% of its instruct version. However, when evaluated in the ANTRAP, the absolute magnitude of performance degradation for thinking models remains comparable to, and even occasionally exceeds, that of instruct models. Quantitatively, Qwen3-VL-8B-Thinking drops 6.1 points under traps (62.7%→56.6%), essentially matching its Instruct counterpart's 5.8-point drop (52.1%→46.3%). GUI-Owl-1.5-32B-Think loses 7.1 points (69.5%→62.4%), more than the 5.8 points lost by GUI-Owl-1.5-32B-Instruct (68.2%→62.4%). This indicates that current thinking paradigms alone are insufficient to bridge the fundamental gap in robustness.
5 Exploring Strategies to Enhance GUI Agents Robustness
In this section, we conduct Group Relative Policy Optimization (GRPO) experiments in both the original and the adversarial environments to investigate how RL in different environments influences GUI agent performance. We first present preliminary knowledge of GRPO (Section 5.1). Then we introduce the experiment details of RL in both the original environment (Section 5.2) and the ANTRAP environment (Section 5.3).
5.1 Preliminary
GRPO is widely utilized to train agents on trajectory-level in dynamic environments. Formally, for a given task, the agents rollout a group of G trajectories, which are subsequently evaluated by a reward function to determine their quality. GRPO optimizes the policy by deriving advantage values through relative comparisons among the group without a separate critic model. The simplified GRPO policy gradient objective in training is formulated as shown in Equation 2:
where is the token-level probability ratio for the -th token in completion given its preceding context . This ratio is practically clipped by to bound policy updates. Because the environment feedback is evaluated at the trajectory level, all tokens within the same completion share a uniform sequence-level relative advantage , bypassing fine-grained token-wise return estimations. The advantage normalizes the trajectory rewards: , where is the individual sequence reward and denotes the reward set of the sampled group. Following this paradigm, we conduct GRPO training on UI-TARS-1.5-7B and GUI-Owl-7B in both the original and the adversarial environment. This comparative setup allows us to systematically observe how GRPO in different environments influences the general performance and the dynamic robustness against runtime anomalies of the agents.
5.2 GRPO in Original Environment
We train UI-TARS-1.5-7B and GUI-Owl-7B using sequence-level GRPO in the original environment without any injection. For each task, we sample G = 8 rollout trajectories and assign a binary re-ward based on rule-based task completion. More experiment details are provided in Appendix A.
Results on Original Tasks. As shown in Table 4 and Figure 3, GRPO in the original environment yields consistent improvements on standard task completion. GUI-Owl-7B improves from to , and UI-TARS-7B from to , confirming that online RL effectively enhances general task execution capabilities.
Results on Adversarial Tasks. The robustness gains against runtime anomalies are marginal. As shown in Figure 3, at the layer level, A-layer exhibits some improvement (+1.6% for GUI-Owl, +2.1% for UI-TARS). We attribute this to the better action execution patterns learned during standard training, which offer implicit robustness to action-level perturbations. S-layer receives less benefit (+1.2%~1.7%), while T-layer and R-layer gain negligible improvement (under +1.0% across most subcategories). These results suggest that while reinforcement learning in the original environment improves the agent's baseline performance, it fails to strengthen the robustness and recovery capabilities needed to handle runtime anomalies.
5.3 GRPO in ANTRAP Environment
We conduct ten independent GRPO runs, each dedicated to a single trap subcategory. For each run, training tasks are sampled with only the corresponding subcategory's traps injected during rollout, while other settings remain consistent with the original one. Consequently, each subcategory's +Trap entry in Table 4 reports the model trained and evaluated on the same subcategory.
Results on Original Tasks. Despite training each model on a single trap subcategory, all ten runs yield comparable improvements on standard tasks. Averaging across the ten subcategory-specific models, GUI-Owl-7B improves 6.4% and UI-TARS-7B improves 5.9%. This demonstrates that training in adversarial environments yields general GUI task execution capabilities comparable to those achieved through standard training.
Results on Adversarial Tasks. In contrast to the standard environment training, ANTRAP-GRPO yields differentiated robustness gains across trap categories. The models demonstrate substantial improvements against state-level perturbations (S-layer, +8.1%~11.0%) and most action-level execution errors (A-layer, up to +8.5%, though Intent Deviation gains more modestly at +3.4%~5.5%). In these cases, successful rollouts against anomalies provide clear learning signals for the agents to identify and adapt to specific perturbations, leading to notable robustness improvements. However, gains diminish to a moderate level for reasoning traps (T-layer, +4.2%~5.1%) and become completely negligible for multi-step contextual anomalies (R-layer, under +3.0%, with Loop traps strictly below +1.0%). This indicates that while single-step anomalies are learnable through adversarial exposure, complex contextual traps are difficult to overcome via RL. We attribute this to the agents' reliance and proficiency in leveraging current-step information rather than integrating broader context for next-step planning. More meta-cognitive, long-horizon self-monitoring capabilities are required for agents to escape circular or deadlocked states.
| Layer | Subcategory | GUI-Owl-7B | UI-TARS-7B | ||||
|---|---|---|---|---|---|---|---|
| Base | +Orig | +Trap | Base | +Orig | +Trap | ||
| - | Original Task | 63.1 | 29.7 | ||||
| S | Ext. Interruption | 43.2 | 45.3 | 28.0 | 29.2 | ||
| Vis. Obscuration | 57.6 | 58.9 | 27.1 | 28.4 | |||
| T | Tmp. Conflict | 40.7 | 41.9 | 21.6 | 22.5 | 25.8 | |
| Vis. Hallucination | 58.9 | 59.7 | 22.9 | 23.7 | 27.1 | ||
| A | Grounding Err. | 59.3 | 62.7 | 17.8 | 20.8 | ||
| Type Mismatch | 55.5 | 58.5 | 21.2 | 24.2 | |||
| Int. Deviation | 57.2 | 55.5 | 60.6 | 21.2 | 21.6 | ||
| R | State Deadlock | 42.4 | 42.8 | 44.9 | 23.7 | 24.6 | 26.3 |
| Ctx. Disruption | 26.3 | 27.5 | 29.2 | 13.6 | 14.4 | 15.7 | |
| Loop | 35.6 | 36.0 | 36.4 | 20.8 | 21.2 | 21.6 | |
Table 4: Success rates (%) under different subcategories of GRPO training regimes. +Orig: trained in original environment; +Trap: trained in ANTRAP environment. denotes absolute improvement over baseline.
6 Conclusion
We present ANTRAP, a benchmark designed for systematically evaluating GUI agents' robustness against runtime anomalies in Android environments, featuring a taxonomy STAR and a meticulously designed construction pipeline. We evaluate 16 models on ANTRAP, revealing their vulnerability to dynamic traps across all layers and subcategories. We further conduct GRPO training in both original and adversarial environments to delineate the boundary between environment-learnable and reasoning-bottlenecked challenges and find that adversarial RL can improve most single-step robustness in the state and action layers, while deeper contextual traps remain hard to address.
Limitations
While our work introduces a fine-grained benchmark for GUI agents robustness against runtime anomalies, we acknowledge several limitations that open avenues for future research. First, due to the time-consuming nature of annotating and validating the online original task initialization and evaluation, we have only tested and studied ANTRAP on 236 base tasks. These tasks, while diverse, are still limited and may not fully represent the wide range of common Android GUI operation scenarios globally. Future work could apply our method to a broader array of Android scenarios to enhance the generalizability of our findings. Second, due to budget constraints and the difficulty of obtaining annotated trajectory data, we do not explore adversarial supervised fine-tuning (SFT) in our study, which has the potential to address issues related to contextual understanding (Wu et al., 2025a; Chen et al., 2025b). Future research could investigate the effectiveness of adversarial SFT in improving model performance under runtime anomalies. Finally, our work intentionally focuses on evaluation. We designed ANTRAP primarily as a benchmark for diagnosing model weaknesses rather than a general training solution. Developing scalable training methods to address these weaknesses remains an open research direction.
References
Anthropic. 2026. Introducing claude sonnet 4.6. https://www.anthropic.com/news/claude-sonnet-4-6.
Hao Bai, Yifei Zhou, Mert Cemri, Jiayi Pan, Alane Suhr, Sergey Levine, and Aviral Kumar. 2024. Digirl: Training in-the-wild device-control agents with autonomous reinforcement learning. In Advances in Neural Information Processing Systems, volume 37, pages 12461–12495. Curran Associates, Inc.
Cong Chen, Kaixiang Ji, Hao Zhong, Muzhi Zhu, Anzhou Li, Guo Gan, Ziyuan Huang, Cheng Zou, Jiajia Liu, Jingdong Chen, Hao Chen, and Chunhua Shen. 2025a. Gui-shepherd: Reliable process reward and verification for long-sequence gui tasks.
Cong Chen, Mingyu Liu, Chenchen Jing, Yizhou Zhou, Fengyun Rao, Hao Chen, Bo Zhang, and Chunhua Shen. 2025b. Perturbollava: Reducing multimodal hallucinations with perturbative visual training. arXiv preprint arXiv:2503.06486.
Tianyu Chen, Chujia Hu, Ge Gao, Dongrui Liu, Xia Hu, and Wenjie Wang. 2026. Lps-bench: Benchmarking safety awareness of computer-use agents in
long-horizon planning under benign and adversarial scenarios. Preprint, arXiv:2602.03255.
Yurun Chen, Xueyu Hu, Keting Yin, Juncheng Li, and Shengyu Zhang. 2025c. Evaluating the robustness of multimodal agents against active environmental injection attacks. In Proceedings of the 33rd ACM International Conference on Multimedia, pages 11648–11656.
Guo Gan, Yuxuan Ding, Cong Chen, Yuwei Ren, Yin Huang, and Hong Zhou. 2026. Android coach: Improve online agentic training efficiency with single state multiple actions. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13407–13428, San Diego, California, United States. Association for Computational Linguistics.
Yichen Gong, Zhuohan Cai, Sunhao Dai, Yuqi Zhou, Zhangxuan Gu, Changhua Meng, and Shuheng Shen. 2026. Venusbench-mobile: A challenging and user-centric benchmark for mobile gui agents with capability diagnostics. Preprint, arXiv:2604.06182.
Google. 2025. A new era of intelligence with gemini 3. https://blog.google/products-and-platforms/products/gemini/gemini-3/.
Jaylen Jones, Zhehao Zhang, Yuting Ning, Eric Fosler-Lussier, Pierre-Luc St-Charles, Yoshua Bengio, Dawn Song, Yu Su, and Huan Sun. 2026. When benign inputs lead to severe harms: Eliciting unsafe unintended behaviors of computer-use agents. Preprint, arXiv:2602.08235.
Quyu Kong, Xu Zhang, Zhenyu Yang, Nolan Gao, Chen Liu, Panrong Tong, Chenglin Cai, Hanzhang Zhou, Jianan Zhang, Liangyu Chen, Zhidan Liu, Steven Hoi, and Yue Wang. 2025. Mobileworld: Benchmarking autonomous mobile agents in agent-user interactive and mcp-augmented environments. Preprint, arXiv:2512.19432.
Karolina Korgul, Yushi Yang, Arkadiusz Drohomirecki, Piotr Błaszczyk, Will Howard, Lukas Aichberger, Chris Russell, Philip H. S. Torr, Adam Mahdi, and Adel Bibi. 2025. It's a trap! task-redirecting agent persuasion benchmark for web agents. Preprint, arXiv:2512.23128.
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th Symposium on Operating Systems Principles, SOSP '23, page 611–626, New York, NY, USA. Association for Computing Machinery.
Kaixin Li, Meng Ziyang, Hongzhan Lin, Ziyang Luo, Yuchen Tian, Jing Ma, Zhiyong Huang, and Tat-Seng Chua. 2025. Screenspot-pro: GUI grounding for professional high-resolution computer use. In Workshop on Reasoning and Planning for Large Language Models.
Wei Li, William Bishop, Alice Li, Chris Rawles, Folawiyo Campbell-Ajala, Divya Tyamagundlu, and Oriana Riva. 2024. On the effects of data scale on ui control agents.
Quanfeng Lu, Wenqi Shao, Zitao Liu, Lingxiao Du, Fanqing Meng, Boxuan Li, Botong Chen, Siyuan Huang, Kaipeng Zhang, and Ping Luo. 2025. Guiodyssey: A comprehensive dataset for cross-app gui navigation on mobile devices. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 22404–22414.
OpenAI. 2026. Gpt-5.4 model. https://developers.openai.com/api/docs/models/gpt-5.4.
Yujia Qin, Yining Ye, Junjie Fang, Haoming Wang, Shihao Liang, Shizuo Tian, Junda Zhang, Jiahao Li, Yunxin Li, Shijue Huang, Wanjun Zhong, Kuanye Li, Jiale Yang, Yu Miao, Woyu Lin, Longxiang Liu, Xu Jiang, Qianli Ma, Jingyu Li, and 16 others. 2025. Ui-tars: Pioneering automated gui interaction with native agents. Preprint, arXiv:2501.12326.
Christopher Rawles, Sarah Clinckemaillie, Yifan Chang, Jonathan Waltz, Gabrielle Lau, Marybeth Fair, Alice Li, William Bishop, Wei Li, Folawiyo Campbell-Ajala, Daniel Toyama, Robert Berry, Divya Tyamagundlu, Timothy Lillicrap, and Oriana Riva. 2025. Androidworld: A dynamic benchmarking environment for autonomous agents. In International Conference on Learning Representations, volume 2025, pages 406–441.
Christopher Rawles, Alice Li, Daniel Rodriguez, Oriana Riva, and Timothy Lillicrap. 2023. Android in the wild: A large-scale dataset for android device control. Preprint, arXiv:2307.10088.
Guangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu, Wang Zhang, Ru Zhang, Yanghua Peng, Haibin Lin, and Chuan Wu. 2025. Hybridflow: A flexible and efficient rlhf framework. In Proceedings of the Twentieth European Conference on Computer Systems, EuroSys '25', page 1279–1297, New York, NY, USA. Association for Computing Machinery.
Jiazheng Sun, Mingxuan Li, Yingying Zhang, Jiayang Niu, Yachen Wu, Ruihan Jin, Shuyu Lei, Pengrongrui Tan, Zongyu Zhang, Ruoyi Wang, Jiachen Yang, Boyu Yang, Jiacheng Liu, and Xin Peng. 2026. Ambibench: Benchmarking mobile gui agents beyond one-shot instructions in the wild. Preprint, arXiv:2602.11750.
Qwen Team. 2025. Qwen3 technical report. Preprint, arXiv:2505.09388.
Haoming Wang, Haoyang Zou, Huatong Song, Jiazhan Feng, Junjie Fang, Junting Lu, Longxiang Liu, Qinyu Luo, Shihao Liang, Shijue Huang, Wanjun Zhong, Yining Ye, Yujia Qin, Yuwen Xiong, Yuxin Song, Zhiyong Wu, Aoyan Li, Bo Li, Chen Dun, and 93 others. 2025. Ui-tars-2 technical report: Advancing gui agent with multi-turn reinforcement learning. Preprint, arXiv:2509.02544.
Jinbiao Wei, Qianran Ma, Yilun Zhao, Xiao Zhou, Kangqi Ni, Guo Gan, and Arman Cohan. 2026a. Opencomputer: Verifiable software worlds for computer-use agents. arXiv preprint arXiv:2605.19769.
Jinbiao Wei, Kangqi Ni, Yilun Zhao, Guo Gan, and Arman Cohan. 2026b. Step-level optimization for efficient computer-use agents. arXiv preprint arXiv:2604.27151.
Penghao Wu, Shengnan Ma, Bo Wang, Jiaheng Yu, Lewei Lu, and Ziwei Liu. 2025a. Gui-reflection: Empowering multimodal gui models with self-reflection behavior. arXiv preprint arXiv:2506.08012.
Qinzhuo Wu, Pengzhi Gao, Wei Liu, and Jian Luan. 2025b. Backtrackagent: Enhancing gui agent with error detection and backtracking mechanism. Preprint, arXiv:2505.20660.
Qinzhuo Wu, Zhizhuo Yang, Hanhao Li, Pengzhi Gao, Wei Liu, and Jian Luan. 2026. Mobilebench-ol: A comprehensive chinese benchmark for evaluating mobile gui agents in real-world environment. Preprint, arXiv:2601.20335.
Zhiyong Wu, Zhenyu Wu, Fangzhi Xu, Yian Wang, Qiushi Sun, Chengyou Jia, Kanzhi Cheng, Zichen Ding, Liheng Chen, Paul Pu Liang, and Yu Qiao. 2024. Os-atlas: A foundation action model for generalist gui agents. Preprint, arXiv:2410.23218.
Tianbao Xie, Danyang Zhang, Jixuan Chen, Xiaochuan Li, Siheng Zhao, Ruisheng Cao, Toh Jing Hua, Zhoujun Cheng, Dongchan Shin, Fangyu Lei, Yitao Liu, Yiheng Xu, Shuyan Zhou, Silvio Savarese, Caiming Xiong, Victor Zhong, and Tao Yu. 2024. Osworld: Benchmarking multimodal agents for open-ended tasks in real computer environments. Preprint, arXiv:2404.07972.
Haiyang Xu, Xi Zhang, Haowei Liu, Junyang Wang, Zhaozai Zhu, Shengjie Zhou, Xuhao Hu, Feiyu Gao, Junjie Cao, Zihua Wang, Zhiyuan Chen, Jitong Liao, Qi Zheng, Jiahui Zeng, Ze Xu, Shuai Bai, Junyang Lin, Jingren Zhou, and Ming Yan. 2026a. Mobile-agent-v3.5: Multi-platform fundamental gui agents. Preprint, arXiv:2602.16855.
Weikai Xu, Zhizheng Jiang, Yuxuan Liu, Pengzhi Gao, Wei Liu, Jian Luan, Yuanchun Li, Yunxin Liu, Bin Wang, and Bo An. 2026b. Mobile-bench-v2: A more realistic and comprehensive benchmark for vlm-based mobile agents. Preprint, arXiv:2505.11891.
Weikai Xu, Zhizheng Jiang, Yuxuan Liu, Pengzhi Gao, Wei Liu, Jian Luan, Yunxin Liu, Yuanchun Li, Bin Wang, and Bo An. 2026c. SMAN-bench: A cross-system benchmark for mobile agents under single-and multi-path, ambiguous, and noisy tasks. In The Fourteenth International Conference on Learning Representations.
Yifan Xu, Xiao Liu, Xueqiao Sun, Siyi Cheng, Hao Yu, Hanyu Lai, Shudan Zhang, Dan Zhang, Jie Tang, and
Yuxiao Dong. 2025. AndroidLab: Training and systematic benchmarking of android autonomous agents. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2144–2166, Vienna, Austria. Association for Computational Linguistics.
Jiabo Ye, Xi Zhang, Haiyang Xu, Haowei Liu, Junyang Wang, Zhaoqing Zhu, Ziwei Zheng, Feiyu Gao, Junjie Cao, Zhengxi Lu, Jitong Liao, Qi Zheng, Fei Huang, Jingren Zhou, and Ming Yan. 2025. Mobile-agent-v3: Fundamental agents for gui automation. Preprint, arXiv:2508.15144.
Junjie Ye, Yilong Wu, Songyang Gao, Caishuang Huang, Sixian Li, Guanyu Li, Xiaoran Fan, Qi Zhang, Tao Gui, and Xuan-Jing Huang. 2024. Rotbench: A multi-level benchmark for evaluating the robustness of large language models in tool learning. In Proceedings of the 2024 conference on empirical methods in natural language processing, pages 313–333.
Siyu Yuan, Zehui Chen, Zhiheng Xi, Junjie Ye, Zhengyin Du, and Jiecao Chen. 2025. Agent-r: Training language model agents to reflect via iterative self-training. arXiv preprint arXiv:2501.11425.
Yuwen Zhai, Runze Li, Liang Wang, Nian Shi, Liwu Xu, Wei Zhang, Ran Lin, Bo Xu, and Benlei Cui. 2026. Guide: Interpretable gui agent evaluation via hierarchical diagnosis. Preprint, arXiv:2604.04399.
Jiwen Zhang, Jihao Wu, Yihua Teng, Minghui Liao, Nuo Xu, Xiao Xiao, Zhongyu Wei, and Duyu Tang. 2024. Android in the zoo: Chain-of-action-thought for gui agents. Preprint, arXiv:2403.02713.
Yanzhe Zhang, Tao Yu, and Diyi Yang. 2025. Attacking vision-language computer agents via pop-ups. Preprint, arXiv:2411.02391.
Yuzhe Zhang, Xianwei Xue, Xingyong Wu, Mengke Chen, Chen Liu, Xinran He, Run Shao, Feiran Liu, Huanmin Xu, Qiutong Pan, and Haiwei Wang. 2026. Don’t act blindly: Robust gui automation via action-effect verification and self-correction. In ACL 2026.
Haoren Zhao, Tianyi Chen, and Zhen Wang. 2025a. On the robustness of gui grounding models against image attacks. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 1618–1623.
Haoren Zhao, Tianyi Chen, and Zhen Wang. 2025b. On the robustness of gui grounding models against image attacks. Preprint, arXiv:2504.04716.
Hanzhang Zhou, Xu Zhang, Panrong Tong, Jianan Zhang, Liangyu Chen, Quyu Kong, Chenglin Cai, Chen Liu, Yue Wang, Jingren Zhou, and Steven Hoi. 2025. Mai-ui technical report: Real-world centric foundation gui agents. Preprint, arXiv:2512.22047.
Shuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Sridhar, Xianyi Cheng, Tianyue
Ou, Yonatan Bisk, Daniel Fried, Uri Alon, and Graham Neubig. 2024. Webarena: A realistic web environment for building autonomous agents. Preprint, arXiv:2307.13854.
A Implementation Details
A.1 ANTRAP Construction
Original Task Augmentation. We expand the original AndroidWorld suite of 116 tasks to 236 tasks by manually adding 120 new tasks spanning the existing application families. Every new task is manually verified to confirm that it initializes a valid starting state, can be completed through the standard Android UI, and is correctly judged by its evaluator, so the augmented suite preserves the solvability and technical soundness of the original benchmark. We release all task definitions and evaluators in our anonymous codebase.
Framework. ANTRAP augments a standard Android environment with an adversarial layer that injects the anomalies defined in our STAR taxonomy into the agent's interaction loop, while leaving the underlying tasks, evaluators, and the agent's reasoning logic unchanged. The framework consists of three conceptual components: a configuration that specifies which anomaly is instantiated and at which layer, a central controller that orchestrates injection during execution, and four layer-specific modules that realize the ten trap operators of the taxonomy. Because intervention occurs only at the interface between the agent and the environment, instrumenting an existing agent does not require modifying its inference logic.
Intervention Points. ANTRAP injects perturbations at four points along the agent's interaction loop, each aligned to one layer of the taxonomy. State layer perturbations modify the observation as it is captured, persistently distorting the input on which all downstream reasoning depends. Thinking layer perturbations instead act on the observation only at decision time, transiently presenting an old or label-tampered view to the model. Action layer perturbations are injected between the agent's output action and its dispatch to the device, offsetting coordinates, remapping the action type, or in the case of State Deadlock, suppressing dispatch entirely to simulate an unresponsive device. Round-layer perturbations operate at the trajectory level, supporting traps such as Context Disruption and Loop. When no trap matches at the current step, every intervention reduces to a transparent pass-through, so injection in ANTRAP imposes negligible overhead on clean runs except for the time cost for recovery steps.
Trigger Mechanism. In our experiment, at each step, a trap is injected independently with probability , subject to a per-episode cap of , so that every reported episode contains exactly one trap event. To preserve enough subsequent steps for the agent to recover, traps are restricted to the first 80% of the original step budget, and the total budget is extended by a factor of . Episodes in which no trap is injected within ten retries are excluded from reporting. In practice, an average of 1.3 attempts suffices to inject a trap. All stochastic decisions including trap-type sampling, inject choice, blur regions, and coordinate offsets are governed by a fixed random seed of 42.
History Policy. The ten trap operators fall into two modes, distinguished by whether the perturbation enters the agent's persistent interaction history. Direct modifications perturb the environment as the agent sees it. The altered state is recorded in the log as the state of the current step and remains visible in subsequent reasoning, so we measure whether the agent can recognize and recover from a real change in the world. Induced modifications, in contrast, only record the agent's misled outputs including offset and remapped actions, without the deceptive observations or the action-hijacking events. This means the agent receives a transiently corrupted observation at decision time, or its output action is silently dropped before execution. Because the agent's perceptions and stated intent are logged exactly as in a clean run, any resulting failure is self-induced, caused by the agent's own decisions under momentarily misleading inputs. Thus, the trap measures self-correction rather than tolerance to external perturbation.
A.2 Benchmark Reproduction
Hardware and Models. Inference runs on a server with Intel Xeon CPUs and four NVIDIA A40 GPUs (48 GB VRAM each). Openweight VLMs are served by vLLM with tensor-parallel size 4, exposed via an OpenAI-compatible API. We use a context length of 32,768 tokens and at most 8 images per prompt. Other settings follow their official model-card defaults in huggingface or technical reports. For API-based models (Claude, GPT and Gemini), we use temperature 1.0, a 4,096-token output cap, and a 8-image history buffer.
Evaluation Settings. We run 8 Android emulators in parallel in a Docker container emulating a Pixel 6 on Android API Level 33, with paired con-
| Subcategory | Implementation |
|---|---|
| Category 1: State Layer | |
| (1) External Interruption | Pop-ups are triggered through a dedicated TrapOverlay APK installed on the emulator, which registers a SYSTEM_ALERT_WINDOW overlay and reacts to Android Debug Bridge (ADB) broadcasts. Four pop-up types are supported: runtime permission dialogs, modal center dialogs, top notification banners, and fullscreen advertisements. Content is drawn from a curated bank of 92 realistic Android prompts (21 permission, 32 center-dialog, 31 banner, and 8 fullscreen-ad templates). Alternatively, the agent’s own Vision-Language Model (VLM) generates content online, conditioned on the foreground-app package name; this mode falls back to the template bank on JSON-parse failure or when the foreground process is a system launcher. |
| (2) Visual Obscuration | Pixel-level masks are applied to the captured frame through Pillow. The target region is one of three: a random clickable or editable UI element drawn from the accessibility tree, a uniformly sampled element regardless of affordance, or a random rectangle covering 10–30% of the screen. The selected region is replaced by either a Gaussian blur with configurable kernel radius (default ) or a solid color patch when a color is specified. |
| Category 2: Thinking Layer | |
| (3) Temporal Conflict | A rolling buffer of past frames is maintained throughout the episode. At trigger time the current observation passed to the model is replaced with the frame captured steps earlier (default ), while the unperturbed frame is still saved into the agent’s persistent history. As an alternative, a random screenshot can be sampled from a pre-collected pool of unrelated app states and resized to the current resolution. |
| (4) Visual Hallucination | For each text-bearing UI element identified via its accessibility-tree bounding box, the background color is estimated by median sampling along the bbox edges, the original region is overwritten with that color, and a misleading replacement is rendered in DejaVu Sans with the contrast-inverted color. Replacements are drawn from a curated 24-pair antonym dictionary covering common UI verbs such as Save/Delete, Allow/Deny, and Confirm/Cancel; unrecognized labels fall back to a character-level permutation. |
| Category 3: Action Layer | |
| (5) Grounding Error | The parsed action is intercepted between model output and ADB execution. An independent random offset , is added to its coordinates, with magnitude uniformly sampled from [20, 50] pixels and uniformly random sign. The same perturbation is applied to all touch-style actions (click, long_press, double.tap) as well as the start of swipe. The model’s recorded intent is left unchanged so that the offset is only observable through the resulting screenshot. |
| (6) Type Mismatch | At the same interception point, the action’s type is rewritten. Touch actions are randomly remapped among the three alternatives click, long_press, and double.tap; swipe is reversed by swapping its start and end coordinates. The model’s response text in the conversation history retains the originally intended action type, so any resulting mismatch must be detected from the post-execution screenshot. |
| (7) Intent Deviation | Before execution, the predicted action is intercepted and changed to a different operation. For touch actions, we change the click coordinates to target a different UI element on the screen, preferring nearby buttons with opposite meanings (e.g., clicking "Cancel" instead of "Confirm"). For type_text actions, the input text is replaced with wrong text from a dictionary or random characters. Importantly, the agent’s history still records its original reasoning and intended action. This creates a mismatch between what the agent planned and what actually happened, forcing the agent to notice the mistake from the next screenshot. |
| Category 4: Round Layer | |
| (8) State Deadlock | At the execution hook, a block signal is returned for consecutive steps, where is uniformly sampled from [1, ] and is the original step budget. During this window every ADB command is silently dropped, so the screenshot returned to the agent is identical to the previous one regardless of the action chosen. |
| (9) Context Disruption | Immediately before the agent’s step begins, a single ADB keyevent is injected. Two sub-types are supported: KEYCODE_HOME, which returns the device to the launcher, and KEYCODE_APP_SWITCH, which opens the recent-apps view. The hook then waits one second for the UI to settle so the next screenshot reflects the disrupted context. |
| (10) Loop | At a fixed cadence (every steps, by default), KEYCODE_BACK is injected before the agent’s step, forcing repeated backward navigation regardless of the current task progress. The loop terminates once the per-episode trap budget has been spent. |
Table 5: Detailed implementation of the ten dynamic trap operators in the ANTRAP benchmark. Each row specifies the concrete mechanism, content sources, and parameters used to realize the corresponding trap during evaluation.
| Component | Hyperparameter | Value |
|---|---|---|
| Data | Max Prompt Len. | 32768 |
| Data | Max Response Len. | 512 |
| Data | Train Batch Size | 8 |
| Actor/Policy | Parallelism | FSDP2 |
| Actor/Policy | Micro Batch/GPU | 1 |
| Actor/Policy | LR | 1e-6 |
| Actor/Policy | Grad. Clip | 1.0 |
| Actor/Policy | Clip Ratio | 0.2 |
| Sampling | Temp. | 1.0 |
| Sampling | Max Tokens | 512 |
| Sampling | Max Turns | 50 |
| Sampling | Max Pixels | 1270180 |
| Sampling | Min Pixels | 256 |
Table 6: Main hyperparameters in GRPO.
sole and gRPC ports for network communication. For reproducibility, we fix the task-initialization seed at 30 and the trap seed at 42. Each evaluated episode contains exactly one trap event, with the trigger schedule determined by and the retry policy in the previous paragraph. The per-step prompts used for each model are listed in Figures 4 to Figures 9. For the human-level evaluation, we recruit five annotators and two authors to independently complete the tasks, and pay $10 per annotator.
Special Considerations. Notably, for the GPT models, following the approach of AndroidLab (Xu et al., 2025), we adopt a Set of Marks (SoM) inference style without a grounding requirement. We therefore exclude grounding error traps for GPT models. For instruct models, although they do not follow the ReAct reasoning framework, their official prompts are designed to guide them to first output a short description of the action before generating the tool call. Therefore, the perturbations injected into the T-layer effectively disrupt the action description phase for these models.
A.3 GRPO Reproduction
We conduct full-parameter GRPO on 2 nodes of 8 NVIDIA A100 GPUs (80GB), leveraging a customized VERL framework (Sheng et al., 2025). We construct our training task pool by leveraging original tasks with randomized parameters. Following a manual verification process to ensure feasibility and strictly exclude overlaps with the test set, we compile a final dataset of 600 training tasks. To optimize throughput, we scale parallel emulators to match the training batch size, accelerate rollouts via vLLM (Kwon et al., 2023), and employ FSDP2 with BF16 mixed precision. The policy has access to the interaction history throughout training. Unless otherwise specified, these settings apply to all GRPO experiments, with comprehensive hyperparameters detailed in Table 6.
B Pilot Study for Taxonomy Development
Task Collection and Execution. To establish a grounded taxonomy of real-world agent failures, we conduct a large-scale pilot study prior to benchmark construction. We predefined 600 daily mobile tasks spanning common usage scenarios (e.g., messaging, navigation, media playback, settings configuration, and shopping) across 30+ popular Android applications. We deployed GUI agents including UITARS-1.5-7B, GUI-Owl-7B, and MAIUI-8B on a cloud server and connected to physical Android devices via ADB, executing each task under authentic network conditions and system states. All trajectories, including screenshots, model reasoning, and executed actions at each step, are recorded for subsequent analysis.
Annotation Protocol and Taxonomy Derivation. Two of our authors serve as annotators in this stage, independently reviewing the full set of recorded trajectories using a custom web-based annotation interface (Figure 10). Annotators examined every trajectory step-by-step, not only those from failed tasks. This allows us to capture cases where the agent eventually completed the task but encountered intermediate errors requiring recovery. We randomly sampled trajectories from 150 tasks for open coding, where annotators marked the presence of issues at each step and assigned an initial error category with notes. Through iterative discussion and annotation analysis on the remaining 450 tasks, we progressively merged and refined the categories, ultimately forming a four-layer tensubcategory taxonomy. This ensures that each category reflects recurring, empirically grounded failure modes rather than hypothetical edge cases.
C Qualitative Results of ANTRAP
We present qualitative examples of GUI agents' trajectories under different dynamic traps and different settings in the ANTRAP benchmark as shown in Figure 11 to 15.
D Mixed-Trap GRPO
In the main experiments (Section 5.3), we adopt a per-subcategory training protocol that yields ten
| Layer | Subcategory | GUI-Owl-7B | UI-TARS-7B | ||
|---|---|---|---|---|---|
| Base | +Mixed | Base | +Mixed | ||
| - | Original Task | 63.1 | 69.1 | 29.7 | 35.6 |
| S | Ext. Interruption | 43.2 | 46.2 | 28.0 | 30.1 |
| Vis. Obscuration | 57.6 | 59.7 | 27.1 | 29.2 | |
| T | Tmp. Conflict | 40.7 | 42.4 | 21.6 | 22.9 |
| Vis. Hallucination | 58.9 | 60.2 | 22.9 | 24.2 | |
| A | Grounding Err. | 59.3 | 62.3 | 17.8 | 20.3 |
| Type Mismatch | 55.5 | 58.1 | 21.2 | 23.7 | |
| Int. Deviation | 57.2 | 55.5 | 21.2 | 21.2 | |
| R | State Deadlock | 42.4 | 43.2 | 23.7 | 25.0 |
| Ctx. Disruption | 26.3 | 27.1 | 13.6 | 14.4 | |
| Loop | 35.6 | 36.0 | 20.8 | 21.2 | |
Table 7: Results of mixed-trap GRPO training, where all ten trap subcategories are randomly injected.
specialist models per base agent, each trained on a single trap subcategory. Here we report a supplementary experiment using mixed-trap training, where one model is trained per base agent and all ten trap subcategories are randomly sampled during each rollout at an equal probability. The training configuration is otherwise identical with 600 tasks, rollouts, binary reward. As shown in Table 7, mixed-trap training yields improvements on original tasks comparable to per-subcategory training. However, the robustness gains across trap subcategories are substantially diluted, with improvements roughly on par with original-environment GRPO (Section 5.2). This indicates that concentrated, subcategory-specific adversarial exposure is critical for meaningful robustness gains, as random mixing distributes the learning signal too sparsely across diverse recovery strategies, and may need more training samples to converge to a robust policy.
Prompt for External Interruption Pop-up Content Generation
=== pop-up type 1: Permission dialog ===
Generate a realistic Android permission request dialog for the app ' {current_app} '.
Requirements:
- title: 3-6 words, specific to the app (e.g., "Camera Access Required")
- message: 10-20 words, explain why the permission is needed
- button1: positive action (e.g., "Allow", "Enable")
- button2: negative action (e.g., "Deny", "Don't Allow")
Output JSON only: {"title": "...", "message": "...", "button1": "...", "button2": "..."}
=== pop-up type 2: Center modal dialog ===
Generate a realistic Android dialog pop-up that might appear while using ' {current_app} '.
Requirements:
- title: 3-5 words, dialog purpose (e.g., "Update Available", "Sign In Required")
- message: 15-25 words, detailed information about the dialog
Output JSON only: {"title": "...", "message": "..."}
=== pop-up type 3: Top notification banner ===
Generate a realistic Android notification banner that might appear while using ' {current_app} '.
Requirements:
- title: 2-4 words, notification type (e.g., "New Message", "Update Available")
- message: 8-15 words, specific notification content
Output JSON only: {"title": "...", "message": "..."}
=== pop-up type 4: Fullscreen advertisement ===
Generate a realistic full-screen advertisement text for an app that might appear while using ' {current_app} '.
Requirements:
- title: 5-10 words, catchy promotional text (e.g., "LIMITED TIME OFFER - 50% OFF TODAY ONLY!")
Output JSON only: {"title": "..."}
Figure 4: Prompts used by the agent's own VLM to generate External Interruption pop-up content, contextualized on the foreground-app package name {current_app}. The four templates correspond to the four pop-up types rendered by the TrapOverlay APK; on JSON-parse failure or when {current_app} resolves to a system launcher, the framework falls back to the curated 92-entry template bank described in Section 3.2.
System Prompt for Claude-Sonnet
You are an AI agent that operates an Android phone by looking at screenshots and choosing one action per turn. Your job is to make steady progress toward the user's goal: never repeat a stuck action, never invent UI elements that aren't visible, and finish with action=terminate (status="success" or "failure") once the goal is achieved or impossible.
Coordinate system
All coordinates are normalized to a 0-999 by 0-999 grid that maps to the entire visible screenshot. (0, 0) is the top-left corner; (999, 999) is the bottom-right. Aim the cursor at the center of the target element, not its edge.
Action vocabulary
You may emit exactly one of the following actions per turn:
- click - tap a single point. arguments: {"action": "click", "coordinate": [x, y]}
- long_press - press and hold a point for
timeseconds. arguments: {"action": "long_press", "coordinate": [x, y], "time": <seconds>} - swipe - drag from one point to another (use for scrolling lists, dismissing sheets, opening the app drawer, etc.). arguments: {"action": "swipe", "coordinate": [x1, y1], "coordinate2": [x2, y2]}
- type - type text into the currently focused input box. The text appears as-is; the IME does not interpret tabs or newlines. arguments: {"action": "type", "text": "<string>"}
- key - issue a hardware/keyevent (adb keyevent name, e.g. "volume_up", "power", "clear"). arguments: {"action": "key", "text": "<keyevent>"}
- system_button - press one of the soft system buttons. arguments: {"action": "system_button", "button": "Back" | "Home" | "Menu" | "Enter"}
- open - launch an app by name. The name MUST be from the canonical app list at the bottom of this prompt. arguments: {"action": "open", "text": "<app name>"}
- wait - pause and let the UI settle (use after a navigation that takes a moment to load). arguments: {"action": "wait", "time": <seconds>}
- answer - submit a textual answer to the user's question. Use this for tasks whose goal is information retrieval. arguments: {"action": "answer", "text": "<answer>"}
- terminate - end the task. Always emit this once the goal is fulfilled or judged infeasible. arguments: {"action": "terminate", "status": "success" | "failure"}
How to think
Before acting, briefly reason about: (1) what is on the screen now, (2) whether your previous action achieved its intended effect, and (3) what single concrete step moves the goal forward. Keep reasoning under ~80 words; do not narrate every UI element. If the prior action did not have the expected effect (e.g. a pop-up is still there, the keyboard didn't appear, the app didn't launch), do NOT immediately retry the same action. Diagnose first: dismiss the pop-up, scroll, switch apps, or pick a different target.
Response format
Respond every step with EXACTLY two XML blocks, in this order, and nothing else: <reasoning> [Brief reasoning, see "How to think" above.] </reasoning> <tool_call> {"name": "mobile_use", "arguments": {"action": "<action>", ...}} </tool_call> The <tool_call> block must contain ONLY a single valid JSON object – no markdown fences, no commentary.
Available apps for action=open
Use these exact names (lowercase):
Figure 5: System prompt used for Claude-Sonnet in ANTRAP.
System Prompt for GPT-5
You are an agent who can operate an Android phone on behalf of a user. Based on user's goal/request, you may
-
Answer back if the request/goal is a question (or a chat message), like user asks "What is my schedule for today?".
-
Complete some tasks described in the requests/goals by performing actions (step by step) on the phone.
When given a user request, you will try to complete it step by step. At each step, you will be given the current screenshot (including the original screenshot and the same screenshot with bounding boxes and numeric indexes added to some UI elements) and a history of what you have done (in text). Based on these pieces of information and the goal, you must choose to perform one of the action in the following list (action description followed by the JSON format) by outputting the action in the correct JSON format.
-
If you think the task has been completed, finish the task by using the status action with complete as goal_status:
{{action_type}: "status", "goal_status": "complete"}} -
If you think the task is not feasible (including cases like you don't have enough information or can not perform some necessary actions), finish by using the
statusaction with infeasible as goal_status:{{action_type}: "status", "goal_status": "infeasible"}} -
Answer user's question:
{{action_type}: "answer", "text": "<answer_text>}} -
Click/tap on an element on the screen. We have added marks (bounding boxes with numeric indexes on their TOP LEFT corner) to most of the UI elements in the screenshot, use the numeric index to indicate which element you want to click:
{{action_type}: "click", "index": <target_index>}} -
Long press on an element on the screen, similar with the click action above, use the numeric label on the bounding box to indicate which element you want to long press:
{{action_type}: "long_press", "index": <target_index>}} -
Type text into a text field (this action contains clicking the text field, typing in the text and pressing the enter, so no need to click on the target field to start), use the numeric label on the bounding box to indicate the target text field:
{{action_type}: "input_text", "text": <text_input>, "index": <target_index>}} -
Press the Enter key:
{{action_type}: "keyboard_enter"}} -
Navigate to the home screen:
{{action_type}: "navigate_home"}} -
Navigate back:
{{action_type}: "navigate_back"}} -
Scroll the screen or a scrollable UI element in one of the four directions, use the same numeric index as above if you want to scroll a specific UI element, leave it empty when scroll the whole screen:
{{action_type}: "scroll", "direction": <up, down, left, right>, "index": <optional_target_index>}} -
Open an app (nothing will happen if the app is not installed):
{{action_type}: "open_app", "app_name": <name>}} -
Wait for the screen to update:
{{action_type}: "wait"}}
Here are some useful guidelines you need to follow:
General:
-
Usually there will be multiple ways to complete a task, pick the easiest one. Also when something does not work as expected (due to various reasons), sometimes a simple retry can solve the problem, but if it doesn't (you can see that from the history), SWITCH to other solutions.
-
Sometimes you may need to navigate the phone to gather information needed to complete the task, for example if user asks "what is my schedule tomorrow", then you may want to open the calendar app (using the
open_appaction), look up information there, answer user's question (using theansweraction) and finish (using thestatusaction with complete as goal_status). -
For requests that are questions (or chat messages), remember to use the
answeraction to reply to user explicitly before finish! Merely displaying the answer on the screen is NOT sufficient (unless the goal is something like "show me ..."). -
If the desired state is already achieved (e.g., enabling Wi-Fi when it's already on), you can just complete the task. Action Related:
-
Use the
open_appaction whenever you want to open an app (nothing will happen if the app is not installed), do not use the app drawer to open an app unless all other ways have failed. -
Use the
input_textaction whenever you want to type something (including password) instead of clicking characters on the keyboard one by one. Sometimes there is some default text in the text field you want to type in, remember to delete them before typing. -
For
click,long_pressandinput_text, the index parameter you pick must be VISIBLE in the screenshot and also in the UI element list given to you (some elements in the list may NOT be visible on the screen so you can not interact with them). -
Consider exploring the screen by using the
scrollaction with different directions to reveal additional content. -
The direction parameter for the
scrollaction can be confusing sometimes as it's opposite to swipe, for example, to view content at the bottom, thescrolldirection should be set to "down". It has been observed that you have difficulties in choosing the correct direction, so if one does not work, try the opposite as well.
Text Related Operations:
-
Normally to select certain text on the screen: <i> Enter text selection mode by long pressing the area where the text is, then some of the words near the long press point will be selected (highlighted with two pointers indicating the range) and usually a text selection bar will also appear with options like
copy,paste,select all, etc. <ii> Select the exact text you need. Usually the text selected from the previous step is NOT the one you want, you need to adjust the range by dragging the two pointers. If you want to select all text in the text field, simply click theselect allbutton in the bar. -
At this point, you don't have the ability to drag something around the screen, so in general you can not select arbitrary text.
-
To delete some text: the most traditional way is to place the cursor at the right place and use the backspace button in the keyboard to delete the characters one by one (can long press the backspace to accelerate if there are many to delete). Another approach is to first select the text you want to delete, then click the backspace button in the keyboard.
-
To copy some text: first select the exact text you want to copy, which usually also brings up the text selection bar, then click the
copybutton in bar. -
To paste text into a text box, first long press the text box, then usually the text selection bar will appear with a
pastebutton in it. -
When typing into a text field, sometimes an auto-complete dropdown list will appear. This usually indicating this is a enum field and you should try to select the best match by clicking the corresponding one in the list.
Figure 6: System prompt used for GPT-5 in ANTRAP. Since we use the SOM approach for GPT, we refer to the target element by its index in the screenshot, and the screenshot provided to GPT will have bounding boxes and index annotations for the elements. GPT needs to choose the element to operate on based on this index.
System Prompt for MAI-UI
You are a GUI agent. You are given a task and your action history, with screenshots. You need to perform the next action to complete the task.
Output Format
For each function call, return the thinking process in <thinking> </thinking> tags, and a json object with function name and arguments within <tool_call></tool_call> XML tags:
<thinking>...
</thinking><tool_call>
{"name": "mobile_use", "arguments": <args-json-object>}
</tool_call>
Action Space
{"action": "click", "coordinate": [x, y]}
{"action": "long_press", "coordinate": [x, y]}
{"action": "type", "text": ""}
{"action": "swipe", "direction": "up or down or left or right", "coordinate": [x, y]}
{"action": "open", "text": "app_name"}
{"action": "drag", "start_coordinate": [x1, y1], "end_coordinate": [x2, y2]}
{"action": "system_button", "button": "button_name"} # Options: back, home, menu, enter
{"action": "wait"}
{"action": "terminate", "status": "success or fail"}
{"action": "answer", "text": "xxx"}
Note
-
Write a small plan and finally summarize your next action (with its target element) in one sentence in <thinking> </thinking> part.
-
Available Apps:
["Camera", "Chrome", "Clock", "Contacts", "Dialer", "Files", "Settings", "Markor", "Tasks", "Simple Draw Pro", "Simple Gallery Pro", "Simple SMS Messenger", "Audio Recorder", "Pro Expense", "Broccoli APP", "OSMand", "VLC", "Joplin", "Retro Music", "OpenTracks", "Simple Calendar Pro"]
You should use the open action to open the app as possible as you can, because it is the fast way to open the app.
- You must follow the Action Space strictly, and return the correct json object within <thinking> </thinking> and <tool_call></tool_call> XML tags.
Figure 7: System prompt used for MAI-UI in ANTRAP.
System Prompt for UI-TARS
You are a GUI agent. You are given a task and your action history, with screenshots. You need to perform the next action to complete the task.
Output Format
Thought: ... Action: ...
Action Space
click(start_box='[x1, y1, x2, y2]') long_press(start_box='<|box_start|>(x1,y1)<|box_end|>) type(content='xxx') scroll(start_box='<|box_start|>(x1,y1)<|box_end|>', end_box='<|box_start|>(x2,y2)<|box_end|>) open_app(app_name='') drag(start_box='<|box_start|>(x1,y1)<|box_end|>', end_box='<|box_start|>(x2,y2)<|box_end|>) press_home() press_back() finished(content='') # Submit the task regardless of whether it succeeds or fails.
Note
- Use English in Thought part.
- Write a small plan and finally summarize your next action (with its save target element) in one sentence in Thought part.
User Instruction
{instruction}
Figure 8: System prompt used for UI-TARS in ANTRAP.
System Prompt for GUI-Owl-1.5 / Qwen3-VL / Gemini3
Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{
"type": "function",
"function": {"name_for_human": "mobile_use", "name": "mobile_use", "description": "Use a touchscreen to interact with a mobile device, and take screenshots.\n* This is an interface to a mobile device with touchscreen. You can perform actions like clicking, typing, swiping, etc.\n* Some applications may take time to start or process actions, so you may need to wait and take successive screenshots to see the results of your actions.\n* The screen's resolution is 1000x1000.\n* Make sure to click any buttons, links, icons, etc with the cursor tip in the center of the element. Don't click boxes on their edges unless asked.", "parameters": {"properties": {"action": {"description": "The action to perform. The available actions are:\n* key": Perform a key event on the mobile device.\n* - This supports adb's keyevent syntax.\n* - Examples: "volume_up", "volume_down", "power", "camera", "clear".\n* click: Click the point on the screen with coordinate (x, y).\n* long_press: Press the point on the screen with coordinate (x, y) for specified seconds.\n* swipe: Swipe from the starting point with coordinate (x, y) to the end point with coordinates2 (x2, y2).\n* type: Input the specified text into the activated input box.\n* answer: Terminate the current task and output the answer.\n* system_button: Press the system button.\n* open: Open an app on the device.\n* wait: Wait specified seconds for the change to happen.\n* terminate: Terminate the current task and report its completion status.", "enum": ["key", "click", "long_press", "swipe", "type", "answer", "system_button", "open", "wait", "terminate"], "type": "string", "coordinate": {"description": "(x, y): The x (pixels from the left edge) and y (pixels from the top edge) coordinates to move the mouse to. Required only by action=click, action=long_press, and action=swipe.", "type": "array"], "coordinate2": {"description": "(x, y): The x (pixels from the left edge) and y (pixels from the top edge) coordinates to move the mouse to. Required only by action=swipe.", "type": "array"], "text": {"description": "Required only by action=key, action=type, action=answer, and action=open.", "type": "string}], "time": {"description": "The seconds to wait. Required only by action=long_press and action=wait.", "type": "number}], "button": {"description": "Back means returning to the previous interface, Home means returning to the desktop, Menu means opening the application background menu, and Enter means pressing the enter. Required only by action=system_button}, "enum": ["Back", "Home", "Menu", "Enter"], "type": "string}], "status": {"description": "The status of the task. Required only by action=terminate.", "type": "string", "enum": ["success", "failure"]}, "required": ["action"], "type": "object}], "args_format": "Format the arguments as a JSON object."}
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags: <tool_call> { "name": <function-name>, "arguments": <args-json-object>} </tool_call>
Response format
Respond every step with exactly two parts, in this order:
Action:followed by one short imperative sentence describing what to do.- A single
<tool_call>...<tool_call>block containing only the JSON: {"name": <function-name>, "arguments": <args-json-object>}.
Rules:
- Output Action first, then the <tool_call>. Nothing else outside these two parts.
- Coordinates are normalized to the 0-999 grid described in the tool schema.
- When using
action=open, thetextargument must be one of the canonical AndroidWorld app names listed below. - Finish the task with action=terminate (status="success" or "failure").
Available apps for action=open (use these exact names, lowercase):
Figure 9: System prompt used for GUI-Owl-1.5 / Qwen3-VL / Gemini3 in ANTRAP.

Figure 10: The web interface for preliminary work, through which we use this annotation website to collect performance data of GUI agents conducting trial and error in real-world scenarios, as well as the error cases they encounter.

Figure 11: For the ExpenseDeleteMultiple task in the original set with no trap injection, GUI-Owl-7B successfully completes the task.

Figure 12: For the ExpenseDeleteMultiple task in the adversarial set with an A-Layer Trap (Grounding Error) injected at step 5, GUI-Owl-7B fails to recover. It proceeds as if the Grounding Error has not occurred, leading to task failure.

Figure 13: For the ExpenseDeleteMultiple task in the adversarial set with an R-Layer Trap (Context Disruption) injected at step 5, GUI-Owl-7B fails to recover. It hallucinates task completion, resulting in failure.

Figure 14: For the ExpenseDeleteMultiple task in the adversarial set with an S-Layer Trap (Visual Obscuration) injected at step 5 after GRPO training, GUI-Owl-7B successfully overcomes the perturbation and completes the task.

Figure 15: For the ExpenseDeleteMultiple task in the adversarial set with an R-Layer Trap (State Deadlock) injected at steps 2-5 after GRPO training, GUI-Owl-7B successfully recovers from the disruption and completes the task.