Manuscript Offprint
arXiv:2611.01962Object-Only Is Not Context-Free: A Counterfactual Diagnostic for Context Removal in Object Retrieval
Abstract
Object-centric retrieval pipelines often mask the background before pooling backbone features, aiming for a descriptor that reflects the object rather than its scene. Whether this truly yields an object-only descriptor, however, is rarely tested. We introduce the Keyhole Aperture Probe (KAP), a counterfactual diagnostic that repurposes the ground-truth masks of existing panoptic segmentation datasets (COCO, ADE20K) for retrieval: it holds the pooled object region fixed and varies only the pixels outside it, summarizing a backbone's context dependence in a single number. We find that the pooled object region has already integrated its surround. Replacing the context, with a neutral fill or even a different real scene, changes the descriptor, and when retrieval fails under a blank fill, the descriptor matches plain-background images rather than its own object. Object-only is not context-free. Across ten modern backbones, object-only descriptors retain only about a quarter to two-thirds of their full-image accuracy, and the effect is not unique to Transformer self-attention: a convolutional backbone shows it too. The dependence is also reducible: a lightweight adapter that encourages the descriptor to stay stable as context is removed lowers it and improves full-image instance retrieval on INSTRE, transferring to ILIAS with accuracy improved or preserved. A matched contrastive-fine-tuning control does not reproduce those gains. We release KAP as a simple, backbone-agnostic evaluation protocol to measure and reduce this dependence before deployment.
1. Introduction
Object-level retrieval is routinely framed as an instance-isolation problem: obtain a mask, pool features inside it, and treat everything outside as nuisance. Yet modern foundation encoders are trained on full images and their co-occurrence structure [24, 36], so an “object descriptor” pooled from a masked region likely summarizes object plus context. Some leakage is expected, since attention and large receptive fields mix every token with its surround; what is missing is a measurement of how much, for which backbones, and through what mechanism. An object stripped to its mask can even retrieve the wrong category outright (Fig. 1). Context is informative for identity, location, and scale [30], but reliance on it induces shortcut behavior and background bias that fail under shift [10, 33]; for retrieval there is little controlled, at-scale evidence on which effect dominates or on what makes a backbone susceptible. Masking, moreover, does not so much remove context as replace it with a neutral fill, and we show (Sec. 4.2) that the encoder folds this fill back into the “object-only” descriptor.
We address this with a counterfactual measurement built on panoptic segmentation datasets [14, 19, 37], whose pixel-precise masks let us delineate an object exactly and intervene only on its surroundings: per query we hold fixed the object pixels, pooling region, database, and labels, and change only the pixels outside the mask, sweeping an expanding aperture (d=0, 5, ..., 50 px and full image), gray-filling outside it, while always pooling over the original undilated mask. This decouples what the encoder sees from what we pool. We summarize each backbone with one scalar, /full: the fraction of full-image retrieval accuracy retained when only object pixels are visible. We call this protocol the Keyhole Aperture Probe (KAP); it reads out through nearest-neighbor retrieval, and the same ranking appears under a trained classifier (Sec. 4.3).
We apply KAP across ten diverse backbones and find that all show substantial context reliance. When a descriptor breaks, it drifts toward plain-background images rather than its own object; the effect is not specific to Transformer attention, and sharpest for small objects.
Why does this matter, if the full image is usually available? The sweep is a measurement instrument, and the cost it exposes bites in two deployment regimes. (i) Masking the query to obtain “object-specific” features (a masked-crop-then-encode step used ahead of frozen backbones in open-vocabulary pipelines [7, 18, 34]) implicitly assumes a matching masked gallery. Against a natural gallery the

Figure 1. How much context does an object descriptor need? A COCO donut query under an expanding visible aperture (gray fill), with DINOv2-G/14 top-1 retrievals. At d=0 (mask only) the top-1 is wrong (orange); as the aperture opens the match flips through cake to the correct donut. KAP reduces this dependence to one scalar; across ten backbones it varies widely and is not exclusive to ViT self-attention.
masked query is distribution-shifted and loses. (ii) Even with full images on both sides, a context-reliant descriptor matches on background, so the same object in a new scene retrieves poorly. The reliance is also reducible: an aperture-conditioned training signal yields features that improve full-image instance retrieval on INSTRE [32] (+3.6 to +11.9 mAP) and transfer to ILIAS [15], with a matched control ruling out generic contrastive fine-tuning as the cause. The rest of the paper measures this dependence, validates it as a diagnostic, traces its mechanism, and reduces it.
-
A mechanism for why removal hurts. Object-only is not context-free: when a query breaks, its descriptor becomes closest to plain-background images rather than to its own object, because the encoder folds the blank fill into the pooled features (Sec. 4.2).
-
A controlled finding about what drives it. Context reliance is not unique to Transformer self-attention: a convolutional network shows it too, in a controlled architecture comparison at matched scale, data, and resolution. The effect is far stronger for small objects (Secs. 4.1 and 4.2).
-
An actionable fix. A lightweight aperture-conditioned adapter reduces context reliance and improves full-image instance retrieval on INSTRE under predicted masks,
transferring to ILIAS (accuracy improved or preserved) under a different mask source; a matched contrastive-fine-tuning control shows the gain is specific to the aperture curriculum (Sec. 4.5).
2. Related Work
Retrieval representations and pooling. Deep image retrieval has progressed from compact global descriptors to hybrid local-global systems, and the pooling operator strongly shapes which regions a descriptor emphasizes. Generalized-mean pooling (GeM) [25] became a standard component of strong global descriptors, while attention-based local-feature selection (DELF) [22] and unified local-global models [2] target robustness to clutter and partial visibility; region aggregation over CNN activations is a classic precursor [29]. Mask pooling over a frozen backbone's feature map is itself common practice, revisited recently for region-level recognition [27] and used to turn frozen vision-language features into open-vocabulary segmenters [35], including retrieval-augmented few-shot ones that pool frozen VLM features inside SAM masks [1]. A recurring finding in that literature is that even an accurate mask does not guarantee an accurate readout: Retrieve and Segment reports residual ambiguity despite well-aligned masks [1], and mask quality alone leaves a gap that downstream mask-refinement stages are built to close [17, 18]. We do not propose a new descriptor. We evaluate the object-descriptor abstraction, masked pooling over a backbone feature map, under controlled background interventions, asking why that gap exists at the representation level rather than closing it with a better mask.
Foundation backbones and pretraining paradigms. Self-supervised [4, 24], vision-language contrastive [36], masked-image-modeling [8, 11], and supervised [20] encoders are increasingly used off the shelf for retrieval. Be-cause all are trained on full images, their representations may implicitly encode scene regularities and object-context co-occurrence. We sample backbones across these families, at comparable scale and with matched-condition controls (Sec. 4.1), to ask whether context dependence tracks the architecture, the training objective, or neither, rather than to crown a single best model.
Context, shortcuts, and counterfactual analysis. Classic work established that scene statistics prime recognition and carry predictive information about objects [30], and the cognitive-science lineage treats context as integral to recognition [23], most useful exactly when local evidence is weak, as for small or degraded objects. Our size-graded result (Sec. 4.2) is the representation-level counterpart, with one difference: a learned descriptor imports context even when the task asks it not to. KAP asks the analogous question of a learned representation's pooled features, while shortcut learning [10] and background-bias studies [33] show such cues generalize poorly. Methodologically, our intervention is a counterfactual edit in the spirit of perturbation-based explanation [9], applied at retrieval scale. Panoptic annotations [14, 19, 37] serve as an oracle measurement instrument, not a deployment requirement: the conclusions survive predicted masks [3] (Secs. 4.3 and 4.5).
Scope relative to object-centric representation learning. This paper studies the practice of hard segment-then-pool masking as deployed in retrieval systems [16] and assumed by instance-retrieval benchmarks that construct context-free queries [15] (Sec. 4.5), not the design of a new pooling mechanism. Slot attention [21] and its follow-ups [13, 26] pursue a soft, object-centric alternative whose slots are discovered rather than tied to a fixed external mask and are optimized to bind to one object each, exactly the failure mode a hard mask cannot prevent. KAP applies to slot read-outs directly: probing FT-DINOSAUR [6] on COCO (each object represented by the slot whose decoder mask best covers it) against mask-pooling the same encoder's features, the slot descriptor still loses over half its accuracy under context removal (/full 42.5% vs. 33.0% mask-pooled, val2017). Its higher retention reflects a lower full-image ceiling ( R@1, 95% CI ), not better object-only accuracy (tied at ): slot binding reduces how much context the descriptor uses, but does not yield a context-free representation. Slot attention is therefore complementary: one candidate, partial mechanism for closing the gap KAP quantifies.
3. The Keyhole Aperture Probe
Setup and notation. Given an image and a ground-truth object mask , a backbone produces a dense feature map , from which we form an object descriptor by mask pooling, , with mean pooling and normalization unless noted. Throughout, we study this mask-pooled object descriptor, which is common in region-centric pipelines [27, 35]. We keep two operations distinct: input masking replaces pixels before encoding, while mask pooling restricts which tokens are averaged after encoding. Region-based retrieval pipelines use one or both; every KAP condition uses both, with the input mask at the aperture and the pooling mask always at the object. Retrieval is category-level object-object: a query descriptor is ranked against a database of object descriptors and scored by recall@K (R@K, the fraction of queries with a correct match in the top ), mean average precision (mAP), and mean reciprocal rank (MRR), with same-image matches excluded so a query is never scored against objects from its own image (image-disjoint evaluation). Masks are used only to define the query intervention and pooling support; the database is encoded once from natural images. This asymmetry is deliberate: the deployed gallery is natural and indexed once, and masking both sides would answer a different question, confounding the effect we isolate with the mask-only failure mode of Fig. 1.
The aperture intervention. The probe varies how much context the encoder sees while holding the pooled support fixed (Fig. 2). For a dilation radius we define the visible aperture and construct an intervened image
where is a fill operator (neutral gray by default; zero, blur, and alpha-feather are studied in Sec. 4.3). The descriptor is always pooled over the original mask, , so changes only the context the encoder integrates, never the set of tokens we read out. Sweeping px and the full image traces a recovery curve from “object only” () to “full context” (full).
A single context-dependence scalar. We summarize each backbone by its object-only retention
the fraction of full-image accuracy retained when only object pixels are visible. Higher /full means the backbone retains more retrieval accuracy without context. Concretely, /full is the retrieval cost of removing context from the increasing visible context

Figure 2. The Keyhole Aperture Probe. The visible aperture expands with (outside-mask pixels replaced by a neutral fill), but the descriptor is always pooled over the original object mask , so changes only the context the encoder integrates, never the read-out tokens. Comparing the top- neighbor set across isolates the effect of visible context on the object-only descriptor.
query while the gallery stays natural, the deployed masked-query setting, rather than a claim that the backbone cannot represent the isolated object in principle. The two aperture extremes bracket the counterfactual precisely: for the same object, same pooling region, same database and labels, what is retrieval accuracy with context removed versus restored? Because only outside-mask pixels differ between the two conditions, any gap is attributable to content outside the object, not to the object, the pooling support, or spatial position (Sec. 4.3).
Data and sampling. We run KAP on COCO-Panoptic [14, 19] train2017 (the protocol of the breadth and validity experiments; Sec. 4.5 adds INSTRE): a database of ~845K “thing” instances and a class-balanced query set (40/category, ~3.2K queries); a cross-dataset replication on ADE20K [37] is reported in the supplementary material. Oracle masks make the intervention exact; Secs. 4.3 and 4.5 show the diagnostic is robust to imperfect and predicted masks, so the oracle is a measurement convenience rather than a deployment assumption.
4. Results
4.1. Context Dependence Across Backbones
We run KAP on ten backbones chosen to populate four pretraining paradigms at comparable scale (Tab. 1): self-supervised (DINOv2-G/14 [24], DINOv3-L [28], DINO ViT-S/8 [4]), vision-language contrastive (SigLIP2 [31] at two resolutions, EVA-02-CLIP [8]), masked-image-
| Backbone | Pretr. | d0 | full | d0/full | 95% CI | AUC |
|---|---|---|---|---|---|---|
| DINOv2-G/14 | SSL | 59.3 | 88.2 | 67 | [65, 69] | 74 |
| ConvNeXt-L | Sup | 45.0 | 68.2 | 66 | [64, 68] | 50 |
| DINOv3-L | SSL | 47.8 | 79.8 | 60 | [58, 62] | 58 |
| ViT-L | Sup | 44.2 | 75.1 | 59 | [57, 61] | 54 |
| MAE ViT-L | MIM | 13.7 | 24.1 | 57† | [52, 61] | 16 |
| SigLIP2-512 | V-L | 47.1 | 85.8 | 55 | [53, 57] | 62 |
| SigLIP2-L | V-L | 40.7 | 81.2 | 50 | [48, 52] | 53 |
| EVA-02-CLIP | V-L | 37.0 | 76.7 | 48 | [46, 50] | 44 |
| DINO ViT-S/8 | SSL | 18.0 | 56.0 | 32 | [30, 34] | 27 |
| EVA-02-MIM | MIM | 18.5 | 66.3 | 28 | [26, 30] | 24 |
Table 1. KAP across ten backbones (COCO train2017, gray fill). Object-only () and full-image R@1 (%), object-only retention /full (%) with paired query-bootstrap 95% CIs ( resamples), and AUC; sorted by /full (higher is more context-resistant). Pretr.: pretraining paradigm, one of self-supervised (SSL), vision-language (V-L), masked-image-modeling (MIM), supervised (Sup). AUC is the area under the recovery curve (the trapezoidal mean R@1 over the sweep; per-aperture curves in the supplementary material), ranking the panel by absolute quality. †MAE's /full ratio is unreliable: its full-image accuracy is the lowest in the panel (24.1), inflating the ratio, and AUC ranks it last.
modeling (MAE ViT-L, EVA-02-MIM), and supervised classification (ConvNeXt-L, ViT-L), all under the identical protocol and database. Exact checkpoints, input resolutions, and feature grids are in the supplementary material.
Not unique to self-attention. A convolutional backbone shows the effect despite having no global self-attention: ConvNeXt-L retains only 66% of its full-image accuracy from object pixels alone. Context dependence therefore does not require self-attention. If anything, the matched supervised ViT-L is slightly more affected (59%, +7 pp gap; paired bootstrap 95% CI [+4.7, +9.3], p < 0.001). The common cause is spatial context integration: by its deep layers a ConvNeXt's effective receptive field spans much of the image, so an object-region feature has already aggregated its surround. Global attention and large receptive fields are two routes to the same leak. This predicts the effect should grow as the object occupies less of the receptive field, borne out by the size-grading of Sec. 4.2. The gap replicates under control: with ViT-B/16 and ConvNeXt-B matched at Base scale, 224 px, ImageNet-1k, pretrain-only, the supervised ConvNeXt again retains more (56.2 vs. 48.9). We restrict the claim to architecture, not pretraining objective: the matched masked-image-modeling models sit at near-floor accuracy (R@1 22, 13), leaving the objective axis unmeasurable.
Recovery curves. Recovery is gradual: no backbone regains full accuracy until substantial context is restored (per-aperture curves in the supplementary material). AUC (the mean R@1 over the sweep, Tab. 1) orders the panel by overall retrieval quality, placing DINOv2-G first and MAE last, where the /full ratio alone ranks MAE mid-panel despite its near-floor accuracy. The two answer different questions (context-resistance vs. absolute quality) and we report both.
Cross-dataset replication (ADE20K). The findings are not specific to COCO: re-running the full ten-backbone panel on ADE20K [37] (scene-parsing instances) under the identical protocol preserves the backbone ranking (Spearman , against COCO /full) and reproduces the architecture dissociation (ConvNeXt-L again exceeds ViT-L, +8 pp); the full per-backbone table is in the supplementary material.
4.2. What Context Removal Does
Beyond the single scalar, KAP shows how context removal reshapes retrieval.
Removal breaks far more than it fixes. Treating each query as broken or fixed by context removal relative to the full-image condition reveals a stark asymmetry (supplementary Fig. 2c): across all ten backbones removing context breaks 4–52× more queries than it fixes (16:1 for DINOv2-G, 30:1 for SigLIP2-L, up to 52:1 for EVA-02-MIM). This is not isolated noise: the top-10 neighbor set drops to barely 10% overlap with the full-context ranking at d=0 (supplementary Fig. 2b), so context removal does not merely lower
| Backbone | /full by area tercile | |||
|---|---|---|---|---|
| small | mid | large | ||
| DINOv2-G/14 | 30 | 67 | 98 | 0.59 |
| ConvNeXt-L | 24 | 61 | 92 | 0.58 |
| DINOv3-L | 20 | 51 | 93 | 0.63 |
| ViT-L | 22 | 49 | 90 | 0.59 |
| MAE ViT-L | 33 | 42 | 72 | 0.45 |
| SigLIP2-512 | 20 | 48 | 88 | 0.58 |
| SigLIP2-L | 18 | 37 | 84 | 0.59 |
| EVA-02-CLIP | 15 | 34 | 81 | 0.61 |
| DINO ViT-S/8 | 18 | 20 | 47 | 0.36 |
| EVA-02-MIM | 4 | 9 | 54 | 0.59 |
| Mean | 20 | 42 | 80 | 0.56 |
Table 2. Context dependence is graded by object size: retention climbs from 20 to 80 from small to large objects (mean over the ten backbones, bottom row). Per-backbone object-only retention /full (%) by query-object area tercile, and Spearman between object area and survival of context removal (positive for all ten). Small objects collapse without context; large objects retrieve nearly as well.
accuracy. It reshapes which objects look similar. With the object alone a bench retrieves an airplane, a frisbee a cake, scissors a cell phone, and a toaster a remote: the isolated shape is read as a different object. A thin context ring barely helps: 984 queries still flip at , nearly as many as the 987 at . For the backbones tested, “mask everything but the object” is more often harmful than helpful.
Small objects are the most context-dependent. The cost is strongly graded by object size (Tab. 2). Within each backbone, per-query survival of context removal correlates with object area (mean Spearman over the ten backbones, positive for every one). Stratifying by area, object-only retention rises from 4–33% for the smallest area tercile to 47–98% for the largest: large objects retrieve nearly as well without context, while small instances collapse. This is the regime where the “mask-everything-else” heuristic is most damaging and, because small objects occupy few patches, where added context, not just added pixels, does the most work.
Why removal breaks: a plain-background crossover. What does a context-removed descriptor become similar to? In the cosine metric retrieval uses, we compare each query's similarity to its own-category centroid against its similarity to plain-background and cluttered-background object centroids (full table in the supplementary material). With full context the descriptor is far closest to its own category; for the queries that break, reverses this. The own–plain margin flips sign , and the descriptor is more
| Perturbation | What it tests | ρ | mean shift |
|---|---|---|---|
| Zero-fill | fill operator / OOD edge | 0.97 | n/a |
| Blur-fill | fill operator / stats | 0.94 | 5.4 |
| Shuffle-fill | fill operator / layout | 0.92 | 4.5 |
| Alpha-feather | sharp-edge tokenization | 1.00 | +1.2 |
| Boundary jitter (1°) | imperfect masks | 1.00 | 0.35 |
| Max-pooling | pooling operator | 0.96 | 2.6 |
| Attn. pooling | pooling operator | 0.99 | 2.5 |
| Retrieval → classif. | retrieval readout | 0.87 | n/a |
Table 3. The /full ranking is robust. Spearman between the ten-backbone /full ranking under gray fill and under each perturbation, with mean absolute /full shift (pp); the pooling-operator rows compare max/attentive against the mean-pooling ranking under an otherwise identical protocol. The ranking is highly stable across fill choice (gray, zero, blur, pixel-shuffle), edge softness, realistic mask error, pooling operator (mean vs. max vs. attentive), and a swap of the retrieval readout for a trained classifier (last row). “n/a”: the perturbation changes the metric’s scale, so only the ranking is comparable.
similar to plain than to cluttered backgrounds, so the driver is plainness, not a generic collapse. The mask-pooled descriptor never pools the gray fill, but the object’s tokens are contextualized by attention over it; stripped of scene they take on a plain-surround signature. The single most frequent flip target is kite, one of COCO’s two plainest-background categories, absorbing a third of all flips, and the pull holds across all ten backbones (broken descriptors closer to plain than cluttered backgrounds in every case; plain overtakes the own category in seven of ten).
4.3. Diagnostic Validity
Where Secs. 4.1 and 4.2 measure and Sec. 4.5 deploys, this subsection checks the diagnostic itself: that /full tracks the representation rather than our measurement choices. All results use the full ten-backbone panel (Tab. 3).
Stress tests. Neither the fill nor the boundary drives the ranking. Zero fill preserves it () and alpha-feathering the hard cut leaves it unchanged (pp). A Gaussian-blur fill, which supplies natural local statistics, keeps it largely intact () at the table’s largest shift (5.4 pp): the two strongest self-supervised backbones (DINov2-G, DINov3-L) gain 9–12 pp retention under blur. A pixel-shuffle fill (exact color histogram, layout destroyed) removes exactly that gain (; 76.2 → 62.8, 72.2 → 55.2), so the blur-specific rise is low-frequency context leaking through the fill, not a gray-patch artifact. A fully natural counterfactual needs no fill at all: cut-pasting the object into a random real scene (INSTRE, SAM3 masks) drops R@1 on all ten backbones, at least as hard as gray on eight of ten, with no synthetic fill what-
| Backbone | Pretr. | /full frozen | /full +LoRA (95% CI on ) | full R@1 |
|---|---|---|---|---|
| ViT-L | Sup | 60.2 | 64.1 [+2.0,+5.8] | +0.3 |
| SigLIP2-L | V-L | 46.0 | 50.5 [+3.1,+6.0] | +0.5 |
| EVA-02-MIM | MIM | 27.8 | 43.6 [+13.8,+17.8] | +6.7 |
Table 4. Aperture-conditioned LoRA reduces context dependence. Object-only retention /full (%) on COCO val2017 (a 36K-object gallery fully disjoint from the 25K adapter-training images), before and after a rank-8 adapter, three pretraining paradigms. Brackets: paired query-bootstrap 95% CI on the gain ( resamples); all three exclude zero. Full-image R@1 is preserved or improved.
soever. The read-out matters as little. Max and attentive pooling (parameter-free, feature-norm weighted) track the mean-pooled ranking (; the mean values move a few points, but the ranking is stable). Realistic mask error (per-mask 1° rotation, median IoU 0.96) leaves it identical (pp; Sec. 4.5 closes the loop with fully predicted masks), and replacing retrieval entirely with an 80-way linear-probe classifier reproduces it (; ConvNeXt-L 62.2 vs. ViT-L 57.7). Full mechanism analysis and per-backbone probe results are in the supplementary material.
4.4. Reducing Context Dependence
A diagnostic is more useful if the property it measures can be moved by a targeted intervention. We demonstrate, on three backbones spanning the supervised, vision-language, and masked-image-modeling paradigms, that a minimal adapter reduces context dependence without harming full-image accuracy and, under genuine instance retrieval (Sec. 4.5), improves it.
Recipe. The adapter is a rank-8 LoRA [12] on the vision backbone’s attention projections (attn.qkv; separate q/k/v_proj on EVA-02-MIM), trained for one epoch on 25K COCO train2017 images. Adapted models are evaluated only on COCO val2017, INSTRE, and ILIAS, never on the train2017 gallery, so no training image appears in any evaluation gallery. Training is a teacher-student aperture distillation on a single frozen backbone (Fig. 3). The teacher (LoRA disabled) encodes a wide aperture, px, and the student (LoRA enabled) a tight one, px, both sampled per image. An InfoNCE loss pulls the student’s global descriptor toward the teacher’s (in-batch negatives, temperature 0.07, teacher gradient stopped). The outside-mask fill is randomized over gray, zero, blur, and noise so the adapter does not overfit one fill (full hyperparameters in the supplementary material). The objective acts on the global descriptor,

Figure 3. Aperture distillation. A single frozen backbone with LoRA toggled off/on produces the teacher (wide aperture) and student (tight aperture) views of the same image; an InfoNCE loss pulls the student descriptor toward the (gradient-stopped) teacher descriptor, updating only the LoRA weights.
| Backbone | pool | Frozen mAP | +LoRA mAP | ||
|---|---|---|---|---|---|
| full | ctx.rm. | full | ctx.rm. | ||
| ViT-L | mean | 46.3 | 43.2 | 49.9 | 50.2 |
| ViT-L | CLS | 54.8 | 48.1 | 61.7 | 60.5 |
| SigLIP2-L | attn | 81.8 | 74.2 | 86.2 | 85.4 |
| EVA-02-MIM | avg | 35.6 | 19.3 | 47.5 | 45.2 |
Table 5. Transfer to INSTRE instance retrieval (1,208 queries / 27,293 gallery), mAP (%). Context removal uses SAM-predicted query masks. The COCO-category-trained adapters of Sec. 4.4 improve full-image mAP in every cell (+3.6 to +11.9 pp) and additionally collapse the context-removal cost (frozen full→ctx. vs. LoRA full→ctx.). All mAP values carry query-bootstrap 95% CIs of half-width ≤ 1.8 pp; every full-image gain exceeds its CI.
yet the adapter improves retrieval under mean, CLS, and attention pooling alike (Sec. 4.5), indicating broad context-robustness rather than a tuned readout. At < 0.4% of backbone parameters the gain reflects the training signal, not added width.
The adapter reduces context dependence. On the three backbones (Tab. 4), the adapter raises object-only retention by +3.9 to +15.8 pp, every gain with a paired-bootstrap 95% CI excluding zero, while full-image R@1 is preserved or improved. The adapter redistributes the descriptor's reliance away from context rather than trading away its ceiling.
4.5. Transfer to Instance Retrieval
The diagnostic and its fix are defined on category-level retrieval with oracle masks. We first check the frozen /full ranking on a third, instance-level dataset across the full ten-backbone panel (Tab. 6), then test the adapters from Sec. 4.4
| Backbone | Pretr. | R@1 | mAP | ||
|---|---|---|---|---|---|
| full | /full | full | /full | ||
| DINOv2-G | SSL | 74.1 | 98.0 | 64.8 | 94.9 |
| DINOv3-L | SSL | 79.7 | 89.6 | 72.4 | 85.6 |
| ViT-L | Sup | 71.5 | 86.3 | 61.5 | 83.2 |
| ConvNeXt-L | Sup | 69.0 | 84.7 | 59.6 | 78.2 |
| SigLIP2-512 | V-L | 82.0 | 80.9 | 69.5 | 73.8 |
| MAE ViT-L | MIM | 13.5 | 78.7 | 9.6 | 80.9 |
| SigLIP2-L | V-L | 79.1 | 78.6 | 65.8 | 69.9 |
| EVA-02-CLIP | V-L | 77.6 | 76.0 | 67.1 | 70.8 |
| EVA-02-MIM | MIM | 53.7 | 36.3 | 40.5 | 33.1 |
| DINO ViT-S/8 | SSL | 51.2 | 19.8 | 35.7 | 13.7 |
Table 6. ILIAS instance-level replication (all ten frozen backbones, gray fill, same mask-pooled protocol as Tab. 1). Each query is a cluttered positive with a SAM3 [3] box-prompted mask, context-removed and pooled over the object mask exactly as in the category-level probe; retrieval is against the 4,653 natural positives with the query image excluded from the gallery. This is ILIAS-core scale: we do not add the benchmark's 100M YFCC distractors, so these numbers measure the diagnostic's transfer, not ILIAS leaderboard performance. R@1 and mAP (%) at full image, and object-only retention (%) formed as the /full ratio within each metric (/full of Tab. 1 is the R@1 column). The backbone ranking matches COCO (Spearman , equal to the COCOADE20K transfer), so the diagnostic generalizes to a third dataset and to instance-level retrieval. MAE's ratio is a floor artifact (near-chance full-image accuracy), as elsewhere.
with no further tuning, changing task, dataset, and mask source at once.
Setup. We evaluate on INSTRE [32] (1,208 queries, 27,293 gallery, cluttered scenes); query-side context removal uses masks predicted by box-prompted SAM3 [3], the gallery is natural: the deployment regime the oracle stood in for.
Full-image instance retrieval improves. On INSTRE the adapter does more than blunt context removal. It makes a better instance descriptor: full-image mAP rises in every cell of Tab. 5 by +3.6 to +11.9 pp, every gain exceeding its bootstrap CI, while the context-removal cost collapses (EVA-02-MIM's 16.3 pp full→masked drop shrinks to 2.3 pp; SigLIP2-L's 7.6 to 0.8).
ILIAS positive-as-query. INSTRE tests one mask source and one dataset; we further check the category-level probe against a genuinely different instance-retrieval benchmark, ILIAS [15]. ILIAS's own queries are already context-removed by construction. Auditing all 1,232, we find 17.1% are hard-segmented cutouts (an exactly constant fill wrapping the object silhouette) against 0.6% of its natural posi-
| ILIAS R@1 (%) | |||
|---|---|---|---|
| Backbone | frozen | Δ SimCLR aug. | Δ KAP |
| EVA-02-MIM | 53.7 | +6.1±2.6 | +19.3±2.8 |
| ViT-L | 71.5 | -2.1±1.4 | +0.1±1.5 |
| SigLIP2-L | 79.1 | +1.8±1.9 | +0.9±1.5 |
| INSTRE R@1 (%) | |||
|---|---|---|---|
| Backbone | frozen | Δ SimCLR aug. | Δ KAP |
| EVA-02-MIM | 81.0 | +3.6±1.8 | +8.6±1.9 |
| ViT-L | 86.8 | -1.1±1.1 | +2.9±1.3 |
| SigLIP2-L | 98.5 | -2.3±1.0 | +0.6±0.5 |
Table 7. The aperture curriculum, not generic contrastive fine-tuning, drives the gain. Full-image R@1 on natural queries (frozen baseline), with the change produced by the matched augmentation-views control (Δ SimCLR aug.) and by the aperture adapter (Δ KAP); subscripts are paired query-bootstrap 95% CI half-widths on each Δ; bold marks KAP improvements whose CI excludes zero. Head-to-head, KAP exceeds the control with paired CIs excluding zero in five of the six cells (SigLIP2-L on ILIAS is a tie). ILIAS uses the mask-pooled positive-as-query protocol of Tab. 6; INSTRE uses Tab. 5's full-image protocol with each backbone's own pooling, reported here as R@1.
tives (test in the supplementary material), the rest clean or bare-surface backgrounds. They therefore cannot serve as a masking counterfactual; instead we treat a randomly chosen cluttered positive as the query, mirroring the COCO protocol exactly (Tab. 6). Context removal hurts every backbone, most severely for small objects (retention about 11% on the weakest), and the adapters from Sec. 4.4 transfer here too without further tuning: EVA-02-MIM gains +19.3 full-image R@1 while its /full nearly doubles (36.3 → 70.9); per-backbone deltas with paired CIs appear in Tab. 7. ILIAS thus confirms both halves of the diagnostic, the ranking and the adapter's transfer, on a benchmark built for a different task than the one KAP was designed against.
A matched control isolates the aperture signal. The adapter's gain could in principle come from contrastive fine-tuning on COCO images generically, rather than from the aperture curriculum specifically. We rule this out with a strictly matched control ("SimCLR aug."): identical teacher-student topology (LoRA-disabled teacher with stopped gradient, LoRA student), identical training images, InfoNCE objective, and hyperparameters. The only change is the views, which are two standard SimCLR augmentations [5] of the full frame instead of a wide/tight aperture pair.
The control changes little or hurts: it significantly degrades frozen ViT-L on ILIAS and frozen SigLIP2-L on INSTRE, and its one clear gain (EVA-02-MIM) is less than a third of KAP's on the same backbone. Under Tab. 5's own mAP metric the contrast is starker still: the control leaves ViT-L below frozen (46.3 → 44.9 vs. KAP's 49.9) and collapses SigLIP2-L (81.8 → 62.6 vs. 86.2), so the Tab. 5 gains themselves are attributable to the aperture curriculum. A conventional symmetric SimCLR variant (both branches trainable, no teacher) shows the same qualitative pattern (supplementary material).
Generalization axes. The transfer crosses four axes at once: task granularity (category → instance), dataset (COCO → INSTRE and ILIAS), mask source (oracle → box-prompted SAM3), and descriptor (mean / CLS / attention pooling), ruling out the concern that the fix is "trained to its own probe."
5. Conclusion
We introduced the Keyhole Aperture Probe, a counterfactual diagnostic that reduces the cost of context removal to a single scalar by fixing the pooling region and intervening only outside it. The pooled object region has already integrated its surround: replacing the context hurts whether the replacement is a neutral fill or a different real scene, and for objects that break, the descriptor crosses over to plain-background images rather than its own category. Object-only is not context-free. Across ten backbones this cost varies widely, is strongly graded by object size, and does not require ViT self-attention. The score is also actionable: a lightweight aperture-conditioned adapter improves full-image instance retrieval on INSTRE, transferring to ILIAS with accuracy improved or preserved, while closing the context-removal gap, and a matched control confirms the gain is specific to the aperture curriculum. We release the protocol, code, and adapter checkpoints at https://github.com/bmeivar/kap so practitioners can measure, and if needed reduce, this trade-off for new backbones.
Limitations. KAP measures how much a descriptor depends on context, not whether that context is spurious: at category level part of the /full gap is lost predictive scene evidence, which is why we also report instance-level results. /full is a ratio that flatters low-accuracy backbones (MAE) and should be read with full-image R@1 or AUC. We claim an architecture effect, not an objective effect: the panel confounds objective with scale and data, and ConvNeXt is our only CNN. The adapter is a Transformer-only proof of concept, and the diagnostic uses oracle masks.
Acknowledgement. Part of this research was supported by ISF grant 2132/23.
References
[1] Tilemachos Aravanis, Vladan Stojnić, Bill Psomas, Nikos Komodakis, and Giorgos Tolias. Retrieve and segment: Are a few examples enough to bridge the supervision gap in open-vocabulary segmentation? In CVPR, pages 27621–27632, 2026.
[2] Bingyi Cao, André Araújo, and Jack Sim. Unifying deep local and global features for image search. In Computer Vision – ECCV 2020, pages 726–743. Springer, 2020.
[3] Nicolas Carion, Laura Gustafson, Yuan-Ting Hu, Shoubhik Debnath, Ronghang Hu, Didac Suris, Chaitanya Ryali, Kalyan Vasudev Alwala, Haitham Khedr, Andrew Huang, Jie Lei, Tengyu Ma, Baishan Guo, Arpit Kalla, Markus Marks, Joseph Greer, Meng Wang, Peize Sun, Roman Rädle, Triantafyllos Afouras, Effrosyni Mavroudi, Katherine Xu, Tsung-Han Wu, Yu Zhou, Liliane Momeni, Rishi Hazra, Shuangrui Ding, Sagar Vaze, Francois Porcher, Feng Li, Siyuan Li, Aishwarya Kamath, Ho Kei Cheng, Piotr Dollár, Nikhila Ravi, Kate Saenko, Pengchuan Zhang, and Christoph Feichtenhofer. SAM 3: Segment anything with concepts. In ICLR, 2026.
[4] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In ICCV, 2021.
[5] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020.
[6] Aniket Didolkar, Andrii Zadaianchuk, Anirudh Goyal, Michael Mozer, Yoshua Bengio, Georg Martius, and Maximilian Seitzer. On the transfer of object-centric representation learning. In ICLR, 2025.
[7] Jian Ding, Nan Xue, Gui-Song Xia, and Dengxin Dai. Decoupling zero-shot semantic segmentation. In CVPR, 2022.
[8] Yuxin Fang, Quan Sun, Xinggang Wang, Tiejun Huang, Xinlong Wang, and Yue Cao. EVA-02: A visual representation for neon genesis. Image and Vision Computing, 149:105171, 2024.
[9] Ruth C. Fong and Andrea Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2017.
[10] Robert Geirhos, Jörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A. Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11):665–673, 2020.
[11] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. Masked autoencoders are scalable vision learners. In CVPR, 2022.
[12] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In ICLR, 2022.
[13] Baoxiong Jia, Yu Liu, and Siyuan Huang. Improving object-centric learning with query optimization. In ICLR, 2023.
[14] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dollár. Panoptic segmentation. In Pro-
ceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9404–9413, 2019.
[15] Giorgos Kordopatis-Zilos, Vladan Stojnić, Anna Manko, Pavel Šuma, Nikolaos-Antonios Ypsilantis, Nikos Efthymiadis, Zakaria Laskar, Jíří Matas, Ondrej Chum, and Giorgos Tolias. ILIAS: Instance-level image retrieval at scale. In CVPR, 2025.
[16] Nikolaus Korfhage, Markus Mühling, and Bernd Freisleben. Search anything: Segmentation-based similarity search via region prompts. Multimedia Tools and Applications, 84(27): 32593–32618, 2025.
[17] Yongkang Li, Tianheng Cheng, Bin Feng, Wenyu Liu, and Xinggang Wang. Mask-adapter: The devil is in the masks for open-vocabulary segmentation. In CVPR, 2025.
[18] Feng Liang, Bichen Wu, Xiaoliang Dai, Kunpeng Li, Yinan Zhao, Hang Zhang, Peizhao Zhang, Peter Vajda, and Diana Marculescu. Open-vocabulary semantic segmentation with mask-adapted CLIP. In CVPR, 2023.
[19] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C. Lawrence Zitnick. Microsoft COCO: Common objects in context. In Computer Vision – ECCV 2014, pages 740–755. Springer, 2014.
[20] Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A ConvNet for the 2020s. In CVPR, 2022.
[21] Francesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran, Georg Heigold, Jakob Uszkoreit, Alexey Dosovitskiy, and Thomas Kipf. Object-centric learning with slot attention. In NeurIPS, 2020.
[22] Hyeonwoo Noh, Andre Araujo, Jack Sim, Tobias Weyand, and Bohyung Han. Large-scale image retrieval with attentive deep local features. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 3456–3465, 2017.
[23] Aude Oliva and Antonio Torralba. The role of context in object recognition. Trends in Cognitive Sciences, 11(12):520–527, 2007.
[24] Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Mahmoud Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Hervé Jégou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. DINOv2: Learning robust visual features without supervision. Transactions on Machine Learning Research, 2024.
[25] Filip Radenović, Giorgos Tolias, and Ondrej Chum. Fine-tuning CNN image retrieval with no human annotation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(7):1655–1668, 2019.
[26] Maximilian Seitzer, Max Horn, Andrii Zadaianchuk, Dominik Zietlow, Tianjun Xiao, Carl-Johann Simon-Gabriel, Tong He, Zheng Zhang, Bernhard Schölkopf, Thomas Brox, and Francesco Locatello. Bridging the gap to real-world object-centric learning. In ICLR, 2023.
[27] Michal Shlapentokh-Rothman, Ansel Blume, Yao Xiao, Yuqun Wu, Sethuraman TV, Heyi Tao, Jae Yong Lee, Wilfredo Torres, Yu-Xiong Wang, and Derek Hoiem. Region-based representations revisited. In CVPR, 2024.
[28] Oriane Siméoni, Huy V. Vo, Maximilian Seitzer, Federico Baldassarre, Maxime Oquab, Cijo Jose, Vasil Khalidov, Marc Szafraniec, Seungeun Yi, Michaël Ramamonjisoa, Francisco Massa, Daniel Haziza, Luca Wehrstedt, Jianyuan Wang, Timothée Darcet, Théo Moutakanni, Leonel Sentana, Claire Roberts, Andrea Vedaldi, Jamie Tolan, John Brandt, Camille Couprie, Julien Mairal, Hervé Jégou, Patrick Labatut, and Piotr Bojanowski. DINOv3, 2025.
[29] Giorgos Tolias, Ronan Sicre, and Hervé Jégou. Particular object retrieval with integral max-pooling of CNN activations. In International Conference on Learning Representations (ICLR), 2016.
[30] Antonio Torralba. Contextual priming for object detection. International Journal of Computer Vision, 53(2):169–191, 2003.
[31] Michael Tschannen, Alexey Gritsenko, Xiao Wang, Muhammad Ferjad Naeem, Ibrahim Alabdulmohsin, Nikhil Parthasarathy, Talfan Evans, Lucas Beyer, Ye Xia, Basil Mustafa, Olivier Hénaff, Jeremiah Harmsen, Andreas Steiner, and Xiaohua Zhai. SigLIP 2: Multilingual vision-language encoders with improved semantic understanding, localization, and dense features. arXiv preprint arXiv:2502.14786, 2025.
[32] Shuang Wang and Shuqiang Jiang. INSTRE: A new benchmark for instance-level object retrieval and recognition. ACM Transactions on Multimedia Computing, Communications, and Applications, 11(3):1–21, 2015.
[33] Kai Xiao, Logan Engstrom, Andrew Ilyas, and Aleksander Madry. Noise or signal: The role of image backgrounds in object recognition. In ICLR, 2021.
[34] Mengde Xu, Zheng Zhang, Fangyun Wei, Yutong Lin, Yue Cao, Han Hu, and Xiang Bai. A simple baseline for open-vocabulary semantic segmentation with pre-trained vision-language model. In ECCV, 2022.
[35] Qihang Yu, Ju He, Xueqing Deng, Xiaohui Shen, and Liang-Chieh Chen. Convolutions die hard: Open-vocabulary segmentation with single frozen convolutional CLIP. In NeurIPS, 2023.
[36] Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. Sigmoid loss for language image pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 11975–11986, 2023.
[37] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ADE20K dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5122–5130, 2017.
Supplementary Material
| Backbone | timm checkpoint | res. | grid |
|---|---|---|---|
| DINOv2-G/14 | vit_giant_patch14_dinov2 .lvd142m | 518 | |
| ConvNeXt-L | convnext_large .fb_in22k_ft_in1k_384 | 384 | |
| DINOv3-L | vit_large_patch16_dinov3 | 256 | |
| ViT-L | vit_large_patch16_384 .augreg_in21k_ft_in1k | 384 | |
| MAE ViT-L | vit_large_patch16_224_mae | 224 | |
| SigLIP2-512 | vit_so400m_patch16_siglip_512 .v2_webli | 512 | |
| SigLIP2-L | vit_large_patch16_siglip_384 .v2_webli | 384 | |
| EVA-02-CLIP | eva02_large_patch14_clip_224 .merged2b | 224 | |
| DINO ViT-S/8 | vit_small_patch8_224_dino | 224 | |
| EVA-02-MIM | eva02_large_patch14_224 .mim_in22k | 224 |
Table S1. Panel specifications. Exact timm checkpoint, square input resolution (px), and resulting dense feature grid for each of the ten backbones. Grid is (res/patch) for ViTs and the stride-32 stage-4 map for ConvNeXt-L. The SigLIP2 pair differs only in resolution (512 vs. 384, i.e. a vs. grid), so the 5 pp /full gap between them in the main paper's panel is a resolution effect: a finer grid leaves a small object more tokens to pool.
A. Backbone specifications and feature extraction
Tab. S1 gives the exact checkpoint, input resolution, and feature grid for every backbone in the panel, so the protocol can be reproduced without ambiguity. All checkpoints are timm identifiers loaded with pretrained weights; no backbone is fine-tuned except where an adapter is explicitly applied (Sec. H).
Order of operations. The aperture fill is applied to the original-resolution image, before the backbone's preprocessing transform, so the fill is resized by exactly the same interpolation as the image content and no fill-versus-content resampling mismatch is introduced. For pooling we up-sample the dense feature map bilinearly to mask resolution rather than downsampling the mask to the feature grid; this matters for small objects, whose masks can vanish entirely under nearest-neighbour downsampling to a or grid. Precision is fp16 for all backbones except DINOv3-L (bf16).
B. ADE20K cross-dataset replication
The full ten-backbone panel re-run on ADE20K (scene-parsing instances) under the identical protocol, referenced from the main paper's "Cross-dataset replication" para-
| Backbone | ADE20K | COCO | ||
|---|---|---|---|---|
| full | /full | /full | ||
| DINOv2-G | 45.0 | 65.0 | 69 | 67 |
| ConvNeXt-L | 31.6 | 46.7 | 68 | 66 |
| DINOv3-L | 39.1 | 63.1 | 62 | 60 |
| ViT-L | 34.4 | 57.3 | 60 | 59 |
| MAE ViT-L | 18.8 | 30.5 | 57 | |
| SigLIP2-512 | 28.3 | 57.1 | 50 | 55 |
| SigLIP2-L | 32.1 | 64.1 | 50 | 50 |
| EVA-02-CLIP | 29.9 | 56.4 | 53 | 48 |
| DINO ViT-S/8 | 12.4 | 50.1 | 25 | 32 |
| EVA-02-MIM | 12.3 | 50.3 | 25 | 28 |
Table S2. ADE20K cross-dataset replication (all ten backbones, gray fill), R@1 (%) at and full image with object-only retention /full (%), beside COCO /full for reference. The ranking is preserved across datasets (Spearman ), and ConvNeXt-L again exceeds ViT-L (+8 pp). MAE's ratio is unreliable (floor full-image accuracy), as on COCO.
graph. The diagnostic transfers: the backbone ranking is preserved (Spearman , against COCO /full), the architecture dissociation reproduces—a convolutional ConvNeXt-L is again more context-resistant than ViT-L (68 vs. 60, +8 pp)—and the extremes agree, with DINOv2-G and ConvNeXt-L highest and DINO ViT-S/8 and EVA-02-MIM lowest on both datasets (Tab. S2).
C. Recovery curves
Figure S1 plots R@1 against the visible aperture for all ten backbones (referenced from the main paper's "Recovery curves" paragraph). Recovery is gradual and the curves separate cleanly; the legend's AUC values match Tab. 1 of the main paper.
D. Stratified effects
Figure S2 accompanies the main paper's "What Context Removal Does" subsection: panel (c) gives the per-backbone break vs. fix counts and panel (b) the neighbor-set overlap quoted there.
E. Plain-background crossover table
Full similarity table for the main paper's "plain-background crossover" analysis (Tab. S3).
F. Validity-check details
Expanded methodology and mechanism analysis for the main paper's "Stress tests" paragraph (Tab. 3 of the main paper).

Figure S1. KAP recovery curves. R@1 vs. visible aperture ( px full image, gray fill) for all ten backbones on COCO train2017, with the area under each curve (AUC = mean R@1 over the sweep, %) in the legend, sorted by AUC. All ten recover gradually—none regains full accuracy until most context is restored—and the spread shows how differently the backbones rely on context.

Figure S2. Stratified effects (one backbone per paradigm). (a) Retrieval recovery vs. aperture; (b) top-10 neighbor overlap with the full-context ranking (stability); (c) per-backbone break vs. fix rates ( vs. full, all ten backbones, sorted by /full). Context removal reshuffles neighbors and breaks far more than it fixes.
Fill and edge artifacts. The gray fill could create out-of-distribution statistics, and the hard mask boundary could inject high-contrast edge tokens. Neither drives the ranking: zero fill, a sharper RGB cut against natural images, preserves it (Spearman ), and replacing the hard cut with an alpha-blend feather—softening the boundary without revealing scene content—leaves it unchanged (, mean shift +1.2 pp). A Gaussian-blur fill preserves the local color and frequency statistics of the surround rather than substituting an out-of-distribution gray
patch, and still leaves the ranking largely intact (, , mean shift 5.4 pp)—the largest shift among the checks, driven mainly by the two strongest self-supervised backbones (DINOv2-G, DINOv3-L), whose object-only retention rises by 9–12 pp under blur relative to gray. A pixel-shuffle fill isolates why: it conserves the background's color histogram exactly—randomly permitting the outside-mask pixels in place—but destroys the low-frequency scene layout that a blur preserves. Under shuffle the ranking again holds (, mean shift 4.5 pp) and the blur gains vanish:
| own cat. | plain bg. | cluttered bg. | ||
|---|---|---|---|---|
| all queries | full | .68 | .44 | .43 |
| .50 | .38 | .36 | ||
| flips | full | .65 | .40 | .40 |
| .29 | .31 | .28 |
Table S3. Context removal flips similarity from the object to a plain background (DINOv2-G; cosine, the retrieval metric). Mean cosine of the query descriptor to its own-category centroid vs. to plain- and cluttered-background object centroids (background pools by image background std, any category), at full context and . With context the descriptor is closest to its own category; for queries that break, at it becomes closest to plain-background objects—and more so than to cluttered ones, so the driver is plainness, not a generic collapse.
DINOv2-G and DINOv3-L fall back to at or slightly below their gray-fill retention ( and ). The blur-specific rise is therefore residual low-frequency context leaking through the fill—the encoder still reads coarse scene layout out of a heavily blurred surround—rather than any artifact of the gray patch. Under all three statistics-preserving fills every backbone's retention still drops sharply from full image to object-only. The real-background cut-paste condition (Sec. K) additionally shows the phenomenon persists with no synthetic fill at all: retention under a random real scene is 60–94% across the panel, at least as low as under gray fill for eight of ten backbones.
Mask-boundary robustness. KAP uses oracle masks, but real masks are imperfect. A per-mask random rotation about the centroid (; median IoU 0.96 against the original mask over a 200-mask sample) perturbs the boundary while preserving object extent, and leaves the ranking identical (, mean shift 0.35 pp). The INSTRE and ILIAS experiments close the loop with fully predicted masks.
G. Classifier-readout retention (all backbones)
Table S4 gives the per-backbone classifier readout referenced in the main paper ("A different readout agrees"). For each backbone we train an 80-way COCO-category linear probe on frozen full-image object descriptors and measure classification retention acc()/acc(full) under the same context-removal intervention. The retention ranking tracks the retrieval /full ranking (Spearman ), and the architecture dissociation persists (ConvNeXt-L 62.2 vs. ViT-L 57.7), so context dependence is a property of the descriptor, not of nearest-neighbor retrieval.
| Backbone | acc. full | acc. | acc. /full |
|---|---|---|---|
| DINOv2-G/14 | 91.7 | 60.5 | 66 |
| ConvNeXt-L | 80.0 | 49.7 | 62 |
| DINOv3-L | 87.1 | 50.8 | 58 |
| ViT-L | 82.1 | 47.4 | 58 |
| MAE ViT-L | 58.3 | 23.6 | 41 |
| SigLIP2-512 | 90.0 | 53.4 | 59 |
| SigLIP2-L | 87.4 | 48.8 | 56 |
| EVA-02-CLIP | 83.5 | 42.7 | 51 |
| DINO ViT-S/8 | 64.7 | 24.6 | 38 |
| EVA-02-MIM | 75.3 | 24.2 | 32 |
Table S4. Classifier readout under context removal. 80-way COCO-category linear-probe accuracy (%) on full-image and object-only () descriptors, and their ratio acc. /full—the classification analogue of /full—for all ten backbones. The ranking matches the retrieval /full ranking (Spearman ).
H. Adapter training details
The aperture-conditioned adapter (main paper, “Reducing Context Dependence”) is a rank-8 LoRA on the vision backbone’s attn.qkv projections (separate q/k/v_proj on EVA-02-MIM), trained with a teacher-student InfoNCE objective on a single frozen backbone: the teacher view (LoRA disabled) sees a wide aperture and the student view (LoRA enabled) a tight one, both sampled per image; the student’s global descriptor is pulled toward the teacher’s with in-batch negatives, and the teacher gradient is stopped. The outside-mask fill is randomized across fill modes so the adapter does not specialize to one. Table S5 lists the hyper-parameters; they are shared across the three adapted backbones.
I. Matched contrastive control (“SimCLR aug.”)
The no-aperture control (main paper, “A matched control isolates the aperture signal”) matches the aperture adapter in everything except the view construction: same rank-8 LoRA on the same attention projections, same 25,000 COCO train2017 training images (identical sampling: seed 43, drawn after excluding the canonical seed-42/25K subset, with the same per-image skip logic so the effective image stream is identical), same teacher-student topology (teacher = LoRA-disabled frozen backbone with stopped gradient, student = LoRA-enabled), same one-directional InfoNCE with in-batch negatives and temperature 0.07, same learning rate (), epochs (1), and batch size (16). The only change: instead of a wide/tight aperture pair around a panoptic segment, teacher and student each receive an independently augmented view of the full frame (no aperture, no mask): RandomResizedCrop to the backbone’s input size with
| Hyperparameter | Value |
|---|---|
| LoRA rank | 8 |
| LoRA | 16 |
| LoRA dropout | 0.1 |
| Target modules | attn.qkv |
| on EVA-02-MIM | q/k/v_proj |
| Learning rate | |
| Epochs | 1 |
| Batch size | 16 |
| Training images | 25,000 (COCO train2017) |
| Image-sampling seed | 43* |
| Teacher aperture | px |
| Student aperture | px |
| InfoNCE temperature | 0.07 |
| Outside-mask fills | gray, zero, blur, noise |
| Trainable parameters | <0.4% of backbone |
Table S5. Aperture-conditioned LoRA hyperparameters. *Disjointness from every evaluation query and gallery holds by split: adapters are trained on train2017 and evaluated only on val2017, INSTRE, and ILIAS.
scale (bilinear), RandomHorizontalFlip, and ColorJitter(0.4,0.4,0.4,0.1).
We also trained a conventional symmetric SimCLR variant (both branches LoRA-enabled, no teacher, symmetric NT-Xent over the 2B in-batch views; same data, augmentations, and hyperparameters). It shows the same qualitative pattern as the matched control: on ILIAS full-image R@1 it reaches 69.4 (EVA-02-MIM), 68.2 (ViT-L), 80.2 (SigLIP2-L) vs. the frozen 53.7/71.5/79.1 and KAP's 73.0/71.6/79.9; on INSTRE (natural queries, per-backbone pooling) it reaches 83.2/81.7/96.8 R@1 vs. frozen 81.0/86.8/98.5 and KAP's 89.6/89.7/99.1. Under either recipe, generic contrastive adaptation helps only the weakest backbone and hurts the stronger ones, while the aperture adapter improves or preserves all three.
J. ILIAS positive-as-query protocol
ILIAS's provided queries are already context-removed (clean or bare-surface backgrounds), so they cannot serve as a masking counterfactual. We quantified this directly. A photographed backdrop always carries sensor noise and a lighting gradient, so its pixels scatter by several units even when it looks uniform; a digitally filled background stays exactly constant (a flat region survives JPEG's DCT near-losslessly). We therefore count a query as a hard-segmented cutout when (i) the modal border color occupies of the frame at exact equality and (ii) that same color also covers of the pixels inside the annotated box—i.e. the fill wraps into the object's concavities, which letterbox bars and studio sweeps do not. By this test 211/1,232 queries (17.1%) are cutouts, spanning 192/1,000 instances, with
fills near-white (124), near-black (65) or other (22); the identical test on the natural positives, which pass through the same capture and JPEG pipeline, returns 27/4,715 (0.6%), confirming the signature is digital fill rather than a compression or annotation artifact. We instead build, for each of the 938 instances with at least two annotated positives, a query from one randomly chosen cluttered positive (fixed seed 0) and retrieve against the 4,653 natural positives with the query's own image excluded; same-instance images are the relevant. ILIAS bbox.json boxes are COCO-style [x, y, w, h] (verified: 0/4,715 boxes invalid under this reading vs. 60% invalid read as [x₀, y₀, x₁, y₁]). Query masks are SAM3 box-prompted segmentations of the annotated box; a mask is accepted if its IoU with the box region is , else the box itself is used as the mask (fall-back). Context removal gray-fills outside the (undilated) mask and the descriptor is always pooled over the original mask, exactly as in the COCO protocol; features come from the same extractor code path as all other experiments.
K. Real-background cut-paste counterfactual
The natural-background control (main paper, “Fill and edge artifacts”) requires no synthetic fill: for each INSTRE query, all pixels outside the SAM3 object mask are replaced by a randomly drawn COCO scene, bilinearly resized to the query image's resolution. Queries are pooled over the object mask; masks with IoU < 0.2 against the annotated box are dropped (1,208/1,250 queries kept). The gallery is the natural 27,293-image INSTRE gallery, identical across the natural / gray-fill / cut-paste conditions; confidence intervals are query bootstraps.
L. Pooling operators
The pooling sweep (main paper, “Pooling operator”) compares three parameter-free operators over the object's feature tokens: mean (the paper's default), max (coordinate-wise maximum), and attentive (tokens weighted by a softmax over their feature norms—a salience weighting with no learned parameters). Query and gallery always use the same operator, and each descriptor is -normalized.
M. Seeds and reproducibility
Query sampling for all COCO sweeps is balanced per category (40/category, 80 categories) with seed 42; adapter and control training use seed 42 with image-sampling seed 43. Disjointness holds by split: adapters are trained on train2017 images and evaluated only on COCO val2017, INSTRE, and ILIAS, so no adapter-training image occurs in any gallery used to evaluate an adapted model; ILIAS positive-as-query sampling uses seed 0; bootstrap confidence intervals use paired query resamples throughout. Code, adapter checkpoints, and the ex-act query lists are available at https://github.com/bmeivar/kap.