Introduction
Content-aware layout generation is the specialized task of automatically arranging design elements—such as text, logos, and decorative graphics—onto a background image. The goal is to create professional, aesthetically pleasing compositions that respect the underlying visual content, ensuring that critical features like faces or product details are not obscured.
While Multi-modal Large Language Models (MLLMs) have shown promise in this area, they frequently suffer from two primary types of "hallucinations" in design:
- Structural Issues: Models often fail to align elements correctly, miss parallel relationships, or create messy overlaps between text blocks.
- Diversity Issues: Due to biases in training data toward simple, "safe" layouts, AI tends to produce repetitive and uninspired designs regardless of the input image's complexity.
ReLayout addresses these challenges by shifting the paradigm from simple coordinate prediction to structural relation reasoning.
Methodology
ReLayout introduces two core innovations to the MLLM pipeline to improve both the logic and the variety of generated layouts.
1. Layout Relation-CoT (Chain-of-Thought)
Traditional models often attempt to predict pixel coordinates directly. ReLayout instead employs a hierarchical Chain-of-Thought approach that forces the model to define the design's logic using an HTML-like structure before committing to coordinates. This process involves:
- Region Decomposition: Breaking the layout into nested "regions" (rows or columns).
- Saliency Awareness: Explicitly identifying "salient blocks" in the background that must remain visible.
- Margin Attributes: Introducing explicit parameters for spacing and alignment.
By treating a layout as a recursive tree—similar to CSS Flexbox in web development—the model learns to maintain alignment and symmetry naturally.
2. Layout Prototype Rebalance Sampler
To combat the "boring layout" problem, the researchers developed a sampler that analyzes training data across three dimensions: saliency, region structure, and element types. By clustering layouts into "prototypes" and using weighted sampling, the model is exposed to rare and complex design styles during training, preventing it from merely memorizing the most frequent, simple patterns.
Evaluation and Key Results
The framework was evaluated on the PKU and CGL datasets, which the authors enriched with high-quality spatial relation annotations. ReLayout was compared against state-of-the-art (SOTA) models like PosterLlama.
- Quantitative Performance: On the PKU dataset, ReLayout achieved a significantly lower Overlap (Ove) score (0.0086 vs. PosterLlama's 0.0211) and superior Frechet Distance (FD), indicating that its outputs are much closer to professional human designs.
- Qualitative Preference: In user studies involving professional designers, ReLayout's designs were preferred 66.3% of the time, whereas PosterLlama was preferred only 12.0% of the time.
- Explainability: Because the model outputs its reasoning (the Relation-CoT) before the final coordinates, the system is more interpretable, allowing designers to understand the logic behind a specific arrangement.
Conclusion and Future Work
ReLayout demonstrates that teaching MLLMs to "reason" about spatial relationships significantly improves the quality and diversity of automated graphic design. While the model sets a new benchmark for structural integrity, future work remains in developing better automated metrics for aesthetic "taste" and exploring Reinforcement Learning (RL) to further align model outputs with human artistic preferences.
Summary updated