Generating Wikipedia by Summarizing Long Sequences

Peter J. Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, Noam Shazeer

TL;DR

This paper tackles the challenge of generating full Wikipedia articles by framing the task as multi-document abstractive summarization over long source sequences. By introducing a novel decoder-only Transformer architecture with memory-compressed attention, the authors scale input processing up to 11,000 tokens, significantly outperforming traditional encoder-decoder models.

What Problem Does This Paper Address?

Most successful sequence-to-sequence models (like standard encoder-decoder Transformers or RNNs) excel at short-form text transduction, such as sentence-level translation or headline generation. However, when applied to multi-document summarization—like compiling a comprehensive Wikipedia article from dozens of web sources—these architectures hit a wall.

The core challenge is memory scaling: standard self-attention mechanisms suffer from quadratic complexity relative to the input sequence length. Furthermore, traditional encoder-decoder frameworks often learn redundant language features in both modules when operating on monolingual text-to-text tasks. This paper addresses these limitations to enable neural abstractive models to handle the massive context lengths required for generating long, coherent, and factually accurate articles.

Methods

The authors propose a two-stage pipeline:

  1. Extractive Stage: Since source documents can contain millions of words, the model first uses coarse extractive methods (such as tf-idf, TextRank, or SumBasic) to rank paragraphs and select the top $L$ tokens.
  2. Abstractive Stage: Instead of a standard encoder-decoder structure, the authors introduce a Transformer Decoder (T-D) architecture. It flattens the problem by concatenating the source text and target text into a single sequence separated by a special token ($\delta$), training the system as a standard language model.

To scale this decoder to very long sequences, they develop the Transformer Decoder with Memory-Compressed Attention (T-DMCA). As illustrated in Figure 1, this architecture alternates between two attention modifications:

  • Local Attention: The sequence is divided into small blocks (e.g., 256 tokens), and attention is restricted within each block to keep memory consumption linear.
  • Memory-Compressed Attention: To maintain global context, a strided convolution reduces the number of keys and values, allowing queries to attend globally without a massive memory footprint.
Figure 1: The architecture of the self-attention layers used in the T-DMCA model. Every attention layer takes a sequence of tokens as input and produces a sequence of similar length as the output. Left: Original self-attention as used in the transformer-decoder. Middle: Memory-compressed attention which reduce the number of keys/values. Right: Local attention which splits the sequence into individual smaller sub-sequences. The sub-sequences are then merged together to get the final output sequence.

Datasets

The authors introduce WikiSum, a large-scale dataset designed for multi-document summarization. The target text consists of English Wikipedia articles (specifically focusing on the lead sections, though full articles are also explored). The input text is composed of two source types:

  1. Cited Sources: Text extracted from the URLs found in the Wikipedia article's references section.
  2. Web Search Results: The top 10 search results from Google using the article's section titles as queries (with Wikipedia clones filtered out).

As shown in the paper's dataset comparisons, WikiSum is orders of magnitude larger than previous benchmarks like Gigaword or CNN/DailyMail, containing over 1.8 million examples with input sizes spanning up to $10^6$ words.

Key Insights and Ideas

  • The Power of Decoder-Only Architectures: Dropping the encoder entirely reduces the parameter count by nearly half for a given hyperparameter set and forces the model to propagate error signals across both input and output time-steps. This simplifies optimization for long-sequence monolingual tasks.
  • Hybrid Summarization is Essential: Purely extractive methods lack narrative flow and coherence, while purely abstractive models cannot ingest massive source documents due to hardware limits. Combining coarse extraction with deep abstractive generation yields the best of both worlds.
  • Global vs. Local Trade-offs: Relying only on local attention blocks destroys the model's ability to synthesize information across different source documents. Alternating local blocks with memory-compressed global layers preserves long-range context efficiently.

Key Results

  • Input Length Scaling: Traditional Transformer Encoder-Decoder (T-ED) models fail to learn when the input length $L$ reaches 2,000 tokens. In contrast, the T-DMCA model scales effectively up to $L=11,000$ tokens, showing consistent drops in log-perplexity as context length increases (see Figure 3).
  • Automated Metrics: On the combined corpus, the best T-DMCA model (augmented with a Mixture-of-Experts layer) achieved a ROUGE-L F1 score of 38.8, more than doubling the performance of standalone extractive baselines like TextRank (16.2) and significantly outperforming standard seq2seq baselines (12.7).
Figure 3: Shows perplexity versus L for tf-idf extraction on combined corpus for different model architectures. For T-DMCA, E denotes the size of the mixture-of-experts layer.
  • Human Evaluation: In DUC-style human evaluations scoring from 1 to 5, T-DMCA achieved high marks in grammaticality (4.6), focus (4.5), and structure/coherence (4.2), significantly outperforming extractive-only and standard LSTM seq2seq baselines.

Limitations and Future Work

The authors highlight that the initial extractive stage acts as a major performance bottleneck. Experiments with a "cheating" extractor (which uses the ground-truth text to select source paragraphs) achieved a ROUGE-L score of 59.3, revealing a massive gap between current retrieval methods (tf-idf) and optimal paragraph selection. The authors suggest that training supervised models specifically to optimize this extraction step is a promising direction. Additionally, while full-article generation showed plausible section layouts, the text quality was noticeably lower than the lead-section generation task.

Summary updated

BibTeX
@inproceedings{liu2018generating,
  author = {Peter J. Liu and Mohammad Saleh and Etienne Pot and Ben Goodrich and Ryan Sepassi and Lukasz Kaiser and Noam Shazeer},
  title = {{Generating Wikipedia by Summarizing Long Sequences}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=Hyg0vbWC-},
}
Figure