Semantic-Driven Initial Image Construction for Guided Image Synthesis in Diffusion Model

Jiafeng Mao, Xueting Wang, Kiyoharu Aizawa

Abstract

Text-to-image diffusion models allow users control over the content of generated images. Still, text-to-image generation occasionally leads to generation failure requiring users to generate dozens of images under the same text prompt before they obtain a satisfying result. We formulate the lottery ticket hypothesis in denoising: randomly initialized Gaussian noise images contain special pixel blocks (winning tickets) that naturally tend to be denoised into specific content independently. The generation failure in standard text-to-image synthesis is caused by the gap between optimal and actual spatial distribution of winning tickets in initial noisy images. To this end, we implement semantic-driven initial image construction creating initial noise from known winning tickets for each concept mentioned in the prompt. We conduct a series of experiments that verify the properties of winning tickets and demonstrate their generalizability across images and prompts. Our results show that aggregating winning tickets into the initial noise image effectively induce the model to generate the specified object at the corresponding location.

Introduction

Text-to-image diffusion models like Stable Diffusion have achieved remarkable success in generating high-quality images from natural language descriptions. However, these models often struggle with spatial control, frequently failing to place objects according to user-specified layouts. This "generation failure" typically forces users to repeatedly sample from the same prompt until a desirable result is achieved by chance.

The authors of this study propose that this stochasticity is not purely random. Instead, they hypothesize that the initial Gaussian noise contains "winning tickets"—specific pixel configurations that are inherently predisposed to evolve into particular semantic concepts during the denoising process. By identifying and strategically placing these tickets, they introduce a training-free method for precise layout control.

The Lottery Ticket Hypothesis in Denoising

Inspired by the Lottery Ticket Hypothesis in neural network pruning, the researchers suggest that large fields of random noise contain small "sub-noises" that can independently reach high-fidelity generation of specific objects. Generation failure occurs when the spatial distribution of these winning tickets in the initial noise does not align with the user's intended layout.

Overview of the Semantic-Driven Initialization (SemI) framework, illustrating the pipeline from identifying winning tickets to generating the final image based on a user prompt and layout.

Methodology: Semantic-Driven Initialization (SemI)

The proposed SemI framework consists of three main stages: identifying, collecting, and transplanting winning tickets to construct a semantically-informed initial noise image.

Identifying and Collecting Winning Tickets

To identify these tickets, the authors analyze the cross-attention maps from the initial denoising step of a pre-trained Stable Diffusion model. By partitioning a $64 \times 64$ noise image into $4 \times 4$ pixel blocks, they identify which blocks exhibit high attention scores for specific tokens in a prompt. By running the model across a wide variety of contrastive prompts and random seeds, they build a comprehensive database of winning tickets for various categories (e.g., "dog," "car," "chair").

The process of identifying winning tickets using cross-attention maps and building a large-scale collection through prompt enumeration and noise iteration.

Semantic-Driven Initial Image Construction

When a user provides a prompt and a desired layout (via bounding boxes), SemI bypasses standard random initialization. Instead, it selects appropriate winning tickets from the database and "transplants" them into the specified regions of the initial noise image. The remaining areas are filled with standard Gaussian noise. The diffusion model then proceeds with its standard denoising process, starting from this "pre-arranged" noise.

Experimental Results

The method was evaluated using Stable Diffusion v1.4 on the MS COCO 2017 dataset, comparing SemI against standard Stable Diffusion (SD) and other training-free layout control methods.

  • Quantitative Performance: SemI significantly outperformed the SD baseline in layout accuracy. On MS COCO, it achieved a higher Success Rate ($R_{suc}$) and Intersection over Union (IoU). When integrated with other guidance techniques, SemI improved the IoU from 0.19 (baseline SD) to 0.32.
  • Qualitative Control: The framework demonstrates precise spatial control for multiple objects and background elements. It can reliably place specific elements like a "lake" or "sky" in designated regions, a task that often challenges standard diffusion models.
  • Robustness and Invariance: Experiments confirmed that winning tickets are invariant; a noise block identified as a "dog" ticket remains effective even when moved to different locations or used with modified prompts (e.g., "a running dog").

Discussion and Limitations

While SemI provides a powerful training-free method for layout control, it faces some challenges:

  • Property Overlap: Tickets are currently selected by category name. A ticket extracted from a "red bus" might retain color attributes, potentially conflicting with a prompt for a "blue bus."
  • Gaussian Deviation: As the initial noise becomes a collage of tickets, it deviates from a pure Gaussian distribution. While the model is generally tolerant, excessive transplantation can occasionally lead to unnatural artifacts or lower image quality in the background.
  • Scale Constraints: The method is limited by the $4 \times 4$ block size, making it less effective for extremely small objects.

Conclusion

Semantic-Driven Initialization reveals that the "randomness" of initial noise in diffusion models is a rich source of latent structure. By treating noise as a collection of potential "winning tickets," SemI offers a robust mechanism for precise spatial control in image synthesis without the need for model fine-tuning or complex guidance.

Summary updated

BibTeX
@inproceedings{mao2024semantic,
  author = {Jiafeng Mao and Xueting Wang and Kiyoharu Aizawa},
  title = {{Semantic-Driven Initial Image Construction for Guided Image Synthesis in Diffusion Model}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72904-1\_6},
}
Figure