Abstract
Text-to-image (T2I) models have reached impressive milestones, yet they frequently struggle with complex semantic instructions, such as precise spatial relationships and color attributions. This paper identifies a primary bottleneck as the "train-inference skew" caused by noisy, non-descriptive web-scraped "Alttext" used in training. We propose RECAP (Principled Recaptioning), a pipeline that utilizes a specialized image-to-text model to generate high-quality, descriptive captions. Training Stable Diffusion on these synthetic captions leads to substantial gains in image quality and prompt following, demonstrating that data quality is a critical lever for model performance.
1. Introduction: The "Alttext" Trap
Modern T2I models like Stable Diffusion are typically trained on massive datasets like LAION, where captions are derived from HTML alt tags. These tags are often optimized for SEO or accessibility rather than literal visual description. For instance, an image of a sunset might be captioned "IMG_4021.jpg" or "Photography by Jane Doe."
This creates a fundamental mismatch: the model is trained on sparse, noisy metadata but is expected to interpret detailed, descriptive user prompts at inference time. This discrepancy often results in "hallucinations" or the omission of key prompt elements, such as failing to place a "pizza near a pineapple" correctly.
2. The RECAP Methodology
To bridge this gap, we developed the RECAP pipeline, which replaces noisy web captions with detailed, model-generated descriptions. The process involves three distinct phases:
- Human-in-the-loop Fine-tuning: We began with a pre-trained PaLI (image-to-text) model. To align it with our goal of descriptive captioning, we fine-tuned it on a small "seed" dataset of 100 images manually annotated with both "Short" (one sentence) and "Long" (two sentences) descriptive captions.
- Massive Recaptioning: The specialized PaLI model was then deployed to generate new captions for a 10-million image subset of the LAION-2B-en dataset.
- T2I Training: Finally, we fine-tuned Stable Diffusion v1.4 using these synthetic captions. We found that a "RECAP Mix"—a 50/50 blend of short and long captions—offered the best balance for the model's text encoder.
3. Experimental Results
The impact of recaptioning was evaluated using both automated metrics and human judgment across standard benchmarks like MS-COCO and the more challenging DrawBench.
3.1 Quantitative Improvements
The RECAP-trained model showed significant improvements in image realism. The Fréchet Inception Distance (FID) on MS-COCO dropped from 17.87 to 14.84, indicating a higher degree of visual fidelity. Furthermore, human raters preferred RECAP's "faithful image generation" by a margin of 64.3% over the base model.
3.2 Qualitative and Semantic Alignment
The most striking improvements occurred in semantic alignment and prompt following. RECAP demonstrated a superior ability to handle prepositions, modifiers, and complex object interactions that typically confuse standard models.
As seen in the comparison above, the base model often fails to distinguish between "near" and "on" (e.g., the pineapple and pizza prompt) or struggles to synthesize abstract concepts like "a person made of cutlery." RECAP consistently produces images that are more faithful to the literal meaning of the prompt. On the DrawBench benchmark, which specifically targets these difficult semantic cases, RECAP achieved a 41.7% improvement in successful prompt following.
4. Discussion and Future Work
Our findings suggest that synthetic data generated by a high-quality captioner can be more effective for training than "real" but noisy web data. This "force multiplier" effect allows the model to learn more efficiently from fewer examples.
However, limitations remain. The 77-token limit of the CLIP text encoder used in Stable Diffusion restricts the amount of detail the model can ingest from very long captions. Future research could explore integrating more flexible text encoders or training large-scale models from scratch using the RECAP methodology to further push the boundaries of text-to-image synthesis.
Summary updated