Efficient Vision-Language Pre-Training by Cluster Masking

Zihao Wei, Zixuan Pan, Andrew Owens

Introduction

Training large-scale vision-language models like CLIP is notoriously computationally expensive. A primary reason for this is the high level of redundancy in natural images; many pixels contribute little to the overall semantic meaning. To address this, recent efficiency-focused methods like Fast Language-Image Pre-training (FLIP) have adopted a strategy of randomly "dropping" or masking a large percentage of image patches during training.

While random masking significantly speeds up training, it introduces a semantic bottleneck. Because patches are masked independently, models can often "cheat" by reconstructing missing information from adjacent, unmasked pixels. This allows the model to solve the task using low-level local correlations rather than learning the high-level semantic relationships between the image and its text caption. Conversely, semantic masking—which targets entire objects—is more effective but typically requires an expensive, pre-trained object detector, which undermines the goal of efficient training.

The Cluster Masking Approach

Researchers from the University of Michigan have proposed Cluster Masking, a simple yet effective strategy that bridges the gap between random and semantic masking. Instead of masking patches at random, Cluster Masking groups patches based on visual similarity using a simple distance metric, effectively masking coherent structures without the need for a complex secondary model.

Comparison of Original Images, Random Masking, and Cluster Masking.

The process involves three primary steps:

  1. Anchor Selection: A small subset of image patches (less than 5%) is randomly selected to serve as "anchors."
  2. Similarity Clustering: The algorithm calculates the similarity between these anchors and all other patches. In its most efficient form, this uses raw RGB pixel intensities.
  3. Masking: Patches that are visually similar to an anchor are masked out.

This approach naturally tends to mask out coherent visual entities—such as the red body of a fire hydrant or the blue expanse of a sky. By removing these entire clusters, the model can no longer rely on local spatial redundancy. To understand the scene, it is forced to rely on the provided text caption, creating a much stronger learning signal for vision-language alignment.

Experimental Results and Performance

The effectiveness of Cluster Masking was evaluated using the Conceptual 12M (CC12M) dataset. The results demonstrate that the method provides both superior performance and significant efficiency gains over existing baselines.

Zero-Shot Classification and Retrieval

On zero-shot ImageNet classification, the Cluster Masking model achieved 36.6% accuracy, outperforming both the original CLIP (36.1%) and the random-masking FLIP (34.4%). These gains were consistent across other benchmarks, including CIFAR-10/100 and retrieval tasks on MS-COCO and Flickr30k.

Training Efficiency

Cluster Masking offers a substantial boost in training throughput. By processing significantly fewer patches per image, the method is approximately 36% faster to train than a standard CLIP model. Unlike attention-based masking strategies that require multiple forward passes, Cluster Masking is a "one-pass" approach, maintaining the speed of random dropping while incorporating the intelligence of semantic masking.

Compositional Understanding

To test if the model truly understands the relationships between objects, the researchers used the SUGARCREPE benchmark. Cluster Masking showed a +3.9% improvement in identifying objects and a +3.0% improvement in identifying attributes compared to FLIP. This suggests that by forcing the model to predict missing clusters from text, it develops a more robust internal representation of object-attribute compositions.

Conclusion

Cluster Masking demonstrates that simple pixel similarity is a powerful proxy for semantic structure. By moving away from "salt-and-pepper" random masking and toward cluster-based removal, researchers can train vision-language models that are both faster and more semantically capable. Future work may involve exploring adaptive thresholds for different image complexities and scaling the method to web-scale datasets like LAION-5B.

Summary updated

BibTeX
@inproceedings{wei2024efficient,
  author = {Zihao Wei and Zixuan Pan and Andrew Owens},
  title = {{Efficient Vision-Language Pre-Training by Cluster Masking}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure