Skip to main content
QUICK REVIEW

[论文解读] ERNIE-SPARSE: Learning Hierarchical Efficient Transformer Through Regularized Self-Attention

Yang Liu, Jiaxiang Liu|arXiv (Cornell University)|Mar 23, 2022
Domain Adaptation and Few-Shot Learning被引用 6
一句话总结

ERNIE-Sparse 提出了一种分层稀疏变换器(HST)和自注意力正则化(SAR),以解决稀疏注意力机制中信息瓶颈敏感性和拓扑不一致性的问题。通过引入分层全局表征并强制在拓扑变化下保持输出一致性,该方法在长序列任务上实现了最先进性能,在 Long Range Arena 上准确率提升 2.77%,在问答基准上提升 3.24%。

ABSTRACT

Sparse Transformer has recently attracted a lot of attention since the ability for reducing the quadratic dependency on the sequence length. We argue that two factors, information bottleneck sensitivity and inconsistency between different attention topologies, could affect the performance of the Sparse Transformer. This paper proposes a well-designed model named ERNIE-Sparse. It consists of two distinctive parts: (i) Hierarchical Sparse Transformer (HST) to sequentially unify local and global information. (ii) Self-Attention Regularization (SAR) method, a novel regularization designed to minimize the distance for transformers with different attention topologies. To evaluate the effectiveness of ERNIE-Sparse, we perform extensive evaluations. Firstly, we perform experiments on a multi-modal long sequence modeling task benchmark, Long Range Arena (LRA). Experimental results demonstrate that ERNIE-Sparse significantly outperforms a variety of strong baseline methods including the dense attention and other efficient sparse attention methods and achieves improvements by 2.77% (57.78% vs. 55.01%). Secondly, to further show the effectiveness of our method, we pretrain ERNIE-Sparse and verified it on 3 text classification and 2 QA downstream tasks, achieve improvements on classification benchmark by 0.83% (92.46% vs. 91.63%), on QA benchmark by 3.24% (74.67% vs. 71.43%). Experimental results continue to demonstrate its superior performance.

研究动机与目标

  • 解决由于全局标记数量有限而导致的稀疏变换器中信息瓶颈敏感性问题。
  • 降低因输入微小变化引起的注意力拓扑不一致所导致的性能下降。
  • 通过引入分层注意力机制,提升长序列建模能力,实现更丰富的全局表征。
  • 通过新颖的正则化策略,稳定不同注意力拓扑下的模型预测。
  • 在包括长文档分类和问答在内的多样化自然语言处理任务中展示卓越性能。

提出的方法

  • 提出分层稀疏变换器(HST),采用两阶段注意力机制:首先局部标记在块内注意力,随后代表性标记聚合并传播全局信息。
  • 设计自注意力正则化(SAR),一种训练正则化方法,旨在最小化原始与扰动后注意力拓扑下的输出差异。
  • 通过采样稀疏注意力输入的扰动版本(例如,向右移动一个标记)来应用 SAR,并最小化原始模型输出与扰动后输出之间的 KL 散度。
  • 在分层注意力头与稀疏注意力头之间共享线性权重,以提升参数效率和一致性。
  • 结合标准交叉熵损失与 SAR 损失进行训练,使模型对拓扑变化具有更强鲁棒性。
  • 采用预训练-微调范式,在文本分类和问答等下游任务上评估泛化能力。

实验结果

研究问题

  • RQ1全局标记数量如何影响稀疏变换器中的模型性能?分层注意力能否缓解这种瓶颈效应?
  • RQ2在固定注意力模式下,输入扰动(如标记位移)在多大程度上会破坏稀疏变换器的行为?
  • RQ3一种强制不同注意力拓扑下输出一致性的正则化策略,能否提升模型鲁棒性与性能?
  • RQ4所提出的 HST 机制在不同序列长度下,与标准稀疏注意力相比,在建模长距离依赖关系方面表现如何?
  • RQ5将 SAR 与其他正则化技术(如 R-Drop)结合使用,能否进一步提升模型泛化能力?

主要发现

  • ERNIE-Sparse 在 Long Range Arena 基准上相比强基线模型平均准确率提升 2.77%(57.78% vs. 55.01%)。
  • 在文本分类任务中,ERNIE-Sparse 相比强基线模型准确率提升 0.83%(92.46% vs. 91.63%)。
  • 在问答任务中,ERNIE-Sparse 相比基线方法准确率提升 3.24%(74.67% vs. 71.43%)。
  • 消融实验表明,移除 HST 会使平均性能下降 1.00 分,ListOps 任务上下降达 1.78 分。
  • 当注意力拓扑被扰动时,SAR 正则化使 Pathfinder 任务的性能下降减少 3.52 分(从 78.77 降至 75.25),证明其具有稳定作用。
  • SAR 在 5 项任务中的 3 项上优于 R-Drop,且与 Dropout 互补,联合使用效果优于单独使用任一方法。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。