NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PLay: Parametrically Conditioned Layout Generation using Latent Diffusion

Chin-Yi Cheng, Forrest Huang, Gang Li, Yang Li

Abstract

PLay is a generative framework that utilizes latent diffusion to transform simple designer-specified "guidelines"—such as grids and alignment lines—into high-quality, functional layouts for user interfaces and documents. By mapping discrete vector graphics into a continuous latent space, the model enables precise, interactive control over design elements. PLay significantly outperforms previous state-of-the-art methods in both automated metrics and human preference studies.

Introduction

Layout design is a cornerstone of visual communication, yet the process of arranging buttons, text, and images remains notoriously tedious. While generative AI has revolutionized image and text creation, layout generation has lagged. Existing models often produce random, unusable layouts or require time-consuming semantic maps. PLay addresses this "missing middle" by leveraging guidelines, a parametric language already familiar to professional designers.

Overview of UI design components, layout representation, and the parametric guidelines used by PLay.

Methodology

The authors propose a two-stage architecture inspired by Latent Diffusion Models (LDMs), specifically tailored for vector graphics.

Stage 1: Vector-to-Latent VAE

Layouts are inherently discrete, consisting of lists of bounding boxes and categories. To make them compatible with diffusion processes, PLay uses a Transformer-based Variational Autoencoder (VAE) to compress these discrete elements into a continuous latent space.

Stage 2: Conditioned Latent Diffusion

In the latent space, a second Transformer-based model learns to "denoise" a layout. This process is conditioned on user-provided guidelines via cross-attention. A guideline sampling schema used during training ensures the model can generate realistic details even from sparse or partial user input.

The two-stage training architecture of PLay, featuring a Vector-to-Latent VAE and a conditioned Latent Diffusion model.

Datasets and Evaluation

The model was benchmarked on three major datasets:

  • CLAY: ~50k complex mobile UI layouts with 24 classes.
  • RICO-Semantic: ~43k UI layouts with 13 classes.
  • PubLayNet: ~330k document design layouts focusing on text, titles, and figures.

Key Insights

  • Guidelines as a Bridge: Guidelines provide more control than text prompts with less effort than full sketches.
  • Latent Space Stability: Mapping to a continuous latent representation first makes the diffusion process more stable and accurate than mapping directly to raw coordinates.
  • Coarse-to-Fine Emergence: The model naturally establishes global structure in the first 150 steps before refining fine alignments and spacing in the final 50 steps.
  • Interactive Editing: Users can "drag" guidelines to update layouts while maintaining design consistency through a feature called "layout inpainting."

Results

PLay achieved state-of-the-art results across the board. Notably, on the challenging CLAY dataset, PLay reached an FID (Fréchet Inception Distance) of 10.59, nearly doubling the performance of the VTN baseline (19.10). In a blind study, 28 professional UI/UX designers overwhelmingly preferred PLay's layouts, noting they felt more realistic and functional.

Conclusion

PLay represents a significant step toward interactive AI-assisted design. While the model occasionally ignores redundant guidelines or generates impractical element sizes, future work will focus on supporting complex vector shapes like curves and improving the model's ability to automatically determine optimal element counts for a given space.

Summary updated

BibTeX
@inproceedings{cheng2023play,
  author = {Chin-Yi Cheng and Forrest Huang and Gang Li and Yang Li},
  title = {{PLay: Parametrically Conditioned Layout Generation using Latent Diffusion}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=2jvwyTm6Pk},
}
Figure