用小数据蒸馏大模型,让CLIP在图文检索上更准还保留原能力。
Distill CLIP (DCLIP): Enhancing Image-Text Retrieval via Cross-Modal Transformer Distillation
- 用跨模态注意力蒸馏图像区域与文本片段的对齐表示
- 仅用6.7万样本训练,检索指标显著提升,零样本性能保留94%
- 适合需要高精度图文匹配且资源有限的场景
我们提出Distill CLIP(DCLIP),一种经过微调的CLIP变体,可在增强多模态图文检索能力的同时保持原始模型强大的零样本分类性能。传统CLIP受限于固定图像分辨率和有限上下文,影响细粒度跨模态理解。DCLIP通过元师生蒸馏框架,利用双向交叉注意力将YOLO提取的图像区域与对应文本片段对齐,生成语义与空间一致的全局表征,指导轻量级学生模型训练。训练采用对比学习与余弦相似度相结合的混合损失函数。尽管仅在约67,500个样本(来自MSCOCO、Flickr30k和Conceptual Captions)上训练,远少于CLIP原始数据集规模,DCLIP仍显著提升Recall@K与MAP等检索指标,同时保留约94%的CLIP零样本分类性能。结果表明,DCLIP有效缓解了任务专精与泛化之间的权衡,为高级视觉语言任务提供了资源高效、领域自适应且细节敏感的解决方案。代码见https://anonymous.4open.science/r/DCLIP-B772/README.md。
原文摘要 · Abstract (English)
We present Distill CLIP (DCLIP), a fine-tuned variant of the CLIP model that enhances multimodal image-text retrieval while preserving the original model's strong zero-shot classification capabilities. CLIP models are typically constrained by fixed image resolutions and limited context, which can hinder their effectiveness in retrieval tasks that require fine-grained cross-modal understanding. DCLIP addresses these challenges through a meta teacher-student distillation framework, where a cross-modal transformer teacher is fine-tuned to produce enriched embeddings via bidirectional cross-attention between YOLO-extracted image regions and corresponding textual spans. These semantically and spatially aligned global representations guide the training of a lightweight student model using a hybrid loss that combines contrastive learning and cosine similarity objectives. Despite being trained on only ~67,500 samples curated from MSCOCO, Flickr30k, and Conceptual Captions-just a fraction of CLIP's original dataset-DCLIP significantly improves image-text retrieval metrics (Recall@K, MAP), while retaining approximately 94% of CLIP's zero-shot classification performance. These results demonstrate that DCLIP effectively mitigates the trade-off between task specialization and generalization, offering a resource-efficient, domain-adaptive, and detail-sensitive solution for advanced vision-language tasks. Code available at https://anonymous.4open.science/r/DCLIP-B772/README.md.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。