Vision-language models are now scored on benchmarks whose images may well have appeared in their web-scale training data. For text, there is a mature toolkit for checking this: researchers count how often a benchmark's words and word pairs appear in an open pretraining corpus, then ask whether accuracy tracks those counts. For images there is almost nothing comparable, because pixels do not come in countable units. This proposal supplies the units. It uses the old bag-of-visual-words idea, which cuts an image into local patches and maps each patch to its nearest entry in a fixed dictionary of prototype patterns (the "visual words"), so that an image becomes a countable bag of tokens. Once images are tokens, the text auditor's questions carry over directly. How often did this benchmark image's visual words, and pairs of visual words, appear in pretraining? How often did they appear next to the benchmark's answer word in a training caption? Does a model's per-item accuracy follow those counts?
A single visual dictionary is a noisy instrument. Quantization merges distinct patches into one word, and the dictionary inherits the biases of the encoder that produced it. The second idea therefore borrows from label aggregation, where several noisy annotators are pooled into one estimate. We treat dictionaries built from several independently trained encoders as independent annotators of "was this item seen?" and pool their verdicts. We also test the condition under which pooling should fail: encoders trained on overlapping web data make correlated errors.
Core Claim
Image-side contamination includes partial and transformed exposure: crops, recolorings, a benchmark image composited into a larger web image, or a benchmark image paired with its answer word in a caption. We claim that a frequency audit over pooled visual-word dictionaries detects this kind of exposure better than whole-image near-duplicate search. It can also tell apart two severity levels from an existing taxonomy of contamination Benchmark Data Contamination of Large Language Models: A Survey: "data-level" exposure (the image was seen) and "label-level" exposure (the image was seen together with its answer). Whole-image search cannot make that distinction without extra machinery.
The claim makes two predictions we can check. First, under controlled injection, visual-word co-occurrence with answer tokens should separate label-level from data-level injected items. Second, on real benchmarks, visual-word frequency should explain per-item accuracy beyond what text-side frequency already explains. The second prediction matters because Both Text and Images Leaked! found that much multimodal leakage originates in the text pretraining of the language backbone. If visual counts add nothing once text counts are controlled, the image channel is not where the contamination lives, and we would report that.
Position Relative to Prior Work
Three papers motivate the gap. Snoopy showed that few-shot language model accuracy tracks term and co-occurrence counts over The Pile. That method needs discrete tokens, so it cannot be applied to images as they are. Both Text and Images Leaked! (MM-DETECT) showed that contamination in multimodal models is widespread. It detects it only by black-box perturbation, through option shuffling and caption slot-guessing, and it states that quantifying overlapping images is hard because of augmentation and opaque corpora. Generalization or Memorization detects memorization by checking whether a model's sampled outputs collapse onto one string. That works on text outputs but says nothing about which input channel was memorized.
Two lines of work supply the method. DCBM clusters region crops embedded by a frozen CLIP encoder into visual concept prototypes, reaching 82.4% on CUB-200-2011 with ViT-L/14. We reuse its recipe for building dictionaries but use the dictionary for counting rather than classification. OBoW and Fast-BoW supply online and scalable dictionary construction, which we need to index a large corpus. Image Reconstruction from Bag-of-Visual-Words suggests that a bag of words keeps enough information to identify image content, which is the property a provenance audit depends on.
Two further papers shape the pooling step, one encouraging and one cautionary. Inter-annotator agreement is not the ceiling shows in simulation that pooling raters whose decision thresholds differ yields an estimator closer to the truth than any single rater: model F1 was 0.67 against true signal, versus 0.58 agreement among the annotators. The same work shows that the advantage collapses when errors are shared or the model is misspecified. We take both halves seriously. Pooling across encoders is expected to help only to the extent that the encoders' quantization errors are not shared.
The closest consensus-plus-clustering work is ClusterMine. It clusters CLIP features and majority-votes a text label per cluster for out-of-distribution detection. It collapses each cluster into a text string, which is precisely the step that could reintroduce text-side bias of the kind documented in Words or Vision. Our audit keeps the visual-word histograms and never routes the verdict through text, except in the deliberate answer-token co-occurrence statistic.
Research Program
The first component is an index. For each of several encoders, we build a visual dictionary of $k$ words by clustering patch or region embeddings. The encoders are a CLIP-style contrastive encoder, a self-supervised encoder trained with OBoW-style objectives, and an encoder trained from scratch on a disjoint corpus. We then quantize every image in an open image-text pretraining corpus and store inverted counts. These cover single words, spatially adjacent word pairs (to recover some of the layout a plain bag discards), and word–caption-token co-occurrences.
For a benchmark item with image $x$ and answer string $a$, dictionary $j$ yields two scores. The first is an exposure score $e_j(x)$: the inverse-frequency-weighted fraction of $x$'s word pairs that occur together in at least one corpus image. The second is a pairing score $p_j(x,a)$: the same quantity restricted to corpus images whose caption contains $a$.
The second component is the pooling rule. A plain average treats every dictionary as equally reliable and equally independent. Instead, we estimate each dictionary's reliability on a held-out calibration set from the controlled-injection runs, where exposure is known, and combine the scores as
$$ s(x) = \sum_{j=1}^{J} w_j \, \frac{e_j(x) - \mu_j}{\sigma_j}. $$
Here $J$ is the number of dictionaries, $\mu_j$ and $\sigma_j$ standardize dictionary $j$'s score over benchmark items, and $w_j$ are logistic-regression weights fit on the calibration set. The pairing score is pooled the same way. We also measure the pairwise correlation of dictionaries' errors on the calibration set. That correlation is what should determine whether pooling helps.
The third component is ground truth. Real corpora give no certainty about what was seen, so we follow the controlled design of Detecting Benchmark Contamination Through Watermarking, which trained models from scratch with known contamination. We train small CLIP-style models on an open image-text corpus and inject benchmark images from CUB-200-2011, COCO-Caption2017 and the image-bearing subset of ScienceQA. Injection varies along three dimensions. The first is the number of exposures. The second is the transformation: exact, random crop, color jitter, or composited into an unrelated web image. The third is the caption: one naming the answer (label-level) or an unrelated caption (data-level). Matched held-out items serve as clean controls. Ground-truth contamination is then both known and behaviorally verified: we keep the injection conditions that actually raise zero-shot accuracy on injected items relative to controls.
Baselines
The naive reference is no audit: treating every benchmark item as clean. Its detection AUC is 0.5 by construction. More usefully, it serves as the reference point for how much contaminated-item accuracy inflation an audit lets us remove when flagged items are excluded.
The strongest existing competitor is global-embedding near-duplicate search. For each benchmark image, we take the maximum cosine similarity, and the count of neighbors above a threshold, among corpus images in the same encoder spaces we use for dictionaries. This is the obvious practical tool and the one a reviewer will expect us to beat. It runs on the identical corpus and encoders, with its threshold and neighbor count tuned on the same calibration split and the same compute budget for indexing.
For black-box detection, the competitor is MM-DETECT's perturbation test from Both Text and Images Leaked!, applied to our small trained models and to open multimodal models on ScienceQA and COCO-Caption2017. That paper reports contamination through its $\Delta$ metric but gives no per-item detection numbers. We found no reported result on Lacuna for image-level contamination detection AUC on any benchmark in this file. The text-side reference is CDD Generalization or Memorization, which reports relative improvements of 21.8% to 30.2% in accuracy and AUC over prior detectors on DETCON. That figure is for text and is not directly comparable. We will run CDD on the answer text of our captioning and question-answering items to quantify what text-only detection already catches.
Two ablations isolate the key ingredients. To isolate quantization, we pool near-duplicate scores across the same $J$ encoders with the same learned weights. If this matches our method, the gain comes from ensembling encoders, not from visual words. To isolate pooling, we report the best single dictionary chosen on calibration data. Beating near-duplicate search means a higher AUC on the crop and composite conditions with a confidence interval excluding zero, while not losing on exact copies. It also means separating label-level from data-level injection at an AUC clearly above chance, a task near-duplicate search does not attempt.
Why not just…?
Why not just run near-duplicate image search with a strong embedding? For exact and lightly augmented copies it will probably work as well as our method, and we expect to tie there. The open question is partial exposure: a benchmark bird cropped out of, or pasted into, a larger photo shifts the global embedding but keeps many local patches intact. The crop and composite injection conditions answer this directly. If near-duplicate search matches us there too, the visual-word index is not worth its cost, and we will say so and recommend pooled near-duplicate search instead.
Why not just use black-box perturbation tests like MM-DETECT? They need query access to the model, and they report that a model is sensitive to perturbation, not which channel or which training items caused the sensitivity. The finding in Both Text and Images Leaked! that text pretraining drives much of the leakage means a perturbation signal on an image benchmark may be entirely textual. Our regression of per-item accuracy on visual-word frequency, with text frequency as a control, is designed to make that attribution, which perturbation tests cannot.
Why not just move to live or regenerated benchmarks such as MMBench-Live or knowledge-graph evolution? MMBench-Live and Dynamic Multimodal Evaluation via Knowledge-Enhanced Benchmark Evolution prevent future contamination, the latter at substantial generation cost. Neither tells us how to read the large body of existing scores on static benchmarks. Benchmarks like VeriSciQA VeriSciQA are built using majority votes from frontier models that may themselves have seen the source figures. An audit of existing items complements these efforts rather than competing with them.
Why not just average the dictionaries instead of learning weights? Averaging is the right default if the encoders' errors are independent. The simulations in Inter-annotator agreement is not the ceiling warn that shared bias breaks it. We report equal-weight averaging alongside learned weights and the measured error correlations. If averaging is as good, we adopt it.
Proposed Experiments and Decisive Checks
The first experiment is the controlled-injection study described above. It reports detection AUC broken down by exposure count, transformation and caption condition for every baseline and ablation, plus label-level versus data-level separation. Its decisive check is the composite condition. The idea survives only if pooled visual words beat both single-encoder and pooled near-duplicate search there.
The second experiment tests whether pooling genuinely behaves like annotator aggregation. We deliberately add a dictionary from an encoder trained on the same corpus as the audited model, which produces correlated errors. If the theory transfers, adding this dictionary should give little or negative benefit, and the learned weight should shrink toward zero. If correlated and independent dictionaries help equally, the annotator analogy is decorative and we drop it from the claim.
The third experiment moves to real models and an open corpus, in the style of Snoopy. On ScienceQA image questions, COCO-Caption2017, NoCaps and CUB-200-2011, we regress each open model's per-item correctness on log visual-word pair frequency, log pairing frequency, and text term frequency of question and answer. NoCaps, which is built around objects rare in COCO, provides a natural low-frequency contrast. For reference, the ScienceQA original paper Learn to Explain reports 75.17% for GPT-3 with chain-of-thought and 88.40% for humans. These are context for item difficulty, not targets. The decisive check is whether visual frequency keeps a significant coefficient once text frequency is in the model. A null result would itself be informative, supporting the text-backbone account of multimodal leakage.
The fourth experiment is a consequence test. Using the threshold fixed in the controlled study, we recompute benchmark accuracy on flagged versus unflagged items for open models. We check whether the gap shrinks for models whose training corpora exclude the flagged sources, which is what genuine contamination, rather than easier items, would predict. To rule out difficulty as a confound, flagged and unflagged items are matched on human accuracy where it is available, and on class within CUB.
References
- Benchmark Data Contamination of Large Language Models: A Survey
- Both Text and Images Leaked! A Systematic Analysis of Data Contamination in Multimodal LLMs
- Snoopy: An Online Interface for Exploring the Effect of Pretraining Term Frequencies on Few-Shot LM Performance
- Generalization or Memorization: Data Contamination and Trustworthy Evaluation for Large Language Models
- DCBM: Data-Efficient Visual Concept Bottleneck Models
- OBoW: Online Bag-of-Visual-Words Generation for Self-Supervised Learning
- Fast-BoW: Scaling Bag-of-Visual-Words Generation
- Image Reconstruction from Bag-of-Visual-Words
- Inter-annotator agreement is not the ceiling of machine learning performance: Evidence from a comprehensive set of simulations
- ClusterMine: Robust Label-Free Visual Out-Of-Distribution Detection via Concept Mining from Text Corpora
- Words or Vision: Do Vision-Language Models Have Blind Faith in Text?
- Detecting Benchmark Contamination Through Watermarking
- MMBench-Live: A Continuously Evolving Benchmark for Multimodal Models
- Dynamic Multimodal Evaluation via Knowledge-Enhanced Benchmark Evolution
- VeriSciQA: An Auto-Verified Dataset for Scientific Visual Question Answering
- Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answering