The Locality Trade-off in Masked Patch Self-Distillation

Xi Weng, Zhaoyu Liu, Lianyu Hu, Jin Song Dong

TL;DR

Masked patch self-distillation (iBOT) is a cornerstone of modern vision foundation models like DINOv2, but it comes with a hidden, scale-dependent "locality cost." This paper introduces two new diagnostics to show that while iBOT boosts semantic performance, it can simultaneously degrade a model's ability to match spatial patches or recover fine-grained textures, depending on the model's size.

What Problem Does This Paper Address?

Modern Vision Transformers (ViTs) are often trained using self-supervised objectives that encourage "semantic abstraction"—the ability to recognize a "dog" regardless of its pose or lighting. A key technique for this is masked patch self-distillation (introduced by iBOT), where a student network tries to predict the features of masked image patches based on a teacher network's output.

While this clearly helps models perform better on high-level tasks like classification, its impact on local visual information has been a black box. Does the model still "see" the fine texture of a brick wall, or does it just see a generic "building" feature? The authors argue that standard benchmarks like semantic segmentation are too coarse to answer this, as they only care if a patch is labeled correctly, not if its unique local identity is preserved.

Methods

The researchers conducted a controlled study comparing standard DINO (image-level distillation) against DINO+iBOT (image + patch-level distillation) across four model scales (ViT-Small to ViT-Huge).

To look "under the hood," they developed two annotation-free diagnostics:

  1. Local Appearance Decodability: They tested how well a simple linear decoder could recover raw pixel attributes—like color means, HOG descriptors (edges), and textures—from frozen model tokens. If a model "forgets" local details, the decoder fails.
  2. Local-to-Global Correspondence: They tested if a model could locate a small, cropped patch within its original full-sized image using only feature similarity. This measures how "distinguishable" and "matchable" local patches remain.

They also analyzed Gram anchoring, a technique used in DINOv3 to stabilize features, to see if it could mitigate the locality trade-offs they discovered.

Datasets

  • Pretraining: ImageNet-1K.
  • Downstream Evaluation: A wide battery including VOC2012 (segmentation), VOC2007 (detection), RParis/ROxford (instance retrieval), Copydays (copy detection), DAVIS-2017 (video object tracking), and MPI Sintel (optical flow).
  • Visualization: ADE20K was used for qualitative similarity heatmaps.

Key Insights and Ideas

  • The Scale-Dependent Dissociation: The "cost" of using iBOT isn't uniform.
  • In smaller models (ViT-S/B), iBOT preserves the "pixels" (appearance) but makes patches look too similar to each other, ruining spatial matching (correspondence).
  • In larger models (ViT-L/H), the situation flips: spatial matching actually improves, but the deep features become "blind" to raw pixel and texture evidence.
  • Semantic Gain vs. Locality Loss: iBOT consistently improves semantic tasks (classification, segmentation) but often hurts tasks requiring precise local distinctions, like video tracking or copy detection.
  • Segmentation is Deceptive: A model can achieve a high segmentation score while losing fine-grained details. As seen in Figure 1, adding iBOT to a ViT-B model produces "blurry" similarity maps that fail to distinguish windows from walls, even if the whole region is correctly labeled "building."
Figure 1: Anchor-patch similarity heatmaps for DINO and DINO+iBOT on ADE20K examples, with semantic annotations shown for reference. Yellow boxes mark the anchor patches. For ViT-B, adding iBOT produces broader responses over the building and mountain, reducing distinctions associated with windows and rugged cliff structures. This effect is alleviated in ViT-L, where the +iBOT model also exhibits more spatially selective responses to these structures. The semantic masks do not resolve many of these within-region differences, illustrating why segmentation performance alone cannot characterize fine-grained local representations. Additional examples appear in Figure 10.

Key Results

  • Tracking Degradation: For ViT-B, adding iBOT caused a massive 6.3 point drop in DAVIS video tracking performance. However, for ViT-L and ViT-H, this trend reversed into modest gains, highlighting the scale-dependent nature of the locality cost.
  • Appearance "Blindness": In ViT-L and ViT-H, the ability to linearly decode HOG (edges) and LBP (texture) descriptors from the final layers dropped significantly when iBOT was enabled, suggesting that deep features in large models prioritize semantic concepts over raw visual evidence.
Figure 2: Downstream comparison of DINO and DINO+iBOT across ViT-S/16, ViT-B/16, ViT-L/16, and ViT-H/16, pretrained on ImageNet-1K for 300 epochs under matched settings within each scale. Adding iBOT generally benefits tasks dominated by semantic understanding, whereas its effects on tasks requiring fine-grained local information vary with model scale. In particular, the degradation in DAVIS tracking observed for smaller backbones reverses to modest gains for larger backbones. Task scores other than optical-flow EPE are percentages; normalized patch rank is multiplied by 100. Arrows indicate the preferred direction for task metrics: ↑denotes higher is better and ↓denotes lower is better. Patch effective rank measures spectral diversity. Numerical results and training trajectories are provided in Table 2 and Figure 11, respectively.
  • Gram Anchoring: The authors found that initializing Gram anchoring from a DINO checkpoint (rather than DINO+iBOT) could selectively recover either correspondence or appearance decodability, depending on the model scale.
Figure 4: Quantitative results of Local appearance decodability across different layers. ∆denotes the difference between the DINO+iBOT and its corresponding DINO model under the same pretraining setup. To validate that the diagnostic indeed captures local visual evidence, we also include raw- pixel prediction models, such as SimMIM and MAE, which are also pretrained using ViT-B/16 on ImageNet. We also report the evolution of each descriptor metric during training in Figure 13, and show the decoding visualization in Figure 14.

Limitations and Future Work

  • Compute Constraints: The study was limited to 300 epochs on ImageNet-1K. While sufficient for analysis, foundation models are typically trained on much larger datasets for longer. It remains to be seen if these trade-offs persist at "web-scale."
  • Linearity: The appearance diagnostic uses linear decoders. It's possible that local information is still present but encoded non-linearly.
  • Future Directions: The authors suggest that future training objectives should be "scale-aware," perhaps adjusting the strength or type of patch supervision based on the model's depth and capacity to ensure both semantic and local features are preserved.

Summary updated

Abstract

Masked patch self-distillation is a key component of modern vision foundation models, including DINOv2 and DINOv3, yet its implications for local visual information remain unclear. We show that its semantic benefits can coexist with a scale-dependent locality cost. Using two annotation-free diagnostics, we distinguish recoverable local appearance from spatial correspondence. In smaller models, adding iBOT substantially weakens patch correspondence while largely preserving appearance decodability. In larger models, correspondence improves, but pixel and texture evidence becomes less linearly accessible in deep features. Thus, scaling changes the form of the locality cost rather than uniformly eliminating it. Our analysis of Gram anchoring further shows that preserving patch relations does not guarantee simultaneous improvements in both properties. These findings motivate evaluating and designing visual representations around the complementary demands of semantic abstraction, appearance preservation, and spatial correspondence. Our code is available at https://github.com/winci-ai/jea.
BibTeX
@inproceedings{weng2026locality,
  author = {Xi Weng and Zhaoyu Liu and Lianyu Hu and Jin Song Dong},
  title = {{The Locality Trade-off in Masked Patch Self-Distillation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=jvnyjDi5md},
}
Figure