利用辅助序列预测任务诱导Transformer的成分概括能力
Inducing Transformer's Compositional Generalization Ability via Auxiliary Sequence Prediction Tasks
摘要:
系统组合性是人类语言中的一种基本机制,它允许已知部分的重组来创造新的表达。然而,现有的神经模型已经被证明缺乏这种学习符号结构的基本能力。由于Transformer模型在SCAN组合性挑战(Lake和Baroni,2018)中失败,需要将命令解析为动作,我们提出了两个辅助序列预测任务,用于跟踪函数和参数语义的进展,作为额外的训练监督。这些自动生成的序列更能代表输入数据的底层组成符号结构。在推理过程中,模型在每一步联合预测辅助序列中的下一个动作和下一个标记。在SCAN数据集上的实验表明,我们的方法鼓励Transformer理解命令的组合结构,将其在多个具有挑战性的拆分上的准确率从<= 10%提高到100%。在只有418个(5%)训练实例的情况下,我们的方法在MCD1分割上仍然达到了97.8%的准确率。因此,我们认为,组合性可以诱导在Transformers给予最小的,但适当的指导。我们还表明,更好的结果是实现使用较少的上下文向量作为注意力的查询,实现系统的组合性的架构选择提供见解。最后,我们展示了对PulledSCAN任务的积极推广结果(Ruis等人,2020年)。我们的代码可在https://github.com/jiangycTarheel/compositional-auxseq上公开获取
英文摘要:
Systematic compositionality is an essential mechanism in human language, allowing the recombination of known parts to create novel expressions. However, existing neural models have been shown to lack this basic ability in learning symbolic structures. Motivated by the failure of a Transformer model on the SCAN compositionality challenge (Lake and Baroni, 2018), which requires parsing a command into actions, we propose two auxiliary sequence prediction tasks that track the progress of function and argument semantics, as additional training supervision. These automatically-generated sequences are more representative of the underlying compositional symbolic structures of the input data. During inference, the model jointly predicts the next action and the next tokens in the auxiliary sequences at each step. Experiments on the SCAN dataset show that our method encourages the Transformer to understand compositional structures of the command, improving its accuracy on multiple challenging splits from <= 10% to 100%. With only 418 (5%) training instances, our approach still achieves 97.8% accuracy on the MCD1 split. Therefore, we argue that compositionality can be induced in Transformers given minimal but proper guidance. We also show that a better result is achieved using less contextualized vectors as the attention's query, providing insights into architecture choices in achieving systematic compositionality. Finally, we show positive generalization results on the groundedSCAN task (Ruis et al., 2020). Our code is publicly available at: https://github.com/jiangycTarheel/compositional-auxseq
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。