Magnet: We Never Know How Text-to-Image Diffusion Models Work, Until We Learn How Vision-Language Models Function

Text-to-image diffusion models particularly Stable Diffusion, have revolutionized the field of computer vision. However, the synthesis quality often deteriorates when asked to generate images that faithfully represent complex prompts involving multiple attributes and objects. While previous studies suggest that blended text embeddings lead to improper attribute binding, few have explored this in depth. In this work, we critically examine the limitations of the CLIP text encoder in understanding attributes and investigate how this affects diffusion models. We discern a phenomenon of attribute bias in the text space and highlight a contextual issue in padding embeddings that entangle different concepts. We propose \textbf{Magnet}, a novel training-free approach to tackle the attribute binding problem. We introduce positive and negative binding vectors to enhance disentanglement, further with a neighbor strategy to increase accuracy. Extensive experiments show that Magnet significantly improves synthesis quality and binding accuracy with negligible computational cost, enabling the generation of unconventional and unnatural concepts.

Paper

Similar papers

Peer review

Reviewer eb4q6/10 · confidence 5/52024-07-11

Summary

The paper investigates the text embedding representation of text-to-image models in the context of stable diffusion. In particular, the authors find that object features often bind to their commonly associated attributes and propose the Magnet approach that interpolates object features with their designated attributes (positively) and attributes designated with other objects (negatively) specified in the prompt. To determine the strength of the interpolation, the authors leverage the similarity between the EOT and the last PAD token. In addition, for any object word, the authors retrieve their neighboring words based on feature and semantic similarity to further twist the binding vectors, resulting in enhanced concept disentanglement.

Strengths

1. The paper is novel in that it mitigates attribute binding problem from the text-encoder perspective instead of iteratively refining the cross-attention activations that most previous works focused on. This brings both enhanced results and improved efficiency comparatively. 2. The paper's idea is well-motivated with empirical evidence (e.g., using the cosine similarity of PAD and EOT to decide the strength of embedding interpolation by showing that there's more decay in attribute-specific information in later PAD tokens when such attributes are uncommon). 3. The paper is well-written with many design choices are well-justified (e.g., use of human evaluators, strength formula, necessity of both positive and negative binding vectors, etc).

Weaknesses

1. The scope of the work is limited -- it only covers fixing attribute binding problems in text-to-image generation, one downstream task that is commonly encountered in compositional generation [1]. 2. The method is model-specific. While it alleviates text-to-image models with a CLIP-based text encoder to a significant degree, it is unknown if this method also improves text-to-image models that use multiple text encoders [2] or different text encoders [3]. 3. I find the neighbor finding procedure a bit awkward. For example, the authors have to manually gather 614 object nouns as feature neighbors and have to prompt GPT-3 to gather semantic neighbors, limiting the applicability of the work toward a completely automatic pipeline (e.g., without manual curation or LLM-assisted selection). [1] T2I-CompBench: A Comprehensive Benchmark for Open-world Compositional Text-to-image Generation [2] SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis [3] PixArt-α: Fast Training of Diffusion Transformer for Photorealistic Text-to-Image Synthesis

Questions

1. Could authors add reference to Stanza’s dependency parsing module in line 99? 2. Given attribute binding is a core task in compositional text-to-image generation, could authors also discuss more recent and/or relevant in related works, such as [4, 5, 6, 7]? 3. Can authors also evaluate on image quality metrics such as FID [9] and compare with other methods? 4. I wonder if authors could compare Magnet to this concurrent work [8]? As its preprint came out this March, there's no need to experimentally compare and contrast. Some discussions would be appreciated. [4] Training-Free Layout Control with Cross-Attention Guidance [5] TokenCompose: Text-to-Image Diffusion with Token-level Supervision [6] RealCompo: Balancing Realism and Compositionality Improves Text-to-Image Diffusion Models [7] Compositional Visual Generation with Composable Diffusion Models [8] Continuous, Subject-Specific Attribute Control in T2I Models by Identifying Semantic Directions [9] GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium

Rating

6

Confidence

5

Soundness

4

Presentation

3

Contribution

3

Limitations

The paper discussed limitations in missing objects, possibilities of over- and under-manipulation as well as failures in correcting position relationships of the objects with specific examples, which are justifiable given the scope of their method.

Reviewer 5FTv5/10 · confidence 2/52024-07-12

Summary

- This work studies how CLIP text embeddings commonly used in text-to-image diffusion models affect attributes in generated images, and how attributes can be bound to the correct objects during generation. - There is an analysis of the (a) CLIP text encoder and how it interacts with the padding used during T2I diffusion (b) how text embeddings of different nouns relate to different attributes w.r.t to distance (c) how the previous two observations interact during diffusion-based generation. - An algorithmic innovation — Magnet — is proposed. Magnet introduces a binding vector that can be applied to the embedding of a noun-object to bind an attribute to it so that it is faithfully applied during generation. - There is a human evaluation (amongst other evaluations) which shows that Magnet improves attribute-object bindings.

Strengths

- The paper is organized very well. I appreciated the bolding. - The in-depth analysis of what causes the attribute binding problem was interesting and would be widely useful to the community. - Human evaluation shows that attribute alignment is substantially improved by Magnet. I appreciated the use of a human evaluation rather than merely using automated metrics. - Magnet is much cheaper w.r.t runtime and memory usage than competing methods.

Weaknesses

I had great difficulty understanding most of the figures. Even after understanding the method, I cannot understand what Fig 3. is showing and how it relates to the method. Similarly, I found the equations and the notations cumbersome, illegible, and frustrating. I am honestly unsure if I understand the method, because the writing is very unclear (though well organized) and the notation is completely overwrought. One minor weakness is that the analysis is highly specific to the CLIP text encoder. I don't know how much of a weakness this is practically since the CLIP text encoder is a de-facto standard, but I am writing it here anyway for completeness.

Questions

- Have at least one *simple* figure that explains the *intuition* behind the approach. - Rewrite 3.1 to be more clear or at least provide examples of all of the $\mathcal{P}$-terms, I am not even sure the notation is correct here. - More generally, provide a comprehensible explanation of the method so I can confirm my understanding is correct. I'm uncomfortable providing a higher score otherwise, though I would like to, given the amount of work that seems to have gone into the paper.

Rating

5

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

Not applicable.

Reviewer iZtx6/10 · confidence 3/52024-07-13

Summary

The authors propose _Magnet_ to solve the attribute binding problem. (1) Initially, they specifically analyze how the improper binding problem occurs in text embeddings. By comparing embeddings for each token, they demonstrate the attribute bias phenomenon where attributes do not bind well to the object token $c_{object}$ in rare concepts like "blue apple." Additionally, through cosine similarity analysis of padding embeddings, they hypothesize that the latter padding tokens, e.g., $pad_{73}$, tend to represent prior bindings (like red apple) rather than binding the target concept (blue) with the object (apple). (2) Magnet suggests a method to slightly edit the embedding of the object to align with the desired concept, based on these observations. They demonstrate their method's efficacy through ARC-6k and CC-500 datasets.

Strengths

- Writing quality The writing quality is good for understanding the core motivation and method. Analyzing embeddings using cosine similarity is intuitive and effectively demonstrates how attribute bias negatively impacts attribute binding. The flow from the initial analysis to the method is also easy to follow. - Novelty Resolving attribute binding in the text space, as done by Magnet, seems quite plausible and novel. Identifying the limitations of the T2I diffusion model from the VLM model has been necessary but has not been extensively conducted until now.

Weaknesses

Overall, I think it's a good paper. It would be better if the evaluation were a bit more solid. - Evaluation I agree that a user study w.r.t performance comparison as shown in Table 1 is necessary, but for this task, it is necessary to evaluate whether each method achieved binding rather than comparing different methods. Since we don't know the precise performance of each technique, it's difficult to understand the actual performance of the Magnet and how much it has improved. The results in Table 2 are weak. It's disappointing that the automatic results are quantitatively worse compared to attend-and-excite. While I agree that manual inspection is the most accurate, trying out a recent VLM like GPT-4o, which can discern characteristics that image encoder-based evaluations fail to capture, might be worthwhile.

Questions

Q1: How is the analysis in lines 64-78 and Figure 2-(a) connected to the method? Q2: Is there no need to modify the padding? If the padding tokens positioned at the end contain prior knowledge, it seems they might also interfere with binding. Q3: How did you perform detection using GrondingDINO in Table 2? I am curious whether you detected "blue apple" or just "apple." It might be somewhat out-of-scope, but I am also interested in how different the results are between detecting "blue apple" and "apple." Q4: As mentioned in the limitations (Figure 20), Magnet seems relatively weak at handling positional information. I suspect this issue arises not so much from a problem with Magnet itself but rather because CLIP's embedding does not effectively bind positional information to the desired token. Is there an analysis similar to Figure 1 for positional information? It seems only color is present in the appendix. Showing this could further demonstrate, as per the title of your paper, an understanding of VLM’s function, providing clarity on what can and cannot be bound. --- - Relevant references Before this paper was submitted, methods for editing text tokens were proposed in papers like [1, 2]. Although these papers also deal with a different task, and attribute binding, and were not considered in the evaluation due to being on Arxiv, I recommend citing them in the camera-ready version. [1]: Uncovering the Text Embedding in Text-to-Image Diffusion Models, https://arxiv.org/abs/2404.01154 [2]: TexSliders: Diffusion-Based Texture Editing in CLIP Space, https://arxiv.org/abs/2405.00672

Rating

6

Confidence

3

Soundness

4

Presentation

3

Contribution

2

Limitations

The authors describe the failure cases of Magnet in the appendix. They have adequately addressed the limitations.

Reviewer iZtx2024-08-13

Thank you to the authors for their detailed response. I have carefully considered the points raised. > [W1] "Our comparison experiment has been designed to evaluate whether each method achieved binding. In Table 1, attribute disentanglement is assessed by asking, 'Which image shows different attributes more clearly?' Only the method achieving the best binding will be voted for; otherwise, evaluators tend to choose no winner." While I understand the authors' approach, I still believe that this method inherently involves a comparison. Evaluating A vs. B seems likely to yield different insights than evaluating A and B separately. The authors suggest that both approaches could lead to similar results, but I respectfully disagree, as I believe pairwise comparisons and individual method evaluations may not produce the same outcomes. > [W2] "Since there is no available API at this moment, we cannot evaluate Magnet with GPT-4o. But we will definitely try out GPT-4o whenever possible." I appreciate the authors' intent to evaluate with GPT-4o when possible. However, isn't the GPT-4o API already available? > [Q3] "This comparison shows that GroundingDINO is not reliable for measuring attribute alignment." I understand this concern, and I recognize the challenges it presents. It is unfortunate that there currently isn't a more robust evaluation method beyond manual inspection. I had hoped that GPT-4o might offer some supplementary capabilities in this area. Given these unresolved concerns regarding the evaluation, I will maintain my score as a weak accept.

Reviewer 2c6i6/10 · confidence 4/52024-07-15

Summary

The paper analyzes and improves upon the “(attribute) binding problem” in VLMs such as CLIP, and the focus is primarily on the text encoder side. First the authors analyze how the individual text embeddings behave in a diagnostic setting when encoding a two-word text “COLOR OBJECT”. With these insights they propose to modify the original embedding of an object by calculating a “binding vector” that uses a positive attribute (the one actually in the prompt, i.e. “yellow”) and negative attributes (other colors). They show improvements to previous methods on top of which they build such as Structure Diffusion.

Strengths

The paper is very practical and intuitive, motivating the final method with analysis of the embedding space. It has a clear contribution and the whole story ties around this contribution, providing additional insights. On top, the evaluation is thorough and uses human judgment. (there is no automatic metric here, I agree). It is also good to see that the neighbor strategy was quantitatively ablated with human judgment, and section 4.6 adds additional nice insights, albeit not beyond a few examples as far as I can tell. Overall a very interesting and creative exploration, and the empirical results do show that the method works! That is exciting, given that this is a persistent major problem many papers have addressed.

Weaknesses

While the method clearly improves upon previous work, it requires pre-computing or manually defining a lot of components such as the negative attribute set or the neighbor set, with additional computation of the adaptive strength. With pre-computation this is not too expensive but it feels somewhat hacked together. The abstract mentions too many terms where it is unclear whether they are established terms and if not, the abstract is not the right place to mention them all: blended text embeddings, attribute bias, object embedding, binding vector. Since this papers main focus is a thorough analysis and interpretability insights, it has to be clearer with its definition, i.e.: “The above phenomenon, which we call attribute bias, occurs when one object prefers or dislikes a specific attribute” → refer/dislike are not well-defined. The 4 experiments with swapping various embeddings seem very interesting but it is not motivated why we need all 4, maybe 2 cases would have been more insightful and easier for the reader to understand what’s going on? Finally, having more quantitative statistically significant experiments and less showing of examples would have strengthened the paper's contributions further!

Questions

It says in the abstract “blended text embeddings as the cause of improper binding… “. Is “blended text embedding” embeddings a term people are expected to know? I work in vision-and-language and have not heard of it. Again in abstract “we observe the attribute bias phenomenon”: was this meant to say attribute binding? How are negative attributes exactly determined? Most things are not as easy as color. Is there an explanation why the Structure Diffusion baseline is so bad? Does your method differ to Stucture Diffusion only in the proposed Magnet method and nothing else? Same exact SD version, CLIP version etc.? This is important to clarify in the paper so that it is clear that your method alone leads to this improvement. Note: Fig. 1b is very small and also low-resolution, please fix!

Rating

6

Confidence

4

Soundness

2

Presentation

2

Contribution

4

Limitations

Yes, addressed.

Reviewer eb4q2024-08-07

Response to author's rebuttal

I would like to thank the authors for the rebuttal -- it has addressed all of my concerns to a considerable extent. I'm also impressed that Magnet works just as well on different types of models (e.g., SD 2.1, SDXL, PixArt) and/or for different constrained generation (e.g., Layout-Guidance, ControlNet) based on the provided rebuttal file. Since SDXL and PixArt use different text encoding strategies (e.g., multimodal text encoder or different text encoder), I wonder if the authors could discuss any necessary modifications (e.g., hyperparameters, Magnet formula, etc) to adapt your original setting for the CLIP encoder to work for two encoders (i.e., SDXL) or a T5 encoder (PixArt) to achieve considerable improvement in attribute binding? This would help me better assess the flexibility of your method as well as the scope of impact. Thanks!

Authorsrebuttal2024-08-08

Response to Comment about Flexibility of Magnet

Thank you for your thoughtful follow-up and your interest in the flexibility of Magnet. When applying Magnet to SDXL, we did not modify any hyperparameters or formulas, keeping all settings consistent with the main paper (e.g., $K=5$, $\lambda=0.6$). The adaptive strength formula (Eq. 3) is designed based on our analysis of the CLIP encoder and naturally adapts to SDXL. However, the T5 encoder in PixArt operates differently by modeling bidirectional context. Consequently, it is necessary to conduct further analysis of T5 and redesign the strength formula. Due to the time constraints of the rebuttal process, we were unable to conduct a detailed analysis and therefore used fixed strengths ($\alpha=2$, $\beta=0.5$) for all objects. We also found that $K=10$ is more robust for PixArt. We will incorporate these considerations in future work to further demonstrate the flexibility and impact of our method.

Reviewer eb4q2024-08-08

Thanks for your response

Thanks for your response! Given the authors' response, it would be interesting to explore Magnet with a broader scope of text encoding strategies in the future. Regardless, given that mitigating attribute binding issues from the text encoder (as opposed to the diffusion backbone) is under-explored and the authors have done a great job proposing an effective method with some interesting analysis, I would maintain my current rating and confidence and lean toward acceptance.

Reviewer 2c6i2024-08-08

Thank you for the explanations and the new PDF! It is good to see you provided new results and engaged with all the questions. I still think my score of 6 is appropriate and think this paper is a weak accept.

Reviewer 5FTv2024-08-13

Thank you for your effort. Unfortunately, your explanation in the comments did not help. I strongly encourage you to choose different notation. I will keep my rating; I think there is a clear technical contribution in this paper, but the comment did not clear anything up for me. I have put my confidence at a 2; the AC can disregard my review at their discretion.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC