We study the problem of leveraging the syntactic structure of text to enhance pre-trained models such as BERT and RoBERTa. Existing methods utilize syntax of text either in the pre-training stage or in the fine-tuning stage, so that they suffer from discrepancy between the two stages. Such a problem would lead to the necessity of having human-annotated syntactic information, which limits the application of existing methods to broader scenarios. To address this, we present a model that utilizes the syntax of text in both pre-training and fine-tuning stages. Our model is based on Transformer with a syntax-aware attention layer that considers the dependency tree of the text. We further introduce a new pre-training task of predicting the syntactic distance among tokens in the dependency tree. We evaluate the model on three downstream tasks, including relation classification, entity typing, and question answering. Results show that our model achieves state-of-the-art performance on six public benchmark datasets. We have two major findings. First, we demonstrate that infusing automatically produced syntax of text improves pre-trained models. Second, global syntactic distances among tokens bring larger performance gains compared to local head relations between contiguous tokens.
翻译:我们研究如何利用文本的合成结构来增强诸如BERT和ROBERTA等经过预先训练的模型; 现有方法在培训前阶段或微调阶段使用文本的合成法,从而在两个阶段之间产生差异; 这样的问题将导致有必要获得附加说明的人类合成信息,从而将现有方法的应用限制在更广泛的假设中; 为了解决这个问题, 我们提出了一个模型, 在培训前和微调阶段都使用文本的合成法。 我们的模式以具有读音觉注意层的变异器为基础,该变异器考虑到文本的依赖性树。 我们进一步引入一项新的培训前任务, 预测依赖树中象征物之间的合成距离。 我们评估三种下游任务的模式, 包括关系分类、 实体输入和问题回答。 结果显示,我们的模型在六个公共基准数据集中都实现了状态的艺术性表现。 我们有两个主要发现。 首先, 我们证明, 使用自动生成文本的合成法, 能够改善当地象征性模型之间的距离。 其次, 我们用软件在使用自动生成更远的文本, 使当地象征性模型与象征性模型进行比较的距离。