Skip to main content
QUICK REVIEW

[Paper Review] Improving Text-to-Image Consistency via Automatic Prompt Optimization

Oscar Mañas, Pietro Astolfi|arXiv (Cornell University)|Mar 26, 2024
Handwritten Text Recognition TechniquesComputer Science6 citations
TL;DR

OPT2I is an inference-time, prompt-optimization framework that uses an LLM to iteratively rewrite user prompts to maximize a prompt-image consistency score for text-to-image models, without fine-tuning the T2I model. It improves consistency on MSCOCO and PartiPrompts datasets while preserving image quality.

ABSTRACT

Impressive advances in text-to-image (T2I) generative models have yielded a plethora of high performing models which are able to generate aesthetically appealing, photorealistic images. Despite the progress, these models still struggle to produce images that are consistent with the input prompt, oftentimes failing to capture object quantities, relations and attributes properly. Existing solutions to improve prompt-image consistency suffer from the following challenges: (1) they oftentimes require model fine-tuning, (2) they only focus on nearby prompt samples, and (3) they are affected by unfavorable trade-offs among image quality, representation diversity, and prompt-image consistency. In this paper, we address these challenges and introduce a T2I optimization-by-prompting framework, OPT2I, which leverages a large language model (LLM) to improve prompt-image consistency in T2I models. Our framework starts from a user prompt and iteratively generates revised prompts with the goal of maximizing a consistency score. Our extensive validation on two datasets, MSCOCO and PartiPrompts, shows that OPT2I can boost the initial consistency score by up to 24.9% in terms of DSG score while preserving the FID and increasing the recall between generated and real data. Our work paves the way toward building more reliable and robust T2I systems by harnessing the power of LLMs.

Motivation & Objective

  • Motivate the need for improved prompt-image consistency in T2I systems due to object counts, spatial relations, and attribute accuracy.
  • Propose a training-free, prompt-based optimization framework (OPT2I) that leverages an LLM to generate revised prompts.
  • Evaluate OPT2I across diverse T2I models, LLMs, and consistency metrics on standard benchmarks (MSCOCO and PartiPrompts).
  • Demonstrate that OPT2I improves prompt-image consistency while maintaining or improving image quality and recall.

Proposed method

  • Framework combines a T2I model, an LLM, and a consistency scorer to optimize prompts without updating model parameters.
  • An iterative process starts from the user prompt, generates multiple images, computes a per-prompt consistency score, and uses an LLM with a meta-prompt history to propose revised prompts.
  • Two fine-grained consistency metrics are used: decomposed CLIPScore (dCS) and Davidsonian Scene Graph (DSG) score, enabling richer feedback than a single scalar.
  • The LLM’s history and task prompts guide in-context learning to produce better paraphrases, updating the context with top-performing prompts at each iteration.
  • Optimization proceeds for a fixed budget of iterations and prompts per iteration, balancing exploration and exploitation via prompts per iteration and sampling temperature.

Experimental results

Research questions

  • RQ1Can an LLM-driven, inference-time prompt optimization improve prompt-image consistency for various T2I models without fine-tuning?
  • RQ2How do different consistency metrics (dCS vs DSG) influence the quality of optimized prompts and the resulting image fidelity?
  • RQ3Is OPT2I robust to variations in LLM choice and T2I model architecture while preserving image quality (FID) and encouraging recall?
  • RQ4What qualitative strategies do optimized prompts employ to emphasize previously ignored elements and improve alignment with the user prompt?

Key findings

  • OPT2I consistently improves prompt-image consistency across MSCOCO and PartiPrompts datasets compared to paraphrasing baselines.
  • On MSCOCO and PartiPrompts, OPT2I achieves up to 24.9% relative improvement in prompt-image consistency over the user prompt when evaluated with DSG and dCS metrics.
  • OPT2I maintains or improves Fréchet Inception Distance (FID) while increasing recall between generated images and real data, indicating preserved or enhanced image quality and diversity.
  • DSG as a scoring objective yields larger improvements for complex prompts (PartiPrompts) than dCS, suggesting the benefit of more detailed, task-relevant consistency measures.
  • OPT2I is robust to the choice of LLM and T2I model, demonstrating versatile applicability as a plug-and-play solution without parameter updates.

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.