Synthetic Data Helps Image Generators OpenAI researchers improved text-to-image prompt following with generated captions.

Published
Reading time
3 min read
Example of alt-text accompanying selected images scraped from the internet and synthetic captions

Text-to-image generators often miss details in text prompts, and sometimes they misunderstand parts of a prompt entirely. Synthetic captions can help them follow prompts more closely.

What鈥檚 new: James Betker, Gabriel Goh, Li Jing, and Aditya Ramesh at OpenAI, along with colleagues at Microsoft, improved a latent diffusion model鈥檚 performance by training it on an image-caption dataset including model-generated captions that were more detailed than those typically scraped from the web. They used the same technique to train DALL路E 3, the latest version of OpenAI鈥檚 text-to-image generator. 

Key insight: Text-to image generators learn about the relationships between images and their descriptions from datasets of paired images and captions. The captions in typical image-caption datasets are limited to general descriptions of image subjects, with few details about the subjects and little information about their surroundings, image style, and so on. This makes models trained on them relatively insensitive to elaborate prompts. However, language models can generate captions in great detail. Training on more-detailed synthetic captions can give an image generator a richer knowledge of the correspondence between words and pictures.

How it works: Rather than reveal details about DALL路E 3鈥檚 architecture and training, the authors describe training a latent diffusion model.

  • The authors trained a transformer language model on an unspecified dataset of image-caption pairs. The transformer learned to generate typical captions from image embeddings produced by CLIP.
  • To enable the language model to produce more elaborate captions, they fine-tuned it on a smaller, handmade dataset in which the captions described in detail subjects, surroundings, backgrounds, colors, styles, and so on.
  • Using the fine-tuned language model, authors generated synthetic captions for 95 percent of 1 billion images from an unspecified image-caption dataset. They retained 5 percent of the original human-made captions.

Results: The authors trained separate latent diffusion models on datasets containing 95 percent generated captions and 100 percent human-made captions. They used the models to generate 50,000 images each and used OpenAI鈥檚 CLIP to calculate a similarity score (higher is better) between the prompts and generated images. The model trained on synthetic captions achieved 27.1 CLIP similarity, while a model trained on human-made captions achieved 26.8 CLIP similarity.

Testing DALL路E 3: The authors also tested human responses to images generated by DALL路E 3, Midjourney 5.2, and Stable Diffusion XL v1.0. Shown images based on 170 prompts selected by the authors, human judges found DALL路E 3鈥檚 output more true to the prompt and more appealing. Shown images based on 250 captions chosen at random from MSCOCO, they found DALL路E 3鈥檚 output most realistic. In a similar test, DALL路E 3 achieved a higher score on the Drawbench dataset than Stable Diffusion XL v1.0 and DALL-E 2. (No word on how DALL路E 3 compared to Midjourney in this experiment.)

Why it matters: Synthetic data is used increasingly to train machine learning models. The market research firm Gartner says that output from generative models will constitute 60 percent of data used in AI development by 2024. While synthetic data has been shown to boost performance in typical training methods, recursively training one model on another model鈥檚 output can distort the trained model鈥檚 output distribution 鈥 a scenario that could manifest over time as more models trained on synthetic data are used to generate data to train subsequent models.

We鈥檙e thinking: Using one AI model to help another to learn seems to be an emerging design pattern. For example, reinforcement learning from AI feedback (RLAIF) uses AI to rate output from large language models, rather than reinforcement learning from human feedback (RLHF). It鈥檚 a fair bet that we鈥檒l see many more techniques along this line.

Share

Subscribe to The Batch

Stay updated with weekly AI News and Insights delivered to your inbox