卷积和自我注意:重新解释预训练语言模型中的相对位置
Convolutions and Self-Attention: Re-interpreting Relative Positions in Pre-trained Language Models
摘要:
本文详细讨论了自然语言任务中卷积和自我注意之间的关系。我们证明了自注意层中的相对位置嵌入等价于最近提出的动态轻量级卷积,并且我们考虑了将卷积集成到Transformer自注意中的多种新方法。具体来说,我们提出了复合注意力,它将以前的相对位置嵌入方法结合在卷积框架下。我们通过用复合注意力训练BERT来进行实验,发现卷积一致地提高了多个下游任务的性能,取代了绝对位置嵌入。为了通知未来的工作,我们提出了比较轻量级卷积,动态卷积和深度可分离卷积在语言模型预训练中的结果,考虑到自我注意层中卷积的多个注入点。
英文摘要:
In this paper, we detail the relationship between convolutions and self-attention in natural language tasks. We show that relative position embeddings in self-attention layers are equivalent to recently-proposed dynamic lightweight convolutions, and we consider multiple new ways of integrating convolutions into Transformer self-attention. Specifically, we propose composite attention, which unites previous relative position embedding methods under a convolutional framework. We conduct experiments by training BERT with composite attention, finding that convolutions consistently improve performance on multiple downstream tasks, replacing absolute position embeddings. To inform future work, we present results comparing lightweight convolutions, dynamic convolutions, and depthwise-separable convolutions in language model pre-training, considering multiple injection points for convolutions in self-attention layers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。