A smaller contrastive temperature helps CLIP retain accuracy
Rethinking Contrastive Loss in CLIP Post-training: A Complementary Framework with Frozen Text Encoder · arXiv:2610.11374

In plain words
The paper introduces ComCLIP, a recipe for updating a pretrained CLIP image encoder while leaving its text encoder unchanged. It combines image-text matching with a reminder to stay near the original image features and guidance about which images look alike.
In one test, the usual contrastive temperature lowered CLIP’s accuracy when classifying images from text descriptions. A smaller temperature improved the average across 12 datasets, suggesting this kind of post-training can work under that tested setup.
The research
Can a pretrained CLIP image encoder be refined with contrastive learning without losing the capabilities it already has? Prior work described small-batch post-training as a cause of forgetting and some methods replaced that training signal with distillation. The paper tests whether the contrastive temperature helps explain that problem.
ComCLIP combines temperature-calibrated image-text matching, feature anchoring and image-relation guidance to refine CLIP’s vision encoder.
On ViT-B/16, the temperature test answers whether contrastive post-training can preserve CLIP’s zero-shot ability: at 0.07, accuracy fell from 61.82% to 57.90%; at 0.01, it rose to 62.90%. Zero-shot accuracy measures classification from text descriptions without a task-specific classifier, averaged over 12 datasets.
ComCLIP builds on this setting with feature anchoring and image-relation guidance. Across three seeds, ComCLIP and CLIP-Refine had similar zero-shot accuracy, while ComCLIP scored higher on linear probing, which tests a simple classifier using frozen image features, and CLIP-Refine led on all four image-text retrieval measures.
This comparison supports a transferability advantage for ComCLIP alongside a retrieval trade-off. The best-setting rows used different post-training datasets for the two methods; separate dataset-matched results also favored ComCLIP on linear probing.
The strongest comparison used different post-training datasets for the two methods, and the downstream compatibility test covered one LLaVA setup with its language model and projector frozen. The findings do not establish that ComCLIP improves downstream accuracy or applies to every CLIP-like model.
What the evidence shows
- The post-training question
ComCLIP is a lightweight recipe for refining a pretrained CLIP vision encoder while keeping its text encoder frozen. The paper addresses a concern from prior work: contrastive post-training with small batches may forget pretrained capabilities, which led some methods to replace that training signal with distillation.
The authors test whether temperature, a setting in contrastive learning, helps explain the reported loss of zero-shot classification accuracy.
- Temperature changes the result
In a controlled temperature comparison, the authors post-train the same ViT-B/16 model on CC3M for one epoch, with the same batch size and contrastive loss. Zero-shot classification measures accuracy across 12 datasets without training a classifier for each task.
Accuracy drops from 61.82% to 57.90% at temperature 0.07, but rises to 62.90% at 0.01. The authors’ gradient analysis explains how the smaller temperature focuses updates on harder mismatched pairs.
- A recipe with trade-offs
ComCLIP combines three training signals: image-text matching, anchoring updated image features near the pretrained encoder’s features, and matching relationships among images supplied by a frozen DINOv2 teacher. In a three-seed ViT-B/16 comparison, ComCLIP and CLIP-Refine had similar zero-shot accuracy.
ComCLIP did better on linear probing, which tests how well a simple classifier uses frozen image features, while CLIP-Refine led on all four image-text retrieval measures.
- Where the evidence stops
A separate control found that adding DINOv2’s image relationships significantly improved five-dataset linear-probe accuracy for ViT-L/14, but the increase was not significant for ViT-B/16. The downstream test swapped ComCLIP into one LLaVA setup while freezing its language model and projector; average relative change across nine scores was +0.02%, with scores both rising and falling. This supports compatibility in that setup, not a general downstream accuracy gain.
Deep
- Original paper authors
- Zidan Wang, Yaqian Li, Xiaokai Zhang, Kaiwen Long, Kun He
- Submitted to arXiv
- License
- CC BY 4.0