Mind the Gap: Preserving and Compensating for the Modality Gap in CLIP-Based Continual Learning

Linlan Huang, Xusheng Cao, Haori Lu, Yifan Meng, Fei Yang +1 more
7/12/2025
cs.CVcs.LG

Official code: linlany/MindtheGap (59 stars, last commit 2026-01-07).

Abstract

Continual learning aims to enable models to learn sequentially from continuously incoming data while retaining performance on previously learned tasks. With the Contrastive Language-Image Pre-trained model (CLIP) exhibiting strong capabilities across various downstream tasks, there has been growing interest in leveraging CLIP for continual learning in such scenarios. Most existing works overlook the inherent modality gap in CLIP, a key factor in its generalization and adaptability. In this paper, we analyze the variations in the modality gap during the fine-tuning of vision-language pre-trained models. Our observations reveal that the modality gap effectively reflects the extent to which pre-trained knowledge is preserved. Based on these insights, we propose a simple yet effective method, MG-CLIP, that improves CLIP's performance in class-incremental learning. Our approach leverages modality gap preservation to mitigate forgetting and modality gap compensation to enhance the capacity for new data, introducing a novel modality-gap-based perspective for continual learning. Extensive experiments on multiple benchmarks demonstrate that our method outperforms existing approaches without requiring additional replay data. Our code is available at https://github.com/linlany/MindtheGap.

View on arXivView PDF

Code Implementations(1)

linlany/MindtheGapOfficial100%

ICCV25 highlight

595Shell, PythonJun 28, 20259 months ago

Similar Papers

Cite this paper

@article{huang2025mind,
  title  = {Mind the Gap: Preserving and Compensating for the Modality Gap in CLIP-Based Continual Learning},
  author = {Linlan Huang and Xusheng Cao and Haori Lu and Yifan Meng and Fei Yang and Xialei Liu},
  year   = {2025},
  eprint = {2507.09118},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.09118v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.09118.svg)](https://codeofpaper.com/paper/2507.09118)

Discussion