Abstract
LayoutFormer++ is a unified framework for conditional graphic layout generation that treats design constraints as a sequence-to-sequence translation task. By employing a novel constraint serialization scheme and a constrained decoding strategy involving pruning and backtracking, the model achieves state-of-the-art performance across various layout tasks while maintaining high aesthetic quality.
Introduction
Graphic design is a complex interplay between creative intent and structural rules. When AI systems attempt to generate layouts for mobile applications or document pages, they often struggle with two primary challenges: flexibility and controllability.
Most existing models are specialized for single tasks, such as layout completion or refinement, and fail to handle diverse, overlapping user constraints effectively. Furthermore, prioritizing strict rule adherence often results in low-quality, "robotic" aesthetics. LayoutFormer++ addresses these hurdles by providing a versatile model capable of mastering multiple design tasks simultaneously without sacrificing visual appeal.
Methods
The architecture of LayoutFormer++ rests on two core innovations that transform layout generation into a manageable sequence-to-sequence problem.
Constraint Serialization
Rather than utilizing custom architectures for different constraint types, LayoutFormer++ represents all requirements—including element types, sizes, positions, and spatial relationships (e.g., "A is above B")—as a unified sequence of tokens. This serialization allows the model to leverage standard Transformer encoder-decoder architectures, treating layout generation as a translation from a constraint "language" to a final design.
Decoding Space Restriction
To ensure high controllability during inference, the model employs a sophisticated decoding strategy:
- Constraint Pruning: Options that would violate explicit user rules are filtered out.
- Probability Pruning: Low-probability options that might lead to incoherent or unappealing layouts are removed.
- Backtracking: If the model reaches a state where no valid options remain, it utilizes a backtracking mechanism to revisit and adjust previous steps.
Evaluation and Results
The model was rigorously tested on two industry-standard benchmarks: RICO (66,000+ mobile UI layouts) and PubLayNet (360,000+ document layouts). Evaluation spanned six distinct tasks, ranging from generation based on element types to complex relational design and refinement.
Key findings include:
- Superior Aesthetics: On the RICO dataset for relationship-conditioned generation, LayoutFormer++ achieved a Frechet Inception Distance (FID) of 5.972, significantly outperforming the previous state-of-the-art (8.898).
- Enhanced Rule Adherence: The model drastically reduced constraint violations. In document layout tasks, it achieved a violation rate of 3.9%, compared to 6.66% for the best baseline.
- Unified Versatility: A single model trained on a mixture of all six tasks (the "M" version) outperformed specialized models, demonstrating the power of the unified sequence format.
Conclusion
LayoutFormer++ demonstrates that treating layout design as a language-like serialization problem enables both high flexibility and strict controllability. By guiding the search for valid solutions using learned probability distributions, the model bridges the gap between rule-following and aesthetic quality. Future work will explore large-scale pretraining and the integration of more natural, "fuzzy" user requirements to further enhance intuitive design capabilities.
Summary updated