Case file · object hallucination

When Text Lies, Patches Don't Jacobian Lenses for Object Hallucination Detection in Multimodal LLMs

Davide Bucciarelli1,2,3 Chongzhe Zhang3,4 Driton Salihu3 Marcella Cornia1 Lorenzo Baraldi1 Feng Liu3
1University of Modena and Reggio Emilia 2University of Pisa 3AI Reliability Lab, Huawei Heisenberg Research Center, Munich 4Technical University of Berlin
A cat under an umbrella. The MLLM describes a cat, an umbrella and a person holding it. J-List highlights the cat and the umbrella patches and stays silent on the hallucinated person; JAMES gives the person a hallucination probability of 0.90.

Exhibit A · the clue

The caption mentions a person. The image patches never do.

When an MLLM hallucinates an object, the text side of the model has already committed to it. The intermediate visual tokens, however, still carry what is actually in the image. We just need the right lens to read them.

Our lens, J-List, decodes every image patch at every layer: it localizes the cat and the umbrella and remains silent on the hallucinated person, where the Logit Lens lights up spurious patches. Pairing this visual evidence with the mention's decoding state hm, our detector JAMES separates real from hallucinated mentions.

Summary of the case

Abstract

While Multimodal Large Language Models (MLLMs) exhibit remarkable capabilities, they remain prone to hallucinating nonexistent objects when describing visual scenes. A natural approach to detect such hallucinations is to inspect intermediate hidden states via representation lenses to verify whether a generated object is genuinely supported by visual evidence. However, existing approaches fail when applied to visual tokens, which are typically masked from the language-modeling loss during training and follow a distribution misaligned with that of textual tokens.

In this work, we decode intermediate visual representations by introducing a closed-form Jacobian lens that maps visual tokens to the vocabulary space by computing the sensitivity of supervised textual outputs with respect to intermediate visual states. Across semantic segmentation evaluations, our lens decodes object content with substantially higher accuracy than existing representation lenses throughout the network. We then show that multi-layer visual evidence extracted via our lens, paired with a text-side decoding state, provides strong complementary signals for object hallucination detection. Combining both sources with a lightweight linear classifier, our detector, JAMES (JAcobian MEntion Scorer), achieves state-of-the-art performance on COCO (up to 95.6 AUROC) and generalizes zero-shot to Objects365 and Pascal VOC, outperforming 14 recent competitors across six different MLLM backbones.

Exhibit B · the method

Reading the image tokens, then scoring every mention

  1. J-List is a Jacobian lens built for visual tokens. It is fitted in closed form, on the MLLM's own answers to “List all the objects in this image”, by averaging how the listed object words at the last layer respond to the image tokens of each intermediate layer. One lens per layer, fitted once per model on 100 unlabeled images.
  2. For each object mention m in a generated caption, J-List reads all image patches at every layer and summarizes where the word (and its class) shows up: the visual evidence vm.
  3. JAMES pairs vm with the decoding state hm (the PCA-reduced hidden state at the mention) and feeds both to a logistic regression trained on ~500 labeled images, which outputs p(hallucinated | m).
Overview of JAMES. (a) Fitting J-List from images paired with object lists generated by the MLLM. (b) Each mention is described by the visual evidence v_m read by J-List on the image patches at every layer and by the decoding state h_m; a logistic regression classifies it as grounded or hallucinated.
Overview of JAMES. (a) J-List is fitted on images paired with the object lists generated by the MLLM. (b) Each mention m of a generated caption is described by the visual evidence vm, read by J-List on the image patches at every layer, and by the decoding state hm at its position; a logistic regression on [vm, hm] classifies it as grounded or hallucinated.

Exhibit C · the lens

J-List decodes visual tokens more accurately than existing lenses

We test each lens as a segmentation model: for each image patch covered by a COCO object, do the 10 most probable tokens decoded from that patch include the object's name (Pass@10)? Lenses designed for text tokens (Logit Lens, Tuned Lens, the text J-Lens) struggle on visual tokens, which are never supervised by the language-modeling loss. J-List is the most accurate lens in early and middle layers, across all architectures and scales.

Pass@10 by layer for six MLLMs: J-List is above the text J-Lens, Tuned Lens, Logit Lens and EmbedLens in early and middle layers.
Segmentation performance by layer. Pass@10 (%) of J-List, the text J-Lens (J-Txt), the Tuned Lens, the Logit Lens and EmbedLens for each layer of six MLLMs.

Exhibit D · the record

Hallucination detection, in and out of domain

AUROC over all object mentions. All detectors use the same 500 COCO calibration images, and learned competitors are refitted on them wherever their recipe allows. In domain, we test on 5,000 held-out COCO images. Out of domain, the detectors fitted on COCO are applied zero-shot, refitting neither the lens nor the classifier, to Objects365 and Pascal VOC 2012. Best in bold, second best underlined.

Method Venue LLaVA-1.57B Gemma-34B Qwen3.54B LLaVA-1.513B Gemma-312B Qwen3.59B
Zero-shot methods
ProjectAwayICLR'2574.763.568.571.563.967.4
Contextual lensNAACL'2586.078.680.885.081.080.8
GLSimNeurIPS'2583.271.370.682.971.576.9
PASCVPR'2682.565.868.780.669.768.4
InsLenICML'2681.146.076.982.563.873.9
VisEREMNLP'2679.662.866.380.065.066.8
Learned methods
MetaTokenVISAPP'2589.080.680.688.780.481.6
HIRE (router)ICLR'2682.344.646.880.765.844.7
OverthinkingCVPRF'2687.281.068.686.180.878.2
VIB-ProbeACL'2689.791.293.090.191.493.5
HaloProbeICML'2690.590.991.689.689.991.2
TruthLensECCV'2690.890.091.691.292.492.0
UniProbearXiv'2690.191.492.189.791.691.4
CADMParXiv'2684.479.969.983.979.969.3
Lens-based methods (ours)
vm (Logit Lens)84.989.489.886.190.187.6
vm (J-Txt)87.489.891.587.189.289.9
vm (Tuned Lens)84.087.689.583.487.888.5
vm (J-List)89.790.093.389.590.792.7
JAMES: vm (J-List) + hm Best on all 692.394.095.592.394.395.6
AUPR, AMBER and further ablations are in the paper.

Few labels go a long way

JAMES is a linear classifier on two compact feature vectors, so it learns from few labeled images: its AUROC on held-out COCO stays above the trained competitors as the number of training images shrinks.

AUROC on held-out COCO as a function of the number of training images for trained detectors; JAMES is on top.
Label efficiency against the competitors. AUROC on held-out COCO vs. number of training images (log scale).

Exhibit E · under the magnifying glass

Qualitative examples

The Logit Lens finds a “cat” in a metal strip and misses tangerines and books that are really there. J-List reads the patches correctly, and JAMES's verdict follows.

Three examples. LLaVA-1.5-7B, hallucinated cat: Logit Lens lights up patches, J-List stays silent, p(hall) 0.73. Gemma-3-4B, real tangerine: J-List covers the tangerines, p(hall) 0.14. Qwen3.5-4B, real book: J-List covers the bookshelf, p(hall) 0.23.
Hallucinated
Grounded
Grounded
For each mention, the visual tokens where the word is in the top-5 decoded by the Logit Lens (left) or J-List (right) at any layer (darker: higher rank). Below each map, JAMES's hallucination probability with that lens. Stamps: JAMES's verdict with J-List, which matches the ground truth in all three cases.

For the record

Citation

@article{bucciarelli2026text,
  title   = {When Text Lies, Patches Don't: Jacobian Lenses for
             Object Hallucination Detection in Multimodal LLMs},
  author  = {Bucciarelli, Davide and Zhang, Chongzhe and Salihu, Driton
             and Cornia, Marcella and Baraldi, Lorenzo and Liu, Feng},
  journal = {arXiv preprint arXiv:XXXX.XXXXX},
  year    = {2026}
}