GUI-KV: Efficient GUI Agents via KV Cache with Spatio-Temporal Awareness

Kung-Hsiang Huang, Haoyi Qiu, Yutong Dai, Caiming Xiong, Chien-Sheng Wu

TL;DR

GUI-KV is a plug-and-play, training-free key-value (KV) cache compression method designed specifically for vision-language GUI agents. By exploiting the unique spatial and temporal redundancies of graphical user interfaces, it reduces decoding FLOPs by up to 38.9% and drastically lowers memory overhead while maintaining—and sometimes even improving—task accuracy.

What Problem Does This Paper Address?

Graphical User Interface (GUI) agents powered by Vision-Language Models (VLMs) are excellent at automating digital workflows by looking at screenshots and executing actions. However, processing sequences of high-resolution screenshots creates a massive computational bottleneck.

During autoregressive generation, models use a Key-Value (KV) cache to avoid recomputing past token representations. For image-heavy GUI tasks, this cache explodes in size. For instance, running a 7B model with 5 screenshots can easily demand over 80GB of GPU memory, leading to out-of-memory (OOM) errors on standard consumer hardware.

While KV cache compression exists, current methods are optimized for natural text or images. They assume that attention patterns vary significantly across transformer layers and fail to account for the massive structural redundancies unique to GUIs—such as large solid-color backgrounds, persistent taskbars, and identical elements repeated across consecutive steps.

Methods

The authors introduce GUI-KV, a compression technique requiring zero retraining that introduces three core strategies:

  1. Uniform Budget Allocation: The authors discovered that unlike natural images, GUI screenshots exhibit an extremely high and flat attention sparsity (>0.99) across all transformer layers (see Figure 1). Consequently, instead of complex layer-varying budget schedules, GUI-KV simply allocates an equal KV cache budget to every layer.
  2. Spatial Saliency Guidance: To prevent discarding critical visual tokens, GUI-KV augments standard attention scores with the $L_2$ norm of the visual tokens' hidden states. This helps preserve "information sinks"—tokens that anchor semantic meaning across the visual field.
  3. Temporal Redundancy Scoring: Since consecutive screenshots share massive visual overlap, GUI-KV uses QR decomposition to project the keys of historical frames onto the key subspace of the current frame (illustrated in Figure 3). Tokens from past frames that yield small residuals are deemed redundant and are preferentially pruned.
Illustration of the temporal redundancy scoring mechanism using QR decomposition and subspace projection.

Datasets

The method was evaluated across six diverse GUI agent benchmarks:

  • GUI Visual Grounding: ScreenSpotV2 and ScreenSpot-Pro.
  • Offline Agent Evaluation: AndroidControl, Multimodal-Mind2Web, and AgentNetBench.
  • Online Agent Evaluation: OSWorld-Verified (testing real-time execution in live environments).

Key Insights and Ideas

  • GUI Attention is Uniquely Sparse: In natural images, attention sparsity drops in deeper layers as the model integrates complex features. In GUIs, the sparsity remains flat and extremely high (>0.99) throughout the network. This means traditional compression baselines like PyramidKV or VL-Cache actually hurt performance by over-amplifying tiny, insignificant sparsity differences between layers.
  • Pruning as a Distraction Filter: Surprisingly, at modest budgets (40-80%), GUI-KV occasionally outperforms the full-cache baseline. This suggests that aggressively pruning redundant visual history acts as a regularizer, reducing long-context distraction for the agent.
  • Spatio-Temporal Synergy: Ablation studies (Figure 4) reveal that spatial saliency is highly effective when dealing with few screenshots, whereas temporal redundancy scoring becomes exponentially more valuable as the agent's history grows. Combined, they provide the best performance across all settings.
Ablation studies on AgentNetBench showing the impact of spatial and temporal components across varying numbers of screenshots.

Key Results

GUI-KV was validated using two top-performing GUI models: UI-TARS-1.5-7B and OpenCUA-7B.

  • Cache Reduction: The method recovers near-full-cache accuracy using only 10% to 20% of the original cache budget.
  • Efficiency Gains: In a 5-screenshot setup on AgentNetBench, GUI-KV reduced decoding FLOPs by 38.9% while simultaneously improving step accuracy by 4.1% over the full-cache baseline.
  • Negligible Overhead: The pre-filling overhead introduced by the QR decomposition is virtually non-existent, accounting for an increase of less than 0.29% in compute time.

Limitations and Future Work

The authors note that model architecture plays a significant role in compression robustness. While UI-TARS-1.5-7B proved highly resilient to aggressive KV cache eviction, OpenCUA-7B was much more sensitive and exhibited fluctuating performance. This implies that training objectives (such as DPO used in UI-TARS) inherently affect how tolerant a model is to cache pruning.

Additionally, performance for all tested methods peaked at around 7 screenshots, indicating that even with smart compression, excessive visual context eventually introduces irreducible distraction for current GUI agents. Future work could explore tighter integration between agent planning and dynamic cache management to break this context ceiling.

Summary updated

BibTeX
@article{huang2026gui,
  author = {Kung-Hsiang Huang and Haoyi Qiu and Yutong Dai and Caiming Xiong and Chien-Sheng Wu},
  title = {{GUI-KV: Efficient GUI Agents via KV Cache with Spatio-Temporal Awareness}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure