Skip to main content
QUICK REVIEW

[Paper Review] LongT5: Efficient Text-To-Text Transformer for Long Sequences

Mandy Guo, Joshua Ainslie|arXiv (Cornell University)|Dec 15, 2021
Topic ModelingComputer Science6 citations
TL;DR

LongT5 introduces a scalable Transformer architecture that simultaneously increases input sequence length and model size for improved performance on long-context NLP tasks. It employs a novel TGlobal attention mechanism—mimicking ETC’s local/global attention without requiring side inputs—and adopts PEGASUS-style pre-training, achieving state-of-the-art results on summarization and question-answering benchmarks including arXiv, PubMed, and BigPatent with up to 16k input tokens.

ABSTRACT

Recent work has shown that either (1) increasing the input length or (2) increasing model size can improve the performance of Transformer-based neural models. In this paper, we present a new model, called LongT5, with which we explore the effects of scaling both the input length and model size at the same time. Specifically, we integrated attention ideas from long-input transformers (ETC), and adopted pre-training strategies from summarization pre-training (PEGASUS) into the scalable T5 architecture. The result is a new attention mechanism we call {\em Transient Global} (TGlobal), which mimics ETC's local/global attention mechanism, but without requiring additional side-inputs. We are able to achieve state-of-the-art results on several summarization tasks and outperform the original T5 models on question answering tasks.

Motivation & Objective

  • To explore the performance gains from scaling both input length and model size in Transformer models.
  • To address the quadratic computational cost of full self-attention in long sequences by introducing an efficient attention mechanism.
  • To adapt PEGASUS-style pre-training for abstractive summarization to improve performance on diverse long-sequence tasks.
  • To enable scalable, high-performance text-to-text modeling on long documents without requiring architectural overhauls or side inputs.
  • To open-source the model architecture, training code, and pre-trained checkpoints for community use.

Proposed method

  • Introduces TGlobal attention, a drop-in replacement for standard self-attention that synthesizes global tokens on-the-fly from input token groups, enabling local sparsity without external side inputs.
  • Adapts the PEGASUS pre-training objective—masking key sentences and requiring autoregressive generation of the masked spans—for improved performance on long-context tasks.
  • Extends the T5 architecture with TGlobal attention in the encoder only, maintaining compatibility with existing T5 pipelines and inference frameworks.
  • Employs a two-stage training strategy: pre-training on long documents using span corruption and principle sentence generation, followed by fine-tuning on downstream tasks.
  • Scales model size and input length simultaneously, pushing the limits of what is feasible under memory constraints.
  • Uses a hierarchical attention design where local attention restricts computation to neighboring tokens, while global tokens enable long-range dependency modeling.

Experimental results

Research questions

  • RQ1Can jointly scaling input length and model size lead to significant performance gains in long-context NLP tasks?
  • RQ2How does TGlobal attention compare to full self-attention and other sparse attention mechanisms in terms of performance and efficiency on long sequences?
  • RQ3Does PEGASUS-style pre-training improve generalization on long-context tasks beyond summarization?
  • RQ4What are the trade-offs between model size, input length, and computational cost in long-context modeling?
  • RQ5Can a modified T5 model achieve state-of-the-art results on long-sequence summarization and question-answering benchmarks without architectural modifications?

Key findings

  • LongT5 achieves state-of-the-art ROUGE scores on the arXiv summarization dataset, with a 44.03 F1 score on R-L at 16k input length, outperforming all baselines.
  • On PubMed summarization, LongT5 reaches a 46.56 F1 score on R-L at 16k input length, surpassing the previous best model (PSG) by 1.53 points.
  • The ablation study shows that PEGASUS-style pre-training (PSG) outperforms span corruption (SC) by 1.2–1.5 ROUGE points across both arXiv and PubMed datasets.
  • TGlobal attention enables LongT5 to scale to 16k input length with only a small performance drop compared to full attention, while maintaining quadratic complexity reduction.
  • LongT5 achieves SOTA results on BigPatent, MediaSum, and TriviaQA, demonstrating broad applicability beyond summarization.
  • The model maintains strong performance even when fine-tuning on long sequences, confirming the effectiveness of the combined scaling strategy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.