Abstract
Aligning signals from different modalities is an important step in vision-language representation learning as it affects the performance of later stages such as cross-modality fusion. Since image and text typically reside in different regions of the feature space, directly aligning them at instance level is challenging especially when features are still evolving during training. In this paper, we propose to align at a higher and more stable level using cluster representation. Specifically, we treat image and text as two “views” of the same entity, and encode them into a joint vision-language coding space spanned by a dictionary of cluster centers (codebook). We contrast positive and negative samples via their cluster assignments while simultaneously optimizing the cluster centers. To further smooth out the learning process, we adopt a teacher-student distillation paradigm, where the momentum teacher of one view guides the student learning of the other. We evaluated our approach on common vision language benchmarks and obtain new SoTA on zero-shot cross modality retrieval while being competitive on various other transfer tasks.
Introduction
In Vision-Language (V&L) representation learning, the primary objective is to bridge the "modality gap"—the inherent difference in feature distributions between visual and textual data. Traditional approaches, such as CLIP or ALIGN, often rely on instance-level contrastive learning to force image and text embeddings into a shared space. However, this direct alignment is notoriously difficult because features are often noisy and unstable during the early stages of training. Consequently, these models typically require massive datasets to achieve convergence.
We propose a shift in perspective: instead of aligning individual instances, we align features at a higher, more stable cluster level. By introducing a "Common Code Space" (Figure 1), we can map disparate modalities to a shared set of semantic prototypes, providing a more robust foundation for cross-modal understanding.
Methodology: The CODIS Framework
Our proposed framework, CODIS (Codebook Learning with Distillation), introduces a learnable Representation Codebook—a dictionary of codewords that serve as global semantic anchors.
Multimodal Codebook Learning
The core of CODIS is the mapping of image and text features to shared prototypes using Optimal Transport (OT). By employing the iterative IPOT algorithm, the model finds an optimal transport plan that assigns a batch of features to codewords. This global matching ensures that the codebook is utilized efficiently and prevents the "prototype collapse" common in clustering-based methods.
Teacher-Student Distillation
To further stabilize the learning of these evolving features, we adopt a distillation paradigm. A momentum teacher—a slowly updated version of the model—generates stable targets for the student model. This cross-modal guidance (e.g., the teacher's image view guiding the student's text view) ensures that the alignment remains consistent throughout the training process.
Hybrid Architecture and Objectives
CODIS utilizes a dual-encoder setup for efficient retrieval, followed by a multimodal transformer for deep fusion. Training is guided by four primary objectives: codebook loss for cluster-level alignment, teacher-student distillation loss for stability, Masked Language Modeling (MLM) for fine-grained textual understanding, and Image-Text Matching (ITM) for verifying cross-modal correspondence.
Experimental Evaluation
We pre-trained CODIS on a standard 4.0M image dataset (comprising CC3M, VG, SBU, and COCO). Despite the relatively small scale of this data compared to industry giants, the model demonstrated exceptional performance across several benchmarks.
Zero-Shot Retrieval
CODIS achieved state-of-the-art (SoTA) results in zero-shot cross-modality retrieval. On the Flickr30K dataset, it outperformed existing early-fusion models by 11.0% in R@1 text retrieval. Most notably, CODIS surpassed the ALIGN model on MSCOCO zero-shot retrieval by 12.9% (R@1), despite being trained on 360x less data.
Transfer Learning
The model's robustness was further validated on downstream tasks including Visual Question Answering (VQA v2), Natural Language Visual Reasoning (NLVR²), and Visual Entailment (SNLI-VE). These results indicate that codebook-based alignment facilitates a deeper semantic understanding of the relationship between visual and textual concepts.
Discussion and Conclusion
The success of CODIS highlights the importance of stability in multi-modal alignment. By moving from instance-level to cluster-level matching, we significantly improve data efficiency and representation quality. While the choice of codebook size remains a critical hyperparameter, the use of Optimal Transport and distillation provides a principled way to manage the complexity of multi-modal feature spaces. Future work will explore extending this framework to additional modalities such as audio and video, further unifying the representation of diverse data types.
Summary updated