Fast-FNet:通过高效的傅里叶层加速Transformer编码器模型
Fast-FNet: Accelerating Transformer Encoder Models via Efficient Fourier Layers
AI总结:
针对Transformer注意力机制计算复杂度高的问题,提出Fast-FNet,利用傅里叶变换替代注意力层并优化其部署,在减少参数、训练时间和内存的同时提升性能。
摘要:
基于Transformer的语言模型利用注意力机制在几乎所有自然语言处理(NLP)任务中实现了显著的性能提升。类似的注意力结构在其他多个领域也得到了广泛研究。尽管注意力机制大幅提升了模型性能,但其二次复杂度阻碍了对长序列的高效处理。近期的研究致力于消除计算效率低下的缺点,并表明基于Transformer的模型在没有注意力层的情况下仍能取得有竞争力的结果。一项开创性研究提出了FNet,它在Transformer编码器架构中用傅里叶变换(FT)替代了注意力层。FNet在与原始Transformer编码器模型相比取得有竞争力的性能的同时,通过移除注意力机制的计算负担加速了训练过程。然而,FNet模型忽略了经典信号处理中可被利用以进一步提高模型效率的FT基本性质。我们提出了在Transformer编码器模型中高效部署FT的不同方法。我们提出的架构具有更少的模型参数、更短的训练时间、更少的内存使用以及一些额外的性能提升。我们通过在常见基准上的大量实验证明了这些改进。
英文摘要:
Transformer-based language models utilize the attention mechanism for substantial performance improvements in almost all natural language processing (NLP) tasks. Similar attention structures are also extensively studied in several other areas. Although the attention mechanism enhances the model performances significantly, its quadratic complexity prevents efficient processing of long sequences. Recent works focused on eliminating the disadvantages of computational inefficiency and showed that transformer-based models can still reach competitive results without the attention layer. A pioneering study proposed the FNet, which replaces the attention layer with the Fourier Transform (FT) in the transformer encoder architecture. FNet achieves competitive performances concerning the original transformer encoder model while accelerating training process by removing the computational burden of the attention mechanism. However, the FNet model ignores essential properties of the FT from the classical signal processing that can be leveraged to increase model efficiency further. We propose different methods to deploy FT efficiently in transformer encoder models. Our proposed architectures have smaller number of model parameters, shorter training times, less memory usage, and some additional performance improvements. We demonstrate these improvements through extensive experiments on common benchmarks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。