arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2010.06138cs.CL
收藏

用适配器实现BERT的并行序列译码

Incorporating BERT into Parallel Sequence Decoding with Adapters

University of Science and Technology of China(中国科学技术大学);Alibaba DAMO Academy(阿里巴巴达摩院);IFLYTEK Co., Ltd.(科大讯飞股份有限公司)

Junliang Guo, Zhirui Zhang, Linli Xu, Hao-Ran Wei, Boxing Chen, Enhong Chen

摘要:

虽然大规模预训练语言模型(如BERT)在各种自然语言理解任务上取得了巨大成功,但如何高效地将它们整合到序列到序列模型和相应的文本生成任务中仍然是一个重要的问题。在本文中,我们提出了解决这个问题,采取两种不同的BERT模型分别作为编码器和解码器,并通过引入简单和轻量级的适配器模块,插入之间的BERT层和任务特定的数据集进行微调。通过这种方式,我们获得了一个灵活而高效的模型,该模型能够联合利用源端和目标端BERT模型中包含的信息,同时绕过灾难性遗忘问题。框架中的每个组件都可以被视为一个插件单元,这使得框架具有灵活性和任务不可知性。该框架基于Mask-Predict并行序列译码算法,充分考虑了BERT的双向性和条件独立性,并能很容易地适应于传统的自回归解码。我们对神经机器翻译任务进行了广泛的实验,其中所提出的方法始终优于自回归基线,同时将推理延迟减少一半,并在IWSLT 14德语-英语/WMT 14德语-英语翻译上实现了$36.49$ / $33.57$ BLEU分数。当适应自回归解码时,所提出的方法在WMT 14英语-德语/英语-法语翻译上实现了$30.60$ / $43.56$ BLEU分数,与最先进的基线模型相当。

英文摘要:

While large scale pre-trained language models such as BERT have achieved great success on various natural language understanding tasks, how to efficiently and effectively incorporate them into sequence-to-sequence models and the corresponding text generation tasks remains a non-trivial problem. In this paper, we propose to address this problem by taking two different BERT models as the encoder and decoder respectively, and fine-tuning them by introducing simple and lightweight adapter modules, which are inserted between BERT layers and tuned on the task-specific dataset. In this way, we obtain a flexible and efficient model which is able to jointly leverage the information contained in the source-side and target-side BERT models, while bypassing the catastrophic forgetting problem. Each component in the framework can be considered as a plug-in unit, making the framework flexible and task agnostic. Our framework is based on a parallel sequence decoding algorithm named Mask-Predict considering the bi-directional and conditional independent nature of BERT, and can be adapted to traditional autoregressive decoding easily. We conduct extensive experiments on neural machine translation tasks where the proposed method consistently outperforms autoregressive baselines while reducing the inference latency by half, and achieves $36.49$/$33.57$ BLEU scores on IWSLT14 German-English/WMT14 German-English translation. When adapted to autoregressive decoding, the proposed method achieves $30.60$/$43.56$ BLEU scores on WMT14 English-German/English-French translation, on par with the state-of-the-art baseline models.

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

↑