arXiv(opens in a new tab)cs.CVOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.20390

STP-GUI: Spatially-Aware Token Pruning for Efficient Web-GUI Agents

Shuo Wang, Sifan Zhou, Xiaobo Wang, Tianyu Fu, Chenxu Zhao, Anyang Su, Hanning Wang, Ping Jiang, Minghui Wu

Abstract

With the rapid development of vision-language models (VLMs), Web-GUI agents have achieved promising performance in interacting with real-world interfaces through screenshot-based grounding. However, high-resolution screenshots and multi-turn histories introduce excessive visual tokens, causing substantial inference overhead. Existing token pruning methods, mainly designed for natural images, often select tokens independently based on importance scores, which can fragment the local visual structures required for recognizing small GUI elements such as buttons, icons, and hyperlinks. In this work, we propose STP-GUI (Spatially-aware Token Pruning for GUI agents), a query-guided token pruning framework that preserves fine-grained instruction-conditioned token scoring while performing spatially coherent window-level selection under aggressive token reduction. A lightweight selector is optimized through policy learning while the VLM backbone remains frozen. Experiments on Online-Mind2Web show that STP-GUI achieves a favorable efficiency-performance tradeoff under low token budgets. At 21% token retention, it preserves 77.7% of full-token performance while reducing inference latency by 31% and FLOPs by 57%. Results on Android in the Wild further suggest that the method transfers to mobile GUI environments.

1 Introduction

With the rapid development of vision-language models (VLMs), Web-GUI agents that navigate real websites by grounding actions in screenshots and text instructions have seen growing adoption (Fu et al., 2025; Wang et al., 2025; Bai et al., 2025a,b; Wang et al., 2024a). This setting requires

Previous Token-Wise Pruning (Fragmented & Failed)

Figure

Ours: SQTS Window Selection (Contiguous & Precise)

Figure 1: Compared to existing VLM token pruning methods, our framework for Web-GUI agents aggregates fine-grained scores into non-overlapping spatial windows and uses a Plackett–Luce policy during training to select complete, contiguous patches. This helps suppress background noise while preserving local semantic and geometric structure, enabling the frozen VLM backbone to retain action-relevant evidence for downstream decisions.

high-resolution visual inputs to resolve small interactive elements such as hyperlinks, icons, and drop-down menus. The cost is a large visual token sequence: for instance, Qwen3-VL (Bai et al., 2025a) encodes a single 1920×10801920 \times 1080 screenshot into approximately 2,040 visual tokens. Furthermore, as is a common practice in Web-GUI agent systems (Fu et al., 2025; Qin et al., 2025; Wang et al., 2025; Bai et al., 2024), agents receive multiple interaction history—prior screenshots, actions, and observations—at each step, which can easily push the total visual token count beyond 10K. These large prefill token counts severely bottleneck inference, yet users are sensitive to agent response latency. Reducing visual token load is therefore a practical challenge.

†^{\dagger}Equal contribution

1^{1}Work done as an intern at Mininglamp

A straightforward strategy is to prune visual tokens before input the LLM modules, as has been studied for VLM (Shen et al., 2025; Shang et al., 2025; Yang et al., 2025). Web-GUI screenshots, however, pose distinct challenges that make standard pruning strategies unreliable. First, informative regions are sparse, localized, and often tiny—a single icon or hyperlink may occupy only a handful of visual tokens—while most of the page consists of blank background, repeated layout blocks, or decorative structure. Second, the spatial continuity of these small regions is essential: losing a few adjacent patches can destroy the visual evidence needed to identify a clickable element. These characteristics make pruning strategies designed for natural images (Jizhihui et al., 2026; Xing et al., 2024), where foreground objects are large and continuous, a poor fit for web interfaces.

Despite these challenges, prior pruning paradigms in the VLM literature—attention-based selection (Jizhihui et al., 2026; Xing et al., 2024; Shang et al., 2025), similarity-based filtering (Cai et al., 2025; Yang et al., 2025; Jeddi et al., 2025), and learnable summarization (Cha et al., 2024) may remain suboptimal for GUI screenshots. Existing pruning methods (Jizhihui et al., 2026; Sun et al., 2026) involves two related decisions: estimating instruction relevance and organizing the retained evidence. Token-wise selection offers fine-grained relevance ranking, but may retain disconnected fragments of interface elements. Window-wise selection imposes local spatial structure, yet its effectiveness also depends on whether the underlying scores identify useful regions. We therefore study scoring and selection granularity jointly. Our matched-budget comparison shows that pooling Attention scores into windows yields modest improvements, while window-wise selection provides larger gains with the learned STP-GUI scorer. This motivates a lightweight instruction-conditioned selector that estimates token relevance and retains complete spatial windows before LLM processing.

As illustrated in Fig. 1, we propose STP-GUI (Spatially-aware Token Pruning for GUI agents), a query-guided token pruning method that selects spatially contiguous windows rather than isolated tokens. Concretely, STP-GUI first computes token-wise importance scores using a lightweight query-conditioned scoring module, aggregates the scores within W×WW \times W windows, and then uses a Plackett–Luce policy during training to learn which windows to retain. At inference time, windows are selected greedily by score rank under a fixed token budget, while the VLM backbone remains frozen throughout. This design preserves fine-grained token scoring while reducing spatial fragmentation of the retained set, thereby helping the model preserve local evidence around GUI elements such as buttons, icons, and label-field pairs. Experiments on Online-Mind2Web (300 tasks across 136 live websites) (Xue et al., 2025) show that STP-GUI is particularly competitive at low retention budgets. By evaluating on Android in the Wild (AitW) (Rawles et al., 2023), we further show that the same design transfers beyond web screenshots to mobile GUI settings. At 21% token retention, it achieves the strongest success rate among the compared methods reported at their evaluated operating points while reducing inference latency by 31% and FLOPs by 57% relative to the dense baseline. Our main contributions are summarized as:

• We identify a previously overlooked failure mode of GUI-agent token pruning: coupling importance estimation and selection granularity causes spatial fragmentation of action-relevant visual evidence.

• We introduce STP-GUI, a granularity-decoupled selection paradigm that scores tokens precisely while selecting contiguous windows to preserve spatial coherence.

• We formulate GUI visual token retention as a budget-constrained discrete selection problem and design a lightweight query-conditioned selector trained with policy learning, while keeping the VLM backbone frozen.

• Experiments on Online-Mind2Web show that STP-GUI provides a favorable tradeoff between accuracy and efficiency under token pruning, reducing inference latency by 31% and FLOPs by 57%. Results on AitW also show the generalization for mobile GUI environments.

References (18)