Abstract
Object hallucination—where Large Vision Language Models (LVLMs) incorrectly identify non-existent objects—remains a significant challenge for reliable AI deployment. This paper presents Black-Box Visual Prompt Engineering (BBVPE), a framework that mitigates hallucinations by automatically overlaying visual cues onto input images. Unlike "white-box" methods that require internal model access, BBVPE is model-agnostic and works with proprietary APIs. By employing a trained VP Router, the system selects the most effective visual prompt (e.g., bounding boxes, arrows, or reverse blur) for a given image. Our results demonstrate substantial improvements across multiple benchmarks, including POPE and CHAIR, for both open-source and proprietary models like GPT-4o.
Introduction
Large Vision Language Models (LVLMs) have shown remarkable capabilities in image understanding, yet they frequently suffer from object hallucination. This phenomenon, where a model confidently asserts the presence of an object not found in the image, undermines trust in critical applications. While fine-tuning and internal decoding adjustments can help, these methods are inaccessible for proprietary "black-box" models.
BBVPE addresses this by engineering the visual input itself. By providing explicit visual grounding through markers, the framework guides the model's attention toward actual image content. As shown in Figure 1, different visual prompts can significantly alter a model's response, and an "Oracle" selection of these prompts can lead to near-perfect accuracy.
Methodology
The BBVPE framework operates in three primary stages to ensure model-agnostic performance:
- Object Localization: The system identifies potential objects within an image using a robust localizer such as SAM 2 (Segment Anything Model 2).
- Visual Prompt Pool: A library of candidate visual prompts (VPs) is maintained, including bounding boxes, cropping, "reverse blur" (highlighting the object while blurring the background), circles, arrows, and colored boxes.
- The VP Router: This is a lightweight model comprising a frozen CLIP vision encoder and a trainable MLP. It analyzes the input image to predict which specific visual prompt will most effectively prevent the target LVLM from hallucinating.
The workflow is simple: the Router selects the optimal prompt, which is then overlaid on the image before being sent to the LVLM. This approach is particularly valuable for proprietary models where only API access is available.
Experimental Results
The researchers evaluated BBVPE using several industry-standard benchmarks:
- POPE (Polling-based Object Probing Evaluation): Measures binary object presence detection. BBVPE raised the F1 score for LLaVA 1.5 from 89.71 to 91.42.
- CHAIR (Caption Hallucination Assessment with Image Relevance): Evaluates free-form captioning. BBVPE reduced the sentence-level hallucination rate (CH_S) for LLaVA 1.5 from 62.8 to 46.3.
- Proprietary Models: The framework successfully reduced hallucinations in GPT-4o and Claude 3.0 Sonnet. Interestingly, these models often preferred "cropping" or "arrows" over the "reverse blur" favored by LLaVA 1.5.
Discussion and Limitations
A key insight from this work is the "Oracle" potential: for almost every image, a visual prompt exists that can nearly eliminate hallucination. However, the system's effectiveness is currently limited by the accuracy of the object localizer. Furthermore, the VP Router currently operates independently of the user's textual query. Future research will focus on incorporating textual context into the routing logic and extending the framework to address attribute-level and relationship-level hallucinations.
Conclusion
BBVPE offers a lightweight, effective, and model-agnostic solution to the persistent problem of object hallucination in LVLMs. By systematically engineering visual prompts, we can significantly enhance the reliability of vision-language systems without needing to modify their internal architectures.
Summary updated