Retrieve-then-compare mitigates visual hallucination in multi-modal large language models

Dingchen Yang, Bowen Cao, Sanqing Qu, Fan Lü, Shangding Gu, Guang ChenIntelligence 2025

Introduction

Multi-modal Large Language Models (MLLMs) like LLaVA or InstructBLIP have demonstrated remarkable success in vision-language tasks. However, they frequently suffer from visual hallucinations, where the generated text describes objects or attributes not present in the image. For example, a model might claim a person is ironing clothes on a car roof when they are simply standing nearby. Such inaccuracies pose significant risks for practical applications, particularly in safety-critical domains.

The Uncertainty Problem

A common assumption is that MLLMs hallucinate because they are "blind" to correct visual cues. However, research into the internal mechanics of these models suggests otherwise. Analysis of confidence scores (logits) reveals that the visual branch often assigns high scores to both correct and incorrect tokens simultaneously. The model isn't failing to see the truth; it is struggling with high levels of uncertainty, often distracted by "visually deceptive candidates."

Existing "Contrastive Decoding" (CD) methods typically focus on removing linguistic biases (language priors), but they can inadvertently worsen visual hallucinations by failing to address this visual uncertainty.

Methodology: Retrieval Contrastive Decoding (RCD)

To address this, researchers developed Retrieval Contrastive Decoding (RCD), a training-free, "plug-and-play" method. RCD is based on the insight that similar images induce analogous hallucinations. By identifying these predictable error patterns, the model can "subtract" them to reveal the correct visual information.

The RCD process involves four key steps:

  1. Retrieval: Using an ensemble of CLIP and DINOv2 encoders, the system finds the $k$ most similar images to the test image from a large reference database (such as COCO).
  2. Multi-Reference Inference: The MLLM generates confidence scores for the test image, a noisy version of that image, and the retrieved reference images, all using the same text prompt.
  3. Contrastive Subtraction: The scores from the reference images are subtracted from the test image's scores. Because the reference images share similar "visual traps" but lack the specific details of the test image, this subtraction cancels out the hallucinatory "noise."
  4. Adaptive Scaling: A dynamic scaling factor ensures a balance between correcting visual hallucinations and removing linguistic biases, preventing the model from over-correcting.

Experimental Results

RCD was tested against state-of-the-art decoding strategies like VCD and DoLa across multiple benchmarks:

  • MME Benchmark: RCD significantly boosted performance, improving InstructBLIP’s total score by 76.3 points and LLaVA-1.5’s by 56.6 points.
  • POPE Benchmark: RCD achieved top accuracy across COCO, AOKVQA, and GQA subsets, outperforming previous methods by up to 2%.
  • WHOOPS: On counterintuitive images, RCD improved the CIDEr captioning score for LLaVA-1.5 by 7.6 points.

Real-World Application: Traffic Scenarios

The researchers also introduced a new Traffic Scenario Understanding Benchmark to test MLLMs in complex, high-stakes environments. RCD demonstrated a superior ability to identify hazards—such as a motorcycle driving on the wrong side of the road—that standard greedy decoding often missed. This suggests that RCD significantly improves the reliability of MLLMs for applications like autonomous driving.

Conclusion and Future Work

RCD proves that a model's consistent error patterns can be leveraged as a tool for correction. By treating similar images as "hallucination templates," RCD acts as a noise-canceling filter for the visual branch.

While highly effective, RCD does introduce computational overhead (approximately 0.43x delay per reference image) and its performance is tied to the quality of the reference database. Future work will focus on optimizing retrieval speed and determining if these analogous hallucinations are a universal trait of all MLLM architectures.

Summary updated

BibTeX
@inproceedings{yang2025retrieve,
  author = {Dingchen Yang and Bowen Cao and Sanqing Qu and Fan Lü and Shangding Gu and Guang Chen},
  title = {{Retrieve-then-compare mitigates visual hallucination in multi-modal large language models}},
  booktitle = {Intelligence},
  year = {2025},
  doi = {10.20517/ir.2025.13},
}
Figure