Skip to main content
QUICK REVIEW

[论文解读] Text-To-Concept (and Back) via Cross-Model Alignment

Mazda Moayeri, Keivan Rezaei|arXiv (Cornell University)|May 10, 2023
Generative Adversarial Networks and Image SynthesisComputer Science被引用 3
一句话总结

本文提出 Text-to-Concept,一种通过单一层线性变换将现成视觉模型对齐至 CLIP 表示空间的方法,从而实现图像特征与文本生成的概念向量之间的直接比较。该方法在部分任务上实现了最先进水平的零样本分类性能,甚至在特定场景(如颜色识别)中超越 CLIP,同时支持概念解释、分布偏移诊断以及低计算量的概念到文本生成。

ABSTRACT

We observe that the mapping between an image's representation in one model to its representation in another can be learned surprisingly well with just a linear layer, even across diverse models. Building on this observation, we propose $ extit{text-to-concept}$, where features from a fixed pretrained model are aligned linearly to the CLIP space, so that text embeddings from CLIP's text encoder become directly comparable to the aligned features. With text-to-concept, we convert fixed off-the-shelf vision encoders to surprisingly strong zero-shot classifiers for free, with accuracy at times even surpassing that of CLIP, despite being much smaller models and trained on a small fraction of the data compared to CLIP. We show other immediate use-cases of text-to-concept, like building concept bottleneck models with no concept supervision, diagnosing distribution shifts in terms of human concepts, and retrieving images satisfying a set of text-based constraints. Lastly, we demonstrate the feasibility of $ extit{concept-to-text}$, where vectors in a model's feature space are decoded by first aligning to the CLIP before being fed to a GPT-based generative model. Our work suggests existing deep models, with presumably diverse architectures and training, represent input samples relatively similarly, and a two-way communication across model representation spaces and to humans (through language) is viable.

研究动机与目标

  • 在不微调或使用概念监督的情况下,利用固定、现成的视觉编码器实现零样本分类。
  • 通过将模型特征映射至 CLIP 的文本对齐空间,解释预训练视觉模型的语义内容。
  • 通过文本到概念与概念到文本的映射,实现模型表示与人类语言之间的双向交互。
  • 仅通过文本提示和预训练特征,诊断分布偏移并构建概念瓶颈模型。
  • 证明不同视觉模型编码了相似的语义结构,使得线性对齐在不同架构间均有效。

提出的方法

  • 训练单一层线性变换,将源视觉编码器(如 DINO ResNet)的特征映射至 CLIP 图像特征空间。
  • 使用 CLIP 的文本编码器从自然语言提示(如“在树上”)生成概念向量,并将其与对齐后的图像特征进行比较。
  • 通过计算对齐后图像特征与文本生成的概念向量之间的余弦相似度,实现零样本分类。
  • 通过先将任意向量对齐至 CLIP 空间,再使用基于 GPT 的模型将其解码为自然语言,实现概念到文本的生成。
  • 利用对齐的表示空间构建概念瓶颈模型,无需概念标注,仅依赖文本提示。
  • 通过筛选与目标概念最相似和最不相似的图像,对其表示取平均,以优化概念向量。
Figure 1 : Overview. After aligning the representation space of a given image encoder to a CLIP image encoder, we can compare aligned representations of images to concept vectors obtained directly from text (typically, an example set of data is required to obtain each concept vector; our method is e
Figure 1 : Overview. After aligning the representation space of a given image encoder to a CLIP image encoder, we can compare aligned representations of images to concept vectors obtained directly from text (typically, an example set of data is required to obtain each concept vector; our method is e

实验结果

研究问题

  • RQ1简单的线性投影是否能有效对齐多样化视觉模型的表示空间至 CLIP 空间,从而实现与文本的直接语义比较?
  • RQ2在不进行微调或概念监督的情况下,现成视觉模型通过仅使用文本到概念对齐,能在多大程度上实现高精度的零样本分类?
  • RQ3能否利用文本到概念方法解释模型行为,例如诊断分布偏移或构建可解释的概念瓶颈模型?
  • RQ4是否可行通过概念到文本映射,从视觉模型表示空间中的任意特征向量重建自然语言描述?
  • RQ5文本到概念与概念到文本的性能在多大程度上依赖于底层模型的质量(如 CLIP、视觉编码器、生成模型)?

主要发现

  • Text-to-Concept 在 ImageNet 上实现了与 CLIP 竞争甚至更优的零样本分类准确率,即使使用训练数据仅为 CLIP 一部分的小型模型亦然。
  • 在某些情况下(尤其是颜色识别),现成模型在零样本准确率上甚至超过 CLIP,表明小型模型中可能蕴含更丰富的语义表征。
  • 在 RIVAL10 上,零样本属性预测的 AUROC 达到 0.8,支持构建准确率高达 93.8% 的可解释性概念瓶颈模型。
  • 概念到文本生成成功将特征向量解码为有意义且语义相关的文本,大多数解码词汇与目标类别高度一致。
  • 该方法对模型多样性具有鲁棒性:线性对齐在不同架构和训练流程的模型间均表现良好。
  • 性能随组件质量提升而改善——更高质量的 CLIP 模型、更强的视觉编码器以及更强大的生成模型,均体现出可扩展性。
(a)
(a)

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。