arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.02535cs.CLcs.LG
收藏

在嵌入空间中分析Transformer

Analyzing Transformers in Embedding Space

The Blavatnik School of Computer Science, Tel-Aviv University(特拉维夫大学布拉瓦特尼克计算机科学学院);Allen Institute for Artificial Intelligence(艾伦人工智能研究所)

Guy Dar, Mor Geva, Ankit Gupta, Jonathan Berant

AI总结:

本文提出一种理论框架,通过将Transformer所有参数投影到嵌入空间进行解释,无需前向/后向传递,并展示了跨模型参数对齐及免训练分类器构建两个应用。

摘要:

理解基于Transformer的模型已引起广泛关注,因为这些模型是近期机器学习技术进展的核心。虽然大多数可解释性方法依赖于在输入上运行模型,但最近的研究表明,一种零传递方法(即直接解释参数而无需前向/后向传递)对于某些Transformer参数和两层注意力网络是可行的。在本工作中,我们提出了一种理论分析,通过将所有训练后的Transformer参数投影到嵌入空间(即它们所操作的词汇项空间)中来解释这些参数。我们推导了一个简单的理论框架来支持我们的论点,并提供了充分的证据证明其有效性。首先,一项实证分析表明,预训练和微调模型的参数都可以在嵌入空间中进行解释。其次,我们展示了该框架的两个应用:(a)对齐共享词汇表的不同模型的参数,以及(b)通过将微调分类器的参数“翻译”为仅预训练模型的参数,无需训练即可构建分类器。总体而言,我们的发现为解释方法打开了大门,这些方法至少部分地抽象出模型的具体细节,并仅在嵌入空间中操作。

英文摘要:

Understanding Transformer-based models has attracted significant attention, as they lie at the heart of recent technological advances across machine learning. While most interpretability methods rely on running models over inputs, recent work has shown that a zero-pass approach, where parameters are interpreted directly without a forward/backward pass is feasible for some Transformer parameters, and for two-layer attention networks. In this work, we present a theoretical analysis where all parameters of a trained Transformer are interpreted by projecting them into the embedding space, that is, the space of vocabulary items they operate on. We derive a simple theoretical framework to support our arguments and provide ample evidence for its validity. First, an empirical analysis showing that parameters of both pretrained and fine-tuned models can be interpreted in embedding space. Second, we present two applications of our framework: (a) aligning the parameters of different models that share a vocabulary, and (b) constructing a classifier without training by ``translating'' the parameters of a fine-tuned classifier to parameters of a different model that was only pretrained. Overall, our findings open the door to interpretation methods that, at least in part, abstract away from model specifics and operate in the embedding space only.

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

↑