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

具有能量友好操作的注意力机制

Attention Mechanism with Energy-Friendly Operations

Alibaba Group(阿里巴巴集团);University of Macau(澳门大学)

Yu Wan, Baosong Yang, Dayiheng Liu, Rong Xiao, Derek F. Wong, Haibo Zhang, Boxing Chen, Lidia S. Chao

摘要:

注意力机制已经成为自然语言处理模型中的主导模块。它是计算密集型的,并且依赖于大量耗电的乘法。本文从能量消耗的角度对注意力机制的变体进行了重新思考。在得出几种能量友好操作的能量成本远低于乘法操作的结论后,我们通过用选择性操作或加法替换乘法来构建一种新的注意力模型。在三个机器翻译任务上的实验结果表明,与vanilla模型相比,该模型在对齐计算和整个注意力过程中分别节省了99%和66%的能量,达到了相当的准确率。代码可在:https://github.com/NLP2CT/E-Att.

英文摘要:

Attention mechanism has become the dominant module in natural language processing models. It is computationally intensive and depends on massive power-hungry multiplications. In this paper, we rethink variants of attention mechanism from the energy consumption aspects. After reaching the conclusion that the energy costs of several energy-friendly operations are far less than their multiplication counterparts, we build a novel attention model by replacing multiplications with either selective operations or additions. Empirical results on three machine translation tasks demonstrate that the proposed model, against the vanilla one, achieves competitable accuracy while saving 99\% and 66\% energy during alignment calculation and the whole attention procedure. Code is available at: https://github.com/NLP2CT/E-Att.

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

↑