Where Does the Visual Evidence Come From? Path Attribution for Claim-Level Hallucination Checking

Vision-language models, which are language models that read an image through a vision encoder, often describe objects that are not in the picture. The best-known training-free fix, visual contrastive decoding, compares the model's word scores on the real image with its scores on a noise-corrupted copy. If a word stays likely even after the image is destroyed, the language prior is probably driving it. That contrast is a single number per word. It says how much the image raised a word's score, but not which part of the image did so. That gap matters, because a common hallucination is not a word with zero visual support. It is a word whose support is borrowed. "Spoon" gets a boost from the pixels of a fork that was already described.

This note proposes a simple bridge. We run Integrated Gradients, which sums gradients along a straight path between a reference input and the real input. We use the noise-corrupted image as the reference, so the path runs from that image to the real one. By the method's completeness property, the per-patch attributions add up exactly to the contrastive-decoding gap. The scalar that contrastive decoding already uses is therefore split across image regions. We ask whether the shape of that split separates real claims from hallucinated ones better than the scalar does. We test this in a post-hoc setting: a finished response is re-scored once by an open model. This removes the per-token backward-pass latency that has made gradient methods unattractive at decoding time.

Core Claim

For a claimed word $y$ (an object, attribute, or relation word) in a response, let $v$ be the projected visual tokens of the real image and $v'$ those of a Gaussian-noised copy. Let $F(\cdot)=\log p(y \mid \cdot, \text{text prefix})$ under teacher forcing. The attribution to visual token $j$ is

$$A_j = (v_j - v'_j)\cdot \int_0^1 \nabla_{v_j} F\big(v' + \alpha (v - v')\big)\, d\alpha, \qquad \sum_j A_j = F(v) - F(v').$$

The right-hand identity is completeness, and it makes $\sum_j A_j$ exactly the quantity Visual Contrastive Decoding contrasts. We claim three things. First, hallucinated claims differ from grounded ones less in total evidence $E=\sum_j A_j$ than in its structure. Evidence for a hallucinated claim is diffuse, or it overlaps heavily with the evidence map of an object mentioned earlier. Second, these structural features add detection power beyond the scalar $E$, beyond raw first-order gradients, and beyond attention-based signals. Third, the path integral matters specifically for high-confidence prior-driven words, where local gradients saturate.

The third claim is falsifiable. If the scalar $E$ alone matches the full feature set, the honest conclusion is that contrastive decoding already captures what gradients can see, and the proposal reports that.

Relation to Prior Work

Several papers motivate this proposal. The language-prior account of object hallucination comes from POPE, which builds adversarial splits from co-occurring objects. Contrastive decoding's finding that noised images push models toward stereotyped priors (VCD) is exactly what makes the noised image a meaningful reference: it is the model's "prior-only" state.

The closest work is GACD. It uses first-order Taylor gradients at decoding time to group visual tokens by object and to suppress tokens of already-mentioned objects. It reports up to a 33% CHAIR sentence-level reduction and an 8% POPE F1 boost, at 385 ms per token on an A40. We reuse its key insight, that "double-counted" evidence drives co-occurrence hallucinations. We differ from it in three ways. We replace local gradients with a path integral anchored at a prior-only reference, which gives the completeness tie to contrastive decoding and robustness to saturation. We treat overlap with earlier objects' evidence as a measured diagnostic rather than a hard-coded suppression rule. We move computation off the decoding loop into one-shot re-scoring.

Localize and Neutralize supplies a cost lesson: one gradient pass before generation adds only about 0.22 s. Its target, adversarial prompt injection, is different from natural hallucination.

When Seeing Overrides Knowing is the main constraining result. It found that raw gradient token importance localizes counterfactual objects worse than selected attention heads (median contrast ratio 4.41 on Gemma3). It did not test path-integrated or prior-anchored gradients. Our head-to-head comparison is designed to tell whether that negative result is about gradients in general or about raw gradients.

DAVE shows that raw ViT input gradients carry checkerboard noise from the derivative of the attention operator. We avoid most of this by integrating at the projected visual tokens rather than at pixels, and we include a DAVE-filtered pixel-space variant as an ablation.

OPERA and work on attention re-sinking (RAR) argue on opposite sides of whether attention is a usable grounding signal. Our attention baselines take that question seriously rather than assuming it away.

Research Program

We build a checker around an open model (LLaVA-v1.5-7B as primary, Qwen2-VL-7B for replication). The checker takes an image and a response, tags claim words, and computes $A_j$ for each claim with $m=16$ path steps. Interpolated forward passes are shared across all claims in a response, and each claim then needs its own backward pass.

From each attribution map we derive four features:

  • Total evidence $E$.
  • Concentration: the fraction of positive attribution inside the top connected patch region.
  • Borrowing: the cosine overlap between this claim's positive map and the maps of earlier claimed objects.
  • Text share: the local gradient-times-input mass on prefix text tokens relative to visual mass.

We use the features in two ways. The first is a zero-parameter rule (flag if $E$ is low, or if borrowing is high and concentration is low). The second is a logistic regression with four inputs, fit on a small labeled split.

Because the checker only re-scores text, it can judge responses written by other models. This makes it comparable to backward-grounding checkers. A secondary use is detect-then-regenerate: flagged sentences are resampled with the flagged word banned. This tests whether detection quality turns into lower caption hallucination.

Baselines

The naive reference is the model's own token probability $p(y)$ for each claim word, thresholded. It needs nothing beyond a forward pass. Any method that cannot beat it has no reason to exist.

The strongest competitor on the scientific question is the scalar contrastive gap $F(v)-F(v')$ from VCD. By construction it equals our total evidence $E$, so it isolates exactly what the spatial structure adds. It is run with the identical noise schedule and the identical teacher-forced responses. Beating it means a statistically significant AUROC gain from the structural features on the adversarial and co-occurrence-heavy subsets.

The strongest gradient competitor is GACD-style first-order gradient-times-input at the same visual tokens, with the same four derived features. This ablation isolates the path integral itself. We expect any gain to be concentrated on claims with $p(y)>0.9$, where saturation should hurt local gradients.

The strongest attention competitor has two forms. One is OPERA's columnar over-trust score at the claim position. The other is the image-region attention of conflict-resolution heads selected as in When Seeing Overrides Knowing, from which the same concentration and borrowing features are computed. Heads are selected on the same labeled split we use to fit the regression, so tuning budgets match.

The external-checker reference is VBackChecker, which the file reports as comparable to GPT-4o on $R^2$-HalBench. No reported numerical score on $R^2$-HalBench was found on Lacuna for VBackChecker or any other method, so we will run it ourselves where code permits.

For the regeneration use, the reference points are GACD's reported up-to-33% CHAIR sentence reduction and SHARP's reported LLaVA-v1.5 CHAIR_s drop from 52.8 to 34.8 (SHARP). We are not aware of any reported claim-level detection AUROC for these methods.

Why not just…?

Why not just use the contrastive-decoding gap as the detector? This is the real threat, and the experiment is built around it. Completeness guarantees that our total evidence equals that gap, so on claims with near-zero visual support the two methods are identical by design. The proposal only earns its cost if borrowed-evidence hallucinations exist in large numbers: claims with positive gap whose support sits on an earlier object's patches. GACD's gains from suppressing already-mentioned objects (GACD) suggest such cases exist, and POPE's adversarial split is built from exactly those co-occurrences (POPE). If the structural features add nothing over the scalar on that split, we will report that gradients reduce to contrastive decoding for this purpose.

Why not just read attention maps, which are free? Attention is cheaper, and selected heads beat raw gradients at localization in When Seeing Overrides Knowing. However, late-layer attention drifts to background patches and delimiters (RAR). Attention also carries no completeness link to the prediction, so its maps cannot be read as "how much of this word's score came from here." The head-selected attention baseline with identical derived features settles this directly. If it matches path attribution, we recommend attention for its cost.

Why not just keep GACD's first-order gradients? First-order gradients are one backward pass instead of $m$. GACD already works at decoding time. The case against them is saturation on confident prior-driven words, which is a theoretical concern that the file does not quantify for vision-language models. Our stratified comparison by $p(y)$ measures it. If local and path attributions agree on high-confidence claims, the extra steps are unjustified and we would fall back to local gradients in the post-hoc checker.

Why not just use an external detector or a segmentation-based checker? Systems like HALC and VBackChecker can be stronger on plain object existence. The cost is an extra model, and failures cascade when the detector misses small or occluded objects. Our checker cannot beat a perfect detector on existence. Its target is the claims a detector cannot adjudicate, such as attributes and relations, plus the question of whether the model itself had evidence. We report $R^2$-HalBench results split by object, attribute, and relation to show where each wins.

Proposed Experiments

Detection on MSCOCO captions. We generate captions with both models on 500 COCO images and label each object claim against COCO annotations, as CHAIR does. We report claim-level AUROC and AUPRC for all detectors, separately for claims whose ground-truth-absent object co-occurs strongly with a present object.

Detection on POPE. We use POPE's three splits on COCO, A-OKVQA, and GQA, scoring the "yes" token. The adversarial split is the decisive one for the borrowing feature. The reference point for the base model's difficulty there is MiniGPT-4's reported F1 drop from 78.86 (random) to 71.37 (adversarial) in POPE.

Cross-model checking on $R^2$-HalBench. We check responses from 18 models, broken down by hallucination type.

Conflict test on WHOOPS-AHA!. On WHOOPS-AHA! we measure whether our maps reach a contrast ratio comparable to the reported head-based 4.41. This directly tests whether the prior negative result on gradients survives prior-anchored path integration.

Regeneration. Detect-then-regenerate on CHAIR, with MME and MM-Vet scores to confirm that general ability is preserved. We report wall-clock cost per response against GACD's per-token latency.

Decisive checks. Two checks decide the outcome. The first is the gain of the four-feature model over the scalar gap on co-occurrence claims, which tests whether spatial structure matters. The second is the gain of path over local gradients on claims with $p(y)>0.9$, which tests whether saturation matters. If both are null, the result is a clean negative: for hallucination checking, gradients add nothing that two forward passes do not already give.