arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.01288cs.CL
收藏

用树投影表征Transformers的内禀组成

Characterizing Intrinsic Compositionality in Transformers with Tree Projections

Stanford University(斯坦福大学);MIT CSAIL(麻省理工学院计算机科学与人工智能实验室)

Shikhar Murty, Pratyusha Sharma, Jacob Andreas, Christopher D. Manning

摘要:

当在语言数据上训练时,Transformers是学习一些任意的计算,利用架构的全部能力,还是学习一个更简单的、树状的计算,假设它是人类语言等组合意义系统的基础?在人类语言理解的组合解释(基于一种受限的自下而上的计算过程)和神经模型(如Transformers)的巨大成功(可以在输入的不同部分之间任意路由信息)之间,存在着明显的张力。一种可能性是,这些模型虽然在原则上非常灵活,但在实践中学会了分层解释语言,最终构建的句子表示接近自下而上的树形结构模型的预测。为了评估这种可能性,我们描述了一种无监督和无参数的方法\emph{functionally project}的行为的任何Transformer到树结构网络的空间。给定一个输入句子,我们生成一个近似于Transformer的表示构建过程的二叉树,以及一个捕获Transformer的行为在输入上的“树状”程度的分数。虽然计算这个分数不需要训练任何额外的模型,但它可以证明Transformer和任何树结构近似之间的拟合上限。使用这种方法,我们证明了三种不同任务的Transformers在训练过程中变得更加树状,在某些情况下,无监督地恢复与监督解析器相同的树。反过来,这些树可以预测模型的行为,更多的树状模型在组合泛化测试中泛化得更好。

英文摘要:

When trained on language data, do transformers learn some arbitrary computation that utilizes the full capacity of the architecture or do they learn a simpler, tree-like computation, hypothesized to underlie compositional meaning systems like human languages? There is an apparent tension between compositional accounts of human language understanding, which are based on a restricted bottom-up computational process, and the enormous success of neural models like transformers, which can route information arbitrarily between different parts of their input. One possibility is that these models, while extremely flexible in principle, in practice learn to interpret language hierarchically, ultimately building sentence representations close to those predictable by a bottom-up, tree-structured model. To evaluate this possibility, we describe an unsupervised and parameter-free method to \emph{functionally project} the behavior of any transformer into the space of tree-structured networks. Given an input sentence, we produce a binary tree that approximates the transformer's representation-building process and a score that captures how "tree-like" the transformer's behavior is on the input. While calculation of this score does not require training any additional models, it provably upper-bounds the fit between a transformer and any tree-structured approximation. Using this method, we show that transformers for three different tasks become more tree-like over the course of training, in some cases unsupervisedly recovering the same trees as supervised parsers. These trees, in turn, are predictive of model behavior, with more tree-like models generalizing better on tests of compositional generalization.

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

↑