Reproduce “Enhancing Few-shot CLIP with Semantic-Aware Fine-Tuning” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yao Zhu, Yuefeng Chen, Wei Wang, Xiaofeng Mao, Xiu Yan, Yue Wang, Zhigang Li, Wang lu and 2 more

A new fine-tuning method called Semantic-Aware FinE-tuning (SAFE) improves few-shot image classification performance for CLIP by selectively updating its attention pooling layer. This approach leads to average accuracy gains of up to +2.38% over prior methods in low-shot settings and enhances out-of-distribution generalization, while also demonstrating improved interpretability through better semantic focus.

Key insights

  • CLIP's visual encoder produces dense features that inherently capture rich semantic information, and different semantics hold varying importance for diverse downstream tasks.
  • Selectively fine-tuning only the attention pooling layer of CLIP's visual encoder can direct the model's focus towards task-specific semantics without incurring the risks of full fine-tuning.
  • A residual blending mechanism can effectively balance newly acquired few-shot knowledge with CLIP's pre-trained general knowledge, ensuring both task specificity and robust generalization.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.