Summarization › Summarization Evaluation

Michael BrenndoerferJanuary 19, 202610 min read
Language AI HandbookAll chapters
Part 63 of 67LLM Applications
Chapter 479Summarization › Summarization Evaluation
Reading section 6 of 10 · Summarization Evaluation · 10 minSection 6 of 10 · 10 min

Book contents

Section 6 of 10 · 10 min read

Summarization › Summarization EvaluationOne section · Sections in this chapter6 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Evaluating summaries is difficult. Unlike translation or question answering, there is rarely a single correct answer. A good summary of a 10,000-word article could take many valid forms, using different sentences, different phrasings, and covering different subsets of the content. This ambiguity makes automatic evaluation challenging and human evaluation expensive.

The challenge is compounded by the multiplicity of valid summaries. Two equally skilled human summarizers given the same document will produce summaries that differ substantially in vocabulary and structure, yet both may be excellent. An automatic metric that rewards similarity to one reference summary will penalize the other, even if both are equally good. This multi-reference problem is a fundamental tension in summarization evaluation that no current metric fully resolves.

A further complication is that different evaluation criteria matter differently in different applications. A medical summary used to brief a clinician needs extreme faithfulness: a single hallucinated drug dosage could harm a patient. A news summary for a casual reader can afford some paraphrasing that slightly stretches the original claims. An internal corporate summary that will be read by domain experts can use technical vocabulary freely; one targeted at executives may need to simplify. Any single automatic metric that treats these scenarios identically will be misleading in at least one of them.

ROUGE Metrics

The dominant automatic evaluation metric for summarization is ROUGE (Recall-Oriented Understudy for Gisting Evaluation), introduced by Lin (2004). ROUGE measures the overlap between a generated summary and one or more reference summaries written by humans.

ROUGE-N measures n-gram overlap. The recall formulation counts how many of the reference n-grams appear in the candidate summary:

ROUGE-NR=∑S∈Refs∑gramn∈SCount_match(gramn)∑S∈Refs∑gramn∈SCount(gramn)\text{ROUGE-N}_{R} = \frac{\sum_{S \in \text{Refs}} \sum_{\text{gram}_n \in S} \text{Count\_match}(\text{gram}_n)}{\sum_{S \in \text{Refs}} \sum_{\text{gram}_n \in S} \text{Count}(\text{gram}_n)}

where:

  • Refs\text{Refs}: the set of reference summaries
  • gramn\text{gram}_n: each n-gram (sequence of nn consecutive tokens) in a reference summary
  • Count_match(gramn)\text{Count\_match}(\text{gram}_n): the count of gramn\text{gram}_n in the candidate summary, clipped to the count in the reference
  • Count(gramn)\text{Count}(\text{gram}_n): the count of gramn\text{gram}_n in the reference summary

This is a recall-oriented measure: it rewards summaries that cover the reference content. Precision measures the complementary direction (how much of the candidate is in the reference), and the F1 harmonic mean balances both:

ROUGE-NF1=2⋅P⋅RP+R\text{ROUGE-N}_{F_1} = \frac{2 \cdot P \cdot R}{P + R}

where PP is precision (fraction of candidate n-grams found in the reference) and RR is recall (fraction of reference n-grams found in the candidate).

ROUGE-1 uses unigram overlap and measures vocabulary coverage broadly. ROUGE-2 uses bigram overlap and is more sensitive to phrasing: two summaries covering the same facts in different words will score well on ROUGE-1 but potentially poorly on ROUGE-2 if they use different collocations. This is why ROUGE-2 is often a better discriminator between system quality levels, though it also penalizes valid paraphrases more harshly. In general, ROUGE-1 tells you whether the candidate covers the right topics; ROUGE-2 tells you whether it also uses similar phrasing to the reference.

ROUGE-L measures the longest common subsequence (LCS) between the candidate and reference, capturing structural similarity beyond exact n-gram matches. The recall-based formulation is:

ROUGE-LR=LCS(C,R)∣R∣\text{ROUGE-L}_{R} = \frac{\text{LCS}(C, R)}{|R|}

where:

  • CC: the candidate summary (as a token sequence)
  • RR: the reference summary (as a token sequence)
  • LCS(C,R)\text{LCS}(C, R): the length (in tokens) of the longest common subsequence of CC and RR
  • ∣R∣|R|: the number of tokens in the reference summary

Unlike ROUGE-N, ROUGE-L does not require the matching tokens to be contiguous. A candidate that captures the same sequence of ideas as the reference but skips connecting words can still score well under ROUGE-L. This makes it somewhat more robust to paraphrasing than ROUGE-2, though less sensitive to local phrasing choices. ROUGE-L is often used as a single composite metric when you want something in between the n-gram granularity of ROUGE-1 and ROUGE-2.

ROUGE Limitations

ROUGE is a proxy, not a true quality measure. A summary that scores well on ROUGE may be grammatically awkward, factually wrong, or miss key nuances. Conversely, a fluent and informative paraphrase may score poorly if it uses different vocabulary than the reference. Research has consistently shown that ROUGE correlates only moderately with human judgments of summary quality, with Spearman correlations often in the 0.2 to 0.5 range depending on the dimension being evaluated. Despite these limitations, ROUGE remains the standard benchmark metric because it is cheap to compute and provides a reproducible comparison point across systems.

BERTScore

BERTScore (Zhang et al., 2019) addresses ROUGE's vocabulary limitation by using contextual embeddings instead of exact token matches. For each token in the candidate summary, BERTScore finds the most similar token in the reference according to their BERT embeddings, and vice versa.

The precision component measures the average similarity of each candidate token to its closest reference match:

PBERT=1∣C∣∑ci∈Cmax⁡rj∈Rcos⁡(eci,erj)P_{\text{BERT}} = \frac{1}{|C|} \sum_{c_i \in C} \max_{r_j \in R} \cos(\mathbf{e}_{c_i}, \mathbf{e}_{r_j})

The recall component measures the average similarity of each reference token to its closest candidate match:

RBERT=1∣R∣∑rj∈Rmax⁡ci∈Ccos⁡(erj,eci)R_{\text{BERT}} = \frac{1}{|R|} \sum_{r_j \in R} \max_{c_i \in C} \cos(\mathbf{e}_{r_j}, \mathbf{e}_{c_i})

where:

  • CC: the set of candidate summary tokens
  • RR: the set of reference summary tokens
  • eci\mathbf{e}_{c_i}: the contextual embedding of candidate token cic_i from BERT (a vector in Rd\mathbb{R}^d)
  • erj\mathbf{e}_{r_j}: the contextual embedding of reference token rjr_j from BERT
  • cos⁡(u,v)=u⋅v∥u∥∥v∥\cos(\mathbf{u}, \mathbf{v}) = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \|\mathbf{v}\|}: cosine similarity between two embedding vectors

The BERTScore F1 combines precision and recall in the standard way. BERTScore better captures semantic equivalence: "vehicle" and "car" would contribute positive similarity even though they never match under ROUGE-N. BERTScore correlates better with human judgments than ROUGE in most evaluations, but it comes with higher computational cost (computing BERT embeddings for every token in every summary and reference) and the additional complexity of choosing which BERT layer and model to use. The choice of BERT model matters because different models produce embeddings with different geometric properties, and the optimal choice varies by domain.

Human Evaluation Criteria

When human evaluation is conducted (typically for research publications or high-stakes applications), evaluators assess multiple dimensions of summary quality:

  • Faithfulness: Does the summary contain only information that can be supported by the source? Unfaithful summaries contain hallucinated facts. This is often the most critical dimension for production applications because users who discover a single false claim may lose trust in the entire system.
  • Relevance: Does the summary cover the most important aspects of the source? A highly faithful but irrelevant summary copies trivial details while omitting the key findings. Relevance is subjective and depends on what the reader needs.
  • Coherence: Is the summary well-organized and logical? Extracted sentences may be individually accurate but collectively incoherent if they come from different parts of the document with no narrative thread connecting them.
  • Fluency: Is the language grammatically correct and natural? Abstractive models sometimes produce disfluent text near their generation length limits, or when copying rare vocabulary from the source.

These dimensions often trade off against each other. Extractive systems score very high on faithfulness (since they copy) but sometimes lower on relevance and coherence. Abstractive systems can score higher on fluency and relevance but are more likely to introduce factual errors. Instruction-tuned LLMs generally score well on fluency and can be guided to prioritize faithfulness with appropriate prompting, but they require careful evaluation in high-stakes settings.

Human evaluation typically uses rating scales (1-5 or 1-7) on each dimension, administered through crowdsourcing platforms or expert panels. The cost ranges from a few cents per judgment on crowdsourcing platforms to hundreds of dollars per page for expert legal or medical review. This cost is why automatic metrics remain dominant in research, even though they are imperfect. For production systems, a practical approach is to use automatic metrics for rapid iteration during development, then conduct targeted human evaluation on a representative sample before deployment.

Implementing ROUGE Evaluation

In[14]:
Code
# Uncomment to install if needed:
# !uv pip install rouge-score

import re
from collections import Counter, namedtuple

RougeScore = namedtuple("RougeScore", ["precision", "recall", "fmeasure"])


def _tokens(text):
    return re.findall(r"\b\w+\b", text.lower())


def _ngram_counts(tokens, n):
    return Counter(tuple(tokens[i : i + n]) for i in range(len(tokens) - n + 1))


def _f_score(overlap, candidate_total, reference_total):
    precision = overlap / candidate_total if candidate_total else 0.0
    recall = overlap / reference_total if reference_total else 0.0
    fmeasure = (
        2 * precision * recall / (precision + recall)
        if precision + recall
        else 0.0
    )
    return RougeScore(precision, recall, fmeasure)


def _lcs_length(a, b):
    prev = [0] * (len(b) + 1)
    for x in a:
        curr = [0]
        for j, y in enumerate(b, start=1):
            curr.append(prev[j - 1] + 1 if x == y else max(prev[j], curr[-1]))
        prev = curr
    return prev[-1]


class SimpleRougeScorer:
    def score(self, reference, candidate):
        ref = _tokens(reference)
        cand = _tokens(candidate)
        scores = {}
        for name, n in [("rouge1", 1), ("rouge2", 2)]:
            ref_counts = _ngram_counts(ref, n)
            cand_counts = _ngram_counts(cand, n)
            overlap = sum(
                min(count, cand_counts[gram])
                for gram, count in ref_counts.items()
            )
            scores[name] = _f_score(
                overlap, sum(cand_counts.values()), sum(ref_counts.values())
            )
        lcs = _lcs_length(cand, ref)
        scores["rougeL"] = _f_score(lcs, len(cand), len(ref))
        return scores


scorer_rouge = SimpleRougeScorer()

# Reference summary (hypothetical human-written)
reference = (
    "Global temperatures have risen 1.1 degrees Celsius since pre-industrial times, "
    "driven by greenhouse gas emissions. Sea levels are rising and extreme "
    "weather events are increasing. Scientists warn that exceeding 2 degrees could "
    "trigger irreversible climate tipping points."
)

extractive_summary = " ".join(summary_sentences)
Out[15]:
Console
ROUGE Scores: Extractive vs Abstractive
=======================================================
Metric                 Extractive                 BART
-------------------------------------------------------
rouge1                     0.3333               0.4819
rouge2                     0.1591               0.2963
rougeL                     0.2889               0.4337

Note: ROUGE scores depend heavily on reference choice.
These scores reflect overlap with one specific reference summary.

ROUGE scores vary substantially based on the reference summary. In this particular single-reference comparison, BART scores higher than TextRank on all three metrics because its generated summary happens to align more closely with the reference wording. Both methods still score lower on ROUGE-2 than on ROUGE-1 or ROUGE-L because exact bigram matches are harder to preserve. A system that produces a summary using nearly identical phrasing to the reference will score very high on ROUGE-2, while a system producing an equally informative but differently worded summary will score lower, even if human judges prefer the latter. This reference-dependency problem is not a bug in ROUGE but an inherent consequence of using a single reference in a task where many valid summaries exist.

The bar chart below visualizes the ROUGE comparison directly, making the extractive-abstractive difference visible.

Out[16]:
Visualization
Grouped bar chart comparing ROUGE-1, ROUGE-2, and ROUGE-L scores for extractive and BART summaries.
ROUGE F1 scores comparing extractive (TextRank) and abstractive (BART) summaries against a single human reference summary. BART scores higher on ROUGE-1, ROUGE-2, and ROUGE-L in this example because its wording aligns more closely with this reference. Both methods score lower on ROUGE-2 than on ROUGE-1 or ROUGE-L, reflecting the stricter requirement for matching contiguous bigrams.