Vision-language models (LVLMs: systems that turn an image into a grid of "visual tokens" and feed them to a large language model) often describe objects that are not in the picture. A recent and surprisingly effective fix uses depth. DSCR estimates a depth map for the image and then smooths each visual token's cached keys and values (the stored attention memory, or KV cache) with its neighbours. Tokens are pooled together only when they are close both on the image grid and in depth. The method is training-free and lifts LLaVA-1.5's MME total from 892.68 to 925.96. Its pooling rule, though, rests on raw depth difference. Raw depth difference marks object borders poorly. A floor, a tabletop, or a road recedes smoothly, so its depth changes steadily, and DSCR splits it into strips. Two objects pressed together at the same distance have nearly equal depth, so DSCR blends them into one.
We propose to replace the depth-difference test with a test for occlusion edges: places where depth jumps off the surface it was on. Two tokens should share representation when they can be joined by a path on the image grid that never crosses such a jump. That distance is measured along a path over the patch grid, which is why we call it geodesic. The test has a clean geometric basis. Under perspective projection, inverse depth on any plane is an affine function of pixel coordinates. A local second difference of inverse depth is therefore zero on every planar surface, however steeply it slants, and large at step edges. The affine-invariant output of monocular estimators such as Depth-Anything keeps this property. The note asks a narrow question that can be settled: is the hallucination reduction from depth-based cache smoothing driven by occlusion structure, by generic spatial smoothing, or by any reasonable segmentation? It then builds the variant that the answer favours.
Core Claim
DSCR shows that depth helps, but its kernel mixes two signals: being on the same surface, and simply being at a similar distance. We claim that only the first signal reduces object hallucination. Our variant, a geodesic kernel that blocks pooling only at depth steps, should beat DSCR on two kinds of probe: objects resting on large slanted support surfaces, and adjacent objects at different depths. It should match DSCR elsewhere at the same cost.
We also expect the geodesic kernel not to help in one case: touching objects at equal depth, where no depth step exists. That case is where a 2D segmenter could win. Building this prediction into the evaluation is what makes the study informative rather than promotional.
Mechanism
Let $u_p$ be the predicted inverse depth at patch $p$, rescaled to $[0,1]$. Define the edge cost between grid neighbours $p$ and $q$ as
$$c(p,q) = \big|\,u_q - 2u_p + u_{p'}\big|,$$
where $p'$ is the neighbour of $p$ opposite $q$, so $c$ is the discrete second difference of inverse depth along that direction. The cost vanishes on any plane and spikes at occlusion steps.
The geodesic distance $g(i,j)$ is the minimum summed cost over grid paths from $i$ to $j$. Over a 24×24 LLaVA grid it is computed exactly with Dijkstra, a few milliseconds per image. The smoothing weight is
$$w_{ij} = \exp\!\left(-\frac{\|x_i - x_j\|^2}{\sigma^2} - \frac{g(i,j)}{\tau}\right),$$
where $x_i$ is the 2D grid position, $\sigma$ sets the spatial reach, and $\tau$ sets how hard a depth step blocks pooling.
Keys and values are updated by the same normalized weighted average DSCR uses. Everything else is held fixed: the layers touched, the mixing strength, and query-agnostic application before the prompt. This isolates the kernel as the only difference.
Two optional extensions are tested separately rather than folded in. One adds a crease term from surface-normal changes, borrowing the plane-consistency idea behind PlaneRecNet's normal loss. The other gates pooling relative to the queried object's depth layer, in the spirit of the order maps of Order-aware Interactive Segmentation.
Relation to Prior Work
DSCR supplies both the method template and the diagnosis that motivates this work. Its authors observed that hallucination coincides with scattered, poorly aligned keys across patches of one object, and that depth-aware pooling restores alignment. We keep everything except its continuous depth-difference kernel.
Two other papers use the same depth-difference geometry in related places. ToSA merges tokens by 3D $(x,y,z)$ proximity during compression. It treats depth as a linear coordinate and does not measure hallucination. OmniCount keeps pixels in a mask only if their depth matches the object's local mean. Both inherit the slanted-plane problem we target.
The segmentation literature supplies the geometric principle. PlaneRecNet's depth-gradient loss and PopNet's contact-surface prior both argue that object boundaries are depth steps relative to a support surface, not depth gaps. PopNet in particular judges foreground by separation from the surface behind the object. Our second-difference cost is a training-free, patch-level version of that idea.
MCA-LLaVA constrains the design from the other side. It shows that 2D spatial structure alone, imposed by Manhattan-distance attention, already gives a +6.7% POPE F1 gain. Any depth method must therefore beat a pure 2D control, not just the raw model.
One constraint comes from DSCR's own scope. Because the method needs a 1-to-1 mapping between tokens and patches, we restrict ourselves to LLaVA-style models. Extending it to Q-Former models (which compress the image into a small set of learned query tokens) is out of scope.
Research Program
The work has three parts.
A probe set organized by boundary type. We will build it from ScanNet and NYUv2, which provide ground-truth instance masks and sensor depth. From the masks and depth we label every instance-pair boundary as one of four types:
- an occlusion step,
- a same-depth contact,
- an object resting on a slanted support plane,
- open separation.
We then generate POPE-style yes/no questions with adversarial negatives, chosen by co-occurrence following Li et al.. We add count and "which is in front" questions and caption-level checks scored CHAIR-style against the instance labels. Every result is reported per stratum, so that "depth helps" can be traced to the boundary type where it helps.
A controlled kernel comparison. All kernels are run inside one DSCR-style refinement code path, so that pooling weights are the only variable.
An analysis of whether the mechanism holds. We measure how coherent the keys are within each ground-truth object under each kernel, testing DSCR's scattering diagnosis directly. We correlate the per-image gain in coherence with whether that image's hallucination is fixed. We also swap monocular depth for sensor depth, to separate kernel quality from estimator error. That error-propagation risk is flagged for exactly these pipelines in the depth-segmentation literature.
Baselines
Unmodified model and plain smoothing. The naive reference is LLaVA-1.5-7B with greedy decoding and no intervention. Next to it we run 2D-only smoothing: the same refinement with the depth term removed. This is the strongest "geometry without depth" control, the cache-level analogue of MCA-LLaVA's 2D prior. Without it, any gain could just be spatial denoising.
DSCR. The strongest existing method is DSCR itself, rerun in our code with its published kernel on the same LLaVA-1.5 checkpoint and the same Depth-Anything depth maps. Each kernel gets an equal hyperparameter grid (12 settings of bandwidth and strength), tuned on a held-out ScanNet split and frozen before testing on POPE, MME, CHAIR, AMBER and the new strata. DSCR's reported figure is the MME total of 925.96 (from 892.68) on LLaVA-1.5. On its Depth Hallucination Mini-Benchmark it reports "accuracy gains of up to 41.6%". We found no reported result on Lacuna for DSCR's POPE or CHAIR scores, so we will produce those numbers ourselves. Beating DSCR means two things. First, a statistically significant gain on the slanted-support and occlusion-step strata (paired bootstrap over images, p<0.05), with at least 2 points of adversarial-split accuracy as the practical bar. Second, no loss on standard POPE, MME, or CHAIR beyond the seed-to-seed noise we measure.
Segment-based pooling. This is the ablation that isolates our key ingredient. Tokens are averaged only within the same 2D segment, using SAM masks or an RGB-edge geodesic built with the identical Dijkstra code but costs from color gradients. If it matches the depth-geodesic kernel on the step strata, then the operative ingredient is "any partition", not depth.
Off-family references. We report RITUAL, which reaches 88.87% POPE accuracy versus 84.13% for base LLaVA-1.5, and SHARP, which cuts CHAIR_s from 52.8 to 34.8 on LLaVA-v1.5. Both are rerun under our protocol and noted as using either two forward passes (RITUAL) or offline steering-vector extraction (SHARP).
Why not just…?
Why not just tune DSCR's depth bandwidth? A wider depth kernel would stop the slanted floor from being split, but it would also let a foreground object bleed into a wall a short depth step behind it. A single bandwidth cannot be both tolerant along a slope and strict across a step. A cost that is zero on planes and high at steps does not have that conflict. The tuning grid gives DSCR its best bandwidth, so if tuned DSCR closes the gap on the slanted-support stratum, our claim fails.
Why not just pool within SAM segments, with no depth at all? This is the real threat. Segments also block pooling at object borders, and they handle same-depth contacts, which depth cannot. Prior work supports depth mainly where photometry fails: PopNet's camouflage gains, and OIS's "depth confusion" between foreground and similar-looking backgrounds. So our prediction is a crossover. Depth-geodesic pooling should win on occlusion steps among same-colored instances. SAM pooling should win on same-depth contacts. Segment-based pooling also has a cost: running SAM is heavier than a depth model plus Dijkstra. If SAM wins everywhere, we will report that depth is unnecessary for this mechanism. That is still a useful correction to the DSCR story.
Why not just use contrastive decoding or RITUAL? These methods act on output scores and need extra forward passes per token or per image. SHARP measures VCD at 13.97 s per sample on LLaVA-Next. Neither changes how visual tokens group into objects. They are complementary rather than competing, so we also report geodesic refinement stacked with RITUAL. If RITUAL alone matches our method on the occlusion strata, the boundary story adds nothing for hallucination.
Decisive Checks
The study is decided by three results.
The first is the stratified ScanNet/NYUv2 comparison. The depth-geodesic kernel must beat both DSCR and 2D-only smoothing on the slanted-support and occlusion-step strata, and must be no better than SAM pooling on same-depth contacts. This crossover pattern is predicted in advance. A uniform win or a uniform loss would both falsify the mechanism.
The second is the swap from monocular to sensor depth. If gains grow substantially with sensor depth, estimator error is the bottleneck, and the next step is depth models rather than kernels.
The third is the coherence analysis. Images whose within-object key coherence rises most should be the ones whose hallucinations disappear. If coherence rises and hallucination does not move, DSCR's scattering diagnosis is correlational, and cache smoothing works for some other reason we would then need to find.
References
- Mitigating Hallucination in Vision-Language Model with Depth and Spatial-aware Key-Value Refinement
- PlaneRecNet: Multi-Task Learning with Cross-Task consistency for Piece-Wise Plane Detection and Reconstruction from a Single RGB Image
- Order-aware Interactive Segmentation
- ToSA: Token Merging with Spatial Awareness
- OmniCount: Multi-label Object Counting with Semantic-Geometric Priors
- Source-free Depth for Object Pop-out
- MCA-LLaVA: Manhattan Causal Attention for Reducing Hallucination in Large Vision-Language Models
- Evaluating Object Hallucination in Large Vision-Language Models
- RITUAL: Random Image Transformations as a Universal Anti-hallucination Lever in LVLMs
- SHARP: Steering Hallucination in LVLMs via Representation Engineering