University of Michigan
We propose a simple strategy for masking image patches during visual-language contrastive learning that improves the quality of the learned representations and the training speed. During each iteration of training, we randomly mask clusters of visually similar image patches, as measured by their raw pixel intensities. This provides an extra learning signal, beyond the contrastive training itself, since it forces a model to predict words for masked visual structures solely from context. It also speeds up training by reducing the amount of data used in each image. We evaluate the effectiveness of our model by pre-training on a number of benchmarks, finding that it outperforms other masking strategies, such as FLIP, on the quality of the learned representation.
We introduce a simple masking strategy that randomly drops out clusters. Firstly, we break the image into patches. Next, we compute the pairwise cosine similarity between each pair of normalized patches. We randomly select a small subset (less than 5%) of these patches to serve as cluster centers, which we refer to as anchor patches. For each anchor patch, we define a cluster that includes all patches within a specified distance 𝑟.
Cluster Visualization:
We visualize the clusters of patches obtained from our masking strategy. Each grid belongs to a cluster, with patches from the same cluster grouped together. Hover over the patches to see the clusters they belong to.
Zero-shot Vision-Language Retrieval:
We evaluate image-text retrievals MS-COCO, Flickr8k, and Flickr30k datasets. Our model outperforms the baselines in most benchmarks.
We evaluate our model on several widely recognized classification benchmarks and outperforms all the baselines on both zero-shot classification and linear probing.
Language Composition:
We use Sugar-Crepe to test our model's ability to understand language compositions, our model yields comparable results in Relation tests and demonstrates a significant enhancement in Object and Attribution tests.
@article{clustermasking2024,
title={Efficient Vision-Language Pre-training by Cluster Masking},
author={Wei, Zihao and Pan, Zixuan and Owens, Andrew},
year={2024},
journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}
}