kefirski.me
ECIRPaper 1920198 min read

Self-Attentive Model for Headline Generation

A Universal Transformer with byte-pair encoding writes news headlines end-to-end, sets a new state of the art on the New York Times corpus, and we release a million-article Russian benchmark.

One line that carries the whole article

Every piece of news arrives with a title already attached, which makes headline generation the rare summarization task with practically unlimited supervision. No annotator sits in the loop: the training pair is the article and the headline its editor wrote. The recipe is also language-independent, because nothing in it requires a native speaker to mark anything up.

The compression involved is extreme. In our filtered New York Times training set the average article runs 707.6 words and the average headline 7.9, so the model must fold roughly ninety words into one while staying factual and fluent. That pressure is what makes the task a genuine test of whether an architecture captures the structure of a text rather than its surface.

What the model is allowed to read

Task and our delta
Earlier neural systems softened the task: reprint the first sentence, or run an encoder-decoder over it alone. We condition on every token of the article and train end to end on article-headline pairs.

Prior systems softened the problem in exactly that way. The classic baseline reprints the first sentence; the strongest neural approaches ran an encoder-decoder over that sentence, or over a summary pre-generated by an external statistical system. We train on the full text and the title, end to end, with no preprocessing beyond lowercasing.

Why we abandoned the recurrent bottleneck

We model the headline autoregressively: the network defines P(yty1,,yt1,X,θ)P(y_t \mid y_1,\dots,y_{t-1}, X, \theta), the distribution of the next title token given the article XX and the tokens written so far, and we fit θ\theta by maximizing likelihood over the corpus. At inference we decode with a beam of width 10, which consistently beats greedy decoding at the cost of extra compute.

The interesting choice is what computes that distribution. In a recurrent encoder, information from token ii reaches token jj only through jij-i sequential updates, so every long-range dependency fights the architecture's limited memory. Self-attention connects any pair of tokens in a single hop, and the Universal Transformer we adopt adds a second idea: one weight-shared block applied repeatedly, a recurrence over refinement steps in depth rather than over positions in the text.

Recurrence over positions versus depth

Architecture
An RNN pays one sequential step per position between two tokens. The Universal Transformer pays one attention hop for any pair and spends its recurrence budget on refining the whole sequence with the same shared weights.

Byte-pair encoding closes the vocabulary problem. Frequent words stay whole while rare ones split into subword units, so the model can emit words it never saw in training and we never need an unknown-word token. We train the tokenizer per corpus, with a 40,000-token vocabulary for English and 50,000 for Russian.

Two corpora, one recipe

We evaluate on two languages. From the New York Times Annotated Corpus we keep articles whose titles run 3 to 15 words and whose bodies run 20 to 2,000 words, skip obituaries, and end up with 1,444,919 articles. Rossiya Segodnya provided us a Russian news archive covering 2010 through 2014, 1,003,869 articles with a mean title of 9.5 words, which we released for research use as the RIA corpus.

Both models share one configuration: four layers in the encoder and decoder, eight attention heads, dropout p=0.3p=0.3 before layer normalization, and Adam with the original Transformer's scaled learning-rate schedule, 4,000 warmup steps and β=(0.9,0.98)\beta=(0.9, 0.98). We hold out 20,000 random articles per corpus for testing and report means over five random seeds.

The first sentence is a recall trick, not a headline

The first-sentence baseline is a lesson in metric design. It posts the best recall on both corpora, 34.67 ROUGE-1 recall on NYT against our 25.33, because the opening sentence usually mentions everything the headline mentions. But it is roughly ten times longer than a headline, so precision, and with it F1, collapses to 11.64. Reprinting is not summarizing.

ROUGE F1 on the New York Times corpus

F1 score
first sentenceencoder-decoderUniversal Transformer (ours)
ROUGE F1 on the New York Times corpus Means over five seeds. The first sentence looks strong only under recall; on F1 it is not competitive. Our end-to-end Universal Transformer leads every F1 metric, a new abstractive state of the art on this corpus in 2019. ROUGE-1: first sentence 11.6; encoder-decoder 23.0; Universal Transformer 26.9 ROUGE-2: first sentence 2.3; encoder-decoder 11.8; Universal Transformer 13.5 ROUGE-L: first sentence 7.2; encoder-decoder 21.2; Universal Transformer 24.8 07142128 11.6first sentence: ROUGE-1, 11.623.0encoder-decoder: ROUGE-1, 23.026.9Universal Transformer: ROUGE-1, 26.9ROUGE-12.3first sentence: ROUGE-2, 2.311.8encoder-decoder: ROUGE-2, 11.813.5Universal Transformer: ROUGE-2, 13.5ROUGE-27.2first sentence: ROUGE-L, 7.221.2encoder-decoder: ROUGE-L, 21.224.8Universal Transformer: ROUGE-L, 24.8ROUGE-L F1 score
Means over five seeds. The first sentence looks strong only under recall; on F1 it is not competitive. Our end-to-end Universal Transformer leads every F1 metric, a new abstractive state of the art on this corpus in 2019.

ROUGE F1 across both corpora

ModelROUGE-1ROUGE-2ROUGE-L
First sentence (NYT)11.642.287.19
Encoder-decoder (NYT)23.0211.8421.23
Universal Transformer (NYT)26.8613.4824.84
First sentence (RIA)24.0810.5716.70
Encoder-decoder (RIA)39.1022.1336.34
Universal Transformer (RIA)39.7522.1536.81
F1 means over five seeds. A label-smoothing variant of our model trails the plain one slightly on both corpora, 25.60/12.92/23.66 on NYT and 39.31/21.82/36.32 on RIA.

On F1, where length discipline counts, we lead every metric on both corpora: 26.86, 13.48 and 24.84 ROUGE-1, 2 and L on NYT, and 39.75, 22.15 and 36.81 on RIA, which had no prior published system. The strongest earlier NYT system reported only recall and leaned on an external summarizer; against its 8.17 ROUGE-2 recall we reach 13.01 while training end to end from raw text.

Readers still prefer the human headline

ROUGE has blind spots: a reasonable headline phrased unlike the reference scores poorly, and we kept meeting generations that read well yet scored low. So we ran a human study. Five annotators compared our headline with the published one on 100 random articles per corpus, choosing the human headline, the machine one, or calling a tie.

Which headline do readers pick?

preference, percent
human headlinetieour model
Which headline do readers pick? Five annotators, 100 articles per corpus. Counting ties as acceptable output, our headlines are competitive for 42.6 percent of NYT articles and 45.6 percent of RIA articles: close to parity, not at it. New York Times: human 57.4; tie 27.4; machine 15.2 RIA: human 54.4; tie 30.6; machine 15.0 015304560 57.4human: New York Times, 57.427.4tie: New York Times, 27.415.2machine: New York Times, 15.2New York Times54.4human: RIA, 54.430.6tie: RIA, 30.615.0machine: RIA, 15.0RIA preference, percent
Five annotators, 100 articles per corpus. Counting ties as acceptable output, our headlines are competitive for 42.6 percent of NYT articles and 45.6 percent of RIA articles: close to parity, not at it.

The flavor of the remaining gap shows in the outputs. For an article about Southwest defending its Chicago hub, the editor wrote "southwest is adding flights to protect its chicago hub"; we generated "southwest airlines to add 16 flights from chicago". Ours is accurate and fluent, and it misses the why. Closing that last editorial distance, the intent behind the facts, is the part we leave open.

What we take away from 2019: a general-purpose non-local architecture plus subword tokenization, with no task-specific machinery, no pointer networks and no external summarizer, was enough to pass every specialized pipeline of its time. And because every language writes headlines, the benchmark we released keeps paying rent as a testbed far beyond English.

A model that reads the whole story writes the better headline, and the endless supply of titled news articles makes this one of the cheapest hard benchmarks in summarization.