GUIGAN: Learning to Generate GUI Designs Using Generative Adversarial Networks

Tianming Zhao, Chunyang Chen, Yuanning Liu, Xiaodong Zhu

Abstract

Designing high-quality Graphical User Interfaces (GUIs) is a complex and time-consuming task, particularly for developers without formal UI/UX training. This paper presents GUIGAN, a novel Generative Adversarial Network (GAN) that approaches GUI generation as a sequence composition task. By treating UI components as discrete "words" and modeling both visual style compatibility and structural layout, GUIGAN generates realistic, brand-new GUI designs. Experimental results demonstrate that GUIGAN significantly outperforms traditional pixel-based generation methods in both quantitative metrics and human evaluations.

Introduction

Software developers often find themselves responsible for designing application interfaces, a task that typically requires specialized design expertise. To bridge this gap, developers frequently rely on existing designs for inspiration, which can lead to intellectual property concerns or the use of outdated trends.

While deep learning has revolutionized image generation, standard pixel-based GANs struggle with GUIs. Because GUIs are highly structured compositions of discrete elements like buttons and text fields, pixel-level models often produce blurry, structurally incoherent results. GUIGAN addresses this by rethinking the generation process as a sequence of structured components rather than a grid of pixels.

Methodology

The Generation Pipeline

GUIGAN formulates GUI creation as a sequence generation task, similar to natural language processing. The process begins with the segmentation of real Android GUIs into "subtrees"—reusable blocks of UI components. These subtrees form a vocabulary from which the model can sample to build new designs.

The end-to-end pipeline of GUIGAN, from GUI segmentation to component recombination.

Architecture and Multi-Loss Fusion

The system is built upon a SeqGAN architecture, utilizing an LSTM as the generator and a CNN as the discriminator. To ensure the generated sequences are both aesthetically harmonious and logically structured, the authors introduce a multi-loss fusion approach:

  1. Style Compatibility ($Loss_s$): A Siamese CNN learns style embeddings from existing applications. The generator is rewarded for selecting subtrees that maintain high visual homogeneity, ensuring the final design looks cohesive.
  2. Structure Rationality ($Loss_c$): The model employs Minimum Edit Distance (MED) to compare generated component sequences against real-world structural patterns, penalizing layouts that lack logical flow.
Detailed architecture of the GUIGAN adversarial training framework, highlighting the LSTM generator and the dual style/structure constraints.

Datasets and Evaluation

The model was trained using a refined subset of the Rico dataset, a large-scale repository of Android app designs. The authors filtered the data to remove non-standard interfaces such as games, ads, and loading screens, resulting in a final corpus of 12,230 screenshots from 1,609 apps. This data was decomposed into over 41,000 reusable component subtrees.

Evaluation focused on two primary areas:

  • Category-specific generation: Testing the model's ability to create designs for specific niches like Shopping or News.
  • Company-specific design: Assessing the model's capacity to replicate the unique design languages of major brands.

Key Results and Insights

Quantitative Performance

GUIGAN demonstrated substantial improvements over state-of-the-art baselines like WGAN-GP and FaceOff. In category-specific tasks, the model achieved a 33.63% improvement in Fréchet Inception Distance (FID) and an 11.33% improvement in 1-Nearest Neighbor Accuracy (1-NNA). These metrics confirm that the generated GUIs are both diverse and closely resemble real-world distributions.

Qualitative User Study

In a study involving professional Android developers, GUIGAN consistently outscored baselines by approximately 30% across metrics for aesthetics, color harmony, and structural rationality. Evaluators noted that the model successfully captured functional UI patterns—such as the correct placement of navigation bars—purely through structural observation, despite having no explicit functional training.

Limitations and Future Work

While GUIGAN represents a significant step forward, it occasionally produces designs with overlapping components or awkward padding. Future work will focus on implementing post-processing rules to enforce strict layout constraints (e.g., snapping menu bars to screen edges). Additionally, the authors aim to bridge the gap between design and development by connecting GUIGAN's output to automated GUI-to-code generation tools, enabling a seamless transition from generated inspiration to deployable software.

Summary updated

BibTeX
@inproceedings{zhao2021guigan,
  author = {Tianming Zhao and Chunyang Chen and Yuanning Liu and Xiaodong Zhu},
  title = {{GUIGAN: Learning to Generate GUI Designs Using Generative Adversarial Networks}},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00074},
}
Figure