Skip to main content
QUICK REVIEW

[Paper Review] Auto Completion of User Interface Layout Design Using Transformer-Based Tree Decoders

Yang Li, Julien Amelot|arXiv (Cornell University)|Jan 14, 2020
Video Analysis and SummarizationComputer Science25 references11 citations
TL;DR

This paper proposes a Transformer-based tree decoder framework for auto-completing graphical user interface (UI) layout designs from partial tree-structured inputs. It introduces two novel architectures—Pointer and Recursive Transformer decoders—that generate hierarchical UI elements with correct spatial placement and structure, achieving state-of-the-art performance on a public Android UI dataset with F1 scores up to 91.8% and edit distances as low as 11.79 under breadth-first traversal settings.

ABSTRACT

It has been of increasing interest in the field to develop automatic machineries to facilitate the design process. In this paper, we focus on assisting graphical user interface (UI) layout design, a crucial task in app development. Given a partial layout, which a designer has entered, our model learns to complete the layout by predicting the remaining UI elements with a correct position and dimension as well as the hierarchical structures. Such automation will significantly ease the effort of UI designers and developers. While we focus on interface layout prediction, our model can be generally applicable for other layout prediction problems that involve tree structures and 2-dimensional placements. Particularly, we design two versions of Transformer-based tree decoders: Pointer and Recursive Transformer, and experiment with these models on a public dataset. We also propose several metrics for measuring the accuracy of tree prediction and ground these metrics in the domain of user experience. These contribute a new task and methods to deep learning research.

Motivation & Objective

  • To automate UI layout design by predicting missing UI elements and their hierarchical structure from a partial layout.
  • To address the challenge of 2D spatial placement and tree-structured generation in layout completion using deep learning.
  • To design new evaluation metrics grounded in user experience for measuring layout prediction quality.
  • To explore the effectiveness of Transformer-based decoders in structural, 2D layout generation tasks.
  • To demonstrate generalizability to other tree-structured layout problems beyond UI design.

Proposed method

  • Proposes two Transformer-based tree decoder architectures: Pointer Transformer and Recursive Transformer, for autoregressive layout generation.
  • Uses self-attention mechanisms to model hierarchical relationships and spatial dependencies in UI layouts.
  • Treats UI element coordinates as categorical variables (one-hot) rather than continuous values, improving training stability and performance.
  • Employs a tree-structured decoding process that generates nodes in a top-down or breadth-first order, depending on the traversal strategy.
  • Introduces three evaluation metrics: F1 score for parent-child pair prediction, next-item accuracy, and edit distance for structural and spatial fidelity.
  • Trains and evaluates models on a public dataset of over 50,000 Android UI layouts with varying degrees of partial input (10%, 50%, 80%).

Experimental results

Research questions

  • RQ1Can Transformer-based tree decoders effectively complete partial UI layouts with accurate spatial placement and hierarchical structure?
  • RQ2How do different decoding strategies—Pointer vs. Recursive—perform under breadth-first vs. depth-first traversal orders?
  • RQ3To what extent do the proposed evaluation metrics correlate with user experience and layout quality?
  • RQ4Why does treating coordinates as categorical variables outperform continuous regression in this task?
  • RQ5Can the model generalize to other layout prediction problems involving tree-structured, 2D placements?

Key findings

  • The Recursive Transformer decoder outperforms the Pointer Transformer and baseline models on most metrics, especially under breadth-first traversal, achieving an F1 score of 91.8% and edit distance of 11.79 at 80% partial layout in breadth-first settings.
  • The Recursive Transformer maintains strong performance even without direct access to all previously decoded nodes, indicating effective hierarchical reasoning.
  • Pointer Transformer performs better in depth-first traversal due to its access to all partial tree nodes, but still underperforms Recursive Transformer in next-item prediction.
  • When metrics are relaxed to focus only on structure and semantics (ignoring exact coordinates), all models achieve over 90% next-item accuracy at 80% partial layout, with Recursive Transformer leading at 95.3%.
  • Treating coordinates as one-hot categorical values yields significantly better results than continuous regression, suggesting that discrete tokenization better captures layout semantics.
  • The model struggles with precise bounding box prediction, indicating that spatial accuracy remains a challenge despite strong structural performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.