Sub topic 10
ROUGE in Practice: Stemming, ROUGE-Lsum, and Multiple References
Prerequisites and the practical problem
Assume you know Python, n-grams, and precision, recall, and F1. You should also know that ROUGE compares generated text with one or more reference texts. It measures overlap, so it is a proxy for quality rather than a complete judge of meaning.
In practice, ROUGE results depend on preprocessing and aggregation choices. Stemming, sentence boundaries, and multiple references can change the score even when the generated text stays the same.
Stemming
Stemming reduces related word forms to a shared root. For example, a stemmer may map connect, connected, and connecting to similar forms. This can increase overlap when the candidate and reference express the same idea with different grammatical forms.
The rouge_score package enables stemming with use_stemmer=True. It returns precision, recall, and F1 for each requested variant.
from rouge_score import rouge_scorer
target = "The system connects users quickly."
prediction = "The system connected users quickly."
scorer = rouge_scorer.RougeScorer(
["rouge1", "rouge2", "rougeL"],
use_stemmer=True,
)
scores = scorer.score(target, prediction)
for name, result in scores.items():
print(name, result.precision, result.recall, result.fmeasure)Stemming is useful when morphology should not affect the evaluation. However, it can also create false matches. Two words with the same stem are not always interchangeable. Report whether stemming was enabled instead of treating it as a harmless default.
ROUGE-Lsum
ROUGE-L uses the longest common subsequence, or LCS. An LCS preserves word order but does not require the words to be adjacent. For a single sentence, this captures a longer ordered match than ROUGE-2.
ROUGE-Lsum applies an LCS-style comparison across a multi-sentence summary. The sum refers to sentence-level LCS contributions, not to simply concatenating every word and ignoring sentence structure. Sentence boundaries therefore matter.
Use rougeL for sentence-like text and rougeLsum when evaluating summaries with multiple sentences. Keep the same newline convention for candidates and references.
from rouge_score import rouge_scorer
target = "Cats are popular pets.\nThey need regular care."
prediction = "Cats are common pets.\nThey require regular care."
scorer = rouge_scorer.RougeScorer(
["rougeL", "rougeLsum"],
use_stemmer=True,
)
for name, result in scorer.score(target, prediction).items():
print(name, result.fmeasure)Multiple references
A single reference cannot contain every valid answer. Multiple references reduce this problem. For each candidate, score it against every reference, then choose and document an aggregation rule.
Common policies include:
- Take the maximum score across references for each example. This rewards a match with any valid wording.
- Average the scores across references. This measures similarity to the whole reference set but can penalize valid paraphrases.
- Pool reference text before scoring. This changes the counting problem and is less directly comparable.
The correct choice depends on the benchmark. Do not mix policies across experiments. A reproducible report should name the ROUGE variant, stemming setting, sentence-splitting rule, reference aggregation method, and whether the result is a mean over examples.
| Setting | Example choice | Why it matters |
|---|---|---|
| Variant | ROUGE-1, ROUGE-2, ROUGE-Lsum | Measures different kinds of overlap |
| Stemming | Enabled | Can match related word forms |
| References | Maximum per example | Rewards any valid reference |
| Reported value | Corpus mean F1 | Gives one summary statistic |
Limitations
ROUGE can miss a correct paraphrase with little shared vocabulary. It can reward copied phrases that are fluent but factually wrong. ROUGE-Lsum also depends on sentence boundaries, and stemming can overmatch related but different words. Use ROUGE alongside human checks or task-specific tests when factuality and usefulness matter.
Exercise
A summarization benchmark has three references per example. Which details must you report so another researcher can reproduce your ROUGE-Lsum result?
Show answer
Report the ROUGE implementation and version, tokenization and sentence-splitting rules, whether stemming was enabled, how the three references were aggregated, whether the reported value is precision, recall, or F1, and how scores were averaged across examples.