Rethinking The Training And Evaluation of Rich-Context Layout-to-Image Generation

Jiaxin Cheng, Zixu Zhao, Tong He, Tianjun Xiao, Zheng Zhang, Yicong Zhou

Introduction

Layout-to-image (L2I) generation provides a mechanism for spatial control in text-to-image synthesis, allowing users to specify object locations via bounding boxes. While current state-of-the-art models perform adequately when labels are simple (e.g., "a dog"), they often struggle with "rich-context" scenarios where descriptions are lengthy and attribute-dense. This paper identifies two primary bottlenecks in the current landscape: the architectural "squashing" of detailed descriptions into single vectors, which leads to information loss, and the lack of evaluation metrics capable of assessing open-vocabulary, detailed object generation.

The Rich-Context Problem

Standard L2I methods often rely on global self-attention or simple feature fusion to integrate layout information. When a prompt contains complex details—such as "a yellow mug with white dots on it sitting next to a silver and black stainless steel mug"—the nuances are frequently lost during the fusion process. Furthermore, traditional evaluation relies on pre-trained object detectors like YOLO or Faster R-CNN. These are limited to fixed categories and are not designed to verify if a generated object matches a specific, detailed description, making it difficult to measure how well a model follows a complex prompt.

Methodology

To bridge this gap, the authors propose three core technical innovations designed to handle rich-context challenges:

1. Regional Cross-Attention (RCA)

Unlike global self-attention, which can blur boundaries and lose fine-grained details, RCA applies cross-attention specifically within defined layout regions. By treating each bounding box as a localized text-to-image task, the model preserves the integrity of long-form textual descriptions and avoids the information bottleneck inherent in condensing descriptions into single vectors.

2. Region Reorganization

Handling overlapping bounding boxes is a common challenge in L2I. The authors introduce a partitioning strategy that divides the image into mutually exclusive zones:

  • Single-object regions: Areas containing only one object.
  • Overlapping regions: Areas where multiple objects intersect, attending to multiple descriptions simultaneously to prevent "inseparable" or "ghost" objects.
  • Background regions: Areas without specified objects, which attend to a "null" token. This ensures precise conditioning for every pixel and solves the "collision" problem often seen in overlapping areas.

3. Sequenced Grounding Encoding (SGE)

To help the model distinguish between multiple objects that might have similar descriptions, SGE embeds bounding box coordinates directly into the textual token embeddings. This provides the model with explicit spatial indicators for each description.

Data and Evaluation

The research introduces "Rich-Context" versions of standard datasets, specifically RC CC3M and RC COCO. Using a large vision-language model (QWen), the authors generated detailed, sentence-level descriptions for objects within these datasets, resulting in a robust training set of two million images with synthetic "rich" labels.

To accurately measure performance in an open-vocabulary context, the paper proposes two new metrics:

  • Crop CLIP Similarity: Measures the alignment between a generated object (cropped from the image) and its specific text description using CLIP.
  • SAMIoU: Utilizes the Segment Anything Model (SAM) to calculate the Intersection over Union (IoU) between the intended bounding box and the actual generated object, providing a more reliable measure of spatial accuracy than traditional detectors.

Results and Insights

The proposed model, built on an SDXL backbone, demonstrates significant improvements over existing baselines. On the RC CC3M dataset, it achieved a CropCLIP score of 29.42 and a SAMIoU of 86.56, outperforming state-of-the-art models like InstDiff (28.46 / 85.59) and GLIGEN (25.27 / 83.64).

Qualitative analysis confirms that the model successfully captures intricate patterns—such as "horizontal red and white strips" or "white dots"—that baseline models typically ignore or assign to the wrong object. Despite the added complexity of regional attention, the approach remains computationally efficient, maintaining over 60% of the original backbone's throughput in typical multi-object scenarios.

Conclusion and Future Work

By rethinking both the architectural approach to regional attention and the metrics used for evaluation, this work sets a new standard for high-fidelity, layout-controlled image generation. While the method currently requires backbone-specific fine-tuning and relies on synthetic data from models like QWen, it provides a clear path forward for more controllable and detailed AI-driven creativity. Future work may explore training-free versions of these modules or further automation of the rich-labeling process.

Summary updated

BibTeX
@inproceedings{cheng2024rethinking,
  author = {Jiaxin Cheng and Zixu Zhao and Tong He and Tianjun Xiao and Zheng Zhang and Yicong Zhou},
  title = {{Rethinking The Training And Evaluation of Rich-Context Layout-to-Image Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=83e3DPVrFC},
}
Figure