Graph4GUI: Graph Neural Networks for Representing Graphical User Interfaces
Yue Jiang, Changkong Zhou, Vikas Garg, Antti Oulasvirta
TL;DR
Graph4GUI introduces a graph-based GUI representation that jointly models GUI element properties and layout constraints within a heterogeneous bipartite graph. A Graph Neural Network operates on this graph to predict element dimensions and positions for autocompletion, yielding more aligned and visually appealing results than baselines, and enabling a Figma plug-in for designer-ready workflow. The approach is validated through autocompletion experiments on mobile GUI data, a comparison study against GRIDS with human participants, and a designer study showing usability and efficiency gains, alongside additional applications in GUI topic classification and retrieval. The work demonstrates practical benefits for computational design and suggests future work on richer constraints and handling more complex layouts, while acknowledging limitations such as semantic cross-element correspondences and view-hierarchy representation.
Abstract
Present-day graphical user interfaces (GUIs) exhibit diverse arrangements of text, graphics, and interactive elements such as buttons and menus, but representations of GUIs have not kept up. They do not encapsulate both semantic and visuo-spatial relationships among elements. To seize machine learning's potential for GUIs more efficiently, Graph4GUI exploits graph neural networks to capture individual elements' properties and their semantic-visuo-spatial constraints in a layout. The learned representation demonstrated its effectiveness in multiple tasks, especially generating designs in a challenging GUI autocompletion task, which involved predicting the positions of remaining unplaced elements in a partially completed GUI. The new model's suggestions showed alignment and visual appeal superior to the baseline method and received higher subjective ratings for preference. Furthermore, we demonstrate the practical benefits and efficiency advantages designers perceive when utilizing our model as an autocompletion plug-in.
