揭秘Transformer如何通过语法特征实现组合泛化
Analyzing the Inner Workings of Transformers in Compositional Generalization
- 通过寻找子网络分析模型内部机制
- 子网络依赖语法特征但使用非组合算法提升泛化
- 早期训练即获得非组合解,泛化能力提升较慢
神经模型的组合泛化能力是实现类人语言理解的关键。现有评估方法仅关注输入输出行为,无法揭示内部机制,模型在组合泛化上的真实能力仍不明确。为此,本文通过定位对泛化性能有贡献的子网络,并对模型如何利用句法特征进行因果分析。结果发现,模型依赖句法特征输出正确答案,但表现更优的子网络除依赖句法特征外,还采用非组合算法。此外,该子网络的泛化性能在训练中相对缓慢提升,而非组合解在训练初期即被获取。
原文摘要 · Abstract (English)
The compositional generalization abilities of neural models have been sought after for human-like linguistic competence. The popular method to evaluate such abilities is to assess the models' input-output behavior. However, that does not reveal the internal mechanisms, and the underlying competence of such models in compositional generalization remains unclear. To address this problem, we explore the inner workings of a Transformer model by finding an existing subnetwork that contributes to the generalization performance and by performing causal analyses on how the model utilizes syntactic features. We find that the model depends on syntactic features to output the correct answer, but that the subnetwork with much better generalization performance than the whole model relies on a non-compositional algorithm in addition to the syntactic features. We also show that the subnetwork improves its generalization performance relatively slowly during the training compared to the in-distribution one, and the non-compositional solution is acquired in the early stages of the training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。