arXiv:2409.09721cs.LGcs.CV2024-09被引 9

让CLIP学会通过向量差理解图像差异,提升分类与生成能力

Finetuning CLIP to Reason about Pairwise Differences

  • 用大模型生成差异描述数据微调CLIP,使其能对齐图像嵌入差与文本描述差
  • 在属性排序和零样本分类上显著提升,尤其在大象比猫大等对比任务中
  • 支持新推理方式‘对比提示’,适合需要类间差异建模的任务

视觉语言模型(如CLIP)通过图文对比学习训练,得到对齐的图像与文本嵌入,适用于多种下游任务。但其嵌入空间缺乏纯文本模型的结构特性,例如无法通过向量运算表达类比关系。本文提出一种原生对比式微调方法,使CLIP能够基于图像差异的文本描述,对应其图像嵌入空间的差值。我们利用大语言模型在图文配对数据集上生成合成数据进行微调。实验表明,该方法显著提升了按属性排序图像的能力(如大象比猫大),并改进了多个下游图像分类任务的零样本性能。此外,新方法支持一种称为‘对比提示’的新推理机制,借助类别间差异的先验知识实现更优分类效果。最后,结果嵌入展现出更强的几何特性,如在文本到图像生成中表现更优。

原文摘要 · Abstract (English)

Vision-language models (VLMs) such as CLIP are trained via contrastive learning between text and image pairs, resulting in aligned image and text embeddings that are useful for many downstream tasks. A notable drawback of CLIP, however, is that the resulting embedding space seems to lack some of the structure of its purely text-based alternatives. For instance, while text embeddings have long been noted to satisfy analogies in embedding space using vector arithmetic, CLIP has no such property. In this paper, we propose an approach to natively train CLIP in a contrastive manner to reason about differences in embedding space. We finetune CLIP so that text descriptions of differences between images correspond to their difference in image embedding space, using synthetically generated data with large language models on image-caption paired datasets. We first demonstrate that our approach yields significantly improved capabilities in ranking images by a certain attribute (e.g., elephants are larger than cats), which is useful in retrieval or constructing attribute-based classifiers, and improved zeroshot classification performance on many downstream image classification tasks. In addition, our approach enables a new mechanism for inference that we refer to as comparative prompting, where we leverage prior knowledge of text descriptions of differences between classes of interest, achieving even larger performance gains in classification. Finally, we illustrate that the resulting embeddings obey a larger degree of geometric properties in embedding space, such as in text-to-image generation.

CLIP对比学习嵌入空间零样本

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。