Memorized or Looked? Internal Signatures of Benchmark Contamination in Vision-Language Models

When a vision-language model answers a benchmark question correctly, we usually cannot tell whether it read the image and reasoned, or whether it had seen that exact question during training and recalled the answer. Current contamination detectors treat the model as a black box. They shuffle answer options, mask caption words, or edit images with a diffusion model, then watch whether accuracy drops. These tests are expensive, and the strongest one breaks down on exactly the benchmarks people care most about for reasoning: math diagrams, where diffusion models cannot redraw thin lines and small symbols. This note proposes reading contamination directly off the model's internal states. The idea is to measure, per question, two things: how early the answer becomes readable in the hidden activations, and how much those activations actually depend on the image.

The core bet links contamination to the "modality gap", the well-documented fact that image and text embeddings sit in separate regions of a shared space. We predict that memorization leaves different geometric fingerprints depending on how the leak happened. If only the text of a benchmark leaked into the language backbone, the image should become causally irrelevant to the answer. If image–answer pairs leaked together, the image's internal representation should be pulled toward the answer's text representation. Black-box perturbation tests cannot separate these two leak sources. A label-free internal score that can would make contamination auditing cheap, and usable on diagram-heavy math benchmarks.

Core Claim

For a contaminated item, a vision-language model commits to its answer before it reasons and largely independent of the visual evidence. The form this takes depends on what leaked. Text-only leakage shows up as near-zero causal contribution from the image tokens. Paired image–text leakage shows up as an item-specific shrinking of the modality gap between the image tokens and the answer text. Both signatures can be measured without contamination labels, at roughly the cost of a few forward passes per item. We claim they detect controlled contamination on MMStar, MathVista and MathVerse at least as well as diffusion-based counterfactual editing, and that they keep working on diagram items where diffusion editing fails.

Where This Sits

The black-box detection line motivates the proposal. Both Text and Images Leaked! (MM-DETECT) perturbs option order and masked captions, and shows that leakage in the unimodal language backbone transfers to the multimodal model. It gives no view of how that leaked text interacts with the image inside the model. Contamination Detection for VLMs Using Multi-Modal Semantic Perturbations edits images so that the correct answer changes. Clean models improve on the edited images; memorizing models stick to the old answer. Its authors note that their diffusion pipeline cannot render fine text, mathematical symbols or geometric lines. That limitation defines our application regime. MMStar and MathVerse show that many multimodal questions can be answered without the image. This creates our main confound: a question that is answerable from its text is not the same as a question the model has memorized.

The latent-reasoning interpretability line supplies the method and one constraint. Are Latent Reasoning Models Easily Interpretable? finds that latent reasoners often reach the same answer with zero reasoning tokens. It reads this as reliance on training artifacts, but never ties it to contamination; we turn that observation into a per-item commitment measurement. The same paper shows that vocabulary-projection tools degrade on wrong answers, recovering gold traces in 24–36% of incorrect cases versus 71–93% of correct ones. This constrains us: our scores must be reported separately for correct and incorrect items. Does Out-of-Sight Equal Out-of-Mind in CoT Monitorability? shows that linear probes on hidden states detect hint reliance with AUROC above 0.90 in a text-only 1B model. We reuse its logit-lens and probing tools, and treat its supervised probe as a reference point rather than as our method.

The modality-gap line supplies the geometry. Mind the Gap shows that the gap is close to a constant offset vector that appears in every contrastive model, even at random initialization. Closing the Modality Gap Aligns Group-Wise Semantics shows that the gap matters for absolute distances, which drive clustering, but not for retrieval rankings. Because the gap is roughly constant, any item-specific deviation from it is informative. Removing the global offset is what lets a local, per-item deviation stand out.

Research Program

We define three per-item quantities on an open vision-language model, read from intermediate layers at the last question token, before any chain-of-thought text is generated.

The first is commitment depth. This is the earliest layer at which the logit lens (projecting a hidden state through the output vocabulary matrix) ranks the eventual answer first. We also check whether truncating the generated chain of thought to zero tokens leaves the answer unchanged; this is the multimodal analogue of the zero-latent-token test.

The second is image causal contribution. We patch the hidden states at the image-token positions with states computed from a different image drawn from the same benchmark category. We then measure the change in the answer's logit-lens log-probability at mid layers. This choice follows L2V-CoT, which found that intervening at shallow layers disrupts perception, so mid layers are where reasoning-relevant state lives.

The third is local gap residual. Let $g$ be the mean difference between image-token and text-token states over the whole benchmark; this is the global gap offset. Let $v_i$ be the mean image-token state for item $i$, and $a_i$ the state of the item's gold answer text. Then

$$r_i = \cos\big(v_i + g,\ a_i\big) - \mathbb{E}_{j \neq i}\,\cos\big(v_i + g,\ a_j\big),$$

which asks whether this image, once the global offset is removed, sits unusually close to its own answer compared with other answers from the same benchmark.

The predictions are as follows. Text-only leakage yields early commitment and low image contribution, with $r_i$ near zero. Paired leakage yields early commitment and positive $r_i$, and the image contribution can stay high because the image now serves as a retrieval key. Clean items whose text alone suffices should show low image contribution but late commitment. This last case is how we separate "text-solvable" from "memorized".

Ground truth comes from controlled contamination. We follow the recipe in the semantic-perturbation paper: fine-tune LLaVA-v1.5-7B and Qwen2.5-VL-7B for up to 3 epochs on a random half of MMStar, MathVista and MathVerse items, leaving the other half clean. We run three conditions: paired image–question–answer leakage; text-only leakage into the language backbone before multimodal alignment, mirroring MM-DETECT's backbone-transfer finding; and a placebo fine-tune on unrelated visual question answering data to control for generic distribution shift. MathVerse's six variants, from text-dominant to vision-only, give a built-in test of whether the signals survive once textual cues are removed.

Baselines

The naive reference point is a per-item blind test: flag an item as contaminated if the model answers it correctly with the image withheld. This is the instance-level version of MMStar's multimodal leakage idea. It costs one forward pass. It is the natural "do nothing clever" detector because it already captures image-independence. We run it on exactly the same items and models, and beating it means a clearly higher instance-level AUROC on the controlled split. The bar is especially high on clean text-solvable items, where the blind test should produce false positives by design.

The text-side behavioral baseline is Partial-Prompt Answer Accuracy from Reasoning or Memorization?. That paper reports 65.8% exact match on MATH-500 for Qwen2.5 from an 80% prompt prefix. We use the same prefix fractions and decoding settings. This baseline should catch text leakage but not image-keyed leakage, so the comparison is decisive mainly in the paired-leakage condition and on MathVerse vision-only variants. MM-DETECT's option order sensitivity is run with the authors' protocol on the multiple-choice items as a second black-box baseline.

The strongest existing method is diffusion-based semantic perturbation from Contamination Detection for VLMs Using Multi-Modal Semantic Perturbations. On MMStar it reports that clean LLaVA-v1.5-7B scores about 38% on original items and about 69% on perturbed ones (Δ = +31.5%). After 3 epochs of contamination, the same model scores about 54% on original items and about 38% on perturbed ones (Δ ≈ −16%), reaching −45% under severe contamination. These are dataset-level deltas; no reported instance-level AUROC was found on Lacuna for this method. We will rerun its pipeline on our splits with matched contamination epochs. We report both its dataset-level Δ and an instance-level score, plus wall-clock cost per item. Beating it means matching its dataset-level separation on MMStar while exceeding its instance-level AUROC on MathVista and MathVerse diagram items, where its edits are expected to be unreliable.

The supervised upper reference is a linear probe on the same activations, trained on contamination labels from one benchmark, following Does Out-of-Sight Equal Out-of-Mind. That paper reports AUROC above 0.90 for hint reliance in a different setting. We give the probe the same layers and a held-out benchmark for testing. Our label-free score need not beat it in-domain. It should match or beat it when transferred to an unseen benchmark, since that paper found that probe monitorability fell sharply when moved out of domain.

Ablations isolate each ingredient. We compare commitment depth alone, image contribution alone, and local gap residual alone, and we run the gap residual without subtracting the global offset $g$. The last ablation tests whether the modality-gap geometry is doing real work or whether raw cosine similarity is enough.

Why not just…?

Why not just run the blind test and call image-independent correct answers contaminated? This is the most serious threat, and for text-only leakage it may perform nearly as well as our score. MMStar shows why it cannot be the whole answer: GeminiPro reaches 42.9% on MMMU from text alone, which means many uncontaminated items are text-solvable, and the blind test will flag them. MathVerse shows models sometimes score higher with the diagram removed. Our commitment-depth signal is designed to separate these clean text-solvable items from memorized ones. The paired-leakage condition is where the blind test should fail outright, because there the memorized model does use the image as a key. If the blind test matches our score in both leakage conditions, we will report that internal signals add nothing for detection and shift the contribution to diagnosing the leak source.

Why not just train a supervised probe on contamination labels? Real deployments have no labels: nobody knows which items a proprietary or third-party model saw. The hint-reliance probing paper also documents sharp degradation under domain transfer. The cross-benchmark probe-transfer experiment settles this directly. If a probe trained on MMStar labels transfers to MathVerse as well as our label-free score does, the geometric construction is unnecessary, and we would say so.

Why not just use diffusion counterfactuals, which already work? They work on natural images. The authors themselves report that the pipeline cannot render fine text, symbols and geometric lines. That failure covers most of MathVista and MathVerse. The method also depends on GPT-4o and Flux calls for every item. Our MathVerse vision-only comparison, together with the cost measurement, shows whether this gap is real in practice.

Decisive Checks

Three results would decide the proposal.

The first is detection quality. On the controlled split, the combined internal score must beat the blind test in instance-level AUROC on clean text-solvable items, and must beat diffusion perturbation on diagram items.

The second is leak-source separation. Text-only and paired leakage must produce distinguishable signatures: low image contribution in the text-only case, positive local gap residual in the paired case. The placebo fine-tune must produce neither. If the two leak conditions look the same, the modality-gap part of the claim is wrong.

The third is a downstream audit of a published gain. We apply the score to L2V-CoT, which reports an average 3.7% MathVista gain from injecting LLM reasoning vectors. We split MathVista items by our score and ask where that gain comes from. If it concentrates on items our score flags as memorized, the intervention is mostly surfacing recalled answers rather than adding visual reasoning. That finding would show that internal contamination signatures change how such results should be read.