ActionBert: Leveraging User Actions for Semantic Understanding of User Interfaces

Zecheng He, Srinivas Sunkara, Xiaoxue Zang, Ying Xu, Lijuan Liu, Nevan Wichers, Gabriel Schubiner, Ruby B. Lee, Jindong Chen

Introduction

Understanding User Interfaces (UIs) presents a unique challenge for artificial intelligence. Unlike natural images, UI components are often semantically ambiguous; for instance, a house icon might represent "Home," "Real Estate," or "Smart Home Control" depending on the application context. Furthermore, UI data is inherently multi-modal, comprising visual pixels, structural metadata (View Hierarchies), and textual labels.

Semantic ambiguity in UI icons: identical or similar visual elements can represent vastly different functional roles depending on the application context.

Existing approaches often treat UI tasks in isolation and fail to capture the functional essence of components. ActionBert addresses this by positing that the true meaning of a UI element is defined not just by its appearance, but by the actions it facilitates. By leveraging sequential user interaction traces, ActionBert learns the "language" of UIs, treating components as words and interaction sequences as paragraphs.

Methodology

ActionBert is built upon a transformer-based architecture designed to integrate visual, textual, and spatial features through a single attention mechanism.

Architecture

The model employs a "uni-stream" transformer encoder. Each UI component is represented by a fused embedding that includes:

  • Textual Embeddings: Information from the View Hierarchy, such as resource IDs and class names.
  • Vision Embeddings: Image crops of components processed via a ResNet-50 backbone.
  • Positional Embeddings: 2D coordinates and dimensions to capture layout context.
  • Segment Embeddings: Indicators to distinguish between different screens in an interaction sequence.
The ActionBert architecture employs a multi-layer transformer encoder to process fused multi-modal embeddings of UI components, treating each component as a semantic token.

Pre-training Tasks

To encode interaction logic, the model is pre-trained on three self-supervised tasks:

  1. Link Component Prediction (LCP): Identifying which specific component was clicked to trigger a transition between two consecutive screens.
  2. Consecutive UI Prediction (CUI): Determining if two screens belong to the same user session, similar to BERT’s Next Sentence Prediction.
  3. Masked VH Text Prediction: Reconstructing hidden UI text using visual context and surrounding elements.

Experimental Results

ActionBert was pre-trained on a massive dataset of 5.4 million UI pairs and evaluated against several benchmarks, including the Rico dataset. The model demonstrated significant improvements over state-of-the-art multi-modal baselines:

  • App Type Classification: Achieved a 15.5% absolute increase in accuracy over the baseline.
  • Icon Classification: Reached 97.5% accuracy on the Rico-32 benchmark.
  • Component Retrieval: Improved accuracy by 14.2% on web UIs, indicating strong generalization beyond mobile apps.
  • Referring Expression Retrieval: Outperformed non-pre-trained versions by 4%, validating the importance of action-based pre-training for understanding natural language descriptions of UI actions.

Conclusion

ActionBert demonstrates that treating UI interactions as a sequential language allows models to disambiguate components and understand functional semantics. By combining pixels with structural metadata and interaction traces, the model sets a new standard for UI understanding. Future work includes extending the model to longer user journeys and optimizing for on-device deployment.

Summary updated

BibTeX
@inproceedings{he2021actionbert,
  author = {Zecheng He and Srinivas Sunkara and Xiaoxue Zang and Ying Xu and Lijuan Liu and Nevan Wichers and Gabriel Schubiner and Ruby B. Lee and Jindong Chen},
  title = {{ActionBert: Leveraging User Actions for Semantic Understanding of User Interfaces}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i7.16741},
}
Figure