arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2209.09735cs.LGcs.CLeess.ASeess.IV
收藏

Transformer模型的放松注意

Relaxed Attention for Transformer Models

Technische Universität Braunschweig(布伦瑞克工业大学)

Timo Lohrenz, Björn Möller, Zhengyang Li, Tim Fingscheidt

摘要:

基于所有注意力的Transformer架构的强大建模能力通常会导致过拟合,并且对于自然语言处理任务,会导致自回归Transformer解码器中隐式学习的内部语言模型,从而使外部语言模型的集成变得复杂。在本文中,我们探讨放松注意力,一个简单的和易于实现的平滑的注意力权重,产生两个方面的改进,一般的Transformer架构:首先,放松注意力提供正则化时,应用到编码器中的自我注意力层。其次,我们表明,它自然支持外部语言模型的整合,因为它通过放松解码器中的交叉注意力来抑制内隐学习的内部语言模型。我们证明了放松注意力在几个任务中的好处,结合最近的基准方法有明显的改善。具体而言,我们在最大的公共唇读LRS 3基准测试中超过了26.90%的最先进的单词出错率,单词出错率为26.31%,并且我们在IWSLT14(DE $\rightarrow$ EN)机器翻译任务中获得了37.67的最佳BLEU得分,而无需外部语言模型,几乎没有额外的模型参数。代码和模型将公开发布。

英文摘要:

The powerful modeling capabilities of all-attention-based transformer architectures often cause overfitting and - for natural language processing tasks - lead to an implicitly learned internal language model in the autoregressive transformer decoder complicating the integration of external language models. In this paper, we explore relaxed attention, a simple and easy-to-implement smoothing of the attention weights, yielding a two-fold improvement to the general transformer architecture: First, relaxed attention provides regularization when applied to the self-attention layers in the encoder. Second, we show that it naturally supports the integration of an external language model as it suppresses the implicitly learned internal language model by relaxing the cross attention in the decoder. We demonstrate the benefit of relaxed attention across several tasks with clear improvement in combination with recent benchmark approaches. Specifically, we exceed the former state-of-the-art performance of 26.90% word error rate on the largest public lip-reading LRS3 benchmark with a word error rate of 26.31%, as well as we achieve a top-performing BLEU score of 37.67 on the IWSLT14 (DE$\rightarrow$EN) machine translation task without external language models and virtually no additional model parameters. Code and models will be made publicly available.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑