Rethinking Contrastive Loss in CLIP Post-training: A Complementary Framework with Frozen Text Encoder
Zidan Wang, Yaqian Li, Xiaokai Zhang, Kaiwen Long, Kun He, Hanpeng Liu
Abstract
CLIP serves as a foundational vision-language model and the de facto vision encoder for downstream VLMs such as LLaVA. Post-training offers a lightweight route to refine CLIP, but recent work argues that the standard contrastive loss is unsuitable for post-training due to catastrophic forgetting under small batches, motivating designs that abandon the contrastive objective in favor of distillation. We revisit this premise and find that, for the InfoNCE objective, the reported forgetting is driven primarily not by insufficient negatives but by an inappropriate magnitude of the contrastive temperature : with set sufficiently small, contrastive post-training improves rather than degrades the pretrained CLIP, which we explain through the temperature dependence of the InfoNCE gradient. Building on this finding, we propose \textbf{ComCLIP}, a lightweight single-epoch post-training recipe that freezes CLIP's text encoder---so the refined vision encoder is a drop-in replacement with unchanged architecture and inference cost---and trains the vision encoder with a properly-tempered contrastive loss, an MSE anchoring loss against the original CLIP, and a relational distillation loss from DINOv2. Over multiple seeds, ComCLIP matches the self-distillation baseline CLIP-Refine on zero-shot classification while significantly improving the transferability of visual features, measured by linear probing ( vs.\ on ViT-B/16), and on ViT-L/14 it also improves MMVP over CLIP-Refine ( vs.\ ); CLIP-Refine remains stronger on image-text retrieval. Used as a drop-in vision encoder for LLaVA-1.5-7B without re-aligning the projector or LLM, ComCLIP yields no net change across VLM benchmarks, i.e., the refinement does not break downstream compatibility. Code and models are available at https://github.com/showstarpro/ComCLIP.git.
Create a lesson
Metadata
- Categories
- cs.CV, cs.AI
Related papers
OWLET: On-Policy Weighted Learning via Evidence Transfer for Video Large Language Model Post-Training
Shared title terminologycs.CVQitan Lv, Ke Fan, Hong Wang et al.
A Lightweight Velocity Correction Framework for Improving Instruction Following in Few-Step Text-to-Image Generation
Shared title terminologycs.CVYating Gao, Zhenlong Zhu, Wen Zihao et al.
Does Target Alignment Mean Target Recovery? An Evidence-Ladder Study of Adversarial Claims on Contrastive Encoders
Shared title terminologycs.CVTao Yang, Jianying Zhou
VEDJE: Video-Efficient Discriminative Joint Encoder for Scalable Video-Text Retrieval
Shared title terminologycs.CVShahaf Wagner, Gabriele Serussi, Dan Ben Ami et al.
DLC: A Metric-Guided Dynamic Loss Controller for Multi-Objective Training
Shared title terminologycs.CVJaewan Ko, Janghoon Choi
Beyond Logits: Coherent Hallucination Mitigation via Attention Contrastive Decoding
Shared title terminologycs.CVYujia Chen, Rui Sun, Huayu Mai et al.