FocusUI: Efficient UI Grounding via Position-Preserving Visual Token Selection

Mingyu Ouyang, Kevin Qinghong Lin, Mike Zheng Shou, Hwee Tou Ng

TL;DR

FocusUI introduces an efficient framework for User Interface (UI) grounding in Vision-Language Models (VLMs) by selectively pruning redundant visual tokens while preserving crucial spatial layout information. By introducing a novel position-preserving padding strategy (POSPAD), it cuts down visual tokens to just 30% with minimal accuracy loss, delivering up to 1.44× faster inference and a 17% reduction in peak GPU memory.

What Problem Does This Paper Address?

Modern Vision-Language Models excel at UI grounding—the task of locating a target region or widget on a screen based on a natural language instruction. However, processing high-resolution screenshots (2K or 4K) forces these models to handle thousands of visual tokens, which easily dominate the sequence budget (often accounting for over 85% of the total tokens).

This extreme visual token skew causes massive computational overhead and dilutes the model's attention. While general token pruning methods exist for natural images, applying them directly to UI grounding causes an "accuracy collapse." This is because standard pruning breaks the strict positional continuity and 2D spatial grid structure that VLMs rely on to precisely localize small UI elements.

Figure 1. FOCUSUI is an efficient UI grounding framework that selects instruction-relevant visual tokens while preserving posi- tional continuity. Study 1 provides motivation to address visual redundancy in UI grounding tasks, and Study 2 demonstrates the effectiveness of the our position-preserving selection.

Methods

FocusUI optimizes the visual pipeline of VLMs before the tokens reach the language model decoder using two core components:

  1. Instruction-to-Patch Saliency Score: To determine which parts of a screenshot matter, FocusUI fuses an instruction-conditioned bounding-box overlap score with a rule-based UI-graph prior. The UI-graph prior uses a union-find algorithm to group connected components of visual patches. This effectively down-weights large, homogeneous background regions (like solid white space) and highlights distinct, instruction-relevant UI widgets. A lightweight Query-Guided Saliency Scorer is trained under this dense supervision to predict per-patch importance.
  2. POSPAD (Positional Continuity Preservation): Instead of naively dropping pruned tokens—which introduces spatial "jumps" in Multimodal Rotary Position Embeddings (M-RoPE)—FocusUI compresses each contiguous sequence of dropped tokens into a single learnable <pos_pad> marker placed at the sequence's final index. This preserves the underlying 2D spatial structure and sequence continuity without modifying downstream language model architectures.
Figure 2. Overview of our proposed FOCUSUI. (a) Illustration of how the Instruction-to-Patch saliency score is constructed. (b) Query- Guided Saliency Scorer and token selection. (c) Overall UI grounding framework illustrating how POSPAD is applied to dropped sequences to preserve positional continuity. For clarity, we omit the system prompt in the token sequence.

Datasets

The authors evaluated FocusUI across four prominent UI grounding and GUI agent benchmarks:

  • ScreenSpot-V2 and ScreenSpot-Pro: High-resolution benchmarks simulating real-world web, desktop, and mobile interfaces.
  • OSWorld-G: An evaluation suite tailored for GUI agents.
  • UI-Vision: A desktop-centric GUI benchmark focusing on visual perception and interaction.

Key Insights and Ideas

  • UI Screens are Mostly Empty Space: Unlike natural images, UI screenshots contain massive amounts of redundant, homogeneous background pixels. FocusUI exploits this structural property by explicitly down-weighting these regions using a graph-based approach.
  • Pruning Breaks Spatial Footprints: The "aha moment" of the paper is that you don't need to keep the content of background patches, but you absolutely must keep their positional footprint. Naive dropping shifts the coordinates of subsequent patches, confusing the model's spatial understanding. POSPAD elegantly maintains the coordinate grid layout with minimal token overhead.
An illustrative example of building the fused Instruction-to-Patch saliency score.

Key Results

  • State-of-the-Art Performance: On the challenging ScreenSpot-Pro benchmark, FocusUI-7B outperforms the strong GUI-Actor-7B baseline by 3.7% in absolute accuracy.
  • Robustness to Aggressive Pruning: When retaining only 30% of visual tokens, FocusUI-7B maintains high accuracy, dropping only 3.2% compared to its full-token baseline. In contrast, general pruning methods like Fast-V suffer catastrophic accuracy drops under the same constraints.
  • Substantial Efficiency Gains: At a 30% token retention ratio, FocusUI achieves up to 1.44× faster inference and 17% lower peak GPU memory usage, demonstrating a highly favorable accuracy-efficiency trade-off.

Limitations and Future Work

FocusUI primarily focuses on spatial visual token reduction within a single screenshot. However, real-world UI interaction is inherently sequential and multi-round. The authors note that future work should extend this efficiency framework to the temporal dimension to handle multi-step video inputs or history-dependent GUI agent tasks.

Summary updated

BibTeX
@inproceedings{ouyang2026focusui,
  author = {Mingyu Ouyang and Kevin Qinghong Lin and Mike Zheng Shou and Hwee Tou Ng},
  title = {{FocusUI: Efficient UI Grounding via Position-Preserving Visual Token Selection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=d0swHkzVlb},
}
Figure