Abstract: This paper, presented at CVPR 2024, introduces Self-Coherence Guidance (SCG), a training-free method designed to mitigate attribute binding failures in Transformer-based diffusion models. By leveraging internal attention maps and Large Language Model (LLM)-derived spatial priors, SCG ensures precise alignment between text prompts and generated visual attributes without requiring additional fine-tuning.
Introduction
While text-to-image diffusion models have achieved remarkable fidelity, they frequently suffer from "hallucinations" related to attribute binding. These failures occur when the model incorrectly associates properties (such as color or style) with the wrong objects in a scene. While previous solutions targeted U-Net architectures, the shift toward more scalable Transformer-based models like PixArt-$α$ necessitates new approaches due to differences in how these models distribute semantic information.
The Challenge of Attribute Binding
The authors categorize alignment failures into three distinct types:
- Coarse-grained attribute binding: Misassociating colors between separate objects (e.g., a "red bench and yellow clock" appearing as a yellow bench).
- Fine-grained attribute binding: Failing to apply specific colors to internal parts of a single object.
- Style binding: Applying conflicting artistic styles to different elements within the same composition.
In Transformer architectures, semantic information is often "smeared" across layers with higher attention entropy compared to U-Nets. This makes traditional attention-refocusing techniques ineffective, as they often rely on sharp semantic signals at specific resolutions.
Self-Coherence Guidance (SCG)
The proposed SCG method operates on a key insight: even when a model fails to bind an attribute correctly, it typically understands what to draw, but lacks the spatial precision of where to apply specific tokens. SCG addresses this through a dynamic masking and optimization process:
- Dynamic Masking: At each denoising step, SCG extracts spatial masks from previous steps. For coarse-grained and style binding, K-means clustering is applied to attention maps to isolate object regions. For fine-grained tasks, an LLM acts as a "common sense" prior, predicting the spatial ratios of object parts to guide mask selection.
- Attention Optimization: Once masks are established, SCG mathematically strengthens the connection between the correct attribute token and its corresponding spatial region, ensuring the "blue" token is strictly bound to the "apple flesh" region, for example.
Experimental Results
SCG was evaluated primarily using the PixArt-$α$ model against a new, more challenging benchmark of prompts. The method demonstrated significant improvements in both quantitative and qualitative metrics.
Quantitatively, SCG improved BLIP-VQA scores for coarse-grained binding from 0.293 to 0.679. Qualitatively, the images produced by SCG exhibit much sharper boundaries and more accurate color placement than baseline models. In a user study with 50 participants, SCG-generated images were preferred over 80% of the time across all categories.
Conclusion
Self-Coherence Guidance provides a robust, training-free framework for improving alignment in Transformer-based diffusion models. By utilizing the model's own internal representations and LLM-based spatial priors, it effectively solves persistent issues of color bleeding and style confusion. Future work may extend this "self-coherence" approach to larger multi-modal models and video generation tasks.
Summary updated