Skip to main content
QUICK REVIEW

[论文解读] Characterizing Intrinsic Compositionality in Transformers with Tree Projections

Shikhar Murty, Pratyusha Sharma|arXiv (Cornell University)|Nov 2, 2022
Natural Language Processing Techniques被引用 13
一句话总结

本文提出一种无需参数、无监督的方法,通过测量跨度上下文不变性(SCI),将任何Transformer模型的行为投影到树状结构计算空间中,从而识别一个跨度的表征在多大程度上对上下文保持不变。该方法生成一个二叉树结构和一个树状结构度量分数,该分数上界约束了Transformer与任意树状结构模型之间的拟合程度,表明Transformer在训练过程中逐渐变得更像树状结构,且更高的树状相似度可预测更好的组合泛化能力。

ABSTRACT

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.

研究动机与目标

  • 确定在语言数据上训练的Transformer是否学习到一种类似于人类语言处理的树状结构、组合性计算。
  • 开发一种无需依赖真实句法树或训练额外模型即可评估内在组合性的方法。
  • 评估Transformer中的树状结构是否与在分布外样本上的更好组合泛化能力相关。
  • 揭示标准监督探针无法观测到的Transformer训练动态。

提出的方法

  • 该方法引入跨度上下文不变性(SCI),通过测量所有句子跨度的上下文表征与无上下文表征之间的距离,量化一个跨度的表征对上下文的不变性程度。
  • 使用图表解析算法从SCI分数中推导出二叉树结构,其中每个内部节点对应一个表征最不依赖上下文的跨度。
  • 树状结构度量分数由所诱导树路径上SCI分数的总和得出,作为Transformer在树状结构模型空间中的功能性投影。
  • 在弱假设下,该方法具有可证明最优性,上界约束了Transformer与任意树状结构近似之间的拟合程度。
  • 该方法为无监督且无需参数,无需额外训练或真实句法树,仅基于注意力机制表征运行。

实验结果

研究问题

  • RQ1在语言数据上训练的Transformer是否学习到一种在功能上等价于自底向上树状结构过程的计算?
  • RQ2我们能否在不依赖真实句法树的情况下,衡量Transformer内部计算的树状程度?
  • RQ3训练过程中树状相似度的提升是否与更好的组合泛化能力相关?
  • RQ4与分布内准确率相比,树状投影和树状结构度量分数是否能更优地预测模型行为?

主要发现

  • 在三个序列转换任务中,Transformer在训练过程中逐渐变得更像树状结构,且在其中两个数据集中,所诱导的树结构与真实句法树的对齐程度逐步提高。
  • 探测实验验证了所诱导的树结构可靠地反映了Transformer编码器所实现的上下文依赖结构。
  • 树状结构度量分数和所诱导树的解析F1分数与组合泛化性能的相关性,均强于分布内准确率,且所有相关性均具有统计显著性(p < 10^-3)。
  • 在分布内准确率相近的模型中,树状结构度量分数更高的模型在组合性新测试配置上的泛化能力更强。
  • 该方法成功在无监督条件下恢复了句法结构,即使没有真实句法树,且揭示了标准监督探针无法观测到的训练动态。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。