Title: Towards Understanding the Working Mechanism of Text-to-Image Diffusion Model
Venue: NeurIPS 2024
Accepted: yes
Keywords: text-to-image generation; working mechanism;
Abstract: Recently, the strong latent Diffusion Probabilistic Model (DPM) has been applied to high-quality Text-to-Image (T2I) generation (e.g., Stable Diffusion), by injecting the encoded target text prompt into the gradually denoised diffusion image generator. Despite the success of DPM in practice, the mechanism behind it remains to be explored. To fill this blank, we begin by examining the intermediate statuses during the gradual denoising generation process in DPM. The empirical observations indicate, the shape of image is reconstructed after the first few denoising steps, and then the image is filled with details (e.g., texture). The phenomenon is because the low-frequency signal (shape relevant) of the noisy image is not corrupted until the final stage in the forward process (initial stage of generation) of adding noise in DPM. Inspired by the observations, we proceed to explore the influence of each token in the text prompt during the two stages. After a series of experiments of T2I generations conditioned on a set of text prompts. We conclude that in the earlier generation stage, the image is mostly decided by the special token [\texttt{EOS}] in the text prompt, and the information in the text prompt is already conveyed in this stage. After that, the diffusion model completes the details of generated images by information from themselves. Finally, we propose to apply this observation to accelerate the process of T2I generation by properly removing text guidance, which finally accelerates the sampling up to 25\%+.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper aims to understand two mechanisms of diffusion models. First, the denoising process is analyzed, and it is found that shapes in an image are constructed in the beginning of the denoising process, while textures and details are filled in later. This empirical observation is justified with a mathematical frequency analysis. Second, the role of text conditioning is analyzed and it is found that the [EOS] token, which captures global information of the prompt, is relied on more heavily by the diffusion model. It is also observed that the text prompt is utilized more in the earlier stages of the denoising process. This finding is utilized to speed up diffusion sampling by ~25% while maintaining the image quality and prompt alignment. This is done by only injecting conditional information in the beginning of the denoising process.\n\nSTRENGTHS:\n* Although the finding that shape is constructed in the first few timesteps has been observed many times before, it is nice to have a more principled study with various experiments and mathematical justification. \n* The finding that the special [EOS] token is the most relied upon during generation rather than the prompt tokens is an interesting finding that can be used in later studies. For instance, improving prompt alignment, attribute binding, etc. \n* The observation that the text prompt is used more in the early denoising process lends itself to a practical application of speeding up inference. \n* Multiple architectures and samplers are used in this study, suggesting the generality of these findings.\n\nWEAKNESSES:\n* As mentioned in the Strengths section above, the findings are not completely surprising (for instance, the shape reconstruction or reliance on text in the early denoising steps, then detail-filling in the later steps). However, this work takes a principled approach in studying these phenomena which have largely been used in diffusion application literature (e.g., [1, 2])\n* Limited to no mention of broader impact or limitations. Furthermore, the Conclusion section is just a summary of the paper but does not discuss the implications of these findings. \n\n[1] @inproceedings{mengsdedit,\n  title={SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equations},\n  author={Meng, Chenlin and He, Yutong and Song, Yang and Song, Jiaming and Wu, Jiajun and Zhu, Jun-Yan and Ermon, Stefano},\n  booktitle={International Conference on Learning Representations}\n}\n[2] @inproceedings{hertzprompt,\n  title={Prompt-to-Prompt Image Editing with Cross-Attention Control},\n  author={Hertz, Amir and Mokady, Ron and Tenenbaum, Jay and Aberman, Kfir and Pritch, Yael and Cohen-or, Daniel},\n  booktitle={International Conference on Learning Representations}\n}\n\nQUESTIONS:\n* What are some of the limitations and implications of these findings?\n* I did not take this into account for my review, but there are many typos in the text and figures which can be corrected for the next version.\n* This (https://arxiv.org/pdf/2404.07724) is a concurrent work, so it is not expected for this paper to compare against it. Their finding is applying guidance in the middle denoising steps improves image quality and distribution coverage. I am curious to hear how the findings this paper being reviewed can be connected to the phenomena observed there. It might be something to keep in mind for the next version, although it will not be used in assessing this paper.\n\nLIMITATIONS:\nAlthough there are no societal implications, a discussion of limitations is lacking.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-06"}

comments: SUMMARY:
This paper explores the mechanism in the text-to-image diffusion model, including the generation order of image components, the influence of various tokens, and the steps in which tokens work.
These observations bring some insight into understanding the diffusion model.
Besides, the authors also design a sampling strategy that accelerates the sampling of the denoising process by 25%+.

STRENGTHS:
1. The conclusion of the [EOS] token is interesting and has been rarely investigated in previous papers.
2. The analytical experiments in this article are sufficient and strongly support its conclusion.
3. The writing expression of this article is very clear.

WEAKNESSES:
1. The other conclusions in this paper, e.g., shape first then details, have been discussed in previous works.
2. The sampling strategy is more like a sample trick than a method.

QUESTIONS:
1. Is the proposed sampling strategy still feasible for generating tasks that require preserving specific details, e.g., subject-driven generation?

LIMITATIONS:
Suggest the author to discuss the applicability and limitations of the proposed sampling scheme.
For example, can it be applied to human face generation without losing human identity?
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 4
DATE: 2024-07-11

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper investigates the denoising process in DPM, identifying that the overall shape of the image is formed early in the process while details are added later. It further examines the influence of different text prompt tokens, finding that the end-of-sequence token [EOS] plays a crucial role in shaping the initial stages of image generation. The authors propose a method to speed up the generation process by removing text guidance after the initial stages, achieving a significant reduction in computational cost.\n\nSTRENGTHS:\n- Comprehensive analysis of the denoising process stages in DPM.\n- Detailed exploration of the influence of different tokens in the text prompt.\n- Practical application of findings to accelerate the T2I generation process.\n- Empirical and theoretical support for the proposed acceleration method.\n\nWEAKNESSES:\n- The paper might lack clarity in explaining the theoretical aspects of frequency signal analysis.\n- Limited exploration of potential biases introduced by the dominance of the [EOS] token.\n- The study may benefit from a broader range of experiments to validate the generalizability of the findings.\n\nQUESTIONS:\n- Can you provide a more detailed explanation of the theoretical aspects of frequency signal analysis used in your study? Specifically, how do the low and high-frequency components influence the denoising process? Including more accessible explanations or visual aids to illustrate the frequency signal analysis could help readers better understand this aspect of your work.\n- Your experiments are primarily based on a specific set of text prompts and Stable Diffusion model versions. How do you ensure that your findings generalize across different models and broader text prompt sets?\n- The paper uses various metrics like CLIPScore, BLIP-VQA, and MiniGPT4-CoT for evaluation. Can you provide a more detailed explanation of why these particular metrics were chosen and how they comprehensively assess the text-image alignment?\n\nLIMITATIONS:\n- Authors should discuss the robustness of their findings and the need for further experiments across various models and more complex or diverse text prompts to validate their conclusions.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-17"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper study how the EOS token plays a role in the generation process of diffusion model. In particular, this paper finds that diffusion models tend to first generate low frequency part of the image at the beginning of the generation process, then gradually add high frequency signal to it. Experiments show that the low frequency signal is conditional on the EOS token while the high frequency signal can be generated without text guidance. In combined with the aforementioned observation, this paper proposes to remove $\\epsilon_\\theta$ in classifier-free guidance once the low frequency signal has been generation to improve generation efficiency.\n\nSTRENGTHS:\n- This paper offers a new perspective for understanding the role of textual condition in diffusion models.  By exploring how the EOS influence the generation process of diffusion model, this paper argues that the conditional part $\\epsilon_\\theta$ in classifier-free guidance (CFG) might be unnecessary after certain denoising step $t_w$.  \n- Most experiments are inspirational and interesting. By swapping the EOS token and the sentence body, it demonstrates that diffusion models rely on the EOS token to synthesize low frequency part of the image. \n- This paper explains the tendency of generating image from low-to-high frequency in diffusion models.\n\nWEAKNESSES:\n- It is not clear that how the \"computational cost\" is defined in this paper. If the computational cost is GPU VRAM, then the claimed efficiency improvement might be invalid, as the required GPU VRAM for computing $\\epsilon_\\theta(x_t, C)$ or $\\epsilon_\\theta(x_t, \\emptyset )$\n is unchanged. \n\n- This paper mainly focus on the role of EOS token in T2I diffusion models while neglecting the SOS token. Despite the weight of SOS token is significantly higher than SEM and EOS token (see Figure 3). However, the authoer(s) claims that the SOS carries no information due to the autoregressive nature CLIP text encoder.  Since this claim is not yet supported by other works, the author(s) should have conducted experiments to support this claim, as there is a chance that EOS and SOS tokens altogether influence the generation process.\n\nQUESTIONS:\n- Please clarify how the computation cost is defined in this paper and how the efficiency gain is computed.\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-21"}