文本编码器过大反而降低CLIP零样本性能,优化配置可减少55%参数。
Bigger Text Encoders Can Hurt CLIP Zero-Shot Performance

- 测试不同视觉与文本编码器组合,发现文本编码器存在最优尺寸。
- 文本编码器过大导致过拟合,性能随参数增加反而下降。
- 通过特定权重衰减可恢复并提升性能,适合模型压缩与高效训练场景。
对比语言-图像预训练(CLIP)是众多机器学习应用的基础。尽管缩放定律指导了大规模训练的资源分配,但以往研究将整个CLIP模型大小视为单一变量,未探讨编码器间容量分配的影响。本文训练了多种具有不同视觉和文本编码器规模的CLIP模型,发现对于大多数视觉编码器,存在一个文本编码器的最佳尺寸;超过该尺寸后,即使总参数量增加,零样本性能也会下降。利用这一现象,可实现效率更高的配置,在保持标准ViT-B/16零样本性能的同时,减少最多55%的参数。进一步分析表明,这种退化源于过大的文本编码器引发的过拟合,并且使用模态特异性权重衰减系数不仅能恢复性能,还能在所有退化配置中实现性能提升。几何分析揭示:扩大文本编码器虽提高嵌入均匀性,但损害跨模态对齐;这两项指标可预测零样本性能。希望这些发现能推动更可靠的CLIP架构与训练方法设计。
原文摘要 · Abstract (English)
Contrastive Language-Image Pretraining (CLIP) is a building block of many machine learning applications. Scaling laws have guided resource allocation for large-scale training, yet prior work treats total CLIP model size as a single variable, without exploring how the capacity split between encoders impacts downstream performance. Here, we train multiple CLIP models with different vision and text encoder sizes, revealing that for most vision encoders, there is an optimal text encoder size beyond which zero-shot performance degrades---even as total parameter count increases. Exploiting this behavior yields efficient configurations that match the zero-shot performance of the standard ViT-B/16 architecture with up to 55% fewer parameters. We further show that this degradation stems from overfitting induced by the oversized text encoder, and that using modality-specific weight decay coefficients not only recovers but improves performance across all degraded configurations. A geometric analysis reveals a trade-off in which scaling the text encoder improves embedding uniformity but worsens cross-modal alignment; we further show that these metrics are predictive of zero-shot performance. We hope these findings motivate CLIP architectures and training methods that counteract this degradation, a prerequisite for scaling CLIP reliably and efficiently.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。