Are Android GUI Agents Robust Against Runtime Anomalies? AnTrap: Evaluating Agents in Dynamic Adversarial Environments

Guo Gan, Yilun Zhao, Cong Chen, Jinbiao Wei, Tingyu Song, Zheyuan Yang, Lin Fu, Hong ZhouarXiv 2026

TL;DR

This paper introduces ANTRAP, a novel benchmark designed to evaluate the robustness of Android GUI agents against real-world runtime anomalies like unexpected pop-ups, grounding errors, and system deadlocks. Evaluating 16 leading models reveals a universal vulnerability to these dynamic disruptions, showing that while adversarial reinforcement learning can mitigate simple single-step errors, deep contextual traps remain a fundamental bottleneck for current agent architectures.

What Problem Does This Paper Address?

While autonomous graphical user interface (GUI) agents have shown impressive planning capabilities on standard benchmarks, they are typically evaluated under pristine, "clean-room" conditions. In reality, deploying an agent on a physical mobile device exposes it to a chaotic environment filled with runtime anomalies.

These anomalies stem from two primary sources:

  1. External environmental perturbations: App pop-ups, system glitches, network lag, and rendering delays.
  2. Internal agent errors: Visual hallucinations, inaccurate coordinate grounding, or action misuse.

Existing benchmarks either rely on static trajectories for single-step testing or lack systematic, controllable anomaly injection in live, dynamic environments. To bridge this gap, the authors explore whether current agents can autonomously detect, adapt to, and recover from these real-world disruptions without breaking the underlying task's solvability.

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.

Methods

The authors developed a systematic framework consisting of two core components:

1. The STAR Taxonomy

Based on a pilot study of real-device deployment failures, the authors categorized anomalies into four layers aligned with the standard agent execution loop:

  • State Layer ($S_{trap}$): One-step environmental changes (e.g., system alerts, blurred/obscured UI elements).
  • Thinking Layer ($T_{trap}$): Cognitive disruptions where the agent is fed outdated or tampered views to induce internal hallucinations.
  • Action Layer ($A_{trap}$): Intercepted outputs where coordinates are offset or action types are altered (e.g., remapping a click to a long press).
  • Round Layer ($R_{trap}$): Multi-step contextual disruptions, such as freezing the interface (State Deadlock) or forcing backward navigation loops.

2. Dynamic Trap Injection Pipeline

ANTRAP acts as an adversarial layer between the agent and the Android emulator. During live execution, it stochastically intercepts the agent's $\langle S, T, A \rangle$ loop to inject traps based on the STAR taxonomy. Crucially, the pipeline adheres to solvability preservation—ensuring that no injected trap makes the user's original instruction impossible to complete.

To explore recovery strategies, the authors also implemented online Group Relative Policy Optimization (GRPO), a reinforcement learning technique, training agents in both clean and adversarial environments.

Overview of the ANTRAP framework and trap construction pipeline.

Datasets

  • ANTRAP Benchmark: Built as an extension of AndroidWorld (Rawles et al., 2025). The authors manually augmented the original suite of 116 tasks to 236 tasks with stochastic variations across multiple application families.
  • Training Set: A separate pool of 600 training tasks with randomized parameters was curated specifically for the GRPO reinforcement learning experiments.

Key Insights and Ideas

  • Reasoning $\neq$ Robustness: One might expect modern "Thinking" models (which output explicit chain-of-thought steps) to handle anomalies better than standard instruct models. However, the paper shows they suffer nearly identical absolute performance drops. Advanced reasoning mechanisms are currently optimized for ideal execution paths, not error recovery.
  • Environment-Learnable vs. Reasoning-Bottlenecked Traps: The authors draw a sharp line between types of anomalies. Single-step perturbations in the State and Action layers are environment-learnable—agents can easily learn to bypass them via adversarial RL. Conversely, multi-step contextual traps (like loops and deadlocks) represent a reasoning bottleneck that current architectures fail to resolve even with dedicated training.
  • The Danger of History Over-Reliance: Agents struggle with contextual traps because they tend to prioritize immediate, current-step observations over long-horizon historical context, causing them to get stuck in circular behaviors.

Key Results

The authors evaluated 16 leading models, including proprietary giants (Claude-Sonnet-4.6, Gemini-3-Pro, GPT-5.4) and open-source models (UI-TARS, GUI-Owl).

  • Universal Performance Degradation: Every single tested model experienced a significant drop in success rate when exposed to traps. For instance, Claude-Sonnet-4.6 dropped from 74.2% to 66.5%, and GUI-Owl-1.5-32B-Think fell from 69.5% to 62.4%.
  • Contextual Traps are the Hardest: Across the board, Round-layer (R-layer) traps caused the most severe performance drops.
  • GRPO Training Duality: Training agents with adversarial GRPO yielded massive improvements on single-step traps (improving GUI-Owl-7B's performance on State-layer traps by +8.1% to 11.0%). However, the same training provided negligible gains (under +3.0%) on multi-step contextual traps like loops and deadlocks.
Layer-level performance comparison across training regimes showing GRPO results.

Limitations and Future Work

  • Task Scale: The benchmark is limited to 236 base tasks, which may not fully capture the massive variety of real-world Android applications and user behaviors.
  • No Adversarial SFT: Due to budget and data collection constraints, the authors did not explore adversarial Supervised Fine-Tuning (SFT), which could potentially improve contextual understanding.
  • Evaluation Focus: ANTRAP is primarily a diagnostic tool rather than a training solution. Developing scalable, architectural training methods that instill long-horizon self-monitoring and meta-cognitive capabilities in agents remains an open challenge.

Summary updated

BibTeX
@misc{gan2026are,
  author = {Guo Gan and Yilun Zhao and Cong Chen and Jinbiao Wei and Tingyu Song and Zheyuan Yang and Lin Fu and Hong Zhou},
  title = {{Are Android GUI Agents Robust Against Runtime Anomalies? AnTrap: Evaluating Agents in Dynamic Adversarial Environments}},
  year = {2026},
  eprint = {2608.24099},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.24099},
}
Figure