Octopus: Alleviating Hallucination via Dynamic Contrastive Decoding

Wei Suo, Lijun Zhang, Mengyang Sun, Lin Yuanbo Wu, Peng Wang, Yanning Zhang

TL;DR

Octopus is a plug-and-play framework that dynamically mitigates hallucinations in Large Vision-Language Models (LVLMs) by adaptively choosing the best contrastive decoding strategy at each token generation step. By diagnosing the specific root cause of a hallucination in real-time—whether it is driven by language priors, visual information loss, or attention bias—Octopus applies targeted corrections to significantly improve text-image alignment without retraining the underlying model.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs) are powerful, but they suffer from a notorious flaw: they frequently "hallucinate" objects, attributes, or relationships that don't exist in the input image.

To fix this without the massive computational expense of retraining the entire model, researchers often turn to Contrastive Decoding (CD). CD methods work by comparing the model's output probabilities given a normal input against its probabilities given a distorted input (e.g., an image blurred with Gaussian noise). By subtracting the distorted distribution from the original, the model can filter out systemic biases.

However, existing CD methods suffer from a "one-size-fits-all" limitation. They apply the exact same distortion strategy to every image and every word generated. The authors of this paper demonstrate that hallucinations are actually a moving target: their causes are hybrid and vary wildly from sample to sample, and even from token to token within the same sentence.

Methods

Instead of relying on a single decoding trick, the authors introduce Octopus, a framework designed to dynamically orchestrate multiple CD strategies.

Paradigm comparison of different hallucination alleviation methods.

The architecture consists of two primary components:

  1. The Octopus’s "Eye" (The Router): A lightweight, transformer-based block paired with a learnable token. At each generative step $t$, it ingests the hidden states of the LVLM to diagnose what kind of hallucination risk the model currently faces.
  2. The Octopus’s "Tentacles" (The Strategies): The action space consists of three established CD methods alongside a "null" action (no contrastive decoding):
  3. Strategy-1 (VCD): Targets language priors by distorting the image with Gaussian noise.
  4. Strategy-2 (M3ID): Targets visual information loss by masking the text query.
  5. Strategy-3 (AVISC): Targets attention bias by utilizing blank/blind visual tokens.

Model Optimization

Because choosing a discrete strategy involves a non-differentiable argmax operation, standard backpropagation won't work. Furthermore, there are no explicit labels showing which strategy is "correct" at any given token step. To solve this, the authors leverage Direct Preference Optimization (DPO). They automatically generate positive and negative action sequences based on whether the resulting text reduces hallucinations (measured via evaluation metrics), allowing Octopus to learn an optimal routing policy while keeping the base LVLM weights completely frozen.

Datasets

  • Training / Preference Construction: Built using the MSCOCO dataset (10,000 preference pairs for generative tasks; 7,000 pairs for discriminative tasks).
  • Generative Evaluation: Evaluated on AMBER, Object-HalBench, and MMHalBench.
  • Discriminative Evaluation: Evaluated on AMBER and the POPE benchmark (which includes subsets from GQA, A-OKVQA, and COCO).

Key Insights and Ideas

  • Hallucination Causes are Token-Dependent: Through qualitative attention-map analysis, the authors show that a model can experience different types of hallucinations within a single sentence. As seen in Figure 4, the word "sitting" might be hallucinated due to attention bias, whereas "person" might be hallucinated due to over-reliance on language priors.
Figure 4. Token-level hallucination qualitative analysis. For sim- plicity, we only present the attention map across the top 5 visual tokens and corresponding keywords. The results show that hallu- cination causes are hybrid in a sample.
  • Single Strategies are Insufficient: The authors' exploratory data analysis reveals that any single CD strategy is only effective for a fraction (~60%) of hallucinated samples, and the overlap between what these strategies fix is surprisingly small (~10%).
Figure 2. The proportion of effective samples using different CD methods for (a) Generative Task and (b) Discriminative Task. We observe that each CD strategy can only address part of the samples.

Key Results

The Octopus framework consistently outperformed both the baseline models and individual CD strategies across all evaluated benchmarks:

  • Generative Tasks: On the AMBER dataset using LLaVA-1.5-7B, Octopus reduced the object hallucination rate (CHAIR metric) from 8.0 down to 4.8—representing a ~40% relative performance improvement over the baseline model. It also outperformed individual methods like VCD (6.7) and AVISC (6.3).
  • Discriminative Tasks: On the AMBER discrimination task, Octopus boosted the baseline LLaVA model's accuracy by 9.7% and its F1 score by 11.6%.
  • Model Agnostic: The framework demonstrated excellent portability, yielding similar substantial improvements when applied to InstructBLIP.

Limitations and Future Work

The primary limitation of Octopus is that its upper-bound performance is inherently constrained by its action space (the "tentacles"). If none of the candidate CD strategies can fix a specific, novel type of hallucination, Octopus cannot correct it either.

The authors note that future work will focus on expanding this framework by integrating newer, more powerful contrastive decoding strategies into the action space as they are developed by the community.

Summary updated

Abstract

Large Vision-Language Models (LVLMs) have obtained impressive performance in visual content understanding and multi-modal reasoning. Unfortunately, these large models suffer from serious hallucination problems and tend to generate fabricated responses. Recently, several Contrastive Decoding (CD) strategies have been proposed to alleviate hallucination by introducing disturbed inputs. Although great progress has been made, these CD strategies mostly apply a one-size-fits-all approach for all input conditions. In this paper, we revisit this process through extensive experiments. Related results show that hallucination causes are hybrid and each generative step faces a unique hallucination challenge. Leveraging these meaningful insights, we introduce a simple yet effective Octopus-like framework that enables the model to adaptively identify hallucination types and create a dynamic CD workflow. Our Octopus framework not only outperforms existing methods across four benchmarks but also demonstrates excellent deployability and expansibility. Code is available at https://github.com/LijunZhang01/Octopus.
BibTeX
@inproceedings{suo2025octopus,
  author = {Wei Suo and Lijun Zhang and Mengyang Sun and Lin Yuanbo Wu and Peng Wang and Yanning Zhang},
  title = {{Octopus: Alleviating Hallucination via Dynamic Contrastive Decoding}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02783},
}
Figure