Why is evaluation hard?
In classification there is one correct answer. In generation there are many correct translations and summaries with different wording. Every automatic metric approximates a human judgment of several aspects: adequacy, fluency, faithfulness to the source, and style.
BLEU
Papineni et al. (2002) proposed BLEU for machine translation. It is based on the modified precision of n-grams (n = 1..4) between the candidate translation and the references, with clipped counts: a word is not counted more times than the maximum number of times it appears in any reference.
Because precision alone rewards short translations, a brevity penalty is added:
where c is the candidate length and r the reference length (at the corpus level).
A small example
- Reference: «ذهب الطالب إلى المكتبة صباحا» (the student went to the library in the morning; 5 words)
- Candidate: «ذهب الطالب الى المكتبة» (4 words, without the hamza in «الى»)
- Unigrams: ذهب ✓, الطالب ✓, الى ✗, المكتبة ✓ → p_1 = 3/4.
- Bigrams: (ذهب الطالب) ✓, (الطالب الى) ✗, (الى المكتبة) ✗ → p_2 = 1/3.
- Trigrams: no match → p_3 = 0, so BLEU becomes zero at the sentence level.
The example shows two things: (1) BLEU is designed for the corpus level, not the sentence level (it needs smoothing at the sentence level), and (2) a small spelling difference (the hamza) broke the match, so normalization strongly affects BLEU in Arabic. If we normalized the hamza, we would get p_1 = 4/4, p_2 = 3/3, p_3 = 2/2 and p_4 = 1/1, and BLEU = BP = e^{1 - 5/4} \approx 0.78.
Reporting BLEU clearly
Post (2018) showed that BLEU numbers in papers are often not comparable because tokenization and normalization differ, and proposed SacreBLEU, which computes the metric in a standard way and prints a "signature" describing the settings. Always use it and report the signature.
chrF
Popović (2015) proposed chrF: an F-score over character n-grams (usually up to 6):
with \beta = 2 (weighting recall). Because it works at the character level, “والكتاب” gets partial credit against “الكتاب”, so it correlates with human judgments better than BLEU in morphologically rich languages such as Arabic. chrF++ adds word unigrams and bigrams.
ROUGE
Lin (2004) designed ROUGE for summarization; it is recall-oriented:
- ROUGE-N: the recall of the reference n-grams in the generated summary (ROUGE-1, ROUGE-2).
- ROUGE-L: based on the longest common subsequence (LCS) between the candidate and the reference, so it rewards order without requiring adjacency.
A note for Arabic: the original ROUGE packages are built for English and may drop non-Latin characters during tokenization if not configured, giving meaningless numbers. Make sure the tokenizer handles Arabic, and apply the same normalization to the candidate and the reference.
Learned metrics
- BERTScore (Zhang et al., 2020): matches each token in the candidate to the closest token in the reference using contextual representations and cosine, so it rewards synonyms and paraphrases. A multilingual or Arabic model is used for Arabic.
- COMET (Rei et al., 2020): a model trained on human judgments of translation, taking the source, the candidate and the reference. It correlates clearly better with human judgment than BLEU, but it inherits the biases of its training data, and its performance depends on its coverage of the language pair.
Perplexity
Suitable for evaluating the language model itself, not its outputs. Only compare models with the same vocabulary.
Human evaluation
The most important reference, but it needs design:
- Clear criteria: adequacy, fluency and faithfulness, each separately, on a defined scale (e.g. 1–5 with descriptions for each score) or pairwise comparisons (which of the two outputs is better?), which are more consistent.
- Blind evaluation: the rater does not know which system produced the text, and the display order is random.
- Qualified raters (native speakers, and from the relevant dialect when needed).
- Inter-rater agreement: compute and report kappa or Krippendorff's alpha.
- A sufficient sample size and a significance test.
Selection summary
| Task | Suggested automatic metrics | Notes |
|---|---|---|
| Translation into Arabic | chrF, COMET, and BLEU via SacreBLEU for historical comparison | Normalize carefully and report the settings |
| Summarisation | ROUGE-1/2/L with an Arabic tokenizer, BERTScore, and a faithfulness check | An abstractive summary may be correct with different words |
| Dialogue and assistants | Human evaluation, or an "LLM judge" with human verification | See the lesson on evaluating large models |
