Automatically Generating Visual Hallucination Test Cases for Multimodal Large Language Models

Zhongye Liu, Hongbin Liu, Yuepeng Hu, Zedian Shao, Neil Zhenqiang Gong
10/15/2024
cs.CVcs.AIcs.LG

Official code: lycheeefish/VHExpansion (5 stars, MIT, last commit 2024-10-13).

Abstract

Visual hallucination (VH) occurs when a multimodal large language model (MLLM) generates responses with incorrect visual details for prompts. Existing methods for generating VH test cases primarily rely on human annotations, typically in the form of triples: (image, question, answer). In this paper, we introduce VHExpansion, the first automated method for expanding VH test cases for MLLMs. Given an initial VH test case, VHExpansion automatically expands it by perturbing the question and answer through negation as well as modifying the image using both common and adversarial perturbations. Additionally, we propose a new evaluation metric, symmetric accuracy, which measures the proportion of correctly answered VH test-case pairs. Each pair consists of a test case and its negated counterpart. Our theoretical analysis shows that symmetric accuracy is an unbiased evaluation metric that remains unaffected by the imbalance of VH testing cases with varying answers when an MLLM is randomly guessing the answers, whereas traditional accuracy is prone to such imbalance. We apply VHExpansion to expand three VH datasets annotated manually and use these expanded datasets to benchmark seven MLLMs. Our evaluation shows that VHExpansion effectively identifies more VH test cases. Moreover, symmetric accuracy, being unbiased, leads to different conclusions about the vulnerability of MLLMs to VH compared to traditional accuracy metric. Finally, we show that fine-tuning MLLMs on the expanded VH dataset generated by VHExpansion mitigates VH more effectively than fine-tuning on the original, manually annotated dataset. Our code is available at: https://github.com/lycheeefish/VHExpansion.

View on arXivView PDF

Code Implementations(1)

MIT
50Shell, PythonOct 13, 20242 years agoMIT

Similar Papers

Cite this paper

@article{liu2024automatically,
  title  = {Automatically Generating Visual Hallucination Test Cases for Multimodal Large Language Models},
  author = {Zhongye Liu and Hongbin Liu and Yuepeng Hu and Zedian Shao and Neil Zhenqiang Gong},
  year   = {2024},
  eprint = {2410.11242},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.11242v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.11242.svg)](https://codeofpaper.com/paper/2410.11242)

Discussion