ROUGE is a family of evaluation metrics that counts how many of the words and word sequences of human-written summaries (reference summaries) a model-generated summary (the candidate) contains. Values range from 0 to 1, and the closer to 1, the closer the summary is to the references. The most common are ROUGE-N, which counts n-gram matches, and ROUGE-L, which uses the longest common subsequence (LCS).
The denominator is the number of n-grams on the reference side, so ROUGE-N is a recall (how much of the reference content was captured). It is the counterpart of BLEU, which divides by the number of candidate n-grams (precision). The name itself stands for Recall-Oriented Understudy for Gisting Evaluation.
ROUGE was released in 2004 by Chin-Yew Lin of the University of Southern California as an evaluation package. Evaluating summaries by hand at the scale of DUC, the US summarization evaluation conference, required more than 3,000 hours of work. Following the success of BLEU in machine translation, ROUGE gathered methods for evaluating summaries automatically through n-gram matching.
Definition and procedure
The paper defines four metrics that differ in the unit they count. The commonly used ROUGE-N and ROUGE-L are computed with the following steps.
Split the candidate and the reference summaries into words with the same rules (normalize case and, if needed, reduce words to their stems).
ROUGE-N: For each n-gram of the reference (single words for ROUGE-1, two-word sequences for ROUGE-2), add the smaller of its count in the reference and in the candidate as the match count Countmatch, then divide by the total number of reference n-grams.
ROUGE-L: Compute, by dynamic programming, the length LCS(X,Y) of the longest common subsequence of the reference X (length m) and the candidate Y (length n). A subsequence may skip words as long as the order is preserved.
For ROUGE-L, compute the recall, precision, and their F-measure.
When there are multiple reference summaries, compute the value against each and take the maximum.
In the paper's DUC setting, β is set very large, so ROUGE-L effectively looks only at the recall Rlcs. Implementations commonly used today, such as Google's rouge-score, return three values for both ROUGE-N and ROUGE-L: recall, precision, and F-measure (β=1).
In the example in the figure at the top, every word of the reference "rain and snow stop the city trains" (7 words) appears in the candidate, so the ROUGE-1 recall is 7/7 = 1.00. However, "rain" and "snow" are swapped, so of the 6 two-word sequences only "the city" and "city trains" match, and the ROUGE-2 recall is 0.33. ROUGE-L counts the 5 words "rain stop the city trains" that are shared in order, giving a recall of 5/7 = 0.71.
The advantage of ROUGE-L is that it counts in-order matches even when they are not contiguous, so it reflects sentence word order without having to choose a length n. In the paper's example, for the reference "police killed the gunman", the candidates "police kill the gunman" and "the gunman kill police" get the same ROUGE-2 value (the only match is "the gunman"). With ROUGE-L (β=1), the former scores 0.75 and the latter 0.5, so the candidate closer in meaning is rated higher.
The remaining two metrics compensate for weaknesses of ROUGE-L.
ROUGE-W: Gives more weight to consecutive matches within the LCS. For the reference "A B C D E F G", "A B C D H I K" and "A H B K C I D" get the same ROUGE-L value, but ROUGE-W rates the former, with its consecutive matches, higher (0.571 versus 0.286 in the paper's example).
ROUGE-S: Counts matches of in-order word pairs (skip-bigrams, which may have gaps). The maximum gap can be set with dskip; ROUGE-S4 allows gaps of up to 4 words. Adding single-word matches gives ROUGE-SU.
What it measures and its limitations
ROUGE measures how completely the candidate includes the content (words) written in the reference summaries. Summarization asks for the important content within a fixed length, so recall is at its center. ROUGE-1 reflects content overlap, while ROUGE-2 and ROUGE-L also reflect closeness of word order and phrasing.
It also has the following limitations.
It cannot credit paraphrases: It only looks at surface word matches. Even with the same meaning, using words different from the reference lowers the score.
With recall alone, longer summaries have an advantage: Recall is not divided by the candidate's length, so longer candidates get more matches. DUC evaluated summaries with a fixed length (such as 100 words). When comparing outputs of different lengths, also look at the F-measure and precision.
It does not measure fluency or correctness: As long as the words match, points are awarded even if the sentence is unnatural or combines facts incorrectly.
Correlation with human judgment varies by task: In the paper, many metrics correlated well with human judgment for single-document summarization, but correlations dropped for multi-document summarization, where ROUGE-L and ROUGE-W did not work well (next section).
ROUGE values cannot be compared unless word splitting, stemming, the treatment of stopwords (function words such as "the" and "of"), and which value is reported (recall or F-measure) are the same. Japanese needs particular care. The default processing in Google's rouge-score and torchmetrics lowercases the text and then removes every character other than a–z and 0–9, so passing Japanese sentences as is leaves no words at all and the value becomes 0. For Japanese, pass your own word-splitting process (tokenizer), for example based on morphological analysis (in torchmetrics, also replace the normalizer that removes characters), and report the analyzer used.
Validation in the original paper
The paper examined, on the DUC 2001–2003 evaluation data, the correlation (Pearson correlation coefficient) between each system's average ROUGE and the average human-assigned content coverage. The table below shows part of the results using words as is (no stemming or stopword removal).
Metric
DUC 2001 single-doc 100 words (1 reference)
DUC 2002 single-doc 100 words (1 reference)
DUC 2003 single-doc 10 words (1 reference)
DUC 2001 multi-doc 100 words (3 references)
ROUGE-1
0.76
0.98
0.96
0.53
ROUGE-2
0.84
0.99
0.75
0.59
ROUGE-L
0.83
0.99
0.97
0.56
ROUGE-SU4
0.84
0.99
0.97
0.55
The paper's conclusions are as follows.
For single-document summarization, ROUGE-2, ROUGE-L, ROUGE-W, and ROUGE-S worked well.
For very short summaries of about 10 words (headline-like summaries), ROUGE-1, ROUGE-L, ROUGE-W, ROUGE-SU4, and ROUGE-SU9 worked well.
For multi-document summarization, high correlations in the 0.9s were hard to achieve; with stopwords removed, ROUGE-1, ROUGE-2, ROUGE-S4, ROUGE-S9, ROUGE-SU4, and ROUGE-SU9 showed reasonable correlations. For example, on DUC 2001 multi-document 100 words (3 references), removing stopwords raised the correlation of ROUGE-1 from 0.53 to 0.87.
Adding more reference summaries tended to raise the correlations.
Where it is used
ROUGE is mainly used in the following situations.
Comparing document summarization systems: On benchmarks such as news article summarization, it is standard to report ROUGE-1, ROUGE-2, and ROUGE-L side by side. It is used to evaluate Sequence to Sequence summarization models such as BART.
Looking at word order across the whole summary: For summaries made of several sentences, summary-level ROUGE-L (Section 3.2 of the paper), which takes the LCS sentence by sentence and combines them, is used. rouge-score calls this rougeLsum and treats line breaks as sentence boundaries. According to the rouge-score documentation, the ROUGE-L reported in the Pointer-Generator paper (See et al., 2017) is this variant.
Headline generation and text generation other than translation: Even for short outputs, ROUGE-1 and ROUGE-L are convenient metrics. In separate work, the author of the paper reported that ROUGE-L, W, and S are also effective for automatic evaluation of machine translation.
Comparison with similar metrics
The following table compares ROUGE with metrics used to evaluate text generation, from the same perspectives.
To compare with prior work in summarization: Compute the F-measures of ROUGE-1, ROUGE-2, and ROUGE-L (or ROUGE-Lsum) with the same implementation and preprocessing as prior work.
To evaluate translation: Translation requires producing exactly the content of the reference, so use BLEU, which looks at precision, or chrF, an F-measure.
To fairly evaluate paraphrased or highly abstractive summaries: ROUGE, which looks only at surface matches, is not enough, so use it together with metrics that look at semantic similarity, such as BERTScore, or human evaluation.
For outputs with a single correct answer, such as speech transcription: Use word error rate (WER), which counts the effort needed to fix the output, rather than a match rate.
PyTorch example
▶Show code
python
from collections import Counter
def rouge_n(ref, cand, n):
"""Eq. (1) of Lin (2004), for a single reference summary. ref and cand are lists of words.
The match count sums, for each n-gram, the smaller of its counts in the reference and the candidate."""
rg = Counter(tuple(ref[i:i + n]) for i in range(len(ref) - n + 1))
cg = Counter(tuple(cand[i:i + n]) for i in range(len(cand) - n + 1))
match = sum(min(k, cg[g]) for g, k in rg.items())
r = match / max(sum(rg.values()), 1) # recall (the definition of ROUGE-N)
p = match / max(sum(cg.values()), 1) # precision
f = 0.0 if r + p == 0 else 2 * r * p / (r + p)
return r, p, f
def rouge_l(ref, cand, beta=1.0):
"""Eqs. (2)-(4) of Lin (2004). Finds the longest common subsequence (LCS) by DP."""
m, n = len(ref), len(cand)
t = [[0] * (n + 1) for _ in range(m + 1)]
for i in range(1, m + 1):
for j in range(1, n + 1):
t[i][j] = t[i - 1][j - 1] + 1 if ref[i - 1] == cand[j - 1] else max(t[i - 1][j], t[i][j - 1])
lcs = t[m][n]
r, p = lcs / m, lcs / n
f = 0.0 if lcs == 0 else (1 + beta ** 2) * r * p / (r + beta ** 2 * p)
return r, p, f
ref = "rain and snow stop the city trains".split() # pass text already split into words
cand = "snow and rain stop all the city trains".split()
print(rouge_n(ref, cand, 1)) # (1.0, 0.875, 0.933...)
print(rouge_n(ref, cand, 2)) # (0.333..., 0.285..., 0.307...)
print(rouge_l(ref, cand)) # (0.714..., 0.625, 0.666...)
# Google's rouge-score: arguments are in (reference, candidate) order. The default processing removes everything except a-z and 0-9,
# so for Japanese, pass a tokenizer that splits into words (an object with tokenize(text) -> list of words)
from rouge_score import rouge_scorer
class SpaceTokenizer:
def tokenize(self, text):
return text.split() # in practice, split with a morphological analyzer
scorer = rouge_scorer.RougeScorer(["rouge1", "rouge2", "rougeL"], tokenizer=SpaceTokenizer())
scores = scorer.score(" ".join(ref), " ".join(cand))
print(scores["rouge2"]) # Score(precision=0.2857..., recall=0.3333..., fmeasure=0.3076...)
# with torchmetrics: arguments are in (candidate, reference) order, the reverse of rouge-score.
# The default normalizer also removes everything except a-z and 0-9, so for Japanese pass both a normalizer and a tokenizer
from torchmetrics.text.rouge import ROUGEScore
metric = ROUGEScore(rouge_keys=("rouge1", "rouge2", "rougeL"), normalizer=lambda s: s, tokenizer=str.split)
print(metric(" ".join(cand), " ".join(ref))) # rouge1_fmeasure, rouge1_precision, rouge1_recall, ...
FAQ
Q. Is ROUGE a recall or an F-measure?
A.
In the original paper, ROUGE-N is a recall, and ROUGE-L was also effectively a recall under the DUC settings. Current implementations (rouge-score and torchmetrics) return three values, recall, precision, and F-measure, and papers differ in which one they report. Always check which value it is when comparing.
Q. Why does ROUGE come out as 0 for Japanese summaries?
A.
Because the default preprocessing in rouge-score and torchmetrics removes every character other than a–z and 0–9. All Japanese characters disappear, leaving no words to compare. Compute it by passing a process that splits text into words, for example with morphological analysis (in torchmetrics, also replace the normalizer that removes characters).
Q. How do ROUGE-L and ROUGE-Lsum differ?
A.
ROUGE-L computes the LCS treating the whole summary as one sequence of words. ROUGE-Lsum is the paper's summary-level ROUGE-L: for each sentence of the reference, it takes the union of the LCSs with each candidate sentence and combines them. rouge-score treats line breaks as sentence boundaries, so the value changes with how line breaks are inserted.