Evaluating Hallucination in Text-to-Image Diffusion Models with Scene-Graph based Question-Answering Agent

Ziyuan Qin, Dongjie Cheng, Haoyu Wang, Huahui Yi, Yuting Shao, Zhiyuan Fan, Kang Li, Qicheng LaoarXiv 2024 · DOI

TL;DR

This paper introduces a novel, automated method for evaluating Text-to-Image (T2I) diffusion models by leveraging scene graphs and Large Language Models (LLMs) to perform question-answering. It also presents a new dataset of 12,000 images with human-rated scores, demonstrating that their approach better aligns with human judgment than existing metrics.

What Problem Does This Paper Address?

The rapid advancement of Text-to-Image (T2I) models, which generate images from textual descriptions, has outpaced the development of robust evaluation methods. Current approaches often rely on subjective human evaluations, which are time-consuming, expensive, and lack reproducibility. Existing automated metrics, like CLIP-score or FID, primarily focus on overall image quality or similarity to the prompt, failing to pinpoint specific errors or "hallucinations" – instances where the generated image contradicts the text prompt. This is particularly problematic for complex prompts involving multiple objects, attributes, and relationships, where subtle inconsistencies can easily arise. The paper aims to bridge this gap by providing a quantitative, reproducible, and interpretable evaluation metric that can identify, categorize, and score these hallucination issues.

Methods

The core of the proposed method is a question-answering (QA) agent that operates on a scene graph extracted from the generated image. The process involves several key steps:

  1. Image Generation: T2I models generate images from text prompts.
  2. Scene Graph Construction:
    • Object Detection: An open-vocabulary object detector (GroundedSAM) identifies salient objects in the image.
  3. Attribute Extraction: For each detected object, a Vision-Language Model (VLM) like BLIP-2 is used to extract attributes such as color, shape, and texture.
  4. Relationship Identification: Both spatial relationships (derived from bounding box coordinates) and non-spatial relationships (determined by feeding pairs of objects and their names to a VLM) are identified.
  5. These objects, attributes, and relationships form nodes and edges in an image-specific scene graph.
  6. Question Generation: The original text prompt is parsed using dependency trees. This structure is then used to generate template questions about object presence, attributes, and relationships. LLMs are employed to create these question-answer pairs, guided by contextual demonstrations.
  7. Question Answering and Evaluation: An LLM-based QA agent uses the constructed scene graph as its knowledge base to answer the generated questions. The accuracy of these answers is used to infer the faithfulness of the generated image to the prompt. Incorrect answers are categorized into attribute, relation, or object hallucinations.
  8. Scoring: A rule-based scoring system assigns a final score based on the correctness and types of errors identified during the QA process.

Datasets

The paper introduces a new dataset comprising 12,000 synthesized images generated from 1,000 complex, composite text prompts. These prompts are sourced from the T2I-CompBench benchmark, known for its challenging compositional scenarios. The dataset includes human-annotated scores for each image-prompt pair, serving as a gold standard for evaluating the proposed metric.

Key Insights and Ideas

  • Scene Graphs as a Rich Representation: The paper highlights the power of scene graphs in capturing fine-grained visual information and relationships within an image, making them ideal for detailed evaluation.
  • LLMs for Interpretable QA: Leveraging LLMs for question-answering on the scene graph allows for a more nuanced and interpretable evaluation, going beyond simple similarity scores.
  • Categorizing Hallucinations: The ability to not only detect but also categorize hallucination types (attribute, relation, object) provides valuable insights into the failure modes of T2I models, guiding future improvements.
  • Human Alignment is Crucial: The study emphasizes that effective evaluation metrics must align with human judgment, and their proposed method demonstrates a stronger correlation with human scores than existing benchmarks.

Key Results

  • The proposed scene-graph based QA method shows a stronger correlation with human scoring patterns compared to other established evaluation metrics like CLIP-score, BLIP-score, LLM-score, and T2ICompbench.
  • The method effectively categorizes hallucination types, achieving higher F1 scores in detecting attribute errors, object omissions, and extraneous objects compared to T2ICompbench.
  • An ablation study shows that using a graph-based knowledge representation yields higher human correlation results than using simple caption-based retrieval.

Limitations and Future Work

  • Landscape Image Detection: The method struggles to effectively detect key objects in synthesized landscape images, potentially due to these objects being treated as background by the object detection model.
  • Relational Error Nuance: Identifying relational errors, especially those involving verb-based relationships, remains challenging due to potential ambiguities in expression and interpretation.
  • Future Work: The authors plan to address the landscape image detection issue and emphasize the need for more fine-grained, attribute-binding sensitive text encoders to improve T2I model performance and evaluation.

Summary updated

BibTeX
@misc{qin2024evaluating,
  author = {Ziyuan Qin and Dongjie Cheng and Haoyu Wang and Huahui Yi and Yuting Shao and Zhiyuan Fan and Kang Li and Qicheng Lao},
  title = {{Evaluating Hallucination in Text-to-Image Diffusion Models with Scene-Graph based Question-Answering Agent}},
  year = {2024},
  eprint = {2412.05722},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.05722},
}
Figure