TL;DR
This paper introduces two modular frameworks, VPGen and VPEval, which move away from "black-box" text-to-image (T2I) systems. By using Large Language Models (LLMs) as orchestrators, the authors decompose image generation into interpretable layout planning and evaluation into skill-specific "visual programs," significantly improving spatial control and the reliability of automated metrics.
What Problem Does This Paper Address?
Current state-of-the-art text-to-image models like Stable Diffusion are typically end-to-end "black boxes." While they produce stunning visuals, they often fail at "compositional" tasks—getting the number of objects right (counting), placing them in specific locations (spatial relations), or maintaining correct relative sizes (scaling).
Furthermore, evaluating these models is equally opaque. Standard metrics like CLIP scores provide a single number but offer no insight into why an image failed. Was the object missing? Was the count wrong? Existing evaluation models might be good at recognizing objects but terrible at reading text or understanding 3D depth.
Methods
The authors propose a "Visual Programming" approach for both sides of the T2I pipeline, breaking down complex tasks into manageable, interpretable steps.
1. VPGen (Generation)
Instead of going straight from text to pixels, VPGen breaks the process into three steps:
- Object/Count Generation: An LLM (Vicuna-13B) identifies what objects should be in the scene and how many.
- Layout Generation: The same LLM generates bounding boxes (quantized into 100 bins) for those objects.
- Image Generation: An off-the-shelf layout-to-image model (GLIGEN) renders the final pixels based on the LLM’s plan.
2. VPEval (Evaluation)
VPEval treats evaluation as a programming task. For a given prompt, an LLM (GPT-3.5-Turbo) generates a Python-like program that invokes specialized "expert" modules.
- Modules: Includes
objDet(Grounding DINO) for detection,ocr(EasyOCR) for text, andvqa(BLIP-2) for complex attributes. - Execution: The program runs these modules to verify specific claims (e.g.,
countEval(img, "dog", "==3")). This provides a binary success score along with visual/textual explanations (e.g., "Found 2 dogs, not 3").
Datasets
- Training VPGen: The authors fine-tuned Vicuna on 1.2 million text-layout pairs from Flickr30K Entities, MS COCO, and PaintSkills.
- Evaluation: They used the TIFA160 benchmark (160 prompts from COCO, DrawBench, and PaintSkills) and a newly created Skill-based Benchmark focusing on five specific areas: Object, Count, Spatial, Scale, and Text Rendering.
Key Insights and Ideas
- LLMs as Architects: The core insight is that LLMs already possess immense world knowledge about object relationships. By using them to "plan" the scene layout, the system overcomes the limitations of previous layout-guided models that were restricted to a few predefined object classes.
- Interpretability as a Debugger: Because the pipeline is modular, the authors could pinpoint exactly where errors occur. Their analysis revealed that the "rendering" step (layout-to-image) is currently a bigger bottleneck than the "planning" step (text-to-layout).
- The "Expert" Advantage: No single model is the best at everything. VPEval succeeds because it uses the right tool for the job—using OCR for text rendering and detection for counting—rather than asking a single CLIP model to guess the alignment.
Key Results
- Superior Control: VPGen significantly outperformed Stable Diffusion v1.4 and v2.1 on challenging compositional tasks. Specifically, it saw a +12.7% improvement in counting over Karlo and a +24.8% improvement in spatial accuracy over SD v2.1.
- Human Correlation: VPEval showed a much higher correlation with human judgments than existing metrics. On skill-based prompts, VPEval achieved a 79.0 Spearman’s ρ, compared to just 65.0 for a standard BLIP-2 VQA-based evaluation and 20.4 for CLIP.
- Zero-Shot Flexibility: VPGen successfully generated images for objects not seen during its layout fine-tuning (like "Pikachu" or "Link"), proving it can leverage the base LLM's internal knowledge.
Limitations and Future Work
- Rendering Bottleneck: The authors noted that GLIGEN sometimes fails to generate high-quality images even when the LLM provides a perfect layout. They suggest that as layout-to-image models improve, VPGen will naturally become more powerful.
- Language and Domain Bias: The system is primarily trained on English and natural images. Performance might degrade for non-English prompts or highly specialized domains (like medical imaging or fine arts).
- Computational Cost: Generating evaluation programs via LLM APIs (like GPT-3.5) adds cost and latency compared to simple scoring metrics. To mitigate this, the authors released their generated programs and a smaller, public LLM fine-tuned for program generation.
Summary updated