Trust From Where, Not What: Outside-In Provenance for Distraction-Robust Mobile Agents

Phone-operating AI agents read the screen the way a person would: a screenshot plus the tree of on-screen elements that Android exposes for screen readers (the accessibility tree). Anything else that appears on that screen enters the model's input as well: an ad, a fake "This app is broken, click here to fix it" banner, or a stranger's post in a feed. Language models are poor at ignoring material that is irrelevant or planted in their input. So far, defenses have asked a model to judge what each element says, and that judgment is exactly the ability that fails under distraction. This note proposes a different approach. For each element, the defense records where it came from and how it behaves, using only signals the phone already emits to outside observers. Those signals are: which app and window drew it, whether it appeared as a result of the agent's own last action or on its own schedule, whether it persists when the agent revisits the same screen, and whether the pixels in the screenshot match an element in the tree at all. The observer turns these signals into trust labels, and the agent's input is rebuilt from them. Actionable controls stay in place. Content the agent may read but must not obey is fenced off, and screenshot regions that no element accounts for are masked.

The bet is that an attacker can freely write persuasive text but has much less control over provenance, and that provenance can be read without modifying the OS or the app. The strongest existing evidence says this gap matters and is open. Hijacking JARVIS built AgentHazard, a tool that injects deceptive content into live Android screens. It found an average misleading rate of 28.8%, rising to 83.3% when misleading actions are chained. An LLM-based detector caught 98.3% of pop-ups but only 37.9% of attacks embedded in native components. The authors conclude that the fix requires OS-level "source-tagging." We ask whether most of that protection can be recovered from outside, without any vendor cooperation.

Core Claim

For mobile GUI agents, distraction robustness is better decided by observable provenance than by content judgment. A small set of outside-in signals should cut misleading rates on native-component attacks, where content-based detectors fail, well below what content-based defenses achieve. It should also cost little clean task success. The claim is falsifiable in a specific way. If a Prune4Web-style relevance filter ported to Android, or a DPO-tuned backbone, matches our misleading rate on attacks crafted to look task-relevant, then the provenance signals are not doing the work.

Why this is not already done

The closest systems each stop short of this, and in different ways. CORE groups the Android element tree into layout blocks and has an on-device small model rank them, sending only the top block to a cloud model. It cut UI exposure by 55.6% at a 4.9% success cost. Its ranking is by content relevance, however, and it never tests deceptive text inside the chosen block. Prune4Web has a planner write a Python scoring script over web page elements, which raises grounding accuracy from 46.8% to 88.28%. Its scores also rest on visible text and labels, it works on static web pages, and it fails if the script drops the target. SMAN-Bench and MobileAgentBench measure failure without proposing a filter. AgentHazard attacks and proposes OS changes.

The older application-agnostic line is where our method comes from. UIScope correlates accessibility events with kernel traces to attribute actions, and F3l uses accessibility-observed UI transitions as ground-truth labels. Both show that event timelines observed from outside carry reliable causal information without instrumentation. We reuse that idea, attributing events to causes, for a new purpose: deciding what enters a model's input.

The distraction literature constrains the design. Breaking Focus and Adaptive Distraction show that "ignore irrelevant information" prompts give almost no protection. They also show that distractors tailored to a model's own decision boundary cut accuracy by over 45% on average, for example from 85.7% to 22.0% for GPT-4o-mini on CommonsenseQA. That is why we avoid any defense whose decision passes through the model's reading of the adversarial text.

Research Program

We would build an observer that runs as an ordinary accessibility service plus a window-manager reader over the Android Debug Bridge, with no app or OS modification. For every element in each observation, it computes four labels.

  1. Origin. The owning package and window layer, which separates overlays and notifications drawn by other apps from the target app's own windows.
  2. Causal timing. Whether the element's appearance falls within a short window after an agent action and inside the subtree that action touched. Otherwise it arrived asynchronously.
  3. Stability. Whether the element recurs across the agent's revisits of screens with the same structural signature.
  4. Visual-structural agreement. Whether the screenshot region that looks like a control corresponds to an element in the tree whose bounds match. This targets the button-like overlays behind the "Vision Trap."

A second, structural role label separates controls (clickable or focusable leaves) from content (text nested inside list items or post containers). This label matters because the hardest case, a malicious post legitimately rendered by the app, shares the app's origin and is stable. Only its role distinguishes it.

The labels feed a fixed input-construction step with no learned components. Low-trust controls are removed from the action space. Content text is presented inside explicit quoted blocks that the agent is told are data, not instructions. Screenshot regions with no matching tree element, or with foreign origin, are blurred. We would also study a softer variant that keeps everything but prints the labels next to each element. Comparing the two tells us whether the model can use provenance when shown it, or whether it must be enforced.

We would be upfront about scope. Provenance cannot catch a third party who posts persuasive text into a feed the agent must read. There the role label and fencing carry the load, and we expect the smallest gains. An attacker who knows the rules can also time content to coincide with agent actions. We measure this directly instead of assuming it away.

One practical issue shapes the experiments. AgentHazard injects content by rewriting the observation, so its injected elements may carry no realistic origin or timing signature. We will therefore run the benchmark as released, where only role and visual agreement apply. We will also re-implement a subset of its attacks through genuine unprivileged channels: a separate overlay app, notifications, and posts written into locally hosted feed content. On that subset the OS emits whatever provenance it really would.

Baselines

The naive reference point is the unmodified agent: a backbone given the full screenshot and full element tree, with a standard system prompt. It is run on GPT-4o, Claude 3.7 Sonnet (which AgentHazard reports as the most robust backbone), and an open 7B–9B model. On AgentHazard's complex scenarios the reported number to beat is the 28.8% average misleading rate, and 83.3% for chained attacks, from Hijacking JARVIS. On AITZ-Noise it is the 17.4% accuracy on ad-handling steps reported in SMAN-Bench. We rerun these baselines rather than copying them, because our injection subset differs.

The strongest content-based competitors form three groups.

The first is the LLM anomaly detector from AgentHazard, applied as a pre-filter. It reports 37.9% detection on native modifications. This is the most direct "judge what it says" rival, run with the same backbone as the agent.

The second is relevance filtering, in two forms. One is CORE-style block partitioning with local ranking, following CORE. The other is a mobile port of Prune4Web's planner-written scoring scripts, with access to Android fields (clickable, bounds, package name) as well as text. The port is the strongest version a skeptic could build, because the script could learn provenance-like rules on its own. We give it the same planner model and the same number of prompt-tuning iterations on held-out apps as our thresholds get.

The third is DPO on clean-versus-distracted trajectory pairs, following Breaking Focus, trained on the open backbone. It gets the same attack-type training split our threshold tuning sees, and is evaluated on held-out attack types.

Two further baselines isolate the key ingredient. The first, text-only, drops the screenshot entirely. The second is a shuffled-label control. It keeps our fencing and formatting but assigns trust labels at random with matched frequencies, which tells us whether gains come from true provenance or merely from presentation. Per-signal ablations remove origin, timing, stability, visual agreement, and role one at a time.

Beating a baseline means a lower misleading rate on native-component attacks with non-overlapping bootstrap intervals. It also requires clean task success within a few points of the naive agent on MobileAgentBench (best reported success 0.40, AppAgent) and on AndroidWorld tasks. CORE's reported 4.9% gap to cloud-only execution is the reference for an acceptable utility cost.

Why not just…?

Why not just tell the model to ignore ads and suspicious text? Adaptive Distraction found that such instructions provide almost no benefit against coherent distractors. AgentHazard's 28.8% misleading rate was measured on frontier backbones with standard prompts. We include the instructed prompt as a baseline, but we do not expect it to be competitive.

Why not just filter by task relevance, as Prune4Web or CORE do? This is the real threat. Relevance filtering will remove many ads simply because they are off-task, and it may match us on AITZ-Noise. Our argument is narrower. AgentHazard's lures ("this app is broken, fix it") are written to look relevant, and tailored distractors are exactly what relevance judgments miss. The experiment settles it: we split attacks by whether a relevance scorer ranks the distractor above the median task element. If the Prune4Web port matches us on the high-relevance split, our claim fails.

Why not just drop the screenshot, since vision makes agents more gullible? The Vision Trap finding supports this, and text-only may win on misleading rate. But MobileAgentBench and the known gaps in the element tree (custom-drawn canvases, touch areas that differ from visible borders) mean text-only agents lose tasks. Masking should keep the visual information that helps while removing what misleads. Our method must beat text-only on clean success at equal or lower misleading rate. Otherwise masking adds nothing.

Why not just DPO-train the agent on distracted pairs? Breaking Focus reports gains of nearly 50% on perturbed inputs for some smaller models, so this is a strong rival on attacks seen in training. The question is transfer. Provenance labels do not depend on attack wording, so we expect our advantage mainly on held-out attack types. We also test DPO combined with our observer, because the two are complementary rather than exclusive.

Proposed Experiments and Decisive Checks

The primary evaluation uses the AgentHazard benchmark, in both its dynamic form (58 tasks across 8 AndroidWorld apps) and its static form (840 tuples from 210 screenshots across 14 commercial apps), plus our re-implemented subset of attacks delivered through genuine third-party channels. The static split can support only the role and visual-agreement signals, while the dynamic and re-implemented splits support all five labels. That difference is itself an ablation of the timing and origin signals. Ad robustness is measured on AITZ-Noise and SMAN-Bench-Noisy through noisy-step accuracy. Clean utility is measured by success rate and step count on MobileAgentBench, DroidTask, and AndroidWorld.

Four checks decide the proposal.

  1. Native-component attacks. On attacks embedded in native components, where the LLM detector reaches only 37.9%, our observer must beat both the detector and the Prune4Web port on misleading rate.
  2. Relevance-looking lures. On the split where distractors look task-relevant, the gap to relevance filtering must widen, not shrink.
  3. Shuffled labels. The shuffled-label control must lose most of the gain, showing that real provenance drives it.
  4. Adaptive attacker. An attacker who knows our rules will synchronize injections with agent actions and place lures inside stable containers. We report the residual misleading rate honestly, broken down by which label the attacker defeated.

We will also report the observer's latency overhead against CORE's reported 1.5 to 1.6 times slowdown. A defense that works but doubles interaction time would have to be judged as the trade-off it is.