Locality Alignment Improves Vision-Language Models

## Abstract

Abstract Vision language models (VLMs) have seen growing adoption in recent years, but many still struggle with basic spatial reasoning errors. We hypothesize that this is due to VLMs adopting pre-trained vision backbones, specifically vision transformers (ViTs) trained with image-level supervision and minimal inductive biases. Such models may fail to encode the class contents at each position in the image, and our goal is to resolve this by ensuring that the vision backbone effectively captures both local and global image semantics. Our main insight is that we do not require new supervision to learn this capability – pre-trained models contain significant knowledge of local semantics that we can extract
and use for scalable self-supervision.
We propose a new efficient post-training stage for ViTs called locality alignment and a novel fine-tuning procedure called MaskEmbed that uses a masked reconstruction loss to learn semantic contributions for each image patch.
We first evaluate locality alignment with a vision-only benchmark, finding that it improves a model’s performance at a patch-level semantic segmentation task, especially for strong backbones trained with image-caption pairs (e.g., CLIP and SigLIP). We then train a series of VLMs with and without locality alignment, and show that locality-aligned backbones improve performance across a range of benchmarks, particularly ones that involve spatial understanding (e.g., RefCOCO, OCID-Ref, TallyQA, VSR, AI2D). Overall, we demonstrate that we can efficiently learn local semantic extraction via a locality alignment stage, and that this procedure complements existing VLM training recipes that use off-the-shelf vision backbones.

## 1 Introduction

Auto-regressive VLMs are an exciting new type of model that emerged in the last couple years and has seen growing adoption (Alayrac et al., ). They are more flexible than previous multi-modal image-text models (Karpathy and Fei-Fei, , Radford et al., ), leverage the reasoning abilities and open-ended nature of pre-trained language models (LMs) (Touvron et al., , Jiang et al., , Zheng et al., ), and have the potential to subsume many visual tasks that can be expressed in natural language and interwoven images (Lu et al., , Chen et al., , Gupta et al., ).

However, current VLMs make a range of basic perceptual errors and struggle in particular with spatial understanding. Multiple recent works document such failures (Tong et al., , Rahmanzadehgervi et al., ), and weaknesses can be seen through benchmarks focused on object localization (Kazemzadeh et al., , Wang et al., ), counting (Acharya et al., ) and relational question-answering (Liu et al., ). Data limitations are part of the problem, because LMs might not fully exploit visual features without sufficient joint training. But we suspect that another issue is how these models leverage pre-trained vision backbones: the most popular current ViTs are trained with image-level supervision and minimal spatial inductive biases (e.g., CLIP and SigLIP; Radford et al. , Zhai et al. ), so they may fail to encode the necessary information for spatial reasoning. Ideally, we want a ViT whose representation is sufficient to predict class contents not only for the entire image but also for each region, which we refer to as encoding local semantics. Since most VLM training recipes either freeze or only partially train the ViT backbone (Liu et al., , Karamcheti et al., , Laurençon et al., , Lu et al., , Bai et al., ), and because it may be difficult to learn local semantics during joint fine-tuning without extensive multi-modal data, we reason that it would help to use a ViT that better captures these rich image details.

Our goal in this work is to train a vision backbone that matches the best existing models in global image understanding (Radford et al., , Zhai et al., ) but that also encodes local semantics. We reason that disentangling where semantics arise in an image provides necessary information for certain downstream tasks, and sacrifices nothing if local semantics can collectively provide rich global image understanding. However, learning such a backbone is challenging due to limitations in current training approaches: for example, scalable objectives like CLIP offer only image-level supervision (Radford et al., ), semantic segmentation datasets contain relatively few images (Lin et al., , Zhou et al., , Gupta et al., ), and densely self-supervised methods like MAE and BEiT lack rich semantics (He et al., , Bao et al., ).

Figure: Figure 1: VLM training pipeline with locality alignment. Given a pre-trained vision backbone, we first perform a locality alignment stage using our MaskEmbed procedure (left), and then use the fine-tuned ViT to train a VLM (center). We find that doing so improves VLM performance in multiple benchmarks that involve spatial understanding (right).
Refer to caption: x1.png

Our main insight is that we do not require new supervision to learn this capability. We find that pre-trained models contain significant knowledge of local semantics that we can elicit by querying them with masked inputs: by examining counterfactual predictions under various masking patterns, we can analyze how the outputs change and infer semantics associated with each patch. We use this insight to design a fine-tuning procedure – we propose a masked embedding self-consistency (MaskEmbed) approach that uses masked patch embeddings to reconstruct masked views from the pre-trained model, and in doing so learns representations that capture localized image semantics.

Since we bypass the need to train from scratch, we view this as a post-training stage for ViTs that we call locality alignment (Figure 1). The goal of this training stage is to take the set of concepts that an existing model is trained to recognize, and localize them by disentangling where they occur in an image. Our approach can be applied to any strong model trained with image-level supervision (e.g., CLIP, SigLIP, MoCo), leverages self-supervision instead of requiring costly human annotations, and has relatively low computational cost compared to pre-training.
Our experiments focus on improving the performance of VLMs, but locality alignment may also prove useful for other applications.

To verify the effectiveness of locality alignment, we conduct both a vision-centric evaluation and a vision-language evaluation where we compare VLMs trained with different vision backbones. In our first set of experiments, we want to test whether locality-aligned ViTs encode what’s where in an image, and we measure this via a simple probing benchmark: we cast existing semantic segmentation datasets as a patch-wise multi-label classification problem (e.g., MSCOCO; Lin et al. ), and we find that locality alignment improves the performance of various backbones trained with image-level supervision, particularly language-supervised models like CLIP and SigLIP (Radford et al., , Zhai et al., ). Next, our main set of vision-language experiments compare a series of VLMs trained with and without locality alignment. We train our models using the recently released Prismatic library (Karamcheti et al., ) and with the strongest current ViT backbones, and we find that locality alignment improves performance across a range of benchmarks, particularly those that involve spatial reasoning (e.g., RefCOCO, OCID-Ref, TallyQA, VSR, AI2D). Through these experiments, we find that the best models for VLMs are reliably improved by locality alignment.

To summarize, our main contributions in this work include:

- •
We introduce a locality alignment post-training stage for ViTs to recover local semantics from models that primarily encode global image information. Our MaskEmbed procedure leverages self-supervision to avoid requiring extra annotated data, is especially suitable for language-supervised models like CLIP and SigLIP, and requires minimal compute relative to pre-training (<1% of CLIP and SigLIP’s pre-training compute in our experiments).
- •
Our vision-centric evaluation shows that locality alignment reliably enhances a model’s ability to predict patch-level class contents. For various backbones trained with image-level supervision, we find that their locality-aligned counterparts improve at local feature extraction, with especially strong improvements for large and high-resolution models like CLIP ViT-L @ 336px and SigLIP SO400M @ 384px that are used in most current VLMs.
- •
Our vision-language evaluation shows that we can incorporate locality-aligned backbones and improve VLM performance across a range of benchmarks. We perform a series of controlled comparisons with a shared training recipe, and we observe improvements on multiple tasks including object localization, text understanding, counting and relational question-answering.

Overall, our findings reveal a gap between current pre-trained ViTs and the needs of open-ended VLMs for localized image semantics. Given the low cost and consistent improvements from MaskEmbed, our results suggest that locality alignment is a promising idea to incorporate into existing VLM recipes, and potentially for other downstream tasks that require spatial understanding.

## 2 Related Work

ViT pre-training. There are many ways to pre-train ViTs, including strongly supervised approaches like image classification (Dosovitskiy et al., ), language-supervised objectives like CLIP and SigLIP (Radford et al., , Yu et al., , Zhai et al., , Tschannen et al., ), and various self-supervised tasks like BERT-style masked image modeling (Bao et al., , He et al., ), augmentation-invariance (Chen et al., , Caron et al., ) and auto-regressive pixel generation (Chen et al., , El-Nouby et al., ). Pre-trained vision models are often adapted to downstream tasks, including semantic segmentation, object detection and depth estimation (Li et al., , Birkl et al., , Kirillov et al., ), but training data for these tasks is typically scarce. Among these various training approaches, language-supervised models have proved most effective for VLMs in recent studies (Karamcheti et al., , McKinzie et al., , Tong et al., ).
Our work is motivated by a lack of training objectives with large-scale, dense and semantically rich supervision.
We review existing pre-training approaches in more detail in Appendix A.

ViT local feature extraction. Several works have noted CLIP’s lack of localized features in the context of downstream dense prediction tasks (Zhong et al., , Rao et al., , Xu et al., , Wu et al., ). Other works have shown that ViTs learn to associate nearby patches (Dosovitskiy et al., , Raghu et al., , Jelassi et al., ), but this is distinct from encoding local semantics in their outputs. Some have proposed hybrid ViTs that reintroduce inductive biases from CNNs (Liu et al., , Wu et al., , d’Ascoli et al., ), but we improve the original ViT’s local feature extraction without sacrificing expressive power. The works most closely related to ours are RegionCLIP (Zhong et al., ), CLIPSelf (Wu et al., ) and LocCa (Wan et al., ). RegionCLIP fine-tunes CLIP with synthetically labeled region-text pairs, which avoids human annotation but suffers from noisy caption matching. CLIPSelf fine-tunes CLIP to reconstruct features of random image sub-crops, which is similar to our approach but specifically intended for zero-shot semantic segmentation; this difference in goals leads to suboptimal localization under probing, as we show in Section 4. LocCa is trained to auto-regressively predict synthetic image captions from OWL-ViT (Minderer et al., ), which is itself a CLIP model fine-tuned on dense object annotations. Compared to LocCa, our approach requires significantly less compute, does not require any extra human annotations, and can be flexibly applied to any pre-trained model.(^1^11We are unable to compare to LocCa (Wan et al., ) due to a lack of public checkpoints.)

VLMs. We focus on the class of open-ended vision-augmented LMs, which includes early examples like Flamingo, OFA, BLIP and Llava (Alayrac et al., , Wang et al., , Li et al., , Liu et al., ), and current frontier models like Claude 3.5 Sonnet, GPT-4o and Gemini 1.5 (, , Reid et al., ).
The most common approach to building such models is to combine a pre-trained ViT and a pre-trained LM (Bai et al., , Lu et al., , Beyer et al., ), which leverages strong capabilities learned from each modality. Several recent works investigate how to best integrate visual features (Laurençon et al., , McKinzie et al., , Karamcheti et al., , Tong et al., ). Most use high-resolution variants of CLIP or SigLIP for their vision backbone (Radford et al., , Zhai et al., ) and either freeze or only partially train the ViT alongside the LM, which makes it important for the initial ViT to capture local semantics.

VLM perceptual failures. VLMs are a diverse class of models with different interfaces and architectures, but many works have demonstrated perceptual errors across various types of multi-modal models (Thrush et al., , Kamath et al., , Yuksekgonul et al., , Xu et al., ). For the current generation of open-ended VLMs, perceptual flaws are apparent in benchmarks for counting, object localization, relational question-answering, object hallucination, and others like BlindTest (Rahmanzadehgervi et al., ) and MMMV (Tong et al., ). Many of these tasks require spatial understanding, and we suspect that part of the problem is a failure to encode local image semantics. There are other ways to approach the issue, but an improved vision backbone composes with many of them: these include fusing features from multiple backbones (Karamcheti et al., , Jain et al., ) or multiple image crops (Liu et al., , Xu et al., ), adding extra parameters for image processing (Tong et al., ), and training with more data focused on spatial reasoning (Lu et al., , Wang et al., , Peng et al., , Xu et al., ).

## 3 Locality Alignment

Our goal is to train a vision backbone that encodes semantics both for the image as a whole and for each image region. Rather than training from scratch, we propose to address this in a post-training locality alignment stage. Our main insight, described in this section, is that pre-trained models offer a way to infer local semantics via masking. We show how to extract this information by querying the model with multiple masked images, and then how to make it more easily accessible by fine-tuning the model with self-supervision.

### 3.1 Masking is all you need

Consider a model trained to extract a rich global representation but no specific information for each image region, e.g., a CLIP image encoder (Radford et al., ). We want to use such a model to understand what’s where in the image, and we propose to do so with masking. A model that accurately represents global image contents will change its output in response to input masking, and we can exploit this to probe a model under different masked views and understand each patch’s contribution to the prediction. For example, comparing the output before and after masking a single patch provides information about that region’s contents (Zeiler and Fergus, ).

We can build on this by masking multiple parts of the image and modeling the differences when each patch is masked. The simplest implementation is an additive approximation: if the model output is a vector, we can learn vectors of the same size for each patch and train them such that the partial summation approximates the masked output. Concretely, consider an input image $x$ represented as a set of $n$ patches $x=\{x_{1},\ldots,x_{n}\}$, a binary mask $m\in\{0,1\}^{n}$, and a masked image $m(x)=\{m_{1}\cdot x_{1},\ldots,m_{n}\cdot x_{n}\}$ where masked patches are set to the dataset mean. Given a pre-trained model $f(\cdot)$ with masked outputs $f(m(x))\in\mathbb{R}^{d}$, we can write the patch embeddings as vectors $g_{1},\ldots,g_{n}\in\mathbb{R}^{d}$ or as a matrix $g=[g_{1},\ldots,g_{n}]\in\mathbb{R}^{n\times d}$, and we can train them such that $m^{\top}g\approx f(m(x))$ for a fixed image $x$ and all masks $m$.

This approach is a reasonable starting point, and it illustrates that pre-trained models contain latent knowledge of local semantics that can be extracted via masking. It also has a precedent in the literature: querying pre-trained models with masked images was one of the earliest approaches to zero-shot semantic segmentation (Xu et al., ), and this learning approach is the basis of certain interpretability methods (Jethani et al., , Covert et al., ). However, we find that the additive approximation is limiting and not very effective in our experiments; this is because 1) patch semantics aren’t truly additive and the poor approximation causes us to lose information about each patch, 2) vector embeddings only allow us to reconstruct vector targets (e.g., the [CLS] token), which contain a small part of the pre-trained model’s information about the image. Our main approach described in the next section therefore generalizes this idea to learn richer patch embeddings.

Figure: Figure 2: MaskEmbed training diagram. The encoder and decoder jointly reconstruct the pre-trained teacher’s masked output, where patches are masked at the embedding layer for the encoder and at the input layer for the teacher.
Refer to caption: x2.png

### 3.2 Proposed approach

We now introduce MaskEmbed, our fine-tuning procedure to enhance a model’s local feature extraction abilities. Our basic idea is still to learn each patch’s semantics by reconstructing masked views, but rather than doing so with an additive approximation we now use an expressive reconstruction function, and we obtain the patch embeddings by fine-tuning the pre-trained model.

We now let the patch embeddings be generated by a model $g_{\theta}(x)\in\mathbb{R}^{n\times d}$, which we refer to as an encoder and initialize with weights from the pre-trained ViT. We view the pre-trained model $f(\cdot)$ as a teacher whose masked views $f(m(x))$ are the reconstruction targets given the encoder’s equivalently masked output $m(g_{\theta}(x))\in\mathbb{R}^{n\times d}$, which we implement by setting masked embeddings to zero. We perform the reconstruction step using a transformer $h_{\phi}(\cdot)$ that we call a decoder, and whose predictions are denoted $h_{\phi}(m(g_{\theta}(x)))$. Importantly, the decoder can map to the teacher’s output space regardless of its size, so we can adopt either the [CLS] token ($\mathbb{R}^{d}$) or an entire embedding layer ($\mathbb{R}^{n\times d}$) as the reconstruction target. To summarize, our model is trained with the following loss function in expectation over images $x$ and random masks $m$:

$$ $\min_{\theta,\phi}\;{\mathcal{L}}(\theta,\phi)=\mathbb{E}_{x,m}\Big{[}\big{ \lVert}h_{\phi}\big{(}m\left(g_{\theta}(x)\right)\big{)}-f\big{(}m(x)\big{)} \big{\rVert}^{2}\Big{]}.$ (1) $$

We call this procedure masked embedding self-consistency, or MaskEmbed for short, and Figure 2 shows a detailed training diagram. The pre-trained model weights are used to initialize the encoder and frozen teacher model, and the decoder is trained from scratch. The intuition behind this approach is that to minimize Equation 1, the encoder’s output embeddings must represent semantics for each patch without leaking information from neighboring patches or the image as a whole. We expect the sequence of patch embeddings to collectively encode rich local and global information, which should be useful when training open-ended VLMs.

Compared to the earlier additive reconstruction approach (Section 3.1), MaskEmbed’s use of an expressive decoder helps compress more information into each patch embedding. This also differentiates our approach from CLIPSelf (Wu et al., ), which adopts a related objective but aggregates CLIP’s features by average-pooling within crop windows. We show the importance of this design choice in Section 4, where we also perform an ablation study to determine several hyperparameters for MaskEmbed. We remark that the main disadvantage of our approach is that our patch embeddings are less interpretable, because they lie in a different embedding space than the pre-trained model’s outputs; however, we reason that this is acceptable because our eventual use case is training a VLM that can learn how the entire representation encodes semantics.

### 3.3 Training data

MaskEmbed is supervised by the pre-trained model’s masked outputs, which means we can use any image dataset regardless of its annotations or lack thereof. Diverse data covering the pre-training distribution will help localize the broadest possible semantics, ideally including objects, backgrounds, textures, facial features, etc. We use ImageNet-1k and ImageNet-21k (hereafter IN1k and IN21k) (Deng et al., ) for all our experiments, which are relatively diverse and contain 1.2M and 12.6M images in our training sets. A promising idea that we leave to future work is using larger web-scraped image datasets like those used for contrastive learning (Schuhmann et al., , Xu et al., , Gadre et al., , Fang et al., ), which are even more diverse and could help learn strong localized text features that are less prominent in ImageNet.

Related to training data, we note that our approach only works as intended if the pre-trained model makes meaningful predictions with masked inputs. This can be ensured by pre-training with randomly dropped patches, which is performed for some but not all of the models in our experiments (He et al., , Bao et al., , Peng et al., , Fang et al., ). Training or fine-tuning with random masking is often suggested in the interpretability literature (Frye et al., , Covert et al., , Jain et al., ) because masked images are out-of-distribution if the model was not trained with masking, but we do not explore this direction and instead rely on the fact that ViTs empirically behave reasonably under masking (Naseer et al., ).

## 4 Vision-Centric Experiments

For our experiments evaluating locality alignment, we aim to test whether MaskEmbed can successfully preserve an existing model’s semantics while disentangling where they occur in an image. We initially want to do so without the complexity and computational cost of training a VLM, so we create a probing benchmark inspired by semantic segmentation. We first use this to determine several unspecified hyperparameters for MaskEmbed (e.g., the choice of reconstruction target), and then to compare a suite of pre-trained models to their locality-aligned counterparts.

### 4.1 Probing benchmark

A natural task to test if a ViT encodes local image semantics is semantic segmentation (Long et al., ). However, this is a pixel-level classification problem, and the most performant approaches for ViTs require fully fine-tuning the backbone (Li et al., , Chen et al., , Fang et al., ), sometimes with windowed self-attention (Li et al., ). We want to test how well a ViT captures local semantics without task-specific fine-tuning, so we simplify the problem by casting it as a patch-level multi-label classification problem and keep the backbone frozen. Specifically, we create a small output head on top of the ViT’s output representation, and we train it to predict the union of labels in each patch using a binary cross-entropy (BCE) loss. We implement this approach with MSCOCO (Lin et al., ), but we can also use other datasets like Ade20k (Zhou et al., ).

The performance on this patch-level task tests how well a model captures local semantics, and for a corresponding measure of global image semantics we also train output heads to predict the union of classes in an entire image; we refer to these tasks as local probing and global probing respectively, and we use macro-averaged recall as a performance metric that accounts for class imbalances in MSCOCO (Lin et al., ). We use two-layer transformer output heads unless otherwise specified, because this tests the information contained in the entire representation and is most similar to how a VLM uses the ViT output; Appendix B also shows results with other output heads.

### 4.2 Ablating MaskEmbed design choices

Our first usage of the probing benchmark is to explore several design choices for MaskEmbed. There are certain hyperparameters that we did not fully specify in Section 3.2, including the choice of reconstruction target and mask distribution, and we also want to test the importance of data augmentations, training duration and data diversity (IN1k vs. IN21k). We consider two pre-trained models for these experiments, IN1k ViT-B/16 and CLIP ViT-B/16 (Dosovitskiy et al., , Radford et al., ), and we conduct a series of ablations to investigate these implementation choices.

We report the full results of our ablations in Appendix B, but we describe our main findings here that inform settings for our later runs.
Reconstruction target: we observe that reconstructing the [CLS] token improves local probing performance, but not as much as reconstructing the entire embedding sequence from the second-to-last layer; this is expected, and we adopt this choice for the rest of our experiments.
Mask sampling: we find that multiple mask distributions are effective, including the block masking approach from BEiT (Bao et al., ). We adopt an unstructured mask whose cardinality is sampled uniformly at random, and we additionally train with the complement of the mask and a mask that preserves all patches at each iteration.(^2^22In our notation this corresponds to $p(m)=1/\binom{n}{|m|}(n+1)$, and at each step we calculate the reconstruction loss for three masks: $m\sim p(m)$, $1-m$ and ${\bm{1}}$.)
Data augmentations: we observe that strong augmentations like Mixup, CutMix and AutoAugment are not necessary for improved performance (Zhang et al., , Yun et al., , Cubuk et al., ), and we use a simple random crop for our main runs.
Decoder size: performance is not overly sensitive to the decoder size, so we adopt a simple two-layer transformer.
Training data: we find that local probing performance improves within just 2 IN1k epochs, and that we can get strong improvements in under 50 epochs. We also find that training with the more diverse IN21k is important for CLIP ViT-B/16, which is pre-trained with more diverse data and can degrade when fine-tuned for too long with IN1k. For our remaining runs we train all models with IN21k for 5 epochs, which is equivalent to roughly 60k gradient steps with batch size 1024. Notably, this is less than 1% of pre-training cost for CLIP and SigLIP (Radford et al., , Zhai et al., ), so the marginal cost of locality alignment is low.

Figure: Figure 3: Qualitative examples from probing benchmark. We plot predictions for two images using CLIP ViT-L @ 336px before and after locality alignment. The original backbone fails to distinguish where certain objects occur in the image, but the aligned backbone corrects this.
Refer to caption: x3.png

Figure: Figure 4: Probing benchmark results. We find that locality alignment with MaskEmbed improves IN1k classifiers across multiple model scales (left), and improves many models trained with language supervision (right). Interestingly, most models increase both their local and global probing accuracy.
Refer to caption: x5.png

### 4.3 Comparison with pre-trained models

We now perform experiments to verify that MaskEmbed improves local feature extraction for a range of pre-trained models.
We consider ViTs trained with multiple forms of image-level supervision, including IN1k classifiers (Dosovitskiy et al., ), CLIP (Radford et al., ), SigLIP (Zhai et al., ), other language-supervised models (OpenCLIP, DFN, EVA02; Cherti et al. , Fang et al. , ) and MoCo v3 (Chen et al., ). Not all of these models are relevant for high-performance VLMs (Tong et al., ), but locality alignment should work for any model pre-trained with image-level supervision. We use the settings determined in our ablation study, which include reconstructing the teacher’s entire embedding sequence and training with IN21k for 5 epochs. Other details on our MaskEmbed hyperparameters are described in Appendix C.

Overall, we find that MaskEmbed reliably improves local probing performance for all these models, and in many cases even improves their global probing performance. Figure 4 (left) shows the local probing accuracy for IN1k models across different scales, where we find that performance improves for all models except the low-capacity ViT-T: locality alignment boosts the ViT-B’s performance to roughly that of the next model scale, and provides a similar absolute improvement for the ViT-L. Next, Figure 4 (right) shows results for a range of models, including three CLIP and three SigLIP backbones, all of which improve substantially. Notably, the two strongest backbones for VLMs show clear improvements (CLIP ViT-L @ 336px and SigLIP SO400M @ 384px), suggesting that the challenge of learning local semantics is not solved merely with scale. Figure 3 shows qualitative examples from CLIP ViT-L @ 336px, demonstrating how MaskEmbed helps identify where each object occurs in the image. Appendix B shows results for the remaining models, all of which show similarly large improvements (OpenCLIP, DFN, EVA02, MoCo v3); we even find that locality alignment can improve probing performance for some densely supervised models, including BEiT and BEiTv2 (Bao et al., , Peng et al., ).

**Table 1: CLIPSelf comparison. We compare MaskEmbed to CLIPSelf’s crop-based objective using CLIP ViT-B. For fair comparison we include a version of MaskEmbed with averaged features instead of a transformer decoder, and a version that uses just one mask per batch rather than three. Results that are worse than the teacher are shown in red.**
|  | # augs/batch | local | global |
| --- | --- | --- | --- |
| teacher |  | 44.63 | 52.61 |
| CLIPSelf | $1\times$ | 36.16 | 42.48 |
| MaskEmbed (avg) | $1\times$ | 40.97 | 47.68 |
| MaskEmbed | $1\times$ | 46.07 | 53.17 |
| MaskEmbed | $3\times$ | 46.32 | 54.55 |

Finally, we perform a comparison with CLIPSelf (Wu et al., ). This method uses a similar objective and reconstructs cropped views using cropped ViT features, but it reconstructs CLIP’s [CLS] token by simply average-pooling embeddings within each crop window. We test this method in Table 1, where we find that it in fact degrades CLIP’s probing performance. We suspect that the main issue is not crops but the use of a weak decoder (i.e., averaging features within the crop), and we verify that MaskEmbed also degrades performance when we use this approach to reconstruct the [CLS] token. Our main version of MaskEmbed proves to be much more effective, although unlike CLIPSelf it does not preserve CLIP’s zero-shot classification abilities.

## 5 Vision-Language Experiments

We now conduct our main experiments by training a series of VLMs with and without locality alignment, and checking for improvements in relevant benchmarks.

Experimental setup. We train VLMs using the Prismatic library and training recipe (Karamcheti et al., ). Images are turned into embedding sequences by the ViT (Liu et al., ), projected into the LM embedding space by an adapter module, concatenated with text token embeddings, and processed by the LM. We train in a single stage with the ViT frozen, following Karamcheti et al. (). Our experiments focus on two high-resolution vision backbones, CLIP ViT-L @ 336px and SigLIP SO400M @ 384px (Radford et al., , Zhai et al., , Alabdulmohsin et al., ), which respectively have 306M and 400M parameters and represent images with 577 and 729 tokens. For our LM backbone we use Llama-2 7B Base (Touvron et al., ), which was found to outperform the instruction-tuned Vicuña 7B (Zheng et al., ) by Karamcheti et al. ().

For our training dataset, we use the Llava-1.5 data mixture (Liu et al., ) that contains 665k examples, and which consists of synthetic instruction completions (Liu et al., ), existing vision-language datasets (e.g., GQA, TextCaps; Hudson and Manning , Sidorov et al. ) and a collection of language-only data (ShareGPT, ). We also experiment with an extended data mixture considered by Karamcheti et al. (), which adds LVIS-Instruct-4V (Wang et al., ) and LRV-Instruct (Liu et al., ) for an additional 570k examples. We provide more details on the training data in Appendix D, and all models are trained for two epochs.

Evaluations. We use a suite of standardized benchmarks considered by Karamcheti et al. (). Those that involve spatial understanding and fine-grained features include object localization (RefCOCO, OCID-Ref; Kazemzadeh et al. , Wang et al. ), counting (TallyQA; Acharya et al. ), relational question-answering (VSR; Liu et al. ), chart understanding (AI2D; Kembhavi et al. ) and text comprehension (TextVQA; Singh et al. ). We also show results for holistic question-answering (VQAv2, VizWiz; Goyal et al. , Bigham et al. ) and object hallucination (POPE; Li et al. ), which are not as closely related to spatial understanding. We provide more details on our suite of benchmarks in Appendix D.

Figure: Figure 5: VLM benchmarking. We plot results across a suite of benchmarks and show controlled comparisons for CLIP (left) and SigLIP (right) with both the Llava-1.5 data mixture (top) and the extended data mixture (bottom). Overall, we achieve better performance in nearly all metrics with locality-aligned backbones. Between the two data mixtures, we find that the larger dataset does not have uniformly better performance and leads to different gains across text comprehension, chart understanding and localization tasks.
Refer to caption: x7.png

### 5.1 Results

We show results in Figure 5 for the full suite of benchmarks. We plot metrics in radar charts for both CLIP and SigLIP, separating results based on the two data mixtures that we consider. Following prior work (Karamcheti et al., ), we scale each benchmark’s y-axis based on the mean and standard deviation within our pool of models. We find that locality alignment is broadly useful and improves performance in most benchmarks, especially those mentioned above that involve spatial understanding. Notably, the generally stronger SigLIP SO400M @ 384px backbone (Tong et al., ) has better performance in nearly all benchmarks using our approach.

For VLMs trained with standard backbones, we follow the exact training recipe from Karamcheti et al. (). But for those trained with locality-aligned backbones, we find that one small architecture change is necessary to achieve these performance improvements: rather than using the standard MLP vision-language adapter (Liu et al., ), we use the trained decoder module from MaskEmbed as an adapter (see Section 3.2). This unlocks robust performance improvements consistent with our probing results in Section 4.3, whereas using a MLP adapter applied to the fine-tuned embeddings slightly hurts performance (see ablations in Appendix D). We reason that this is because information is compressed into a space that is difficult to use compared to the text-aligned CLIP and SigLIP spaces, and that the decoder helps resolve this for the LM. Overall, the modified adapter adds negligible compute overhead and is a simple change to yield improved spatial understanding.

In Appendix D, we also show a comparison with an alternative approach to improving spatial understanding: fusing features from a second backbone, specifically DINOv2 (Oquab et al., ), following the implementation from Karamcheti et al. (). We find that both methods improve spatial understanding benchmarks like RefCOCO and TallyQA, with feature fusion in some cases leading to larger gains. However, we also observe that feature fusion can degrade the model in other ways that do not occur with locality alignment, including holistic question-answering (VizWiz) and text comprehension (TextVQA) – likely because text is not prominent in DINOv2’s pre-training. We leave to future work a careful study of how to compose locality alignment with feature fusion, as well as other ideas like combining multi-crop features (Liu et al., , Xu et al., ), increasing image resolution (Bai et al., ) and utilizing prefix attention in the LM (Beyer et al., ).

## 6 Discussion

Our main contributions in this work are proposing locality alignment as a post-training stage for ViTs, investigating a specific implementation with MaskEmbed, and demonstrating improvements in local feature extraction and VLM performance (Sections 4 and 5). We find that fixing a vision backbone’s local feature extraction can be done relatively efficiently using only self-supervision, and that this is effective for many models trained with image-level objectives. Most notably, locality alignment boosts performance for VLMs trained with high-resolution CLIP and SigLIP backbones.

One limitation of our work is that we focus on a single VLM training approach – the Llava-style patches-as-tokens architecture (Liu et al., ) and the specific Prismatic recipe of training in a single stage with the ViT frozen (Karamcheti et al., ). The benefits of locality alignment may change with end-to-end fine-tuning, but we did not explore this because it is unhelpful with our quantity of multi-modal training data (Karamcheti et al., ). An important direction for future work is to test locality alignment in other VLM training approaches, with larger LMs, and to evaluate how it composes with other techniques that enhance visual features.

As other directions for future work, we speculate that locality alignment may yield larger gains when
training for longer with more diverse data (e.g., DataComp; Gadre et al. ). It may also be possible to iteratively learn from stronger teacher models learned during locality alignment, similar to the momentum encoding approach in data2vec (Baevski et al., ). Next, because we observe significant gains for large and high-resolution backbones, an exciting next step is to locality-align native-resolution ViTs (Dehghani et al., ): these offer the potential to capture fine-grained details in large images, but due to their large token counts are at higher risk of mixing information across locations and losing local semantics.
And finally, because MaskEmbed can be understood as leveraging synthetic data for large-scale dense supervision, it may be possible to adapt our approach for end-to-end vision-language training and incorporate it into the pre-training data mixture for next-generation models like Chameleon (Chameleon Team, ).

## Code

We provide repositories to reproduce each part of our results:

|  | Locality alignment | [https://github.com/iancovert/locality-alignment/](https://github.com/iancovert/locality-alignment/) |
| --- | --- | --- |
|  | Probing benchmark | [https://github.com/iancovert/patch-seg/](https://github.com/iancovert/patch-seg/) |
|  | VLM training | [https://github.com/iancovert/prismatic-vlms/](https://github.com/iancovert/prismatic-vlms/) |

## Acknowledgements

The authors thank Yann Dubois, Sheng Liu, Mert Yuksekgonul, Rahul Thapa, and other members of the Zou and Hashimoto labs for helpful discussions. We also thank the authors of the Prismatic library (Karamcheti et al., ), and Ross Wightman for creating and maintaining the timm repository.

## Appendix A Extended Related Work

This section provides an extended discussion of related work, including our proposal’s connection to knowledge distillation and its differences with existing pre-training and distillation approaches.

Other ViT pre-training methods. The main text mentions a number of strongly supervised, language-supervised and self-supervised pre-training methods (see Section 2). We add to list this several more self-supervised methods including iBOT (Zhou et al., ), DINOv2 (Oquab et al., ), MoCo (Chen et al., ), CISSL/DISSL (Dubois et al., ), and pretext tasks like jigsaw puzzle solving (Noroozi and Favaro, ) and rotation prediction (Gidaris et al., ). Beyond these works that develop new objectives, other works explore combinations of multiple objectives (Mu et al., , Kim et al., , Dong et al., , Chen et al., ), e.g., CLIP combined with SimCLR (Chen et al., ) or MAE (He et al., ). Other works combine pre-training with distillation from strong teacher models (Sameni et al., ). Our proposal for a locality alignment stage composes with any pre-training approach, but it is most applicable to those that provide large-scale, semantically rich supervision without any localization (e.g., CLIP). Our locality alignment post-training stage removes the need to augment such objectives with either a secondary objective to learn localized semantics.

Knowledge distillation. Knowledge distillation is a technique to train small models that imitate larger ones (Hinton et al., ) that works across many machine learning problems (Sanh et al., , Taori et al., ). Deviating from this motivation, some works have adopted versions of distillation for self-supervised learning (Caron et al., , Baevski et al., ), and others use it for masked image modeling (Peng et al., , Fang et al., ) or to learn models that handle missing information for better interpretability (Frye et al., , Jethani et al., , Jain et al., ). MaskEmbed is a form of self-distillation because we reconstruct augmented teacher views, similar to works like Consistent Teaching (Beyer et al., ) and ReLabel (Yun et al., ). However, our use of masking at the embedding layer is a key difference from these approaches that enables MaskEmbed to learn localized patch semantics.

Comparison with existing approaches. In Table 2, we compare MaskEmbed to existing methods that use various combinations of masked prediction, dense supervision and knowledge distillation. MaskEmbed is unique in its use of dual masking for both the student and teacher, because most methods only perform masking for the student model. Unlike other densely supervised methods, especially masked image modeling methods like MAE, BEiT and MaskFeat (He et al., , Bao et al., , Wei et al., ), we do not adopt single labels for each patch: MaskEmbed is the only method in Table 2 that supervises student predictions by decoding arbitrarily masked patch embeddings to reconstruct mask-dependent labels. Overall, MaskEmbed has important differences from prior works that enable learning rich localized semantics from a pre-trained teacher model.

**Table 2: Comparison to methods involving combinations of masked prediction, dense supervision and knowledge distillation. ^†Unlike some previous works, we do not adopt single labels for each patch. ^‡Unlike previous works, we perform student masking on patch embeddings rather than raw pixels.**
|  | Labels | Dense Supervision | Teacher Masking | Student Masking |
| --- | --- | --- | --- | --- |
| MAE (He et al., ) | Raw pixels | ✓ |  | ✓ |
| MaskFeat (Wei et al., ) | HOG features | ✓ |  | ✓ |
| BEiT (Bao et al., ) | dVAE | ✓ |  | ✓ |
| BEiTv2 (Peng et al., ) | Pre-trained model | ✓ |  | ✓ |
| EVA (Fang et al., ) | Pre-trained model | ✓ |  | ✓ |
| data2vec (Baevski et al., ) | Momentum encoder | ✓ |  | ✓ |
| FLIP (Li et al., ) | Image captions |  |  | ✓ |
| CLIPA (Li et al., ) | Image captions |  |  | ✓ |
| Masked Surrogate (Frye et al., ) | Pre-trained model |  |  | ✓ |
| Token Labeling (Jiang et al., ) | Pre-trained model | ✓ |  |  |
| MaskEmbed (Ours) | Pre-trained model | ✓^† | ✓ | ✓^‡ |

## Appendix B Probing Benchmark Details & Additional Results

Output head. All experiments with our probing benchmark use a frozen ViT and a trainable output head. The main text results use a transformer output head with two layers, learnable position embeddings, and the same model dimension and number of attention heads as the ViT backbone. We also include supplementary results in Figure 6 with linear and MLP output heads; the MLP output heads use one hidden layer of size 1024 and GELU activation.

Hyperparameters. All output heads are trained with the same approach using hyperparameters that we tuned for the non-aligned IN1k ViT-B/16 backbone (see Table 3). We use the training examples from MSCOCO with semantic segmentation masks (118k images) and report results using the validation set (5k images) (Lin et al., ). MSCOCO contains 183 total class labels split between things classes, stuff classes and the unlabeled class. We report macro-averaged recall for all results, as we found that with our multi-label classification setup the per-class 0-1 accuracy and AUROC are too high to show meaningful differences between models. All training runs are performed on a single NVIDIA H100 80GB GPU.

**Table 3: Probing benchmark hyperparameters.**
| Hyperparameter | Value |
| --- | --- |
| Epochs | 5 |
| Batch size | 32 |
| Weight decay | 0.01 |
| Augmentation | None |
| Gradient clipping | None |
| Optimizer | AdamW |
| $\beta_{1},\beta_{2}$ | (0.9, 0.999) |
| Learning rate schedule | Linear warmup + cosine decay |
| Max learning rate | 1e-3 |
| Min learning rate | 1e-4 |
| Warmup steps | 500 |

### B.1 Ablation study

We report the full results from our MaskEmbed ablation study in Table 4. These results inform our settings for the reconstruction target, data augmentations, mask sampling approach, training dataset and training duration. Separately, we also found in our early experiments that cosine similarity loss yielded similar results to MSE loss, and that varying the decoder depth and width did not lead to clear improvements; all our reported results therefore use a two-layer decoder with the same model dimension and number of attention heads as the pre-trained ViT. We describe each ablation parameter in detail below.

Reconstruction target. We consider three choices for the teacher reconstruction target: the [CLS] token from the last layer, the last layer’s entire embedding sequence, and the second-to-last layer’s embedding sequence. We find that the embedding sequences both work better than the [CLS] token, consistent with our intuition that all the tokens contain useful information. The last layer provides a larger improvement for global probing, and the second-to-last layer provides a large improvement for local probing. We use the second-to-last layer in our subsequent experiments.

Data augmentation. The least amount of data augmentation we can apply during MaskEmbed is a random crop and resize to the ViT’s resolution, in this case $224\times 224$ for both IN1k ViT-B and CLIP ViT-B. In addition to the random crop, we consider applying Mixup (Zhang et al., ), CutMix (Yun et al., ) and an AutoAugment recipe (Cubuk et al., ) as stronger augmentations. We find that Mixup and CutMix can help boost local probing performance but tend to hurt global probing performance. We opt to use the simple random crop in our remaining experiments, and we reason that strong augmentations are unnecessary because our masking leads to training each image with different targets in each epoch.

Mask sampling. We consider several approaches to mask sampling. First, we use a block masking approach inspired by BEiT (Bao et al., ) that uncovers random rectangular regions until a desired portion of the image is visible. Next, we consider a strategy that generates masks of roughly fixed size but without any structure: letting each position be revealed independently with the same probability (Bernoulli), similar to the MAE masking approach (He et al., ). Finally, we consider a uniform masking strategy that first samples the cardinality in $\{0,\ldots,n\}$ uniformly at random and then assigns the masked elements at random, which creates more variability in the portion of the image that is masked. We find that Bernoulli masking becomes more effective as we uncover larger parts of the image (75% vs. 25%), but that it does not lead to simultaneous gains in local and global probing. Our main experiments use the uniform approach with two modifications: in addition to the sampled mask $m$ we use its complement $1-m$, and we also include the null mask that preserves all patches, which we find is helpful for global probing. These additions require extra compute, but crucially not from the encoder: the extra FLOPs are only incurred by the small decoder and the teacher model that does not require a backward pass for gradient computation, so this leads to just $1.66\times$ the FLOPs of our base setting with a single mask (assuming a ViT-B backbone and a two-layer decoder).

Training data and duration. We compare training with IN1k and IN21k for different numbers of epochs. Our base setting is to train with IN1k for 25 epochs, and we find that performance improvements are mostly achieved even with minimal training (as few as 2 IN1k epochs). The best global probing performance is achieved in both cases with IN21k, whereas the best local probing performance is achieved with IN1k. One notable observation is that our performance does not always increase with longer training for CLIP ViT-B and can even degrade (see IN1k global probing); we suspect this is due to insufficient data diversity compared to the pre-training dataset. We choose to train with IN21k for 5 epochs in all our subsequent experiments.

**(a) Reconstruction target.**
|  | layer | local | global |
| --- | --- | --- | --- |
| teacher |  | 43.50 | 51.04 |
| [CLS] token | $L$ | 44.16 | 48.73 |
| embed seq | $L$ | 45.27 | 52.21 |
| embed seq | $L-1$ | 45.66 | 51.43 |

### B.2 Additional results

We now provide additional results from our probing experiments. First, Figure 6 shows results for three large models trained with three different output heads: IN1k ViT-L, CLIP ViT-L @ 336px, SigLIP SO400M @ 384px, and with transformer, MLP and linear output heads. We find that locality alignment improves performance not only with the transformer output head, but also with the other options (except for IN1k ViT-L with linear head). The transformer output head is the most relevant setting, but these results show that we successfully compress more relevant semantics for each patch into the corresponding embeddings and not just into the representation as a whole. However, it is notable that a large gap remains between the transformer output head and the others even after locality alignment; this shows that the embedding sequence learned by MaskEmbed is far more informative about a patch than the single corresponding patch embedding.

Figure: Figure 6: Local probing performance with multiple output heads. We show the improvement in local probing for three models when training three different output heads (transformer, MLP and linear).
Refer to caption: x11.png

Figure: Figure 7: Local probing improvements by class. Results are shown for CLIP ViT-L @ 336px. We show the improvement for all classes (top), and we plot the top 10 most improved classes among both things (bottom left) and stuff (bottom right).
Refer to caption: x12.png

Next, Figure 7 examines one model to understand how our improvements are distributed across classes in MSCOCO (CLIP ViT-L @ 336px). We observe that our local probing performance improves roughly uniformly across all classes, with a few outliers. We also plot the top 10 most improved classes for both things and stuff; qualitatively, it appears that the most improved things classes are objects that could often be small in an image (e.g., cup, bottle, wine glass, scissors), which suggests that locality alignment may help better detect and localize non-dominant objects in an image.

Figure: Figure 8: Stratifying local probing improvements by object size. Results are shown for CLIP ViT-L @ 336px.
Refer to caption: x15.png

Next, we test this by stratifying our improvements across object sizes. We group objects into 10 bins representing the portion of the image they occupy, and we re-compute the local probing performance within each bin. Figure 8 shows that we improve probing performance for objects of all sizes, but that locality alignment helps most for smaller objects. Again, this suggests that locality alignment can help better detect and localize non-dominant objects in images.

Figure: Figure 9: Probing results for suite of pre-trained models. We compare the local and global probing performance across a diverse set of models (left), and compare the local probing performance before and after applying interventions to remove spatial information from the ViT output (right).
Refer to caption: x16.png

**Table 5: Complete local probing results. Results are separated by image-level supervision and various forms of dense supervision. Metrics that did not improve are highlighted in gray.**
|  | Baseline | Aligned | Difference |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | local | global | local | global | local | global |
| IN1k ViT-T | 30.13 | 41.26 | 30.28 | 40.89 | 0.15 | -0.36 |
| IN1k ViT-S | 37.35 | 46.37 | 41.46 | 46.20 | 4.10 | -0.17 |
| IN1k ViT-B | 43.50 | 51.04 | 45.96 | 51.84 | 2.46 | 0.80 |
| IN1k ViT-L | 46.00 | 52.97 | 48.03 | 53.30 | 2.03 | 0.33 |
| MoCo ViT-B | 37.50 | 44.60 | 40.38 | 45.29 | 2.88 | 0.69 |
| CLIP ViT-B | 44.63 | 52.61 | 46.32 | 54.55 | 1.68 | 1.94 |
| CLIP ViT-L | 46.40 | 54.51 | 51.38 | 57.54 | 4.99 | 3.03 |
| CLIP ViT-L @ 336px | 46.05 | 55.13 | 52.71 | 57.75 | 6.66 | 2.62 |
| SigLIP ViT-B | 44.48 | 54.53 | 46.54 | 54.39 | 2.06 | -0.14 |
| SigLIP SO400M | 48.15 | 58.25 | 51.54 | 58.98 | 3.38 | 0.73 |
| SigLIP SO400M @ 384px | 50.25 | 60.53 | 53.00 | 60.62 | 2.75 | 0.09 |
| OpenCLIP ViT-B | 44.25 | 52.20 | 45.17 | 52.62 | 0.92 | 0.42 |
| EVA02 ViT-B | 44.91 | 52.93 | 49.21 | 51.47 | 4.30 | -1.46 |
| DFN ViT-B | 44.36 | 52.36 | 45.67 | 53.72 | 1.31 | 1.36 |
| MAE ViT-B | 39.46 | 43.53 | 37.80 | 42.33 | -1.66 | -1.20 |
| BEiT ViT-B | 41.01 | 49.56 | 43.13 | 49.90 | 2.13 | 0.35 |
| BEiTv2 ViT-B | 42.98 | 49.44 | 46.60 | 53.58 | 3.62 | 4.14 |
| DINO ViT-B | 40.84 | 46.35 | 40.18 | 46.32 | -0.67 | -0.03 |
| DINOv2 ViT-B | 50.18 | 56.95 | 50.79 | 55.64 | 0.61 | -1.31 |

Next, we examine the probing performance across a suite of pre-trained models without locality alignment. Our goal is to better understand how well these models naturally encode local semantics, e.g., due to inductive bias in the ViT architecture. In Figure 9 (left), we plot the local and global probing accuracy for ViT-B models trained with a diverse set of pre-training objectives, including language supervision (CLIP, SigLIP, OpenCLIP, DFN, EVA02), self-supervision (MAE, DINO, DINOv2) and masked image modeling from pre-trained features (BEiT, BEiTv2).

It can be difficult to interpret absolute performance numbers in our benchmark, but we find that the comparative performance between models is informative. For example, we observe that local and global probing performance increase in tandem following a roughly linear trend (Figure 9). This suggests a notion of relative locality that describes how well a model performs at local probing given its performance at global probing, or simply how much it deviates from the empirical trendline. We note that certain models trained with dense self-supervision, including MAE and DINOv2, lie far above the empirical trendline. In contrast, models trained with image-level supervision sometimes lie far below the line (MoCO v3, SigLIP); this indicates relatively poor local feature extraction and is a sign that locality alignment may be effective. Locality alignment is an intervention that can shift a model upwards and improve its relative locality.

Next, we consider what these results imply about how well ViTs naturally encode local semantics. Our work is motivated by the intuition that they may not, due to pre-training objectives that do not encourage it and a lack of inductive biases in the architecture, but in reality these models do not fail outright at the probing task. To emphasize this, we experiment with two interventions applied the transformer output head: 1) we restrict it to only have access to the [CLS] token (or the average embedding for models that do not use one), and 2) we anonymize the ViT’s output embeddings by removing their learned positional embeddings and placing them in separate token positions from the predictions. Figure 9 (right) shows the probing performance before and after these interventions. It is clear that performance degrades due to these interventions, especially the first, suggesting that the ViT output does not collapse into a global representation containing no information about each patch’s class contents. This is clear evidence that the patch embeddings provide useful information that significantly improves probing performance, even for models where these are not explicitly trained (e.g., CLIP, IN1k). However, they generally do not perfectly capture local semantics and in many cases benefit from locality alignment.

Finally, Table 5 shows the results of running MaskEmbed on our full suite of pre-trained models. We observe that locality alignment improves local probing performance for all models trained with image-level supervision, and in most cases it also improves their global probing performance. The results are mixed for models trained with dense supervision: MAE, DINO and DINOv2 barely benefit from locality alignment (He et al., , Caron et al., , Oquab et al., ), and although BEiT and BEiTv2 do (Bao et al., , Peng et al., ) this could be because we use checkpoints that are fine-tuned for IN1k classification.(^3^33We use checkpoints available on timm at [https://github.com/huggingface/pytorch-image-models](https://github.com/huggingface/pytorch-image-models).) We also note that results between different models are sometimes not comparable due to differences in resolution and patch size. Surprisingly, DINOv2 is the best-performing model overall despite being a relatively weak backbone for VLMs (Karamcheti et al., , Tong et al., ); we interpret this to mean that DINOv2 is exceptionally good at detecting and localizing the set of classes in MSCOCO, which are relatively narrow and perhaps not indicative of the diverse images handled by VLMs.

### B.3 CLIPSelf comparison

We now describe our comparison with CLIPSelf (Wu et al., ) in more detail. We implemented a simple version of CLIPSelf where crops are aligned with the ViT’s patch grid: we use CLIP ViT-B/16 (Radford et al., ), which operates on a grid of $14\times 14=196$ patches, and for consistency with Wu et al. () we sample crops containing between 3-14 patches on each side. The cropped image is then upsampled to $224\times 224$ for the teacher model, which deviates slightly from the choice to pad in Wu et al. (). The student ViT’s patch features are average-pooled within the crop window to reconstruct the teacher’s [CLS] token, and we train the model with cosine similarity loss as in the original work. We sample one crop per image at each gradient step, and for a fair comparison we also run a version of MaskEmbed that uses just one mask per gradient step. When running our version of MaskEmbed that performs reconstruction via average-pooling, we use the block masking strategy (Bao et al., ) to avoid masks that contain no image patches. Unlike in the original CLIPSelf work we do not increase the student’s resolution during training, which is a step that we also did not apply with MaskEmbed.

Figure 10 illustrates the masking and cropping operations involved in MaskEmbed and CLIPSelf. Both augmentations can meaningfully change the teacher’s output depending on what contents are removed. Our results in Table 1 suggest that the main reason for CLIPSelf’s poor performance is not the use of crops instead of masks, but the choice to reconstruct the teacher’s [CLS] token by average-pooling features within each crop window. We speculate that a version of CLIPSelf that adopts a transformer decoder would be significantly more effective, but we leave this exploration to future work.

Figure: Figure 10: Image transformations for MaskEmbed and CLIPSelf. We show the original image, the randomly sampled image augmentation for each method (either a mask or crop), and the modified image seen by the teacher model. We annotate each image with class probabilities generated by IN1k ViT-B/16 to show that both augmentations can meaningfully change the teacher’s output.
Refer to caption: extracted/5926632/images/image_transforms.png

## Appendix C MaskEmbed Training Details

We use this section to provide more details on our MaskEmbed implementation.

Teacher model. The teacher ViT is initialized from the pre-trained model weights and not updated during training. Its inputs are masked images, where masking is applied by setting masked patches to the image mean (or zero when images are normalized). Its output can be set in multiple ways, but we find that an entire layer’s embedding sequence works best.

Encoder. The encoder ViT is initialized from the pre-trained model weights and updated throughout training. Its input is an unmasked image, and its output is a sequence of patch embeddings that go through an additional linear output head. We experimented with re-initializing the final transformer block because these parameters are typically pre-trained only to pass information to the [CLS] token (Dosovitskiy et al., , Radford et al., ), but this did not improve performance.

Decoder. The decoder is a shallow transformer trained from random initialization, and we use LayerScale to ease its optimization (Touvron et al., ). Its input is a masked sequence of patch embeddings, and its output is a reconstruction of the masked teacher view. We extract the first entry from the output when reconstructing the [CLS] token, and we otherwise use the output at every position. We use learned position embeddings, omit the standard layer norm after adding position embeddings, and put the final output through a linear layer.

Prefix token handling. Most pre-trained models that we consider use a [CLS] token or other prefix tokens; our DINOv2 backbone uses extra register tokens (Darcet et al., ).
For these models, it is unclear what role the prefix tokens should play in the reconstruction, because our goal is to compress semantics into the patch embeddings. We choose to mask prefix tokens at the decoder’s input layer, but we keep them as part of the reconstruction objective.

Training instability. We encountered training instabilities in certain experiments, specifically a slow loss divergence that occurs partway through training. This type of instability has been reported in the literature with ViTs, with some works attributing it to saturation of the attention logits resulting in one-hot softmaxes (Zhai et al., ); empirically, we were able to verify that diverged runs had a long tail of large attention logits. One common fix, QK-norm (Dehghani et al., , Chameleon Team, ), cannot be applied here because we fine-tune models that were pre-trained without QK-norm. We therefore use another approach that can be applied with a pre-trained model: logit soft-capping, where we use a tanh activation to constrain attention logits within a fixed range (Gemma Team et al., ). We adopt this approach in most of our MaskEmbed runs, including all runs that were used for training VLMs. We also had some success with increasing AdamW’s $\epsilon$ parameter and increasing the weight decay to 0.1, but these sometimes led to slower optimization.

Training data. We experiment with running MaskEmbed using two datasets, IN1k and IN21k (Deng et al., ). We use the standard train and validation splits for IN1k, and we follow the pre-processing guidelines from Ridnik et al. () for IN21k and create a validation set using sufficiently prominent classes.

Hyperparameters. We report hyperparameters for our main MaskEmbed runs in Table 6. All models are trained with AdamW (Loshchilov and Hutter, ), slightly lower $\beta_{2}$ than the default value, moderate weight decay, minimal augmentations, gradient clipping, cosine learning rate schedule, and batch size 1024. All MaskEmbed runs are performed on a single node with 4 NVIDIA A100 SXM4 80GB GPUs.

**Table 6: MaskEmbed hyperparameters.**
|  | Model scale |  |  |
| --- | --- | --- | --- |
| Hyperparameter | ViT-T / ViT-S / ViT-B | ViT-L / ViT-SO400M |  |
| Global batch size | 1024 | 1024 |  |
| Weight decay | 0.01 | 0.01 |  |
| Gradient clipping | 1.0 | 1.0 |  |
| Optimizer | AdamW | AdamW |  |
| $\beta_{1},\beta_{2}$ | (0.9, 0.95) | (0.9, 0.95) |  |
| Learning rate schedule | Cosine decay | Cosine decay |  |
| Max learning rate | 3e-4 | 2e-4 |  |
| Min learning rate | 3e-5 | 2e-5 |  |
| Augmentations | Random crop | Random crop |  |

### C.1 Additional perspectives

This section discusses some additional perspectives and observations about MaskEmbed.

Augmentation compression. MaskEmbed can be viewed as compressing a large number of augmentations into a single learned representation: we query specific augmentations based on how the embeddings are masked, and we obtain approximate reconstructions via the decoder. We note that CLIPSelf (Wu et al., ) can also be viewed as a form of augmentation compression with crops rather than masks.

Relationship to masked image modeling. MaskEmbed bears some similarity to BERT-style masked imaging modeling (MIM) methods like MAE, MaskFeat and BEiT (He et al., , Wei et al., , Bao et al., ), but there are several important differences. 1) When encoding images, MIM methods mask the image at the input layer; MaskEmbed encodes the entire image and masks only at the output embedding layer. 2) MIM methods adopt static labels for each patch (although they typically only train on masked patches); we do not require labels for each patch embedding, and instead supervise predictions via their ability to reconstruct arbitrary masked teacher views. 3) Most MIM methods are designed for pre-training; MaskEmbed is a post-training method that can be applied to any pre-trained ViT backbone, including strong pre-training approaches that MIM methods struggle to match (e.g., CLIP, SigLIP; Radford et al. , Zhai et al. ).

Relationship to feature attribution. As described in the main text, our reconstruction objective in Equation 1 generalizes an existing feature attribution approach (Jethani et al., , Covert et al., ). Given masked outputs $f(m(x))\in\mathbb{R}^{d}$ and a learned patch embedding model $g_{\theta}(x)\in\mathbb{R}^{n\times d}$, we can train the model to approximate $m^{\top}g_{\theta}(x)\approx f(m(x))$ for all $m$ using the following objective:

$$ $\min_{\theta}\;\mathbb{E}_{x,m}\Big{[}\big{\lVert}m^{\top}g_{\theta}(x)-f\big{ (}m(x)\big{)}\big{\rVert}^{2}\Big{]}.$ (2) $$

Unlike in our generalization that uses an expressive decoder, the resulting patch embeddings from Equation 2 have an analytic solution: the solution depends on the choice of mask distribution $p(m)$, and there exists a specific distribution that results in Shapley values (Charnes et al., ). Additionally, the learned embeddings share the semantics of the original model: for example, if $f(x)$ is a classifier, then the learned embeddings represent how each patch affects the class probabilities. Our generalization sacrifices these properties, but we find that this is necessary to learn richer patch embeddings.

Relationship to hybrid ViTs and convolutional patch embeddings. The original ViT architecture uses a lightweight linear projection to turn patches into tokens, and then passes these through a series of transformer blocks (Dosovitskiy et al., ). Other works have explored using more expressive patch embedding modules, e.g., a series of residually connected convolutions (Xiao et al., ). The combined model $h_{\phi}(g_{\theta}(x))$ we train with MaskEmbed can be viewed as using a highly expressive, transformer-based patch embedding module followed by a small number of transformer blocks that aggregate the rich patch embeddings. If this architecture were trained directly on a prediction task like image classification, the intermediate embeddings would not be constrained to be patch-specific; they are only forced to represent localized semantics in our approach because 1) we mask at the internal embedding layer, and 2) we use labels that change depending on the mask.

Objective degeneracy. One potential concern about our approach is that the objective in Equation 1 is degenerate: it contains a trivial solution where the encoder acts as an identity function and the decoder replicates the teacher model, or $g_{\theta}(\cdot)=I(\cdot)$ and $h_{\phi}(\cdot)=f(\cdot)$. This solution is undesirable because it fails to encode rich semantics in each patch embedding, and when training a VLM it is equivalent to passing raw patch projections (similar to the Fuyu architecture; Bavishi et al. ). Given the strong performance we observe in practice from MaskEmbed, we reason that the trivial solution is avoided due to 1) the encoder’s strong initialization, and 2) the decoder’s small number of parameters and weak initialization. We tried training the encoder from scratch in our early experiments, and we found that it was important to use a shallow decoder to avoid simply preserving information with the encoder and offloading computation. However, the objective degeneracy does not seem like an issue when fine-tuning.

Need for self-attention. A related observation is that because we only need patch-specific information in each learned embedding to reconstruct masked views, we may not need self-attention in the encoder. For example, a helpful inductive bias could be to replace the ViT transformer blocks with residually connected MLPs, because this prevents patches from mixing information. We experimented with such an architecture and found that it performed poorly, learning more slowly and converging to a worse model than a ViT encoder even when both were trained from scratch. Interestingly, this suggests that inter-patch communication is helpful to understand each patch’s semantics, and it shows that the expressive ViT architecture is highly beneficial for this task.

## Appendix D VLM Experiment Details & Additional Results

Training recipe. Following Karamcheti et al. (), we train the VLM in a single stage with the ViT frozen. This differs from some works that fine-tune the vision backbone and/or include a preliminary training stage to only train the vision-language adapter, including Qwen-VL (Bai et al., ), Idefics2 (Laurençon et al., ), DeepSeek-VL (Lu et al., ) and Pali-Gemma (Beyer et al., ). We use these settings because they were found to work best in this training library and with our quantity of training data.

Hyperparameters. Our hyperparameters are identical to those in Karamcheti et al. (), which themselves are inspired by Llava-1.5 (Liu et al., ). We report these below in Table 7. All VLMs are trained on a single node with 8 NVIDIA A100 SXM4 80GB GPUs.

**Table 7: VLM training hyperparameters.**
| Hyperparameter | Value |
| --- | --- |
| Epochs | 2 |
| Global batch size | 128 |
| Max sequence length | 2048 |
| Weight decay | 0.1 |
| Gradient clipping | 1.0 |
| Optimizer | AdamW |
| $\beta_{1},\beta_{2}$ | (0.9, 0.999) |
| Learning rate schedule | Linear warmup + cosine decay |
| Max learning rate | 2e-5 |
| Min learning rate | 0 |
| Warmup ratio | 0.03 |

Training data mixture. The Llava-1.5 training data mixture (Liu et al., ) consists of data sourced from several pre-existing datasets. These include synthetic instruction completions from the original Llava work (Liu et al., ), a collection of existing VQA datasets (VQAv2, GQA, OCR-VQA, OK-VQA, A-OKVQA; Goyal et al. , Hudson and Manning , Marino et al. , Mishra et al. , Schwenk et al. ), captioning data (TextCaps; Sidorov et al. ), referring expression data (RefCOCO, Visual Genome; Kazemzadeh et al. , Yu et al. , Krishna et al. ), and ShareGPT data sourced from user conversations (ShareGPT, ). Our extended data mixture also includes the recent LVIS-Instruct-4V (Wang et al., ) and LRV-Instruct (Liu et al., ) datasets, which roughly double the number of training examples.

Benchmarks. Our benchmarks are summarized in Table 8, including the prompt type, scoring method and details about variants of certain tasks. Some benchmarks are scored based on exact match using model response probabilities, others use intersection-over-union (IoU) thresholds for bounding box predictions, and others use the standard VQA scoring method (Antol et al., ). All our reported results use full splits set up by Karamcheti et al. () consisting of several thousand examples each. Our radar charts use axes that are scaled separately for each benchmark based on the mean and standard deviation of performance within our pool of models; the models in this pool include the main runs with the original and locality-aligned backbones (Figure 5), ablations on the vision-language adapter described below (Figure 11), and DINOv2 feature fusion (Figure 13), all for both the CLIP and SigLIP backbones.

**Table 8: Summary of VLM benchmarks.**
| Benchmark | # Examples | Prompt Type | Scoring | Details |
| --- | --- | --- | --- | --- |
| VizWiz | 4319 | Open-ended | VQA | Some questions are unanswerable |
| VQAv2 | 214354 | Open-ended | VQA |  |
| GQA | 12578 | Open-ended | Exact match |  |
| TextVQA (ocr) | 5000 | Open-ended | VQA | Prompt includes OCR dump |
| TextVQA (pure) | 5000 | Open-ended | VQA | No OCR dump |
| AI2D | 15501 | Multiple choice (4) | Exact match |  |
| RefCOCO | 10834 | Bounding box | Acc @ 0.5 IoU | Spatial terms allowed |
| RefCOCO+ | 10758 | Bounding box | Acc @ 0.5 IoU | No spatial terms allowed |
| RefCOCOg | 4896 | Bounding box | Acc @ 0.5 IoU | Long object descriptions |
| OCID-Ref | 18342 | Bounding box | Acc @ 0.25 IoU |  |
| VSR | 1222 | True/false | Exact match |  |
| TallyQA (complex) | 15598 | Multiple choice (16) | Exact match | Involve filtering criteria |
| TallyQA (simple) | 22991 | Multiple choice (16) | Exact match | No filtering criteria |
| POPE | 9000 | Open-ended | Exact match |  |

### D.1 Additional results

We now report several additional results from our VLM experiments.

First, Figure 11 shows a series of ablations for VLMs trained using different vision-language adapters. In the main text, we report that using the standard MLP adapter for aligned backbones degrades performance (see “Aligned MLP” vs. “Baseline MLP”) but that using the decoder as an adapter improves performance (see “Aligned Decoder”). To be sure that our improvements are due to locality alignment and not only the stronger adapter, we run several experiments using different adapter approaches for the baseline ViTs. First, we try training a transformer adapter from random initialization with the same size as the aligned model’s decoder; we find that this hurts performance compared to the MLP adapter (see “Baseline Transformer”), and we suspect that this is due to our VLM setup having insufficient training data to learn this module from random initialization.
Previous works that successfully use transformer-based adapters have significantly more training data (Bai et al., , Laurençon et al., ), so this result suggests that the decoder adapter is effective in part because it is initialized from pre-trained parameters.

Next, because a fair comparison with our aligned model’s decoder is not possible for the baseline backbone, we attempt to mimic the idea of using pre-trained transformer layers for the adapter: we simply use the last two ViT blocks with an additional linear layer, which we refer to as a truncated adapter. We remark that this represents partially fine-tuning the backbone, which along with training it using low-rank updates (Laurençon et al., ), unfreezing it partway through training (Lu et al., ), and giving it a longer warmup schedule (Beyer et al., ) is an option to stabilize joint fine-tuning. We find that this approach is less effective than the decoder adapter for aligned models (see “Aligned Truncated” vs. “Aligned Decoder”), but that it can improve performance over a MLP adapter for the baseline model (see “Baseline Truncated” vs. “Baseline MLP”).

Since this is a new stronger baseline, we show a head-to-head comparison with our locality-aligned approach in radar charts in Figure 12.
We find that the locality-aligned models preserve their improvements in several tasks, including AI2D and all three RefCOCO variants for both models, as well as POPE and TallyQA (Simple) for CLIP ViT-L @ 336px and VizWiz and OCID-Ref for SigLIP SO400M @ 384px. Overall, we conclude that our adapter strategy explains some of the gains observed in Figure 5, but that even adjusting for this with a stronger baseline shows improvements in several tasks, especially object localization and chart understanding.

Figure: Figure 11: VLM adapter ablations. We report results for several vision-language adapter ablations using both the baseline and locality-aligned backbones.
Refer to caption: x18.png

Finally, Figure 13 shows results from our feature fusion runs with DINOv2 (Oquab et al., , Darcet et al., ). Our implementation of feature fusion follows Karamcheti et al. (): we concatenate the two output sequences along their embedding dimension and then pass this through a MLP adapter. As we describe in the main text, the fused backbones often lead to larger gains in core localization tasks, likely due to DINOv2’s excellent performance at dense prediction tasks (Oquab et al., ); however, it also leads the model to degrade in other ways, notably in VizWiz and TextVQA, which does not occur with our locality-aligned backbones.

Figure: Figure 12: Comparison between locality alignment and original model with truncated adapter. We find that VLMs trained with locality-aligned backbones often outperform a new and stronger baseline, which truncates the last two ViT layers and fine-tunes them as a vision-language adapter.
Refer to caption: x20.png

Figure: Figure 13: VLM comparison with DINOv2 feature fusion. We compare the baseline and locality-aligned VLMs with an alternative strategy to enhance the visual features, which is to fuse with DINOv2’s output embedding. We find that this approach can lead to larger gains on localization tasks but also degrades the model in other ways.
Refer to caption: x22.png

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: Please see the weakness.
soundness: 2
strengths: 1. The paper is overall well-written.
2.  Locality alignment is efficient, requiring minimal additional computation compared to pre-training, making it a cost-effective solution.
3. The authors provide theoretical analysis and practical experiments to support their claims.
summary: The paper presents a method called Locality Alignment, which aims to improve the spatial reasoning capabilities of Vision Language Models (VLMs) by enhancing the local semantic understanding of pre-trained Vision Transformers (ViTs). Specifically,  the authors propose MaskEmbed, which uses a masked reconstruction loss to learn the semantic contributions of each image patch.
weaknesses: 1. I suggest the authors to conduct a thorough analysis of MaskEmbed's sensitivity to hyperparameters. This includes varying mask sizes, patch sampling strategies, and the influence of different reconstruction targets. By understanding these sensitivities, the paper can provide guidelines for applying MaskEmbed effectively across various scenarios. Besides,  including additional evaluations that specifically test the impact of MaskEmbed on global semantic understanding tasks may help to validate whether the method indeed compromises the model's ability to capture long-range dependencies.
2. The methodology of MaskEmbed involves fine-tuning the encoder to align its output tokens with those of a teacher model when only partial patches of an image are visible. This approach, while innovative, raises concerns about its impact on the encoder's ability to model global interactions and capture long-range dependencies, which are crucial for tasks requiring global semantic understanding.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. How were the scales in **Figure 5** determined? The performance gains appear to be quite small, yet they are magnified in the figure, making it difficult to assess the actual level of improvement provided by this method.
soundness: 2
strengths: The proposed method is relatively simple and provides a notable performance improvement.
summary: This paper proposes improving the performance of Vision-Language Models (VLMs) on region-level visual tasks by enhancing their **locality alignment**. The authors argue that the poor performance of many current VLMs on spatial reasoning tasks can be attributed to the weak locality alignment of vision models, which is caused by image-level supervision and minimal inductive biases. To address this, the paper introduces a post-training approach called **MaskEmbed**, which aims to improve the locality of features. Specifically, MaskEmbed applies the same mask to both the input image of the teacher model and the output features of the encoder model. The masked features are then aligned with the teacher model’s output features through a decoder, thereby enhancing the encoder’s locality alignment. Both visualizations and experimental results demonstrate that MaskEmbed effectively improves locality alignment and boosts performance on downstream tasks.
weaknesses: 1. **Issues with the Main Claim**:  
   The paper’s primary claim is confusing. It begins by hypothesizing that VLMs perform poorly on region-level tasks due to image-level supervision and minimal inductive biases. However, pre-training methods like DINO, despite using image-level supervision, exhibit strong locality, to the point where their features can even be directly used for semantic segmentation maps. This suggests that the initial assumption may be flawed. Additionally, regarding the claim about minimal inductive biases, is the paper referring to the lack of inductive biases in ViT architectures? If so, would using a convolution-based structure like ConvNext or a hierarchical structure like Swin Transformer resolve this issue? The paper fails to sufficiently justify this claim, making the motivation behind **MaskEmbed** unclear. Consequently, **MaskEmbed** may not be effective in the aforementioned scenarios.

2. **Methodological Concerns**:  
   There are also some issues with the methodology. The goal of **MaskEmbed** is to make the tokens output by the encoder—when the entire image is input—align with the tokens output by the teacher model when only partially visible patches are input. This approach could weaken the encoder's ability to model global interactions, potentially limiting its capacity to capture long-range dependencies. Such a strategy could harm performance on tasks requiring global semantic understanding. Furthermore, this method may also negatively impact region-level tasks if the masking approach crosses a certain threshold, as it constrains the model’s capacity for representation learning. These factors suggest that **MaskEmbed** may be highly sensitive to hyperparameters, which significantly limits its overall contribution.

**Response to the rebuttal**

Thank you to the authors for their comprehensive and detailed responses—most of my concerns have been resolved.

However, regarding the use of models with stronger locality, such as DINO and MAE, as vision encoders, the authors avoided addressing this issue by pointing out that most VLMs use CLIP/SigCLIP as their vision encoder. Nevertheless, many recent MLLM studies often incorporate mixed vision encoders, as demonstrated in [1,2]. Therefore, it would still be valuable to verify the effectiveness of the proposed method when applied to models with stronger locality.

In addition, although this work focuses on the VLM domain, its techniques primarily target vision encoders. To better highlight its advantages, I suggest integrating the proposed method into some vision pre-trained models, such as MAE or DINO, and evaluating whether the optimized models exhibit advantages in dense prediction tasks. This would better showcase the contributions of this work.

Despite some minor concerns, I find this to be an interesting study overall, and I have raised my score accordingly.

References:

[1] Jiang D, Liu Y, Liu S, et al. From clip to dino: Visual encoders shout in multi-modal large language models. arXiv preprint arXiv:2310.08825, 2023.

[2] Shi M, Liu F, Wang S, et al. Eagle: Exploring the design space for multimodal LLMs with mixture of encoders. arXiv preprint arXiv:2408.15998, 2024.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Please refer to the 'Weaknesses' part.
soundness: 3
strengths: 1. The paper is well-written and easy to follow.
2. The proposed MaskEmbed training diagram is effective in learning local semantics.
summary: This paper proposes a  MaskEmbed fine-tuning procedure that uses a masked reconstruction loss to improve the path-level semantics of the visual encoder. Experiment results show that the proposed method can improve performance across a range of VLM benchmarks.
weaknesses: 1. The authors need to include comparisons and discussions with more methods, such as dBOT[1] and UMG-CLIP[2].

a) dBOT[1] employs a distillation strategy similar to the method presented in the paper, so it is necessary to discuss the differences with this method and provide performance comparisons.

b) UMG-CLIP[2] directly incorporates fine-grained annotations to enhance CLIP's Locality Alignment. I am curious whether the proposed method has advantages over this method in some fundamental visual perception benchmarks.  Besides, is it possible to use a similar visualization approach as in UMG-CLIP to further illustrate the locality of the features in MaskEmbed?

2. The experimental comparisons are not sufficient.

a) As previously mentioned, it is necessary to supplement more results on visual perception benchmarks.

b) The paper employs a one-stage strategy for training VLMs. As far as I know, the majority of current VLM methods employ a multi-stage training approach, and the mentioned Llava-1.5 does as well, which gives it better performance than the one-stage baseline in this paper. I hope the authors can train the VLM model according to the Llava-1.5 setup and conduct performance comparisons on more benchmarks used in Llava-1.5 (r.f. Benchmarks in Table 3 and Table 4 of Llava-1.5).

c) To my knowledge, the latest method in the Llava series, Llava-OneVision[3], fine-tunes the vision encoder part simultaneously during VLM training. Many other recent methods[4][5] also adopt this setting, making the claim in lines 52-54 somewhat Inadequate. I wonder whether simultaneously fine-tuning the vision encoder could lead to VLMs gaining local semantic understanding, potentially diminishing the advantages of the proposed method.

[1] Exploring target representations for masked autoencoders.

[2] UMG-CLIP: A Unified Multi-Granularity Vision Generalist for Open-World Understanding.

[3] LLaVA-OneVision: Easy Visual Task Transfer.

[4] Qwen2-VL: Enhancing Vision-Language Model’s Perception of the World at Any Resolution.

[5] MiniCPM-V: A GPT-4V Level MLLM on Your Phone.

---

confidence: 4
contribution: 4
initial_rating: 6
presentation: 4
questions: In the current setup, the entire embedding sequence is reconstructed during training. Have you considered ablations that reconstruct only unmasked tokens?

While I understand your reasoning for masking the teacher, have you explored or considered a comparison with approaches where the student is masked, as in the dBOT framework? 

(This one is due to my lack of knowledge about single stage VLMs), Can you give more context on the significance of the VLM benchmark improvements? Some of the relative improvements on Figure 5 are so small that they seem like noise. (but again, it just might be duo to my lack of knowledge)
soundness: 4
strengths: Simplicity and novelty of the approach, with a clear explanation of the intuition behind the formulation of patch embeddings (g_i) and the task.

Demonstration of general applicability by using a variety of backbones trained on different tasks.

Comprehensive evaluation across diverse VLM benchmarks.
summary: This paper introduces a novel, computationally efficient mask-based self-supervised loss function designed to enhance the local feature representations of a pretrained Vision Transformer (ViT) initially trained on a global, image-level task. This approach aims to improve the ViT's utility for Vision-Language Model (VLM) training. By applying their method across various backbones, the authors demonstrate its generalizability and report gains in patch-level semantic segmentation and across multiple vision-language tasks.
weaknesses: Ablation studies could be more comprehensive. Some, like the effects of data augmentation and training data scale, feel unnecessary or self-evident. Exploring a broader range of datasets, such as CC3M (diverse) versus IN1k or SAM images (multi-object), could have offered more insightful findings on generalizability.

Limited ablation of the loss function. For example, testing reconstruction of only unmasked tokens rather than the entire embedding sequence could provide valuable insights into the role of different token types in the loss.

Comparison with alternative masking strategies is missing. While the rationale for masking in the current way is sound, comparing with an approach like dBOT—where the student rather than the teacher is masked—could have strengthened their case, as dBOT follows a nearly identical pipeline and has shown strong spatial feature learning.

dBOT: Exploring Target Representations for Masked Autoencoders

Meta-review: This paper proposed a locality alignment method to improve the spatial understanding ability of visual encoders so as to improve the performance of vision-language models. Based on the insight that visual encoders pre-trained on text image pairs already contains local semantics, this paper proposes a simple fine-tune procedure named MaskEmbed to boost the spatial understanding ability of visual encoders. Experiments on several benchmark demonstrates the effectiveness of the proposed method.

All reviewers acknowledge that the proposed method is simple and effective. Most concerns proposed by reviewers (lack of comparison with existing methods, impact of fine-tuning on global semantics, ablation studies) are addressed in the discussion. One remaining concern is whether end-to-end fine-tuning could change the benefit of locality alignment. Considering the overall rating, I tend to accept this paper.

Decision: Accept (Poster)