TL;DR
When language model (LM) agents interact with graphical user interfaces (GUIs), the sequential order in which UI elements are fed to the model matters far more than previously assumed. Randomizing element order degrades task success as severely as stripping away all visible text; by using 2D-to-1D dimensionality reduction (t-SNE) to preserve spatial locality when ordering pixel-detected elements, the authors more than double the state-of-the-art action score on the OmniACT desktop/web benchmark.
What Problem Does This Paper Address?
Autonomous LM agents increasingly handle tasks across web browsers and desktop operating systems. In idealized web environments, agents inspect a structured Document Object Model (DOM) or accessibility tree to identify interactable components. However, many real-world desktop applications, mobile apps, and canvas-rendered web apps (e.g., Google Slides or game engines) do not expose an informative DOM or accessibility tree.
In these pixel-only settings, agents must visually detect UI elements from raw screenshots and serialize them into a text prompt. While prior work focused on visual prompting (like Set-of-Mark) or detection algorithms, little attention has been paid to the ordering of these detected elements in the serialized input. Because language models process tokens sequentially, the chosen linearization order can either preserve or completely scramble the semantic relationships between nearby screen elements.
Methods
- Ablation of State Representations: The authors systematically isolated each component of agent state representations (screenshots, Set-of-Mark overlays, element tags, captions, alt-text, interactable text, and element ordering) on VisualWebArena to evaluate what information agents actually rely on.
- Interactable Element Detection from Pixels: For environments without an accessible DOM, they trained a Faster R-CNN object detector to locate interactable UI components directly from raw screenshots and extracted labels using EasyOCR.
- Spatial Dimensionality Reduction for Linearization (t-SNE): Unlike the default raster scan (left-to-right, top-to-bottom), the authors project 2D bounding-box coordinates $(x, y)$ into a 1D sequence using t-SNE. Because t-SNE prioritizes preserving local neighborhood structures, visually and functionally grouped interface elements (e.g., a music icon, track name, and play button) stay adjacent in the prompt sequence.
- Abstracted Action Space: Instead of requiring the LM to output raw mouse coordinates via PyAutoGUI code, the agent outputs high-level actions on discrete element IDs (e.g.,
click [12]), which are programmatically mapped to pixel executions.
Datasets
- VisualWebArena (VWA): A multimodal web-agent benchmark evaluated on a reproducible subset of tasks to perform granular state ablations.
- OmniACT: A pixel-based benchmark covering 177 desktop and web applications with 2,021 test tasks, evaluated using action completion scores.
- Common Crawl UI Dataset: A custom dataset created by the authors comprising 674,416 interactable elements extracted across 1,468 popular Common Crawl web pages, used to train the Faster R-CNN detector.
Key Insights and Ideas
- Ordering is as critical as visible text: Shuffling element ordering drops relative agent performance by 42%–50% on VisualWebArena. The performance penalty of random ordering is comparable to removing all text descriptions from the HTML.
- Text remains indispensable on desktop displays: On mobile benchmarks, prior studies suggested screenshots alone sufficed. However, for desktop viewports (typically $1920 \times 1080$ vs. mobile's $360 \times 800$), removing text representations caused Gemini 1.5 Pro’s success rate to plummet from 64.2% to 3.7%.
- Locality reflects functionality: In GUI design, elements placed close to each other are almost always functionally related. Raster scanning breaks vertical and grouped clusters, whereas t-SNE keeps functional clusters intact, providing better in-context cues for the LM.
- Larger models benefit more from structure: The advantage of t-SNE ordering over simple raster scanning widened on stronger models (GPT-4V and Gemini 1.5 Pro) compared to smaller models (Llama 3 8B), especially on challenging, clutter-heavy interfaces.
Key Results
- VisualWebArena Ablations: On GPT-4V, ground-truth DOM pre-order traversal achieved a 74.07% success rate. Scrambling the ordering dropped success to 44.44%, and removing text completely dropped it to 38.89%.
- Ordering Strategies on OmniACT (Detected Elements):
- Random: 39.59% (Gemini 1.5) / 44.63% (GPT-4V)
- Raster: 45.21% (Gemini 1.5) / 47.38% (GPT-4V)
- t-SNE: 47.16% (Gemini 1.5) / 49.18% (GPT-4V)
- New OmniACT State of the Art: Combining the trained UI detector, t-SNE ordering, high-level action space, and multimodal input achieved an Action Score of 23.34% (GPT-4V) and 22.86% (Gemini 1.5 Pro), more than doubling the prior best published baseline of 11.60%.
Limitations and Future Work
- Gap to Ground-Truth Hierarchies: While t-SNE outperforms raster and random orderings, it still falls short of true hierarchical DOM traversals (44.44% vs. 64.03% on Gemini 1.5).
- Pure Vision Agent Questions: Because web/desktop environments failed when stripping text, the authors could not isolate whether element ordering directly alters image-only agent reasoning.
- Expanded Evaluation: Future research needs to explore combining learned pixel detectors with OS-level accessibility trees (such as OSWorld) and extending spatial linearization strategies to mobile benchmarks like Android in the Wild.
Summary updated