Investigating Efficiently Extending Transformers for Long Input Summarization

Jason Phang, Yao Zhao, Peter J. Liu

Introduction

Standard Transformer models face a significant bottleneck: the computational cost of self-attention grows quadratically ($O(n^2)$) with input length. This typically limits models to 512 or 1024 tokens, making them "short-sighted" for real-world tasks like summarizing scientific papers, legal filings, or scripts which often span tens of thousands of tokens. Researchers from NYU and Google Research address this with PEGASUS-X, an efficient extension of the PEGASUS model designed for documents up to 16,000 tokens.

Methodology

The authors propose a "Goldilocks" configuration for long-input processing based on three core pillars:

1. Global-Local Attention with Staggering

The architecture employs a hybrid attention mechanism:

  • Local Attention: Input is divided into non-overlapping blocks where tokens only attend to others within the same block.
  • Staggering: To facilitate information flow across blocks without extra compute, block boundaries are shifted by half a block in every other layer. This allows information to propagate across the entire sequence over multiple layers.
  • Global Tokens: A small set of learned embeddings (global tokens) can attend to and be attended to by every token, serving as a high-level "bulletin board" for the model.

2. Two-Stage Pretraining

To avoid the prohibitive cost of training on long sequences from scratch, the model uses a "warm-up" phase. It starts with a standard PEGASUS model (pretrained on 512 tokens) and undergoes an intermediate pretraining stage on 4,096-token sequences before final task-specific fine-tuning.

3. Sinusoidal Position Encodings

Despite testing complex schemes like T5's relative biases or RoPE, simple sinusoidal encodings were found to offer the best balance of performance and inference speed.

Performance and Efficiency

PEGASUS-X was evaluated against benchmarks like arXiv, PubMed, and the SCROLLS suite (GovReport, SummScreen/FD, QMSum).

Performance and efficiency comparison of different encoder architectures across various datasets.

As shown in the table above, the Global-Local encoder architecture achieves a superior balance of ROUGE scores and resource efficiency (Steps/s and Memory) compared to other variants like BigBird or Performer.

Efficiency vs. Scale

A key finding is that architectural efficiency can often outweigh raw parameter count. PEGASUS-X (568M parameters) frequently outperformed larger models like LongT5-Large (770M) and remained competitive with the 3B-parameter LongT5-XL.

SCROLLS Summarization Score vs. Number of Parameters for various models.

Key Insights

  • Staggering is a "Free Lunch": Shifting block boundaries improves performance significantly without increasing memory or compute.
  • Global Tokens are Essential: Adding as few as 128 global tokens provides a massive boost in ROUGE scores by maintaining a "big picture" view of the document.
  • The Adaptation Gap: Models benefit significantly from intermediate long-context pre-adaptation rather than jumping directly from 512 to 16k tokens.

Conclusion

PEGASUS-X demonstrates that through smart architectural choices—specifically staggered local attention and global tokens—it is possible to achieve state-of-the-art performance on long-document summarization with significantly fewer parameters and higher efficiency than massive, dense models. Future work may address the slight performance regression observed on very short tasks and explore scaling hidden dimensions for purely extractive tasks.

Summary updated

BibTeX
@inproceedings{phang2023investigating,
  author = {Jason Phang and Yao Zhao and Peter J. Liu},
  title = {{Investigating Efficiently Extending Transformers for Long Input Summarization}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.240},
}
Figure