TL;DR
While text-to-image diffusion models excel at generating realistic imagery, they frequently fail at basic compositionality tasks like attribute binding, counting, and spatial relationships. This paper introduces CONPAIR, a dataset of 15k high-quality contrastive image pairs with minimal visual differences, and EVOGEN, a multi-stage curriculum fine-tuning framework. By training diffusion models progressively from simple to complex scenarios using a contrastive loss, EVOGEN significantly improves text-image alignment and compositional understanding.
What Problem Does This Paper Address?
State-of-the-art text-to-image (T2I) models like Stable Diffusion XL and DALL-E 3 can generate stunning graphics, but they often stumble when combining multiple objects and attributes in a single scene. Common failures include "attribute bleeding" (e.g., generating a yellow motorcycle when prompted for "a red motorcycle and a yellow door"), miscounting objects, or scrambling spatial relationships.
Existing solutions typically rely on rigid, pre-specified architectural structures or test-time attention tweaks that struggle to generalize to new prompts. Furthermore, existing contrastive datasets are either purely textual or contain noisy, retrieved images with massive background differences, making it difficult for models to isolate and learn subtle compositional nuances.
Methods
The authors propose a two-part solution: an automated data generation pipeline to create hard negative examples, and a curriculum-based fine-tuning strategy called EVOGEN.
- Data Generation & Quality Control: The pipeline uses GPT-4 to generate positive and negative text prompts. To create the corresponding images, Stable Diffusion 3 generates candidates, which are then filtered using a Visual Question Answering (VQA) model (LLaVA) that decomposes prompts into verification questions. Crucially, if candidate images fail to match a complex prompt perfectly, the authors introduce a reverse-alignment strategy: LLaVA rewrites the prompt to accurately describe what was actually generated. For color and texture modifications, they use MagicBrush to make minimal, precise edits to create perfect negative pairs.
- Curriculum Fine-Tuning: EVOGEN trains the model across three progressive stages:
- Stage-I (Single Object): Learning simple object-attribute compositions (e.g., shape, color, quantity).
- Stage-II (Object Compositions): Mastering attribute binding and relationships between two objects.
- Stage-III (Complex Compositions): Handling intricate scenes with multiple objects, attributes, and interactions.
- Contrastive Loss: They apply a variant of the InfoNCE loss on the feature maps of the diffusion model's noise estimator, forcing the model to maximize similarity for correct text-image pairs and minimize it for hard negatives.
Datasets
The paper introduces CONPAIR, a meticulously crafted dataset consisting of 15,400 high-quality contrastive image pairs with minimal visual discrepancies. It spans eight compositional categories: color, counting, shape, texture, spatial relations, non-spatial relations, scene, and complex compositions.
For evaluation, the authors leverage standard benchmarks including T2I-CompBench and the Gen-AI Benchmark, and compare their dataset's quality against retrieval-based contrastive datasets like COLA and BISON.
Key Insights and Ideas
- Curriculum Learning is Essential: Just like humans, diffusion models benefit from mastering foundational attribute binding before being tasked with complex, multi-object scenes.
- Reverse-Alignment Beats Discarding: Instead of throwing away images that fail to match a complex prompt due to model limitations, rewriting the prompt to match the image preserves high-quality visual data and yields excellent contrastive examples.
- Minimal Visual Discrepancy is Key: Hard negative images that differ only by the target attribute or relation force the model to focus on semantic alignment rather than superficial background features.
Key Results
- T2I-CompBench: EVOGEN (built on Stable Diffusion v2) outperformed state-of-the-art models across 5 out of 6 metrics. Notably, its score on "Complex" compositions jumped to 42.52, significantly beating the SDv2 baseline (33.86) and outperforming much larger models like SDXL (41.00).
- Gen-AI Benchmark: EVOGEN fine-tuned on SD3-Medium achieved the highest performance on all "Advanced" prompts, which include challenging tasks like logical negation and attribute comparison.
- Ablation Studies: Quantitative breakdowns confirmed that both the contrastive loss and the multi-stage curriculum training were vital to achieving these performance gains.
Limitations and Future Work
The authors note that while CONPAIR is comprehensive, it could be expanded further to cover an even broader array of object-attribute relationships to boost generalization. Additionally, despite VQA guidance, ensuring absolute faithfulness in extremely intricate settings remains a challenge, leaving room for more advanced text-image alignment verification techniques in future work.
Summary updated