arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.01989cs.CLcs.LG
收藏

WavSpA:用于提升 Transformer 长序列学习能力的 Wavelet Space Attention

WavSpA: Wavelet Space Attention for Boosting Transformers' Long Sequence Learning Ability

UC San Diego(加州大学圣地亚哥分校);Mindverse

Yufan Zhuang, Zihan Wang, Fangbo Tao, Jingbo Shang

AI总结:

本文提出 Wavelet Space Attention(WavSpA),通过在可学习小波系数空间中进行注意力学习来替代传统 Transformer 注意力,在保持线性时间复杂度的同时捕获位置与频率信息,显著提升了模型的长序列学习与推理外推能力。

摘要:

Transformer 及其变体是深度学习中的基础神经架构。近期研究表明,在 Fourier 空间中学习注意力可以提高 Transformer 的长序列学习能力。我们认为小波变换是更好的选择,因为它能以线性时间复杂度同时捕获位置和频率信息。因此,本文系统研究了小波变换与 Transformer 之间的协同作用。我们提出了 Wavelet Space Attention(WavSpA),它通过在一个可学习的小波系数空间中促进注意力学习来替代 Transformer 中的注意力机制,具体步骤包括:(1) 应用正向小波变换将输入序列投影到多分辨率基上;(2) 在小波系数空间中进行注意力学习;(3) 通过逆向小波变换在输入空间中重建表示。在 Long Range Arena 上的大量实验表明,使用固定或自适应小波在小波空间中学习注意力,能够持续提升 Transformer 的性能,并且显著优于在 Fourier 空间中的学习。我们进一步表明,该方法能够增强 Transformer 在 LEGO chain-of-reasoning 任务上跨越距离的推理外推能力。

英文摘要:

Transformer and its variants are fundamental neural architectures in deep learning. Recent works show that learning attention in the Fourier space can improve the long sequence learning capability of Transformers. We argue that wavelet transform shall be a better choice because it captures both position and frequency information with linear time complexity. Therefore, in this paper, we systematically study the synergy between wavelet transform and Transformers. We propose Wavelet Space Attention (WavSpA) that facilitates attention learning in a learnable wavelet coefficient space which replaces the attention in Transformers by (1) applying forward wavelet transform to project the input sequences to multi-resolution bases, (2) conducting attention learning in the wavelet coefficient space, and (3) reconstructing the representation in input space via backward wavelet transform. Extensive experiments on the Long Range Arena demonstrate that learning attention in the wavelet space using either fixed or adaptive wavelets can consistently improve Transformer's performance and also significantly outperform learning in Fourier space. We further show our method can enhance Transformer's reasoning extrapolation capability over distance on the LEGO chain-of-reasoning task.

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

↑