Skip to main content
QUICK REVIEW

[Paper Review] Image Captions are Natural Prompts for Text-to-Image Models

Shiye Lei, Hao Chen|arXiv (Cornell University)|Jul 17, 2023
Multimodal Machine Learning ApplicationsComputer Science3 citations
TL;DR

This paper proposes Caption in Prompt (CiP), a training-free method that uses pre-trained image captioning models to generate high-quality, class-relevant textual prompts by captioning real images, which are then concatenated with class names to prompt text-to-image models. The approach significantly improves synthetic data quality, achieving an average 10% accuracy gain in downstream image classification tasks across ImageNet-100, ImageNet-1K, and ImageNette.

ABSTRACT

With the rapid development of Artificial Intelligence Generated Content (AIGC), it has become a common practice to train models on synthetic data due to data-scarcity and privacy leakage problems. Owing to massive and diverse information conveyed in real images, it is challenging for text-to-image generative models to synthesize informative training data with hand-crafted prompts. Considering the impressive ability of large generative models, could such models directly synthesize good training images for prediction tasks with proper prompts? We offer an affirmative response to this question by proposing a simple yet effective method, validated through ImageNet classification. Specifically, we caption each real image with the advanced captioning model to obtain informative and faithful prompts that extract class-relevant information and clarify the polysemy of class names. The image captions and class names are concatenated to prompt generative models for training image synthesis. We show that this simple caption incorporation significantly boosts the informativeness of synthetic data therefore enhancing downstream model generalization. More importantly, besides improvements in data augmentation and privacy preservation, our experiments demonstrate that synthesized images can exceed real data in terms of out-of-distribution robustness.

Motivation & Objective

  • To address the challenge of generating informative and diverse synthetic training data for downstream vision models.
  • To overcome the limitations of hand-crafted prompts in text-to-image generation, which often lead to poor generalization.
  • To develop a theoretically grounded, scalable, and training-free method for prompt design in synthetic data generation.
  • To explore the impact of prompt quality on the induced data distribution and model generalization.
  • To enable privacy-preserving and efficient data synthesis via distillation of image semantics into compact, high-quality text prompts.

Proposed method

  • Leverage off-the-shelf image captioning models (e.g., BLIP-2) to generate descriptive, class-relevant captions from real images.
  • Concatenate the generated captions with class names to form enriched prompts for text-to-image (T2I) models.
  • Use the resulting prompts to generate synthetic training data with pre-trained T2I models (e.g., Stable Diffusion), without fine-tuning.
  • Apply a theoretical analysis linking prompt quality to induced data distribution complexity and distribution distance, guiding effective prompt design.
  • Explore zero-shot variants where synthetic images are captioned to generate prompts, and evaluate LLM-based caption refinement for prompt enhancement.
  • Use the resulting prompt set to distill image-level semantics into compact, privacy-preserving text representations for scalable data synthesis.

Experimental results

Research questions

  • RQ1How does the quality of prompts affect the distributional properties and generalization performance of synthetic training data?
  • RQ2Can image captions extracted from real images serve as more informative and diverse prompts than class names alone in text-to-image generation?
  • RQ3What is the impact of prompt design on the induced data distribution complexity and its proximity to the original data distribution?
  • RQ4Does using LLMs to refine captions improve prompt quality and downstream model performance?
  • RQ5Can the proposed method be effectively applied in zero-shot settings without access to real images?

Key findings

  • CiP improves the average classification accuracy of models trained on synthetic data by approximately 10% across ImageNette, ImageNet-100, and ImageNet-1K.
  • The method significantly enhances data diversity and informativeness by extracting class-relevant details such as backgrounds, object relations, and behaviors from real images.
  • Captioning real images before prompting leads to better performance than using LLMs to rewrite captions, which often results in overly generic or definition-like descriptions.
  • Zero-shot CiP, where synthetic images are captioned to generate prompts, shows marginal gains only at high guidance scales and does not outperform basic prompts under optimal settings.
  • The theoretical analysis confirms that prompt quality influences both distribution complexity and distribution distance, providing a foundation for effective prompt design.
  • The method is computationally efficient and scalable, requiring no model fine-tuning or time-consuming inversion operations, making it suitable for large-scale and privacy-sensitive applications like federated learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.