Training massive vision-language models like CLIP is typically a "one-and-done" endeavor involving static, gargantuan datasets. However, in real-world applications, data arrives in continuous streams. Attempting to update a pre-trained CLIP model with new data—such as shifting from general web images to a specific e-commerce domain—often results in "catastrophic forgetting." The model rapidly loses its ability to understand the original data it was trained on.
In the paper "Continual Vision-Language Representation Learning with Off-Diagonal Information," researchers from Zhejiang University and Huawei Cloud investigate the underlying causes of this phenomenon and propose a geometric solution called Mod-X.
The Challenge of Continual Learning in Multi-Modal Models
Standard supervised learning models are notorious for catastrophic forgetting. Interestingly, recent research has shown that self-supervised image models (like SimCLR) are surprisingly resistant to this issue. Given that CLIP also relies heavily on contrastive learning, one might expect it to share this robustness.
Unfortunately, it does not. When CLIP is trained on a sequence of new datasets, its performance on previous datasets plummets. The authors sought to understand why multi-modal models are significantly more fragile than single-modal ones in a continual learning setting. Their findings reveal that the problem is not merely about the model "forgetting" features; rather, it is a geometric issue where the vision and language encoders drift apart.
Diagnosing the Root Cause: Spatial Disorder
The researchers diagnosed this geometric drift as Spatial Disorder (SD), which consists of two distinct phenomena:
- Intra-modal Rotation: The entire representation space of a single modality (e.g., all image vectors) rotates around the center of its high-dimensional sphere.
- Inter-modal Deviation: Crucially, the vision and language spaces rotate at different speeds and in different directions.
One of the most surprising insights from the paper is that the internal "shape" or topology of the image space stays mostly intact during continual learning. The forgetting occurs because this "rotational asynchrony" breaks the alignment between an image and its corresponding text. It is akin to two clocks that both keep perfect time but are no longer set to the same time zone.
The Mod-X Solution
To combat Spatial Disorder, the authors introduce the Mod-X (Maintain off-diagonal information-matriX) framework.
Most contrastive learning methods focus on the "diagonal" of the contrastive similarity matrix, which represents matching (positive) pairs. However, Mod-X shifts the focus to the off-diagonal elements. These elements represent how a specific image relates to all other text samples in a batch, effectively serving as a structural map of the entire representation space. By preserving these relationships, the model retains its "common sense" regarding how different entities relate to one another.
Using Knowledge Distillation—specifically Kullback-Leibler (KL) Divergence—Mod-X forces the updated model to maintain the same off-diagonal similarity distribution as the previous version. This preserves the spatial topology of the representation space, ensuring that old concepts stay aligned even as the model learns new ones. Furthermore, Mod-X employs Selective Distillation, a filtering mechanism that ignores samples the old model was already confused about, preventing the transfer of poor representations.
Experimental Setup and Key Results
The researchers evaluated Mod-X across several benchmarks designed to simulate streaming data:
- MS COCO & Flickr30K: Standard general-purpose image-captioning datasets used to test basic retrieval.
- ECommerce-T2I: A specialized domain dataset used to assess adaptation to niche data without forgetting general knowledge.
- CC12M (Conceptual 12M): A large-scale dataset used to test the scalability of the approach.
Mod-X demonstrated significant improvements over standard continual learning baselines like Elastic Weight Consolidation (EWC) and Learning without Forgetting (LwF):
- Preserving Old Knowledge: On the COCO dataset, a standard CLIP model's Image-Text R@1 accuracy dropped precipitously from 14.7% to 6.1% after five phases of continual training. Mod-X maintained an accuracy of 14.5%, essentially eliminating catastrophic forgetting.
- Adapting to New Knowledge: In the E-commerce domain, Mod-X outperformed baselines by 3.5% to 4.2% in retrieval tasks, proving that it facilitates the learning of new concepts while preserving the old.
- Scalability: When scaled to the 10-million-sample CC12M dataset, Mod-X consistently outperformed other strategies, maintaining a much narrower gap to the "Joint Training" upper bound (training on all data simultaneously).
Limitations and Future Directions
While Mod-X proves highly effective, the authors note a few areas for future exploration:
- The Joint Training Gap: Although Mod-X significantly outperforms other continual methods, a small performance gap remains compared to Joint Training.
- Computational Overhead: The distillation process requires running both the old and new models during training, which increases the computational cost per iteration.
- Beyond Two Modalities: Current work focuses exclusively on Vision-Language models. Future research could explore whether Spatial Disorder occurs in tri-modal models (e.g., Video-Audio-Text) and if off-diagonal alignment can resolve issues in those domains as well.
Summary updated