[论文解读] Big Bird: Transformers for Longer Sequences
Big Bird 引入了一种稀疏注意力机制,使 Transformers 的复杂度随序列长度线性缩放,从而实现更长上下文建模,并具备理论保证,在 NLP 和基因组学任务上取得显著经验增益。
Transformers-based models, such as BERT, have been one of the most successful deep learning models for NLP. Unfortunately, one of their core limitations is the quadratic dependency (mainly in terms of memory) on the sequence length due to their full attention mechanism. To remedy this, we propose, BigBird, a sparse attention mechanism that reduces this quadratic dependency to linear. We show that BigBird is a universal approximator of sequence functions and is Turing complete, thereby preserving these properties of the quadratic, full attention model. Along the way, our theoretical analysis reveals some of the benefits of having $O(1)$ global tokens (such as CLS), that attend to the entire sequence as part of the sparse attention mechanism. The proposed sparse attention can handle sequences of length up to 8x of what was previously possible using similar hardware. As a consequence of the capability to handle longer context, BigBird drastically improves performance on various NLP tasks such as question answering and summarization. We also propose novel applications to genomics data.
研究动机与目标
- 动机并解决长序列标准自注意力的二次内存瓶颈。
- 提出一种稀疏注意力机制,结合全局 token、局部窗口注意力和随机连接。
- 证明稀疏注意力 Transformer 的通用逼近性和图灵完备性。
- 在长上下文的NLP任务(QA、摘要)和基因组学应用中展示经验性提升。
- 在理论与实践中探讨稀疏注意力的含义与局限性。
提出的方法
- 在有向图 D 上定义广义稀疏注意力,其中从每个 token i 对邻域 N(i) 进行注意。
- 使用三个组成部分:g 个全局 tokens 对所有 tokens 进行注意、宽度为 w 的局部窗口注意力,以及 r 个随机注意力连接。
- 展示 Big Bird 变体(BigBird-itc 与 BigBird-etc),通过添加全局 tokens 来保留表达能力。
- 证明稀疏注意力编码器是序列到序列函数的通用逼近器,且稀疏编码器-解码器 transformers 是图灵完备的。
- 给出复杂度分析,表明注意力为线性于 n 的增长,与全注意力的二次复杂度形成对比。
- 给出关于使用 MLM 的预训练、QA 基准、长文档摘要以及具有更长上下文的基因组学任务的经验结果。
实验结果
研究问题
- RQ1稀疏注意力是否能够在降低计算与内存成本的同时实现与完全二次注意力相同的经验收益?
- RQ2稀疏注意力的 Transformer 是否能保持与完整 Transformer 相同的表达能力(通用逼近性和图灵完备性)?
- RQ3Big Bird 能有效建模多少上下文,以及相较于仅使用局部注意力或随机注意力的权衡?
- RQ4与固定长度上下文模型相比,长上下文模型在 QA、摘要和基因组学任务上是否有性能提升?
主要发现
- Big Bird 将注意力复杂度降至 O(n),并且在相似硬件上能够处理比先前方法长八倍的序列。
- 带有全局 token 的稀疏注意力保留了通用函数逼近性质,并且是图灵完备的。
- Big Bird 在 QA 和摘要基准上使用更长上下文实现了最先进或强劲的结果。
- 使用 Big Bird 的长上下文预训练提升下游任务,包括基因组学中的启动子区域和染色质谱预测。
- 经验结果显示在多个数据集上相对于 BERT 类基线和可比方法(如 Longformer)有提升。
- 存在理论下界,表明极度稀疏注意力在某些任务上需要更多层才能实现。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。