Vision-language models, which pair an image encoder with a large text generator, often describe objects that are not in the picture. A useful diagnosis comes from an unrelated corner of computer vision. Networks trained to predict depth or pixels with a per-pixel error produce blurry outputs. Each pixel is scored on its own, so the network learns to predict the average of plausible answers and smooths away edges. The fix in that literature was to score differences between neighboring pixels, not raw values. We argue that object hallucination has the same cause at the level of whole images. Next-token training scores each image on its own. The model is therefore rewarded for predicting the scene-typical answer, such as "a kitchen has a refrigerator," rather than what this particular image contains.
We propose to train the model on differences instead. For each training image we build near-identical twins: one where a single annotated object has been erased, and one where an equally sized empty region has been erased. The loss requires two things. The model's probability of naming the erased object must drop by a margin. Its probability of naming every other object must stay the same. The first term is the analogue of preserving an edge. The second is the analogue of keeping flat regions flat, and it also keeps the model from reacting to the erasure artifact itself.
Core Claim
Hallucinations that survive object removal are a failure of sensitivity, not of average accuracy. A loss that directly matches how the model's output changes under a minimal, targeted image edit should cut these failures more than three alternatives: per-image cross-entropy on the same edited data, untargeted masking objectives, or decoding-time fixes. It should also avoid the loss of fluency that prior-suppression methods cause.
The strongest motivating evidence is MERLIM. It inpaints objects out of images and finds that models keep reporting them, with an average precision drop of about 8%. We call these "hidden hallucinations." The models are answering from scene context rather than from the object. POPE points the same way: accuracy drops sharply when the probed absent object usually co-occurs with the objects that are present.
The method borrows its logic from the Gradient Difference Loss of Mathieu et al., which matches differences between neighboring pixels in the prediction to those in the ground truth. There, "neighbors" are adjacent pixels. Here, neighbors are an image and its minimal edit.
The design is also constrained by a known weakness of edge losses. High-pass operators cannot tell a real structure from noise, which is why StructKPN handles flat and edge regions with different terms. Our stability term plays the same role. It penalizes any reaction to edits that should not matter.
Research Program
Let $s(I, o)$ be the log-probability the model assigns to the word for object $o$ at its position in a reference caption of image $I$. For an object $o$, let $I^{-o}$ be $I$ with $o$ erased by an off-the-shelf inpainter using its instance mask. The contrastive term and the stability term are
$$ \mathcal{L}_{\text{diff}} = \big[m - (s(I,o) - s(I^{-o},o))\big]_+ \;+\; \lambda \sum_{o' \neq o} \big| s(I,o') - s(I^{-o},o') \big| \;+\; \lambda \sum_{o'} \big| s(I,o') - s(I^{\varnothing},o') \big| . $$
The symbols are as follows. $m$ is a margin on the required drop. $o'$ ranges over the other annotated objects in the image. $I^{\varnothing}$ is a "null edit": the same inpainter applied to a mask of matched size placed over a region containing no annotated object. $\lambda$ weights the two stability sums.
The total training objective is the standard caption cross-entropy on the original image plus $\mathcal{L}_{\text{diff}}$. The loss acts directly on the object words of an existing caption, so no counterfactual caption has to be written. Its cost is one or two extra forward passes per pair during training. Inference is unchanged.
We will fine-tune LLaVA-1.5-7B with low-rank adapters. Training data will be COCO training-split images with instance masks. RAI-30k masks from Chen et al. serve as a second source that includes relations. Since POPE, CHAIR and MERLIM all draw on COCO, every evaluation image will come from splits disjoint from training.
To keep the model from learning a detector for one inpainter's fingerprint, training and MERLIM-style testing will use different inpainters. As a secondary analysis, we will also train a first-order variant. It replaces the finite difference with the gradient of $s(I,o)$ with respect to the patch embeddings inside the object mask. This is an input-gradient alignment in the spirit of ART, which aligned classifier saliency with image structure but only in CNN classifiers. The comparison tells us whether the true counterfactual matters or a cheaper local gradient is enough.
Relation to Prior Work
The nearest training-time relative is PAPO. It maximizes the divergence between outputs on full images and images with 60–80% of patches randomly masked, and it reports a 30.5% reduction in perception errors on reasoning benchmarks. PAPO's edit is random and coarse, and its target is "change as much as possible." Ours is object-targeted, signed, and paired with an explicit "do not change" constraint. Without such a constraint, a model can satisfy the objective by becoming unstable everywhere.
Chen et al. supervise masks through an auxiliary SAM decoder, the Segment Anything Model, and report an 8.4% F1 gain on RAH-Bench for LLaVA-13B. That decoder is discarded at inference, and the supervision says where objects are rather than how the answer should depend on them. We supervise the answer's dependence on the object directly.
Decoding-time methods work on the frozen model instead. RITUAL contrasts predictions on randomly transformed images. DAMRO subtracts logits driven by high-norm background tokens. CRG uses gradient-estimated causal effects to gate text-dominated attention routes. Steering methods SHARP and RFI edit hidden states, and RFI argues that no single static steering vector suits all inputs. None of these changes what the model learned, and all add inference cost, ranging from RFI's 1.09x latency to CRG's 2.27x.
The text-only gradient methods, GAME and Grad Detect, use gradients as detection or editing signals at test time. We use a difference signal as a training target instead.
Baselines
The naive reference is LLaVA-1.5-7B fine-tuned with the same adapters, data and steps using ordinary caption cross-entropy on original images only. This separates the effect of our loss from the effect of extra fine-tuning. We also report the untouched model.
The strongest competitor is counterfactual data augmentation with plain cross-entropy. It trains on exactly our image triples: the original, the object-erased twin with its caption stripped of that object's mentions, and the null-edit twin with the original caption. It uses the same inpainters, step count and learning-rate sweep. It is the strongest competitor because it sees identical information and differs from our method only in how that information enters the loss. Beating it means lower hidden-hallucination rates on MERLIM-style held-out edits and on POPE-Adversarial at matched caption recall, with no loss on MME.
PAPO's masking-KL objective will be run in supervised form on the same images and budget. It is the closest existing training-time method, and our untargeted-masking ablation is essentially it.
Among decoding-time methods, the numbers to beat on LLaVA-1.5 are the following. RITUAL reports 88.87% POPE accuracy, up from 84.13% (RITUAL). HalluTrace reports 89.6% POPE-Adversarial F1, up from 85.9% (HalluTrace). CRG reports CHAIR sentence hallucination falling from 52.8% to 34.2% (CRG). Base-model numbers differ across these papers because of protocol differences; DAMRO reports a CHAIR base of 12.4. We will therefore rerun RITUAL and DAMRO, using the DAMRO code, under our own evaluation settings rather than comparing against quoted figures.
We found no reported result on Lacuna for any mitigation method on MERLIM's hidden-hallucination test. That comparison is new, and we will run it for every baseline.
The key ablations are three. First, we drop both stability terms, which tests whether the "flat-region" constraint is what prevents artifact shortcuts. Second, we replace targeted object erasure with random erasure. Third, we substitute the first-order input-gradient variant for the finite difference.
Why not just…?
Why not just add the edited images as ordinary training data? This is the real threat, and we do not claim to know the answer in advance. If the model could fit every example exactly, per-image cross-entropy on all three twins would imply the right differences. In practice it cannot, and the regression-to-the-mean argument from the edge-loss literature predicts that it will spend its capacity on the common scene-level answer rather than on the rare contrastive case. The augmentation baseline is built to share every input with our method. If it matches us on MERLIM held-out edits and POPE-Adversarial, we will report that the paired data, not the loss, is the contribution.
Why not just supervise attention or add a segmentation head using the masks? Chen et al. show that mask supervision helps. However, CRG finds that attention on visual tokens does not mean the output depends on them. Text pathways can decide the token even while visual attention is high. A model can therefore look at the right place and still answer from the prior. Our loss constrains the output's dependence on the object directly, and the MERLIM test measures exactly that dependence. We expect mask supervision to improve localization more than it reduces hidden hallucinations. If it does not, that points to attention supervision as the simpler route.
Why not just use contrastive decoding or test-time augmentation? These methods need no training and are strong on POPE. They do, however, multiply inference cost: RITUAL runs two forward passes, and VCD took 13.97 s per sample versus 7.04 s for intervention in SHARP. RFI also observes that such methods can suppress useful language knowledge. They also leave the model's learned reliance on context intact. We will test whether our fine-tuned model plus RITUAL beats RITUAL alone. If so, the two approaches are complementary rather than competing.
Why not just use PAPO-style random masking? Maximizing sensitivity to large random masks rewards any output change, including changes to objects that remain visible. Our random-erasure ablation measures this directly. We will check whether it raises instability on null edits and lowers recall of objects that are still present.
Decisive Experiments
The primary test is a MERLIM-style hidden-hallucination evaluation on held-out COCO validation images, with objects removed by an inpainter not used in training. We report the fraction of erased objects the model still affirms, alongside the fraction of null-edited images whose answers flip. A method that reduces the first by also raising the second has only learned to be jumpy. We also report MERLIM's phrasing-sensitivity measure, since shortcut reliance should show up as brittleness to phrasing.
Secondary evaluations are POPE's three splits (accuracy and F1), CHAIR sentence and instance rates together with object recall and caption length, and MME's existence, count and position scores. The fluency trade-off noted in the file is caught by a text-only perplexity check on caption outputs.
Three results would falsify the central claim. The first is the augmentation baseline matching us at equal data. The second is the stability-free ablation performing as well as the full loss. The third is gains appearing only with the training inpainter. Two results would support it. The first is a gap over augmentation on POPE-Adversarial specifically, where co-occurrence priors are strongest. The second is a hidden-hallucination rate that falls while recall of present objects holds.
References
- Behind the Magic, MERLIM: Multi-modal Evaluation Benchmark for Large Image-Language Models
- Evaluating Object Hallucination in Large Vision-Language Models
- Deep Multi Scale Video Prediction Beyond Mean Square Error Michael Mathieu
- Low-Dose CT Denoising Using A Structure-Preserving Kernel Prediction Network
- Mitigating Hallucination in Visual Language Models with Visual Supervision
- Attributional Robustness Training Using Input-Gradient Spatial Alignment
- Perception-Aware Policy Optimization for Multimodal Reasoning
- RITUAL: Random Image Transformations as a Universal Anti-hallucination Lever in LVLMs
- DAMRO: Dive into the Attention Mechanism of LVLM to Reduce Object Hallucination
- Mitigating Hallucinations in Large Vision-Language Models via Causal Route Gating
- SHARP: Steering Hallucination in LVLMs via Representation Engineering
- RFI: Rectified Flow Intervention for Mitigating Object Hallucination in Large Vision-Language Models
- Gradient-guided Attention Map Editing: Towards Efficient Contextual Hallucination Mitigation
- Grad Detect: Gradient-Based Hallucination Detection in LLMs
- HalluTrace: Causal Attribution and Source-Targeted Decoding for Hallucination in Large Vision-Language Models