Vision-language models describe images in fluent text, but they often mention objects that are not in the picture. One cheap fix is to nudge the model's internal activations during generation. Current methods add the same fixed "be more faithful" direction to every token. That direction is learned from responses that a separate language model has labeled as faithful or hallucinated. This proposal replaces the fixed direction with a direction that changes from token to token. We estimate it with a score: the gradient of the log-probability density of activations, a vector pointing toward where activations become more typical. Specifically, we estimate the difference of two such scores. The first describes activations produced when a caption is read alongside its true image. The second describes activations produced when the same caption is read alongside a different, mismatched image. That second case is a label-free stand-in for hallucination, because the text makes claims the image does not support. At inference, we push each hidden state a small step along this difference, and only inside a low-dimensional subspace learned from data.
In two sentences: hallucinated text looks, inside the model, like a caption being read next to the wrong picture, and we can get unlimited examples of that for free by swapping captions between images. We fit a low-rank vector field that points from "wrong-picture" activations toward "right-picture" activations, and we follow it during decoding. The proposal must also answer a harder question. Does the score-estimation machinery beat the two obvious shortcuts: a constant steering vector computed from the same caption-swap data, and the gradient of a nonlinear classifier trained to separate the two kinds of activations?
Core Claim
A large vision-language model (LVLM) is a pretrained language model fed with visual tokens from an image encoder. At an intermediate layer $\ell$ it produces a hidden state $h$ at every token position. Let $\pi(h)$ be the distribution of such states at object-word positions when ground-truth captions are read with their own image. Let $p(h)$ be the distribution of states at the same positions when those captions are read with a mismatched image. The quantity we estimate is the score ratio
$$s(h) \approx \nabla_h \log \frac{\pi(h)}{p(h)},$$
the direction in which a hidden state becomes more "grounded-like" relative to "unsupported-text-like."
The claim has three parts. First, this field is far from constant, so the best steering direction varies with the token and the image. Second, the field concentrates in a low-dimensional subspace. Third, fitting the gradient directly, rather than fitting a scalar and differentiating it, yields better-directed steering. The payoff is measured on open-ended captioning, where earlier decoding tricks have failed.
Where this sits in prior work
Several papers motivate the gap. Evaluating Object Hallucination in Large Vision-Language Models introduced the POPE yes/no probing benchmark and showed that hallucinations track how often objects co-occur in training text. Why LVLMs Are More Prone to Hallucinations in Longer Responses showed that attention drifts from visual tokens to the model's own earlier output as responses grow. Together these suggest hallucination is text continuing without image support. Our caption-swap construction reproduces exactly that condition on demand.
SHARP supplies the setting and is the main competitor. It found that faithful and hallucinated states are linearly separable, with the best separation in layers 10–15. It then adds a fixed mean-difference vector at layer 10, with the vector computed from HaloQuest responses labeled by GPT-4o-mini. We differ in two ways. Our direction depends on the current state, and our training data need no judge model, which matters because Chen et al. report that judge models themselves hallucinate.
Other work constrains the design. Visual Contrastive Decoding contrasts the model's next-token scores on a clean image against a noise-corrupted image. RITUAL combines predictions on the original and a randomly transformed image. The Mirage of Performance Gains found that such contrasts mostly exploit POPE. A corrupted image makes the model say "No," subtracting that pushes answers toward "Yes," and on the balanced POPE benchmark this alone raises accuracy. The same paper found no gain on CHAIR or MME. Two design choices follow from this result. Our reference uses a real but mismatched image, not noise. And we treat a change in the POPE "Yes" rate as a warning sign, not a success.
Summary-Guided Decoding fights the drift in long captions with an external summarizer and part-of-speech rules. We borrow its restriction to image-related words when choosing training positions.
Three papers supply the method. Dimension reduction via score ratio matching fits $\nabla \log(\pi/p)$ directly from samples, using a nuclear-norm penalty on a projection matrix to find the subspace where $\pi$ departs from a reference $p$. That paper assumes a known Gaussian reference. Our reference is itself only available through samples, which is the main technical extension. Sliced Score Matching supplies the cheap random-projection estimate of the trace term in score matching objectives, which keeps training affordable at hidden size 4096. Mutual Information Gradient Estimation supplies the central hypothesis: estimating a scalar and then backpropagating through it gives high-variance, misdirected gradients. That paper also gives the main caution. Its tighter gradient estimator did not beat the heuristic local Deep InfoMax variant, so statistical tightness need not win. We take that seriously below.
Kernel Stein estimators (Gradient Estimators for Implicit Models, SSGE) need a cubic-cost matrix inversion over reference samples. We use one only as an offline check on small subsets, not inside decoding.
Research Program
Data construction. From MSCOCO training images we take ground-truth captions. We pair each caption with its own image, and separately with an image drawn from the same split that shares no annotated objects with the caption's nouns. We run the frozen LVLM in teacher-forcing mode, meaning the caption is fed in as given rather than generated. We record layer-$\ell$ states at noun and adjective positions, selected with a part-of-speech tagger as in Summary-Guided Decoding. This gives paired samples from $\pi$ and $p$ in the hundreds of thousands, with no labeling.
We also build two other references, used only as ablations. One uses a noise-corrupted image, as in contrastive decoding. The other uses no image at all, giving a text-only reference.
Estimating the reference score. We first fit a small network $t_\psi(h) \approx \nabla_h \log p(h)$ with variance-reduced sliced score matching and then freeze it. A cheaper variant replaces $t_\psi$ with the closed-form score of a Gaussian fitted to reference states.
Fitting the score ratio. We then fit the ratio field. Write $\pi$ for the grounded distribution, $p$ for the mismatched-image reference, and $t_\psi$ for the frozen reference score. Integrating by parts under $\pi$ turns the squared error between $s$ and the true score ratio into a quantity computable from samples:
$$J(s) = \mathbb{E}_{h\sim\pi}\left[\, \|s(h)\|^2 + 2\,\mathrm{tr}\,\nabla_h s(h) + 2\, s(h)^\top t_\psi(h) \,\right] + \lambda \|VV^\top\|_*.$$
Here $s(h) = V f_\phi(V^\top h)$, where $V$ is a $4096\times r$ matrix and $f_\phi$ is a small network acting in $r$ dimensions. The trace term uses Rademacher random projections from Sliced Score Matching, and $\lambda$ weights the nuclear-norm penalty $\|\cdot\|_*$. The working rank $r$ is chosen from the eigenvalue decay of the diagnostic matrix $\mathbb{E}_\pi[s s^\top]$, following the score ratio matching paper.
Steering. During generation we replace $h$ with $h + \beta\, s(h)$ at layer $\ell$ for every token. We also test a gated variant that steers only when $\|s(h)\|$ exceeds a threshold. Both $\beta$ and $\ell$ (searched within layers 10–15) are tuned on a held-out COCO validation split.
Why the field might be better behaved than a single score. Raw scores are ill-defined off the low-dimensional manifold where activations live. Both distributions here come from the same model on the same text, so they plausibly share support, and the ratio only has to capture where they differ. We check this directly. On 2,000-state subsets we compare $s(h)$ against an offline SSGE estimate of each score, differenced.
Models. LLaVA-1.5 (7B) and LLaVA-Next, matching the models in the strongest reported results.
Baselines
Unmodified model. The reference point is the same LVLM with greedy decoding and with standard sampling, since the two behave differently on yes/no tasks. On CHAIR, SHARP reports a sentence-level hallucination rate (CHAIR$_s$) of 52.8 for unmodified LLaVA-v1.5, which tells us the regime to expect. We rerun this ourselves under our prompt and length settings.
Naive tricks from the Mirage paper. We include the Mirage paper's prompt-based adjustment (appending "Answer Yes if possible") and the adaptive plausibility constraint alone. These are the cheapest ways to look good on POPE. That paper reports 90.2% POPE accuracy for prompt adjustment versus 89.2% for contrastive decoding on LLaVA-13B (COCO random), and about +2.5% from the plausibility constraint alone. Beating them means matching their POPE accuracy without their shift in "Yes" rate, and clearly beating them on CHAIR, where that paper reports they do not help.
SHARP, the strongest existing method. We run SHARP as published, with HaloQuest and judge-labeled steering vectors at layer 10, using the same models, prompts and decoding settings as ours. Reported numbers are as follows. CHAIR$_s$ on LLaVA-v1.5 falls from 52.8 to 34.8. MME perception total on LLaVA-v1.5 rises from 510.0 to 613.3. POPE adversarial accuracy on LLaVA-Next is 82.8% versus 79.5% for standard sampling. Latency is 7.04s per sample on LLaVA-Next. SHARP gets the same tuning budget for its scale $\beta$ on the same validation split. Beating it means a lower CHAIR$_s$ and CHAIR$_i$ at equal or higher object recall and similar caption length, no loss on MME perception, and latency within a few percent of SHARP's.
Contrastive and augmentation decoding. We run VCD and RITUAL under the same decoding budget, as two-pass references. RITUAL reports 88.87% POPE accuracy versus 84.13% for base LLaVA-1.5. VCD reports up to +7.4 F1 on POPE random and an MME rise from 565 to 604. VCD's latency is 13.97s per sample in SHARP's measurement. For RITUAL's CHAIR and MME-Fullset results, no reported number was found on Lacuna, so we measure them.
Ablations that isolate the key ingredient. Three variants use exactly our caption-swap data. The first is caption-swap mean difference: the SHARP-style constant vector $\mathbb{E}_\pi[h]-\mathbb{E}_p[h]$, which separates the effect of the label-free data from the effect of the local field. The second is mean-of-field: the constant vector $\mathbb{E}_\pi[s(h)]$, which tests whether adaptivity matters at all. The third is classifier gradient: an MLP of matched capacity, trained by logistic regression to tell $\pi$ from $p$ and also restricted to rank $r$, steering along the gradient of its logit. In theory that gradient also estimates the score ratio. We additionally ablate the reference distribution (mismatched image versus noise image versus no image) and the rank penalty ($\lambda = 0$).
Why not just…?
Why not just shift the output toward "Yes" or prompt the model? On POPE this works: the Mirage paper's prompt adjustment beats VCD on LLaVA-13B, 90.2% versus 89.2%. But the same paper reports that such shifts do nothing for open-ended captions, because they move a decision threshold rather than restoring use of the image. We report POPE "Yes" rates for every method. If our POPE gain comes with a comparable "Yes"-rate shift and no CHAIR gain, we have reproduced the mirage and the proposal fails.
Why not just use a constant steering vector like SHARP's? This is a serious threat, since SHARP's constant vector already cuts CHAIR$_s$ by 18 points. The mean-of-field and caption-swap-mean ablations settle it. If the cosine similarity of $s(h)$ across tokens is near 1, or if mean-of-field matches the full field on CHAIR, then adaptivity buys nothing. In that case the contribution shrinks to a judge-free way to build SHARP-style vectors, which we would report as the finding.
Why not just take the gradient of a nonlinear hallucination classifier? This is the most dangerous alternative, because a density-ratio classifier's logit gradient is in principle the same score ratio. Our reason to expect a difference comes from MIGE's observation that fitting a scalar and then differentiating misdirects gradients. Against that, MIGE itself lost to a heuristic in the local Deep InfoMax comparison. The classifier-gradient ablation, at matched capacity, rank and tuning, decides the question. If the classifier ties, we would recommend the simpler classifier and say so.
Why not just use two-pass decoding like VCD or RITUAL? These methods double the forward passes, and the Mirage paper attributes much of contrastive decoding's POPE gain to "Yes" bias and truncation, with none on CHAIR. Our method needs one pass plus a small low-rank network at one layer. We will report CHAIR, MME and latency side by side.
Proposed Experiments and Decisive Checks
Primary evaluation. CHAIR$_s$ and CHAIR$_i$ on 500 held-out MSCOCO validation images under a fixed "describe this image in detail" prompt. We report object recall against ground-truth annotations and mean caption length alongside, because fewer mentioned objects trivially lowers CHAIR. We also run a length sweep from 64 to 512 tokens on Visual Genome, following Summary-Guided Decoding, to test whether the field counteracts drift in long captions.
Secondary evaluation. MME Existence and Count subsets plus the full Perception total, to check that steering does not hurt general perception. POPE random, popular and adversarial splits, always with the "Yes" rate reported. LLaVA-Bench for qualitative failure cases.
Four checks decide whether the idea is right. The first is adaptivity: the distribution of cosine similarities of $s(h)$ across tokens, and full field versus mean-of-field. The second is direct fitting: full field versus classifier gradient. The third is the reference: the mismatched-image reference should beat the noise reference on CHAIR, and the noise reference should show the Mirage paper's "Yes" bias on POPE. The fourth is the departure subspace: a sharp eigenvalue drop at small $r$, with the nuclear-norm model at least matching the full-rank one.
Detection as a by-product. As a secondary use, we test whether $\|s(h)\|$ at object tokens flags hallucinated objects, compared against a SHARP-style linear probe by AUROC on CHAIR-labeled tokens.
Expected outcome. The idea succeeds if the field beats SHARP on CHAIR at equal recall and latency, and also beats both constant-vector ablations and the classifier gradient. It succeeds only partially if just the label-free caption-swap data helps. It fails if gains appear only on POPE together with a "Yes"-rate shift.
References
- Evaluating Object Hallucination in Large Vision-Language Models
- Why LVLMs Are More Prone to Hallucinations in Longer Responses: The Role of Context
- SHARP: Steering Hallucination in LVLMs via Representation Engineering
- MLLM-as-a-Judge: Assessing Multimodal LLM-as-a-Judge with Vision-Language Benchmark
- Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decoding
- RITUAL: Random Image Transformations as a Universal Anti-hallucination Lever in LVLMs
- The Mirage of Performance Gains: Why Contrastive Decoding Fails to Mitigate Object Hallucinations in MLLMs?
- Mitigating Hallucinations in LVLMs via Summary-Guided Decoding
- Dimension reduction via score ratio matching
- Sliced Score Matching: A Scalable Approach to Density and Score Estimation
- Mutual Information Gradient Estimation for Representation Learning
- Gradient Estimators for Implicit Models
- A Spectral Approach to Gradient Estimation for Implicit Distributions