Evaluation, diagnostics, benchmarks, and additional tests · Evaluation, diagnostics, benchmarks, and additional hypothesis tests · EVA032 · Metric
ROUGE family
Evaluates reference overlap for summaries using n-grams, longest common subsequences, and related variants.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page.
- Generated-text metrics (BLEU, chrF, ROUGE) Verified in Python and R
Do it in CodeSplash Run it on your own data, in Python or R.
- Availability
- Runs in CodeSplash
- Code example
- Complete calculation
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through evaluate.text. The reference's example ran here in one language.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Evaluates reference overlap for summaries using n-grams, longest common subsequences, and related variants.
Question / hypotheses
How much reference content is recovered in the candidate summary under the selected overlap rule?
Architecture / computational structure
A fixed scoring/calibration pipeline applied to model outputs or supplied observations; the formula and usage sections identify its operations.
Assumptions
Declare variant, stemming, sentence segmentation, tokenization, and precision/recall/F-score choice. Multiple references and corpus aggregation affect results.
Formula / computational definition
Parameters and notation
g is an n-gram; ROUGE-L uses longest-common-subsequence matches. Variant and beta/aggregation settings are hyperparameters, with no learned metric parameters.
Fitting, fine-tuning, and adaptation
There is no model fine-tuning step for this evaluation procedure. Freeze the evaluated systems and evaluator before the final test. Select evaluation settings on development data; if a learned evaluator or calibration model is adapted, use separate fitting data, version it, and reassess its validity.
How to use and calibrate
Report specific variants and implementation settings, then inspect hallucinations, omitted critical facts, and redundancy. Bootstrap entire documents for paired comparisons.
Example application
Compare abstractive summarizers against human reference summaries.
Interpretation / pitfalls
Watch out
Word overlap does not establish factual consistency. Long summaries can increase recall without being better. ROUGE-L and ROUGE-Lsum use different sentence-level conventions.
Python and R code examples
Scope: Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
Validation: Python — Executed successfully on synthetic inputs. R — reviewed but not executed in this environment. Python dependencies are explicit imports; R uses base R unless a package/bridge is explicitly named.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
from collections import Counter
ref=Counter("the red cat sat".split()); hyp=Counter("the cat sat".split())
overlap=sum((ref&hyp).values()); print("ROUGE-1 recall",overlap/sum(ref.values()))
Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.
ref <- table(strsplit("the red cat sat"," ")[[1]]); hyp <- table(strsplit("the cat sat"," ")[[1]])
words <- union(names(ref),names(hyp)); a <- ref[words]; b <- hyp[words]; a[is.na(a)] <- 0; b[is.na(b)] <- 0
print(sum(pmin(a,b))/sum(a))
Sources
- Source 1aclanthology.org
- Source 2github.com
From the CodeSplash reference, entry EVA032.