Highlight

Longformer: The Long-Document Transformer

Introduces Longformer, a transformer whose attention scales linearly with sequence length to process documents of thousands of tokens.

Based on

Longformer: The Long-Document Transformer

By Iz Beltagy, Matthew E. Peters, Arman CohanarXiv.org
Read original article →

The paper addresses the inability of transformer models to handle long sequences, which stems from self-attention scaling quadratically with sequence length. Longformer replaces standard self-attention with a mechanism that scales linearly, combining a local windowed attention with a task-motivated global attention, and is designed as a drop-in replacement so it can process documents of thousands of tokens or longer.

Longformer achieves state-of-the-art results on the text8 and enwik8 character-level language modeling benchmarks, and unlike much prior long-sequence work it is also pretrained and finetuned on downstream tasks, where it consistently outperforms RoBERTa and sets new state-of-the-art results on WikiHop and TriviaQA. The authors further introduce the Longformer-Encoder-Decoder (LED) for long-document sequence-to-sequence generation, demonstrating its effectiveness on arXiv summarization.

Abstract

Standard transformers cannot process long sequences because self-attention scales quadratically with length. Longformer introduces attention that scales linearly, combining local windowed attention with task-motivated global attention as a drop-in replacement for self-attention. It reaches state-of-the-art results on character-level language modeling and, when pretrained and finetuned, consistently outperforms RoBERTa on long-document tasks, with new records on WikiHop and TriviaQA. A Longformer-Encoder-Decoder variant supports generative tasks like arXiv summarization.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

transformerslong-document modelingsparse attentionself-attentionlanguage modelingsummarization
Share

Take the next step

Try CoreModels, talk with our team, or explore more resources.