๐Ÿ”ฅLimited Offer: Get 50% OFFon AI & Full Stack Courses๐Ÿ”ฅ
Back to Deep Learning Notes
Topic #156

ROUGE Score

The ROUGE score (Recall-Oriented Understudy for Gisting Evaluation) is BLEU's counterpart for text summarization โ€” where the priority flips from "did the generated text avoid adding wrong words" (precision) to "did the generated text capture the important content from the reference" (recall).

ROUGE-N: N-gram Recall

\[ \text{ROUGE-N} = \frac{\text{Number of overlapping n-grams}}{\text{Number of n-grams in the reference}} \]

Notice the denominator: unlike BLEU's precision (which divides by n-grams in the generated text), ROUGE-N divides by n-grams in the reference text โ€” directly measuring how much of the reference's content the generated summary successfully captured, which is exactly the priority for summarization (where missing important content is a bigger concern than including a few extra words).

ROUGE-L: Longest Common Subsequence

ROUGE-L instead measures the length of the longest common subsequence (LCS) between generated and reference text โ€” a sequence of words appearing in the same relative order in both texts, though not necessarily contiguously. This captures sentence-level structural similarity in a way that's more flexible than requiring exact contiguous n-gram matches.

Numerical Example (ROUGE-1, Unigram Recall)

Reference summary: "the company reported strong quarterly earnings." Generated summary: "company reported earnings." Unigram overlap: "company," "reported," "earnings" โ€” 3 words. Reference has 6 words total.

\[ \text{ROUGE-1 (recall)} = \frac{3}{6} = 0.5 \]

In practice, ROUGE is usually reported alongside a corresponding precision and F1 score too, not recall alone โ€” giving a fuller picture, similar to how classification metrics pair precision and recall (see Precision & Recall).

Code

from rouge_score import rouge_scorer

scorer = rouge_scorer.RougeScorer(['rouge1', 'rougeL'], use_stemmer=True)
scores = scorer.score(
    "the company reported strong quarterly earnings",
    "company reported earnings"
)
print(scores)   # includes precision, recall, and F1 for each ROUGE variant

BLEU vs ROUGE โ€” Why the Emphasis Differs

BLEUROUGE
Primary emphasisPrecision (did the generated text avoid wrong content?)Recall (did the generated text capture the reference's content?)
Typical taskMachine translationText summarization
Why the different emphasisA wrong or extra word in a translation is a clear errorMissing important content in a summary is usually a bigger concern than including a few extra words

Common Mistakes

  • Using BLEU for summarization or ROUGE for translation without understanding why each metric emphasizes precision or recall differently โ€” the choice of metric should match which type of error matters more for the specific task.
  • Treating ROUGE (or BLEU) scores as capturing factual correctness โ€” both are purely surface-level text overlap metrics and say nothing about whether a summary is factually accurate to the source document.

Interview Relevance

Q: "Why does ROUGE emphasize recall while BLEU emphasizes precision?" Summarization's key failure mode is missing important content from the source โ€” recall directly measures how much of the reference's content the summary captured. Translation's key failure mode is producing incorrect or extraneous content โ€” precision directly measures how much of the generated text is actually correct relative to the reference. Each metric's emphasis matches the error type most relevant to its target task.

Practice Question

Reference: "the stock market fell sharply today." Generated: "stock market fell today amid concerns." Compute ROUGE-1 recall (fraction of the reference's 6 words that appear in the generated text).

Want to go beyond the notes?

Join CodingNow 2.0's Deep Learning course โ€” live mentorship, real projects, and 100% placement support.

Enroll Now โ€” Free Demo Available

ROUGE Score โ€“ FAQs

Quick answers about learning ROUGE Score in Deep Learning.

This free note from CodingNow 2.0 explains ROUGE Score in Deep Learning โ€” concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every Deep Learning topic on CodingNow 2.0, including ROUGE Score, is 100% free with no signup required.
With focused practice, most students grasp ROUGE Score in 1โ€“3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) โ€” expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now