Adversarial Supervision Makes Layout-to-Image Diffusion Models Thrive

Yumeng Li, Margret Keuper, Dan Zhang, Anna Khoreva

Abstract

Layout-to-Image (L2I) synthesis requires models to generate photorealistic images that strictly adhere to per-pixel semantic label maps. While large-scale diffusion models have revolutionized text-to-image generation, they often struggle to balance precise spatial control with text-based editability. This paper introduces the Adversarial Layout-to-Image Diffusion Model (ALDM), a novel training framework that employs adversarial supervision and a multistep unrolling strategy. By utilizing a trainable segmentation-based discriminator to provide pixel-level feedback, ALDM ensures high layout faithfulness while maintaining the model's responsiveness to complex text prompts. Our results demonstrate significant improvements in layout alignment (mIoU) and the utility of generated data for downstream perception tasks.

Introduction

Layout-to-Image (L2I) synthesis is a critical task in computer vision, aiming to generate images based on a specific semantic map (e.g., defining the exact boundaries of cars, trees, and buildings). While models like Stable Diffusion excel at generating high-quality images from text, adapting them for layout control typically results in a "faithfulness vs. editability" trade-off.

Existing methods generally fall into two categories: fine-tuning the entire model on layout datasets, which often leads to "catastrophic forgetting" of text-to-image knowledge, or using lightweight adapters like ControlNet, which may preserve editability but frequently fail to follow the layout strictly. The primary bottleneck is the standard Mean Squared Error (MSE) loss used in diffusion training, which provides only implicit guidance and lacks a mechanism to ensure that denoised pixels represent the intended semantic classes.

The ALDM Framework

To address these limitations, ALDM introduces two primary innovations to the diffusion training pipeline: Adversarial Supervision and Multistep Unrolling.

Adversarial Supervision

ALDM integrates a trainable, segmentation-based discriminator (utilizing the UperNet architecture) directly into the training loop. During a training step, the diffusion model generates a denoised estimate of the clean image, denoted as $\hat{x}_0$. This estimate is passed to the discriminator, which is tasked with a multi-class classification problem. For real images, the discriminator must classify pixels into the $N$ ground-truth semantic classes. For generated images, it must classify pixels into an additional $(N+1)$-th "fake" class. This adversarial game forces the generator to produce pixels that the discriminator recognizes as the correct semantic class to avoid the "fake" label, leading to much tighter layout alignment.

Multistep Unrolling

Standard diffusion training typically optimizes for a single random timestep $t$. However, inference involves an iterative process. ALDM adopts a "multistep unrolling" strategy, inspired by Model Predictive Control (MPC) in robotics. The model unrolls the denoising process for $K$ steps (typically $K=9$) during training. This encourages the model to maintain layout consistency across a time horizon rather than just a single point in time. To mitigate the computational overhead of this iterative process, the authors employ a gradient accumulation strategy, allowing for the benefits of multistep training within reasonable memory constraints.

Experimental Evaluation

The model was evaluated on several benchmark datasets, including Cityscapes (urban scenes), ADE20K (complex indoor/outdoor environments), and ACDC (adverse weather conditions).

Quantitative Performance

On the Cityscapes dataset, ALDM significantly improved the layout alignment of a ControlNet backbone, raising the mIoU from 55.2 to 63.9. Crucially, this improvement did not come at the cost of text responsiveness. Using the TIFA (Text-to-Image Faithfulness) metric, ALDM maintained high scores even when subjected to complex prompts like "Van Gogh style" or "burning van," whereas traditional fine-tuning methods often saw these scores collapse.

Practical Utility: Synthetic Data for Perception

A key highlight of the research is the "practical utility" of the generated images. The authors used ALDM to generate synthetic versions of Cityscapes layouts under adverse conditions (fog, snow, rain). When a standard segmentation model (HRNet) was trained on this ALDM-augmented data, its performance on the unseen ACDC dataset improved by approximately 12 mIoU points compared to the baseline. This suggests that ALDM-generated images are not only visually pleasing but also semantically accurate enough to serve as effective training data for other vision models.

Discussion and Limitations

Despite its success, ALDM faces challenges common to the underlying Stable Diffusion architecture, such as "attribute leakage." For instance, changing the color of a specific car in a prompt may occasionally cause that color to leak into the background or adjacent objects. Additionally, while layout alignment is significantly improved, it is not yet 100% perfect in extremely rare or highly complex scenarios.

Conclusion

ALDM demonstrates that adversarial supervision is a powerful tool for bridging the gap between layout faithfulness and text-based editability in diffusion models. By forcing the model to satisfy a trainable discriminator and optimizing over multiple denoising steps, ALDM produces images that are both highly controllable and useful for downstream computer vision tasks. Future work may explore more sophisticated loss weighting across timesteps and the integration of human feedback to further refine alignment.

Summary updated

BibTeX
@inproceedings{li2024adversarial,
  author = {Yumeng Li and Margret Keuper and Dan Zhang and Anna Khoreva},
  title = {{Adversarial Supervision Makes Layout-to-Image Diffusion Models Thrive}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=EJPIzl7mgc},
}
Figure