Introduction
Modern text-to-image (T2I) diffusion models have achieved remarkable photorealism. However, they frequently struggle with compositional attribute binding—the ability to correctly assign specific attributes (like color or texture) to the intended objects in a complex scene. For instance, a prompt like "a red book and a yellow vase" might result in a yellow book or a red vase, a phenomenon often referred to as "color bleeding."
The Root of Compositional Failure
The authors investigate the underlying causes of these failures, focusing on the CLIP text encoder commonly used in models like Stable Diffusion. They identify two primary bottlenecks within the CLIP architecture:
- Erroneous Attention Contributions: Within CLIP's final layers, tokens representing one object often incorrectly attend to attributes belonging to another, leading to information leakage across the prompt.
- Sub-optimal Embedding Space: Even when the generative UNet is capable of correct rendering, the text embeddings provided by CLIP are often not optimized for complex compositional instructions.
Methodology: Window-based Compositional Linear Projection (WiCLP)
To address these issues, the researchers introduce WiCLP, a lightweight and parameter-efficient approach designed to clean up text embeddings before they reach the generative model.
- Architecture: A small linear projection layer is inserted after the CLIP text encoder. This avoids the need for massive fine-tuning of the entire diffusion model.
- Windowing Mechanism: Unlike standard token-wise projections, WiCLP utilizes a "window" of neighboring tokens (e.g., 5 tokens) to refine the central token's embedding. This localized contextualization helps the model better bind attributes to their respective objects.
- SWITCH-OFF Strategy: To preserve general image quality and the model's creative capacity, the projection is only applied during the initial stages of generation. Once the scene's layout and composition are "locked in," the model reverts to standard embeddings for fine-grained detailing, maintaining a low FID score.
Experimental Results
The method was evaluated using the T2I-CompBench (focusing on color, texture, and shape) and MS-COCO datasets.
- Compositional Accuracy: WiCLP significantly improved scores on attribute binding tasks. For Stable Diffusion v1.4, color binding scores rose from 0.37 to 0.53, and texture scores from 0.41 to 0.56.
- Image Quality: The SWITCH-OFF strategy ensured that high image quality was maintained. For SD v2, WiCLP achieved an FID of 27.40, significantly outperforming baselines like GORS (30.54).
- Human Evaluation: In blind studies, human evaluators preferred WiCLP-generated images 52% of the time, compared to only 34% for the base model.
Conclusion
WiCLP offers an efficient solution to the persistent problem of attribute binding in T2I models. By refining text embeddings through a localized windowing approach and a strategic switch-off mechanism, it corrects the informational "leakage" inherent in CLIP without sacrificing image quality or requiring extensive computational resources. While the current work focuses on attribute binding, future research may expand these techniques to address spatial and numerical compositionality.
Summary updated