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

LayoutDM: Discrete Diffusion Model for Controllable Layout Generation

Naoto Inoue, Kotaro Kikuchi, Edgar Simo-Serra, Mayu Otani, Kota Yamaguchi

Abstract

Graphic layout generation requires balancing structural realism with flexible user constraints. We present LayoutDM, a unified generative framework that treats layout design as a discrete diffusion process. By modeling element categories and quantized coordinates as discrete tokens, LayoutDM avoids the limitations of autoregressive dependency chains. Our approach incorporates modality-wise corruption and logit adjustment to enable precise control over spatial relationships and aesthetic properties. Experimental results on the Rico and PubLayNet datasets demonstrate that LayoutDM achieves state-of-the-art performance in layout synthesis, completion, and refinement.

Introduction

Creating visually pleasing graphic layouts—for mobile apps, documents, or advertisements—is a complex task involving structured relationships between diverse elements. Current AI approaches generally fall into two categories: autoregressive models, which predict elements sequentially and suffer from immutable dependency chains, and non-autoregressive models, which often struggle with variable element counts or complex user constraints.

LayoutDM addresses these challenges by framing layout generation as a Discrete State-Space Diffusion process. This allows a single, flexible model to perform high-quality layout synthesis, completion, and refinement, outperforming specialized state-of-the-art baselines.

Methodology

LayoutDM works with discrete tokens representing element categories and quantized coordinates ($x, y, w, h$). Unlike standard diffusion models that add Gaussian noise to continuous values, LayoutDM progressively "denoises" a corrupted set of discrete tokens until a final layout is reached.

Overview of LayoutDM's diffusion process and supported tasks.

Key Technical Innovations

  • Modality-wise Discrete Diffusion: The model treats different attributes (category vs. geometry) as disjoint sets. This prevents the corruption process from mixing semantic labels with spatial values, preserving structural integrity during training.
  • Logit Adjustment for Control: To handle "weak constraints" (e.g., "the title must be at the top"), the authors inject aesthetic or relational loss functions directly into the inference process. By adjusting the "logits" (internal probability scores) during each denoising step, they steer the generation toward desired outcomes without retraining.
  • Adaptive Quantization: Instead of a uniform grid, LayoutDM uses KMeans clustering to discretize coordinates, capturing the natural alignment patterns found in professional designs.
  • Variable Length Handling: By utilizing a special [PAD] token, the diffusion process naturally accommodates layouts with varying numbers of elements (up to 25).

Experiments and Results

The model was evaluated on two industry-standard benchmarks: Rico (mobile UI designs) and PubLayNet (document layouts).

Qualitative comparison of LayoutDM against baselines on Rico and PubLayNet.

Performance Highlights

  • State-of-the-Art Realism: LayoutDM achieved the lowest FID scores on most tasks compared to baselines like LayoutTrans, BLT, and BART, indicating superior layout quality and realism.
  • Versatility: A single pre-trained model successfully performs unconditional generation, completion (filling in missing parts), refinement (fixing noisy layouts), and relationship-based generation (e.g., "A is above B").
  • Efficiency: While slower than some GAN-based models, LayoutDM generates layouts in under 0.5 seconds—significantly faster than previous optimization-based methods (~4.0s).

Discussion

A core insight of this work is that layouts are inherently discrete; elements are categorized, and their positions often "snap" to a grid. Modeling this as a discrete state-space proves more effective than continuous latent spaces. Furthermore, by using a bidirectional Transformer, LayoutDM avoids the "fixed-order" problem of autoregressive models, allowing it to refine any part of the layout at any time, mimicking a human designer's workflow.

Limitations and Future Work

Despite its success, LayoutDM does not perfectly eliminate element overlaps, a common aesthetic violation. Future work could extend the model to handle additional design properties such as color, font style, or actual image/text content. Additionally, the authors note the ethical responsibility of releasing such tools, as they could potentially be used to automate the creation of deceptive web content at scale.

Summary updated

BibTeX
@inproceedings{inoue2023layoutdm,
  author = {Naoto Inoue and Kotaro Kikuchi and Edgar Simo-Serra and Mayu Otani and Kota Yamaguchi},
  title = {{LayoutDM: Discrete Diffusion Model for Controllable Layout Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure