Research
OS-Sentinel: Towards Safety-Enhanced Mobile GUI Agents via Hybrid Validation in Realistic Workflows
Overview Research area: AI agent safety — specifically, safety detection for Vision-Language Model (VLM) agents that operate mobile Android interfaces. Technical level: Intermediate. The paper assumes
- arXiv
- 2510.24411
- Published
- 2025-10-28
- Authors
- Qiushi Sun, Mukai Li, Zhoumianze Liu, Zhihui Xie, Fangzhi Xu, Zhangyue Yin, Kanzhi Cheng, Zehao Li, Zichen Ding, Qi Liu, Zhiyong Wu, Zhuosheng Zhang, Ben Kao, Lingpeng Kong
AI summary
Overview
Research area: AI agent safety — specifically, safety detection for Vision-Language Model (VLM) agents that operate mobile Android interfaces.
Technical level: Intermediate. The paper assumes familiarity with GUI agents, VLMs, and basic system security concepts, but its core arguments are accessible to anyone following agent-safety research.
Scope: The authors build a live Android sandbox and benchmark for mobile agent safety, then propose a hybrid detection framework combining deterministic system-level verification with VLM-based contextual judgment.
What This Paper Is About
Mobile GUI agents driven by VLMs can autonomously tap, type, and navigate real phone apps, but they can also leak private data, tamper with system files, or produce harmful content — sometimes even when the user's original request was completely benign. Existing safety infrastructure is built mostly for desktop and web agents, and existing detectors are either too rigid (fixed rules) or too context-blind (generic LLM judges), so no one has been able to systematically measure or catch mobile agent misbehavior. This paper builds both the testbed and the detector needed to close that gap.
Key Contributions
-
MobileRisk-Live, a dynamic Android emulator sandbox that records not just what the agent sees (screenshots, accessibility trees) and does (actions), but also a System State Trace capturing invisible background events such as file modifications, permission escalations, and network activity. It covers roughly 50 applications and system components, and can be reset and extended.
-
MobileRisk, a benchmark of 204 realistic agent trajectories (102 unsafe, 102 safe) with multi-level annotations: trajectory-level binary labels, the exact first unsafe step, and one of ten risk categories. Safe cases include 51 "counterpart" trajectories that are corrected versions of unsafe ones, which exposes false-positive behavior.
-
OS-Sentinel, a hybrid safety detection framework that runs a Formal Verifier (hash-based system integrity checks, sensitive keyword lexicons, regex pattern matching) alongside a Contextual Judge (a VLM reasoning over screenshots and action sequences), with configurable aggregation modes.
-
Empirical and analytical results showing consistent gains over rule-based and LLM/VLM-as-a-Judge baselines at both step and trajectory granularity, plus component ablations, category-wise breakdowns, and a live-versus-frozen environment comparison.
Main Findings
-
Large, consistent detection gains: OS-Sentinel improves over baselines by roughly 10–30% across metrics. With Claude-4.5-Sonnet as backbone, it reaches 73.0% accuracy and 69.1% F1 at the trajectory level (consecutive mode), compared to 52.7% / 53.8% for rule-based evaluators.
-
Hybrid beats either half alone: Adding the Formal Verifier to a VLM judge improves results for nearly every backbone. The gain is dramatic for weaker models — GPT-4o mini's trajectory-level consecutive accuracy rises from 36.8% to 63.9%.
-
Rule-based methods collapse on long horizons: Static rule checkers struggle badly with multi-step semantic dependencies, confirming that task-specific rules do not scale to realistic workflows.
-
Error asymmetry drives the design: The authors argue false negatives (missed violations) are far costlier than false positives (an unnecessary pause), so OS-Sentinel defaults to a "strict" OR-mode aggregation that prioritizes recall over precision.
-
Model-agnostic and fast: Strong results hold even with a 7B open-source backbone that can run locally on-device, and API models average 66ms latency per detection.
-
Frozen benchmark tracks live environment: On 104 selected instructions, detection accuracy in the frozen MobileRisk benchmark closely matches results in the live MobileRisk-Live sandbox (e.g., 62.3% vs. 60.4% for Claude-3.7-Sonnet), validating reproducible offline evaluation.
-
Balanced category coverage: Category-wise analysis shows baselines excel in some risk categories but fail in others, whereas OS-Sentinel delivers more uniform performance across the safety taxonomy.
Methodology in Plain English
The researchers start with an Android emulator (a Pixel 6a simulator running Android Studio's emulator) and instrument it to record three parallel streams at every step: what the agent sees (screenshot plus accessibility tree), what the agent does (the action), and what happens underneath (a compact hash of file-system metadata and screen text). That third stream is the key innovation — it exposes risks the agent's own view can never show.
They collect data by writing instructions covering risk-prone scenarios, letting a GPT-4o-powered mobile agent execute them, then having human annotators refine the trajectories and mark the first step where something unsafe happens. Safe examples come from two sources: instructions that are inherently safe, and "counterpart" versions of unsafe trajectories where the violation was manually corrected.
For detection, they split the problem in two. The Formal Verifier does deterministic checks: it compares SHA-256 hashes of system file metadata between consecutive steps to catch tampering or privilege escalation, scans on-screen text against a lexicon of sensitive terms drawn from OWASP Mobile Top 10 guidelines, and uses regular expressions to catch structured secrets like credit card numbers and passwords. The Contextual Judge feeds the current screenshot and action (or the accessibility tree, if using a text-only model) to a VLM and asks whether the behavior is risky. At the trajectory level, the judge either walks through the trajectory in fixed-size consecutive windows or samples representative transition points scattered across the whole trajectory. Finally, a simple combiner merges the two verdicts — OR by default for maximum sensitivity, AND for high-confidence decisions.
Evaluation happens at two levels: a binary safe/unsafe judgment over the whole trajectory, and a localization score for the first unsafe step that penalizes predictions based on how far off they are from the ground truth.
Why This Matters
Impact on research: Mobile GUI agent safety has lacked both a realistic testbed and a principled detector. This paper supplies both, plus a ten-category taxonomy that gives future work a shared vocabulary. The System State Trace concept — treating runtime metadata as a first-class observable for safety — is a transferable idea beyond mobile.
Real-world applications:
- Consumer smartphone assistants that execute app tasks on behalf of users, where an undetected destructive action or data leak is irreversible.
- Enterprise device management, where mobile agents handling corporate email, documents, or credentials must be constrained by an auditable safety layer.
- Human-in-the-loop oversight systems, using OS-Sentinel as a "guard-then-ask" filter so that human confirmation is requested only for genuinely risky steps rather than every action.
- Compliance and audit tooling that needs a deterministic, explainable record of what an autonomous agent actually changed on a device.
Industry relevance: Mobile agents are already being integrated into shipping products, and their failure modes carry direct liability — financial loss, privacy breach, regulatory exposure. A model-agnostic framework that runs in tens of milliseconds and can even operate from a small on-device model is a practical deployment path rather than a theoretical one. The deliberate recall-first posture also matches how regulated industries typically configure safety systems.
Future Directions
-
Extending beyond Android. The Formal Verifier depends on access to system state traces, which are available on open platforms without root access but not on closed systems like iOS. Adapting the approach to locked-down platforms is an open problem.
-
Closing the simulation gap. The live and frozen settings matched closely in testing, but discrepancies remain — random push notifications, network-dependent behavior, dynamic content. Reducing these will strengthen reproducibility claims.
-
Tightening step-level detection. Step-level accuracy remains low in absolute terms (best around 31%) because each individual step provides limited information. Better ways of injecting trajectory context into real-time guards is a clear next target.
-
Tuning the precision-recall tradeoff. The framework's strict mode deliberately over-flags. Systematic study of how to calibrate the safety bar per deployment environment — and how to measure the true cost of false alarms in practice — remains open.
Target Audience
Researchers and engineers working on autonomous GUI agents, agent safety, and AI alignment evaluation will find the core value here, as will mobile platform developers building or governing on-device automation. It is also relevant to security practitioners interested in runtime verification of untrusted AI behavior, and to policy or compliance teams who need concrete mechanisms for constraining agent autonomy. Readers should be comfortable with VLMs and basic Android system concepts to get the most out of the methodology sections.
Authors’ abstract
Computer-using agents powered by Vision-Language Models (VLMs) have demonstrated human-like capabilities in operating digital environments like mobile platforms. While these agents hold great promise for advancing digital automation, their potential for unsafe operations, such as system compromise and privacy leakage, is raising significant concerns. Detecting these safety concerns across the vast and complex operational space of mobile environments presents a formidable challenge that remains critically underexplored. To establish a foundation for mobile agent safety research, we introduce MobileRisk-Live, a dynamic sandbox environment accompanied by a safety detection benchmark comprising realistic trajectories with fine-grained annotations. Built upon this, we propose OS-Sentinel, a novel hybrid safety detection framework that synergistically combines a Formal Verifier for detecting explicit system-level violations with a VLM-based Contextual Judge for assessing contextual risks and agent actions. Experiments show that OS-Sentinel achieves 10%-30% improvements over existing approaches across multiple metrics. Further analysis provides critical insights that foster the development of safer and more reliable autonomous mobile agents. Our code and data are available at https://qiushisun.github.io/OS-Sentinel-Home/.