arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.06386cs.CVcs.AIcs.HCcs.LG
收藏

文本到概念(及反向)通过跨模型对齐

Text-To-Concept (and Back) via Cross-Model Alignment

University of Maryland(马里兰大学);Meta AI

Mazda Moayeri, Keivan Rezaei, Maziar Sanjabi, Soheil Feizi

AI总结:

通过线性层将任意预训练视觉模型特征对齐到CLIP空间,实现零样本分类及概念瓶颈模型等应用,并验证概念到文本生成的可行性。

摘要:

我们观察到,一个模型中的图像表示到另一个模型中的表示的映射,即使跨不同模型,也可以仅通过一个线性层就学习得非常好。基于这一观察,我们提出了文本到概念(text-to-concept),其中固定预训练模型的特征被线性对齐到CLIP空间,使得来自CLIP文本编码器的文本嵌入可以直接与对齐后的特征进行比较。通过文本到概念,我们将固定的现成视觉编码器转换为免费的、出奇强大的零样本分类器,其准确率有时甚至超过CLIP,尽管模型更小且训练数据仅为CLIP的一小部分。我们展示了文本到概念的其他直接用例,如在没有概念监督的情况下构建概念瓶颈模型,以人类概念诊断分布偏移,以及检索满足一组基于文本约束的图像。最后,我们证明了概念到文本(concept-to-text)的可行性,其中模型特征空间中的向量通过首先对齐到CLIP,再馈送到基于GPT的生成模型进行解码。我们的工作表明,现有深度模型(可能具有多样的架构和训练方式)对输入样本的表示相对相似,并且跨模型表示空间以及与人(通过语言)的双向通信是可行的。

英文摘要:

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 $\textit{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 $\textit{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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑