Longformer: 长文档 Transformer

Longformer: The Long-Document Transformer

伊兹·贝尔塔吉 Iz Beltagy · Allen Institute for AI · 2020-04-10 · arXiv:2004.05150 ↗ · 被引 5634

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

基于 Transformer 的模型由于自注意力操作的计算量随序列长度呈二次方增长,因此无法处理长序列。为了解决这一限制,我们提出了 Longformer,其注意力机制的计算量随序列长度线性增长,使得处理数千个或更长令牌的文档变得容易。Longformer 的注意力机制是标准自注意力的直接替代品,它结合了局部窗口注意力和任务驱动的全局注意力。遵循先前关于长序列 Transformer 的工作,我们在字符级语言建模上评估了 Longformer,并在 text8 和 enwik8 上取得了最先进的结果。与大多数先前工作不同,我们还对 Longformer 进行了预训练,并在各种下游任务上进行了微调。我们的预训练 Longformer 在长文档任务上始终优于 RoBERTa,并在 WikiHop 和 TriviaQA 上创造了新的最先进结果。最后,我们介绍了 Longformer-Encoder-Decoder(LED),这是 Longformer 的一个变体,用于支持长文档生成式序列到序列任务,并在 arXiv 摘要数据集上证明了其有效性。

Transformer-based models are unable to process long sequences due to their self-attention operation, which scales quadratically with the sequence length. To address this limitation, we introduce the Longformer with an attention mechanism that scales linearly with sequence length, making it easy to process documents of thousands of tokens or longer. Longformer's attention mechanism is a drop-in replacement for the standard self-attention and combines a local windowed attention with a task motivated global attention. Following prior work on long-sequence transformers, we evaluate Longformer on character-level language modeling and achieve state-of-the-art results on text8 and enwik8. In contrast to most prior work, we also pretrain Longformer and finetune it on a variety of downstream tasks. Our pretrained Longformer consistently outperforms RoBERTa on long document tasks and sets new state-of-the-art results on WikiHop and TriviaQA. We finally introduce the Longformer-Encoder-Decoder (LED), a Longformer variant for supporting long document generative sequence-to-sequence tasks, and demonstrate its effectiveness on the arXiv summarization dataset.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 18)

阅读逐段中英对照全文 →