wikillm

Paper · 2023-11-28 · cs.CV, cs.AI, cs.CL

Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decoding

Training-free decoding for large vision-language models. Each token is sampled from (1+α)·logits(image) − α·logits(noised image), with α=1, keeping only tokens with probability ≥ β·max (β=0.1). Author-reported gains on POPE reach +5.8 accuracy and +7.4 F1 across LLaVA-1.5, InstructBLIP and Qwen-VL.

Decoding strategiesHallucination mitigationMultimodal language modelhallucinationdecodingvision-language-model

arXivPDFCodeMarkdown16 min read

AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Vision-language models sometimes describe objects that are not in the picture. They do this partly because they lean on what usually goes together in their training data, and partly because the language model behind them likes to finish sentences in familiar ways, whatever the image shows.

The paper's idea is to make the model compare two readings of the same question. One reading uses the real picture. The other uses a copy of the picture covered in random noise, so the visual evidence is weaker. Words that the model would produce mainly because of the bias or habit show up in both readings, so the method pushes the choice away from them and toward what the clear picture supports.

No extra training is needed, and no other model or tool is called. The change happens only at the moment the model picks each next word. The authors report that this reduces made-up objects on standard tests and also improves general benchmarks.

TL;DR

  • Training-free change to decoding for LVLMs: at each token, contrast the logits from the original image with those from a Gaussian-noised copy of it §3.3.1 eq. 3.
  • A plausibility cutoff keeps only tokens whose probability under the original image is at least β times the top probability §3.3.2 eq. 4. Default α=1, β=0.1 §4.1.
  • Author-reported: up to +5.8 accuracy and +7.4 F1 on POPE, across three LVLMs and three sampling settings tab. 1.
  • Costs a second forward pass per generated token. The paper does not quantify this §3.3.1.
  • Relevant if you need fewer hallucinated objects from an existing LVLM without retraining it.

Problem

Object hallucination means an LVLM outputs content that is fluent but inconsistent with the objects in the image §1. The authors attribute it mainly to two causes: statistical bias from training data (frequent or co-occurring objects) and over-reliance on unimodal, mostly language, priors §1 §3.1. Existing remedies named in the paper need extra data, RLHF or a post-hoc revisor, which they consider costly §1.

Method

Decoding. The model is parameterised by θ, takes a text query x and a visual input v, and samples each token y_t from a softmax over its logits given (v, x, y_<t) §3.1 eq. 1. The authors argue hallucinations arise when probability goes to tokens that do not match v §3.1.

Visual uncertainty. The authors make the image less certain by adding Gaussian noise following a forward diffusion process. Each of T steps mixes the previous image with fresh noise, using a per-step parameter γ §3.2 eq. 2. Their observations (from their own experiments) are that more noise makes the model put more weight on language priors §3.2 fig. 2, that it favours frequent and co-occurring MSCOCO objects more §3.2 fig. 3, and that POPE performance drops as the noise steps grow for LLaVA-1.5 §4.3 fig. 6.

Visual contrastive decoding. For a query x and image v, the model produces two next-token distributions: one from v and one from the distorted image v'. The contrastive distribution is a softmax over (1+α)·logit(y | v, x) − α·logit(y | v', x) §3.3.1 eq. 3. With α=0 this reduces to regular decoding. Any standard sampler can be applied afterwards; the authors mention nucleus sampling and beam search §3.3.1. Their experiments use direct sampling §4.1.

Adaptive plausibility constraint. Contrasting can penalise tokens that are still reasonable under the distorted image. The authors follow an earlier contrastive decoding work §3.3.2 and keep only tokens whose probability under the original image is at least β times the maximum probability. All other tokens get probability zero §3.3.2 eq. 4. Larger β truncates more aggressively §3.3.2.

Full rule. Combining the two, each token is sampled from the contrastive softmax restricted to the plausible set §3.3.2 eq. 5.

Pseudocode
# Visual contrastive decoding, one token  [§3.3] [eq. 3] [eq. 4] [eq. 5]
# Input:  image v, prompt x, tokens so far y_<t, T, gamma, alpha, beta
# Output: next token y_t

def vcd_next_token(image, prompt, tokens_so_far, T, gamma, alpha, beta):
    # 1. Distort the image with T Gaussian noising steps  [eq. 2] [§3.2]
    noised_image = image
    for step in range(T):
        noise = sample_gaussian_like(noised_image)
        noised_image = sqrt(1 - gamma) * noised_image + sqrt(gamma) * noise

    # 2. Next-token logits for the original and the distorted image  [§3.3.1]
    logits = model(image, prompt, tokens_so_far)                 # (V,)
    logits_noised = model(noised_image, prompt, tokens_so_far)   # (V,)

    # 3. Plausible set from the original image only  [eq. 4] [§3.3.2]
    probs = softmax(logits)
    plausible = probs >= beta * probs.max()                      # bool (V,)

    # 4. Contrast the two sets of logits  [eq. 3]
    contrast = (1 + alpha) * logits - alpha * logits_noised      # (V,)

    # 5. Drop implausible tokens and sample from the softmax  [eq. 5]
    contrast = where(plausible, contrast, -inf)
    probs_vcd = softmax(contrast)
    return sample(probs_vcd)

Pseudocode is written for this card. The paper has no algorithm box.

Hyperparameters

NameValueWhereNotes
α (contrast strength)1§4.1 app. Aα=0 gives regular decoding §3.3.1; MME sweep 0.25 to 1.0 in app. B
β (plausibility cutoff)0.1§4.1 app. Aβ in [0, 1]; larger β truncates more §3.3.2; see Pitfalls on the β sweep
γ (per-step noise, eq. 2)0.1§4.1 app. Aapplies to the forward process in eq. 2; the code does not use a per-step γ, see Paper vs code
T (total noise steps)999 for POPE; 500 for MME and LLaVA-Benchapp. AMME sweep T ∈ {200, 500, 700, 999}; 500 scored highest on the hallucination subset app. B
Samplingdirect sampling (the "Regular" baseline)§4.1top-p, top-k and temperature for the ablation are given in app. B
Repeats5 runs, mean ± std§4.1for POPE and MME only
Model variantsLLaVA-1.5 (Vicuna 7B), InstructBLIP (Vicuna 7B), Qwen-VL (Qwen 7B)§4.113B LLaVA-1.5 and InstructBLIP in app. B
Max new tokensnot stated—the code uses 1024 for LLaVA and 20 for Qwen-VL; see Paper vs code
Image resolution, hardware, batch sizenot stated—
Trainingnone§1 §3.3training-free

POPE set: MSCOCO, A-OKVQA and GQA images; 500 images per dataset per setting (random, popular, adversarial); 6 questions per image, 27,000 query-answer pairs in total §4.1. Negative objects are absent from the image, sampled at random, from a frequent pool, or from co-occurring objects, respectively §4.1. Segmentation with SEEM is used to find objects in A-OKVQA and GQA images §4.1.

MME: 10 perception and 4 cognition subtasks. The hallucination subset uses existence, count, position and color questions §4.1.

LLaVA-Bench: 24 images and 60 questions, used for qualitative cases and GPT-4V-judged open-ended answers §4.1 tab. 3.

Results

Author-reported. Setup: three LVLMs at 7B scale, regular decoding as baseline, 5 runs with standard deviation §4.1 tab. 1. VCD is bold (best) in every row of the POPE table tab. 1.

POPE tab. 1. Accuracy, precision, recall and F1, mean ± std over 5 runs.

DatasetSettingModelDecodingAccuracyPrecisionRecallF1
MSCOCORandomLLaVA-1.5Regular83.29 ± 0.3592.13 ± 0.5472.80 ± 0.5781.33 ± 0.41
MSCOCORandomLLaVA-1.5VCD87.73 ± 0.4091.42 ± 0.5583.28 ± 0.4287.16 ± 0.41
MSCOCORandomQwen-VLRegular84.73 ± 0.3695.61 ± 0.4572.81 ± 0.3882.67 ± 0.41
MSCOCORandomQwen-VLVCD88.63 ± 0.1094.64 ± 0.2581.91 ± 0.1987.81 ± 0.11
MSCOCORandomInstructBLIPRegular80.71 ± 0.7381.67 ± 0.6779.19 ± 1.1480.41 ± 0.80
MSCOCORandomInstructBLIPVCD84.53 ± 0.3888.55 ± 0.5479.32 ± 0.4483.68 ± 0.40
MSCOCOPopularLLaVA-1.5Regular81.88 ± 0.4888.93 ± 0.6072.80 ± 0.5780.06 ± 0.05
MSCOCOPopularLLaVA-1.5VCD85.38 ± 0.3886.92 ± 0.5383.28 ± 0.4285.06 ± 0.37
MSCOCOPopularQwen-VLRegular84.13 ± 0.1894.31 ± 0.4372.64 ± 0.4582.06 ± 0.23
MSCOCOPopularQwen-VLVCD87.12 ± 0.0791.49 ± 0.1081.85 ± 0.1986.40 ± 0.09
MSCOCOPopularInstructBLIPRegular78.22 ± 0.8477.87 ± 1.0378.85 ± 0.5278.36 ± 0.76
MSCOCOPopularInstructBLIPVCD81.47 ± 0.4282.89 ± 0.6479.32 ± 0.4481.07 ± 0.39
MSCOCOAdversarialLLaVA-1.5Regular78.96 ± 0.5283.06 ± 0.5872.75 ± 0.5977.57 ± 0.57
MSCOCOAdversarialLLaVA-1.5VCD80.88 ± 0.3379.45 ± 0.2983.29 ± 0.4381.33 ± 0.34
MSCOCOAdversarialQwen-VLRegular82.26 ± 0.3089.97 ± 0.3372.61 ± 0.5080.37 ± 0.37
MSCOCOAdversarialQwen-VLVCD84.26 ± 0.3985.84 ± 0.4582.05 ± 0.3983.90 ± 0.39
MSCOCOAdversarialInstructBLIPRegular75.84 ± 0.4574.30 ± 0.6379.03 ± 0.6876.59 ± 0.40
MSCOCOAdversarialInstructBLIPVCD79.56 ± 0.4179.67 ± 0.5979.39 ± 0.5079.52 ± 0.38
A-OKVQARandomLLaVA-1.5Regular83.45 ± 0.4887.24 ± 0.6878.36 ± 0.5482.56 ± 0.50
A-OKVQARandomLLaVA-1.5VCD86.15 ± 0.2385.18 ± 0.3487.53 ± 0.1486.34 ± 0.21
A-OKVQARandomQwen-VLRegular86.67 ± 0.4893.16 ± 0.5579.16 ± 0.5985.59 ± 0.53
A-OKVQARandomQwen-VLVCD89.22 ± 0.1490.77 ± 0.0487.32 ± 0.3489.01 ± 0.16
A-OKVQARandomInstructBLIPRegular80.91 ± 0.3477.97 ± 0.5986.16 ± 0.8881.86 ± 0.32
A-OKVQARandomInstructBLIPVCD84.11 ± 0.2782.21 ± 0.3587.05 ± 0.5384.56 ± 0.28
A-OKVQAPopularLLaVA-1.5Regular79.90 ± 0.3380.85 ± 0.3178.36 ± 0.5479.59 ± 0.37
A-OKVQAPopularLLaVA-1.5VCD81.85 ± 0.4478.60 ± 0.5887.53 ± 0.1482.82 ± 0.36
A-OKVQAPopularQwen-VLRegular85.56 ± 0.3590.44 ± 0.5679.53 ± 0.8484.63 ± 0.42
A-OKVQAPopularQwen-VLVCD87.85 ± 0.3088.10 ± 0.3687.53 ± 0.4787.81 ± 0.31
A-OKVQAPopularInstructBLIPRegular76.19 ± 0.8072.16 ± 0.6985.28 ± 0.7978.17 ± 0.73
A-OKVQAPopularInstructBLIPVCD79.78 ± 0.4776.00 ± 0.5287.05 ± 0.5381.15 ± 0.42
A-OKVQAAdversarialLLaVA-1.5Regular74.04 ± 0.3472.08 ± 0.5378.49 ± 0.3875.15 ± 0.23
A-OKVQAAdversarialLLaVA-1.5VCD74.97 ± 0.3970.01 ± 0.4087.36 ± 0.1577.73 ± 0.29
A-OKVQAAdversarialQwen-VLRegular79.57 ± 0.3179.77 ± 0.3479.23 ± 0.7379.50 ± 0.38
A-OKVQAAdversarialQwen-VLVCD81.27 ± 0.0977.79 ± 0.2087.53 ± 0.3482.38 ± 0.10
A-OKVQAAdversarialInstructBLIPRegular70.71 ± 0.7665.91 ± 0.7485.83 ± 0.8075.56 ± 0.57
A-OKVQAAdversarialInstructBLIPVCD74.33 ± 0.6769.46 ± 0.7386.87 ± 0.2777.19 ± 0.47
GQARandomLLaVA-1.5Regular83.73 ± 0.2787.16 ± 0.3979.12 ± 0.3582.95 ± 0.28
GQARandomLLaVA-1.5VCD86.65 ± 0.4584.85 ± 0.5989.24 ± 0.3486.99 ± 0.41
GQARandomQwen-VLRegular80.97 ± 0.3288.07 ± 0.3471.64 ± 0.5779.01 ± 0.40
GQARandomQwen-VLVCD85.59 ± 0.3886.88 ± 0.4483.84 ± 0.3685.33 ± 0.38
GQARandomInstructBLIPRegular79.65 ± 0.2477.14 ± 0.4384.29 ± 0.3680.56 ± 0.18
GQARandomInstructBLIPVCD83.69 ± 0.1181.84 ± 0.4286.61 ± 0.4884.16 ± 0.01
GQAPopularLLaVA-1.5Regular78.17 ± 0.1777.64 ± 0.2679.12 ± 0.3578.37 ± 0.18
GQAPopularLLaVA-1.5VCD80.73 ± 0.4776.26 ± 0.6889.24 ± 0.3482.24 ± 0.35
GQAPopularQwen-VLRegular75.99 ± 0.3378.62 ± 0.4171.40 ± 0.3874.84 ± 0.34
GQAPopularQwen-VLVCD81.83 ± 0.2780.45 ± 0.4784.09 ± 0.3282.23 ± 0.22
GQAPopularInstructBLIPRegular73.87 ± 0.5869.63 ± 0.5484.69 ± 0.6876.42 ± 0.52
GQAPopularInstructBLIPVCD78.57 ± 0.1474.62 ± 0.2286.61 ± 0.4880.17 ± 0.16
GQAAdversarialLLaVA-1.5Regular75.08 ± 0.3373.19 ± 0.4979.16 ± 0.3576.06 ± 0.24
GQAAdversarialLLaVA-1.5VCD76.09 ± 0.4370.83 ± 0.4588.75 ± 0.5678.78 ± 0.36
GQAAdversarialQwen-VLRegular75.46 ± 0.6377.92 ± 0.7371.07 ± 0.9774.33 ± 0.71
GQAAdversarialQwen-VLVCD80.01 ± 0.2777.86 ± 0.2483.85 ± 0.3580.75 ± 0.27
GQAAdversarialInstructBLIPRegular70.56 ± 0.5366.12 ± 0.3284.33 ± 1.0574.12 ± 0.58
GQAAdversarialInstructBLIPVCD75.08 ± 0.1370.59 ± 0.1685.99 ± 0.1077.53 ± 0.08

Headline POPE gains as the paper states them: up to +5.8 accuracy and +7.4 F1 §4.2. These match the GQA Popular Qwen-VL row (accuracy 75.99 to 81.83, F1 74.84 to 82.23). Recall drives most of the F1 gain for LLaVA-1.5 and Qwen-VL; precision drives it for InstructBLIP §4.2.

MME hallucination subset tab. 2. Totals are sums of the four subtasks, mean ± std over 5 runs.

ModelDecodingExistenceCountPositionColorTotal
LLaVA-1.5Regular175.67 ± 7.51124.67 ± 19.59114.00 ± 9.32151.00 ± 10.45565.33 ± 32.92
LLaVA-1.5VCD184.66 ± 6.81138.33 ± 15.68128.67 ± 7.21153.00 ± 7.58604.66 ± 18.76
Qwen-VLRegular155.00 ± 3.54127.67 ± 13.36131.67 ± 7.73173.00 ± 9.75587.33 ± 31.06
Qwen-VLVCD156.00 ± 6.52131.00 ± 6.19128.00 ± 3.61181.67 ± 5.14596.67 ± 11.61
InstructBLIPRegular141.00 ± 13.9775.33 ± 14.1666.67 ± 3.9197.33 ± 16.94380.33 ± 40.20
InstructBLIPVCD168.33 ± 11.5592.33 ± 8.4764.00 ± 6.73123.00 ± 11.27447.67 ± 13.36

The paper says VCD gives a uniform gain on object-level items and on color, with little change on position §4.2. In the table, Regular beats VCD on position for Qwen-VL and InstructBLIP. The MME full-set perception and recognition results are in fig. 4 and app. C; the appendix tables are not transcribed here.

GPT-4V-judged open-ended answers on LLaVA-Bench tab. 3. Scores on a 0 to 10 scale, author-reported, judged by GPT-4V.

ModelDecodingAccuracyDetailedness
LLaVA-1.5Regular3.233.54
LLaVA-1.5VCD4.153.85
InstructBLIPRegular3.844.07
InstructBLIPVCD4.234.69
Qwen-VLRegular4.763.46
Qwen-VLVCD6.694.46

Ablations (LLaVA-1.5, MME hallucination, perception and recognition totals) app. B.

THallucinationPerceptionRecognition
200586.67 ± 11.671311.47 ± 4.33338.69 ± 19.87
500591.67 ± 36.061340.89 ± 55.91323.45 ± 5.89
700578.89 ± 19.171339.04 ± 40.40320.95 ± 14.18
999557.78 ± 1.921345.81 ± 36.31321.90 ± 10.19
αHallucinationPerceptionRecognition
0.25583.89 ± 19.321322.25 ± 32.58330.24 ± 13.60
0.5580.56 ± 17.111315.49 ± 27.28333.45 ± 5.77
0.75578.33 ± 29.491312.93 ± 39.31330.95 ± 13.58
1.0591.67 ± 36.061340.89 ± 55.91323.45 ± 5.89
βHallucinationPerceptionRecognition
0577.22 ± 11.101299.04 ± 39.30302.98 ± 19.82
0.001574.44 ± 6.311298.71 ± 40.24289.88 ± 14.02
0.01583.33 ± 18.781324.44 ± 37.84327.38 ± 17.11
0.1591.67 ± 36.061340.89 ± 55.91323.45 ± 5.89
0.2591.67 ± 7.261343.06 ± 13.06328.57 ± 16.37
0.5635.00 ± 7.641474.02 ± 15.53331.43 ± 13.03

Sampling strategies on POPE random, LLaVA-1.5 app. B. The appendix text gives top-p 0.9, top-k 50 and temperature 1.5 and 0.7 with top-k 50; the table itself does not state these values.

StrategyVCDAccuracyPrecisionRecallF1
Top-pno84.91 ± 0.2594.73 ± 0.3073.93 ± 0.5283.05 ± 0.32
Top-pyes87.82 ± 0.6691.17 ± 0.5783.76 ± 0.8787.31 ± 0.72
Top-kno83.04 ± 0.1691.84 ± 0.1572.53 ± 0.4481.05 ± 0.24
Top-kyes87.49 ± 0.5691.09 ± 0.5383.11 ± 0.7186.92 ± 0.60
Greedyno87.10 ± 0.0097.33 ± 0.0076.29 ± 0.0085.54 ± 0.00
Greedyyes88.49 ± 0.2891.78 ± 0.2884.56 ± 0.4488.02 ± 0.30
Top-k + temp 0.7no85.17 ± 0.1294.82 ± 0.1274.40 ± 0.3583.38 ± 0.17
Top-k + temp 0.7yes87.94 ± 0.5191.21 ± 0.4983.98 ± 0.6087.45 ± 0.54
Top-k + temp 1.5no79.28 ± 0.2286.48 ± 1.1269.42 ± 0.9177.01 ± 0.22
Top-k + temp 1.5yes86.97 ± 0.5090.96 ± 0.6482.09 ± 0.4186.30 ± 0.51

13B variants on POPE app. B.

DatasetSettingModelDecodingAccuracyPrecisionRecallF1
MSCOCORandomLLaVA-1.5 (13B)Regular83.31 ± 0.3291.46 ± 0.3873.48 ± 0.7581.49 ± 0.43
MSCOCORandomLLaVA-1.5 (13B)VCD87.39 ± 0.3292.68 ± 0.3681.19 ± 0.6386.55 ± 0.41
MSCOCORandomInstructBLIP (13B)Regular82.36 ± 0.5986.93 ± 0.8576.19 ± 1.0581.20 ± 0.68
MSCOCORandomInstructBLIP (13B)VCD84.53 ± 0.3888.55 ± 0.5479.32 ± 0.4483.68 ± 0.40
MSCOCOPopularLLaVA-1.5 (13B)Regular82.47 ± 0.5589.55 ± 0.9273.53 ± 0.7880.75 ± 0.61
MSCOCOPopularLLaVA-1.5 (13B)VCD85.74 ± 0.2589.33 ± 0.5281.19 ± 0.6385.06 ± 0.29
MSCOCOPopularInstructBLIP (13B)Regular79.07 ± 0.6681.11 ± 0.7075.79 ± 1.2778.35 ± 0.78
MSCOCOPopularInstructBLIP (13B)VCD81.47 ± 0.4282.89 ± 0.6479.32 ± 0.4481.07 ± 0.39
MSCOCOAdversarialLLaVA-1.5 (13B)Regular80.00 ± 0.5284.46 ± 0.7373.53 ± 0.7678.62 ± 0.58
MSCOCOAdversarialLLaVA-1.5 (13B)VCD81.92 ± 0.4482.40 ± 0.4281.17 ± 0.6581.78 ± 0.47
MSCOCOAdversarialInstructBLIP (13B)Regular76.57 ± 0.7577.00 ± 0.8375.79 ± 0.8076.39 ± 0.75
MSCOCOAdversarialInstructBLIP (13B)VCD79.56 ± 0.4179.67 ± 0.5979.39 ± 0.5079.52 ± 0.38

Paper vs code

Code: DAMO-NLP-SG/VCD at code_commit, Apache-2.0. Citations are relative to that repository. Discrepancies, each with both citations:

  • α for InstructBLIP. Paper uses α=1 §4.1 app. A. The InstructBLIP eval script passes cd_beta but not cd_alpha object_hallucination_vqa_instructblip.py, so the sampler falls back to 0.5 vcd_sample.py. The LLaVA and Qwen-VL scripts pass α=1 by argument default object_hallucination_vqa_llava.py object_hallucination_vqa_qwenvl.py. Not verified by running; it follows from reading the call path.
  • Noise schedule. Paper: T steps of Gaussian noise, each with a fixed γ=0.1 §3.2 eq. 2 app. A. Code: a fixed 1000-step schedule of betas sigmoid-spaced between 1e-5 and 5e-3, then one closed-form noising to step t = noise_step vcd_add_noise.py vcd_add_noise.py. The code never uses γ. Eq. 2 scales the signal by sqrt(1−γ) per step, so with γ=0.1 the signal shrinks geometrically over T steps; the code's schedule is not that.
  • Noise steps. Paper: T=999 for POPE, 500 for MME and LLaVA-Bench app. A. Eval scripts default noise_step to 500 object_hallucination_vqa_llava.py object_hallucination_vqa_qwenvl.py object_hallucination_vqa_instructblip.py. The repository has no run scripts that set 999 for POPE.
  • Noise space. The paper does not say in which space the noise is added. The code adds it to the processor output, which for LLaVA is the normalised pixel tensor object_hallucination_vqa_llava.py.
  • Generation length. Not stated in the paper. The LLaVA script uses max_new_tokens=1024 object_hallucination_vqa_llava.py and the Qwen-VL script uses 20 object_hallucination_vqa_qwenvl.py.
  • Default sampling. Paper baseline is direct sampling §4.1. Code defaults are temperature 1.0, top-p 1, top-k none object_hallucination_vqa_llava.py, which is consistent.
  • Plausibility cutoff. No discrepancy. Paper keeps tokens with p ≥ β·max p eq. 4. Code applies logit < log(β) + max logit to the original logits, which is the same test because softmax is shift-invariant vcd_sample.py.
  • Contrast. No discrepancy. Code computes (1+α)·original − α·noised on logits, matching eq. 3 vcd_sample.py.
  • Beam search. The paper names beam search as a possible sampler §3.3.1. The patched decoding loop only samples with multinomial on the contrastive logits vcd_sample.py. Beam search with VCD is not implemented.
  • Mechanism of patching. The code replaces transformers' internal sampling method at import time vcd_sample.py. Behaviour depends on the transformers version; the repository does not pin one in the code cited here.

No other discrepancies found in the parts read.

Pitfalls

  • Two noise models. Eq. 2 with fixed γ and T steps is not the code's one-shot schedule. Pick one and say which in your implementation. The paper does not say which one produced the reported numbers.
  • Noise scale depends on the input space. Gaussian noise in [0, 1] pixels and in normalised space have very different magnitudes. The paper is silent; the code uses the processor output object_hallucination_vqa_llava.py.
  • Stochastic. Each call draws fresh noise, and the paper states no seed. Expect run-to-run variation; the reported std over 5 runs is the only guide.
  • Cost. Each generated token needs a second forward pass on the noised image, with its own cached state vcd_sample.py vcd_sample.py. The introduction calls the overhead minimal §1; the paper gives no timing or memory numbers.
  • Default β is not the paper's best β. In its own β sweep on MME, β=0.5 scores highest on all three subsets, while the default is 0.1 app. B. The paper does not explain the choice.
  • Possible copy error in the 13B table. The InstructBLIP 13B VCD rows are identical to the InstructBLIP 7B VCD rows in all three settings tab. 1 app. B. Check before using either set.
  • Intro MME figure. The introduction says "+18%" on MME §1 without naming the model or subset. The InstructBLIP hallucination total rises from 380.33 to 447.67, about +17.7%. LLaVA-1.5 rises about 7% and Qwen-VL about 2% tab. 2. The paper does not state the basis.
  • Equation numbers. The appendix cites the source labels eq:1, eq:3 and eq:5 for γ, α and β app. A. In order of appearance those equations are numbered 2, 3 and 4 here, as cited on this card. Check the PDF's own numbering before citing.
  • Ablation text names δ, table shows T. The MME ablation text describes a noise level δ with default 500 app. B. The table is labelled T.
  • Table 2 is not uniform. VCD does not win Position for Qwen-VL or InstructBLIP tab. 2. The text says "minimal uplift" there §4.2.
  • Sampling ablation values. The top-k value and the temperature values are in the appendix text only app. B. The "Greedy" row is also not explained in the paper.
  • GPT-4V evaluation. Open-ended scores depend on GPT-4V, a proprietary judge model §4.2 app. E. Results cannot be reproduced without it, and the evaluation prompt is only in the supplement app. E.
  • Only tested on three LVLMs, 7B scale plus 13B variants. No generalisation claim beyond these is made or tested §4.1 app. B.

Lineage

  • Builds on: contrastive decoding for text (Li et al., 2022), followed for the plausibility constraint §3.3.2; classifier-free diffusion guidance, cited as an analogy §3.3.1; the diffusion forward process, cited for the noise model §3.2.
  • Compared against: regular decoding (direct sampling) in every table tab. 1 tab. 2 tab. 3.
  • Superseded by: not stated in the wiki.

Source and license

Adapted from “Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decoding” by Sicong Leng, Hang Zhang, Guanzheng Chen, Xin Li, Shijian Lu, Chunyan Miao, Lidong Bing (arXiv:2311.16922), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/DAMO-NLP-SG/VCD at commit d6568ff81b8f (Apache-2.0). Any quoted code is shown under that license.