Neural Design Network: Graphic Layout Generation with Constraints

Hsin-Ying Lee, Weilong Yang, Lu Jiang, Madison Le, Irfan Essa, Haifeng Gong, Ming-Hsuan Yang

Abstract

Graphic design is essential for visual communication with layouts being fundamental to composing attractive designs. Layout generation differs from pixel-level image synthesis and is unique in terms of the requirement of mutual relations among the desired components. We propose a method for design layout generation that can satisfy user-specified constraints. The proposed neural design network (NDN) consists of three modules. The first module predicts a graph with complete relations from a graph with user-specified relations. The second module generates a layout from the predicted graph. Finally, the third module fine-tunes the predicted layout. Quantitative and qualitative experiments demonstrate that the generated layouts are visually similar to real design layouts. We also construct real designs based on predicted layouts for a better understanding of the visual quality. Finally, we demonstrate a practical application on layout recommendation.

Introduction

Graphic design is a high-stakes balancing act of spatial relationships. While generative AI has made massive strides in creating realistic images, generating layouts—the specific placement and sizing of text, images, and buttons—remains difficult. Existing approaches often fall into two camps: rigid, rule-based templates that lack variety, or pixel-level generative models that fail to respect the strict alignment and aesthetic rules humans expect. A few pixels of misalignment in a professional ad can make it look "broken." The Neural Design Network (NDN) addresses the challenge of generating diverse, high-quality layouts that satisfy specific user requirements while maintaining professional aesthetic standards.

Methodology

The NDN framework represents a layout as a directional graph where nodes are components and edges represent spatial or size relationships. The process is divided into three specialized modules:

  1. Relation Prediction: Users rarely specify every single relationship between elements. This module uses a Conditional Variational Auto-encoder (CVAE) and Graph Convolutional Networks (GCNs) to take a "partial" graph and predict missing edges (e.g., inferring that if A is above B, and B is above C, then A is also above C).
  2. Layout Generation: This module iteratively predicts the bounding boxes $(x, y, width, height)$ for each component. It uses a GCN to "read" the completed relationship graph and places elements one by one, ensuring each new placement is aware of the elements already on the canvas.
  3. Refinement: Because the iterative process can lead to small cumulative errors, a final GCN-based module fine-tunes the bounding boxes, improving alignment and reducing overlaps.
Overview of the NDN pipeline, showing how design components and user constraints are transformed into generated layouts and final designs.

Datasets and Evaluation

The model was evaluated on three distinct layout domains: magazine pages, Android UI layouts (RICO), and a new benchmark of car-themed banner ads. NDN achieved significantly lower Fréchet Inception Distance (FID) scores across all datasets compared to baselines like LayoutVAE. In constraint consistency tests, the model followed user-specified rules with 95.9% to 98.2% accuracy, proving its reliability as an interactive design tool.

An example of a final graphic design produced using a layout generated by the Neural Design Network.

Discussion

The core insight of NDN is treating design as a graph of relative relationships rather than absolute coordinates. By encoding "grammar" (e.g., "logo is smaller than headline"), the model learns the underlying logic of professional design. However, the model currently lacks "semantic awareness"—it sees bounding boxes but not the content within them. Future work aims to incorporate content-aware generation, where layouts adapt to the visual weight of specific images.

Conclusion

The Neural Design Network provides a robust, graph-based approach to automated layout generation. By combining relation prediction with iterative placement and refinement, it bridges the gap between user intent and professional aesthetic quality.

Summary updated

BibTeX
@inproceedings{lee2020neural,
  author = {Hsin-Ying Lee and Weilong Yang and Lu Jiang and Madison Le and Irfan Essa and Haifeng Gong and Ming-Hsuan Yang},
  title = {{Neural Design Network: Graphic Layout Generation with Constraints}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58580-8\_29},
}
Figure