[Paper Review] Attend-and-Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models
This paper proposes Attend-and-Excite, an inference-time method that enhances text-to-image diffusion models by guiding cross-attention mechanisms to attend to all subject tokens in the input prompt, thereby reducing catastrophic neglect and improving attribute binding. By excitation-based refinement of attention maps during denoising, it boosts semantic faithfulness without retraining, significantly outperforming baseline models in generating images that fully reflect complex prompts.
Recent text-to-image generative models have demonstrated an unparalleled ability to generate diverse and creative imagery guided by a target text prompt. While revolutionary, current state-of-the-art diffusion models may still fail in generating images that fully convey the semantics in the given text prompt. We analyze the publicly available Stable Diffusion model and assess the existence of catastrophic neglect, where the model fails to generate one or more of the subjects from the input prompt. Moreover, we find that in some cases the model also fails to correctly bind attributes (e.g., colors) to their corresponding subjects. To help mitigate these failure cases, we introduce the concept of Generative Semantic Nursing (GSN), where we seek to intervene in the generative process on the fly during inference time to improve the faithfulness of the generated images. Using an attention-based formulation of GSN, dubbed Attend-and-Excite, we guide the model to refine the cross-attention units to attend to all subject tokens in the text prompt and strengthen - or excite - their activations, encouraging the model to generate all subjects described in the text prompt. We compare our approach to alternative approaches and demonstrate that it conveys the desired concepts more faithfully across a range of text prompts.
Motivation & Objective
- To address semantic fidelity issues in text-to-image diffusion models, particularly catastrophic neglect and incorrect attribute binding.
- To identify failure modes in state-of-the-art models like Stable Diffusion where subjects or attributes are omitted or misassigned.
- To develop a training-free, on-the-fly intervention method that enhances attention to all subject tokens during image generation.
- To improve the faithfulness of generated images to complex, multi-subject prompts without fine-tuning the pre-trained model.
- To demonstrate that mitigating catastrophic neglect implicitly improves attribute binding through shared semantic representations.
Proposed method
- Introduce Generative Semantic Nursing (GSN), a framework for on-the-fly semantic intervention during image generation.
- Design Attend-and-Excite as an attention-based GSN method that identifies and strengthens cross-attention activations for subject tokens.
- At each denoising step, modify latent features to encourage image patches to attend to all subject tokens in the text prompt.
- Use a learnable excitation vector per subject token to amplify attention weights in cross-attention layers.
- Apply the method during inference only, preserving the pre-trained model’s weights and semantics.
- Leverage the pre-trained text encoder’s semantic linkage between subjects and attributes to implicitly improve binding.
Experimental results
Research questions
- RQ1Can we reduce catastrophic neglect in text-to-image diffusion models by enhancing attention to all subject tokens during inference?
- RQ2Does improving attention to subject tokens also lead to better attribute binding, even without explicit supervision?
- RQ3Can we achieve improved semantic faithfulness without fine-tuning or retraining the generative model?
- RQ4How does Attend-and-Excite compare to alternative methods like Composable Diffusion or StructureDiffusion in generating complex, multi-object scenes?
- RQ5To what extent does the excitation mechanism improve consistency in subject presence and attribute assignment across diverse prompts?
Key findings
- Attend-and-Excite significantly reduces catastrophic neglect, ensuring all subject tokens from the prompt are visually represented in the generated image.
- The method improves attribute binding implicitly, as demonstrated by correct assignment of colors and descriptors to their intended subjects.
- In qualitative comparisons, Attend-and-Excite outperforms both Stable Diffusion and Composable Diffusion in generating semantically faithful images, especially for complex prompts with multiple subjects.
- The approach maintains high image quality while achieving better alignment with input prompts, as confirmed by visual inspection across diverse prompts.
- The method is effective across various prompt types, including those with multiple objects, attributes, and spatial relationships.
- Attend-and-Excite achieves these results without any model fine-tuning, relying solely on inference-time attention modulation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.