AI Logic

Evaluation Metrics

METEOR

Updated

Computing METEOR. Left: the words of the reference "the kids played happily in a park" and the candidate "in a park children were happily playing" are linked in three stages (exact match, same stem, synonym), and adjacent matches on the candidate side are grouped into 4 chunks. Right: from precision 6/7 and recall 6/7, Fmean 0.857 and the penalty 0.5 × (4/6)³ = 0.148 are computed, giving METEOR 0.730

Background and overview

METEOR is an evaluation metric that aligns the words of a machine translation output (the candidate) one to one with those of a human translation (the reference), and computes a number between 0 and 1 from the fraction of aligned words and how scrambled their order is. The closer to 1, the closer the translation is to the reference.

Score=Fmean⋅(1−Penalty),Fmean=10PRR+9P,Penalty=0.5(number of chunksnumber of matched words)3\mathrm{Score} = F_{\mathrm{mean}} \cdot (1 - \mathrm{Penalty}), \quad F_{\mathrm{mean}} = \frac{10 P R}{R + 9 P}, \quad \mathrm{Penalty} = 0.5 \left( \frac{\text{number of chunks}}{\text{number of matched words}} \right)^3

PP is the fraction of candidate words that are aligned (precision), and RR is the fraction of reference words that are aligned (recall). FmeanF_{\mathrm{mean}} is a harmonic mean that weights recall more heavily, and the penalty grows the more the aligned words are scattered.

METEOR was proposed in 2005 by Banerjee and Lavie at Carnegie Mellon University. The name stands for Metric for Evaluation of Translation with Explicit ORdering. It was designed to directly address the weaknesses of BLEU, which was widely used at the time. The paper lists four weaknesses of BLEU: it does not use recall; it measures grammaticality only indirectly through longer n-grams; it does not explicitly align words; and because it uses a geometric mean, a zero match for any one n-gram order makes the whole score zero, so sentence-level values become meaningless.

Definition and computation

METEOR is computed for one candidate-reference pair in the following steps.

  1. Align words stage by stage. By default, the first stage aligns words with identical surface forms, the second stage aligns words with the same stem (Porter stemming; e.g. computers and computer), and the third stage aligns synonyms (words in the same WordNet synonym set). Words aligned in an earlier stage are not used in later stages.
  2. In each stage, choose as many alignments as possible under the constraint that each word aligns with at most one word on the other side. When several choices give the same number, choose the one with the fewest crossing lines when the two sentences are written one above the other and the alignments are drawn as lines.
  3. From the number of aligned words, compute precision PP (divided by the number of candidate words) and recall RR (divided by the number of reference words), then compute Fmean=10PR/(R+9P)F_{\mathrm{mean}} = 10PR/(R + 9P). This is the harmonic mean of PP and 9R9R, which emphasizes recall.
  4. Group the aligned candidate words into as few chunks as possible, where each chunk is a run of words adjacent both in the candidate and in the reference. If the whole sentence matches exactly, there is one chunk; if no two or more consecutive words match, there are as many chunks as aligned words.
  5. Compute the penalty 0.5×(number of chunks/number of matched words)30.5 \times (\text{number of chunks} / \text{number of matched words})^3 and take Fmean×(1−Penalty)F_{\mathrm{mean}} \times (1 - \mathrm{Penalty}) as the score. The penalty is at most 0.5, so even a completely scrambled word order only halves FmeanF_{\mathrm{mean}} at most.
  6. When there are several references, compute the score against each and take the highest as the sentence's value.

In the paper's example, the candidate "the president spoke to the audience" and the reference "the president then spoke to the audience" form two chunks: "the president" and "spoke to the audience".

In the example in the figure at the top, 6 of the 7 candidate words are aligned (4 exact matches, "playing" and "played" with the same stem, and the synonyms "children" and "kids"), so P=R=6/7P = R = 6/7 and Fmean=0.857F_{\mathrm{mean}} = 0.857. Because the word order is rearranged, the alignments split into 4 chunks, the penalty is 0.5×(4/6)3=0.1480.5 \times (4/6)^3 = 0.148, and METEOR is 0.730.

The penalty measures "correct word order", which BLEU measured indirectly through matches of longer n-grams, directly by the number of chunks. Even with the same words, the more scattered their order, the more chunks there are and the lower the value.

What it measures and its limitations

METEOR measures a value centered on how much of the reference's content is captured (recall), counting word alignments that include near-paraphrase matches, and discounted by the correctness of word order. Based on the results of earlier work (Lavie et al. 2004), the paper argues that recall matters more than precision for high correlation with human judgments. The stem and synonym alignments let words with different surface forms but the same meaning count as matches.

METEOR also has the following limitations.

  • It needs language-specific tools: the stemmer and the synonym dictionary (WordNet) are for English. For other languages, only the exact-match stage can be used unless tools for that language are available.
  • Synonym matching is coarse: the paper itself describes the WordNet synonym matching as a simple form of synonym detection that does not distinguish word senses. Depending on the context, words that are not synonyms can also match.
  • The weights in the formula were chosen empirically: the weight in FmeanF_{\mathrm{mean}} (9×) and the 0.5 and cube in the penalty were set by hand after trials on development data and were not optimized. The improved version of 2007 (Lavie and Agarwal) turned them into tunable parameters α\alpha, ÎČ\beta and Îł\gamma and retrained them to maximize correlation with human judgments.
  • It is more expensive to compute than BLEU: word alignment and crossing minimization take more time than simply counting n-grams.

"METEOR" values change with the version and implementation. The values differ depending on whether the original paper's weights (the same as NLTK's meteor_score defaults α=0.9\alpha = 0.9, ÎČ=3\beta = 3, Îł=0.5\gamma = 0.5) or the weights tuned in 2007 and later are used, and on how the alignment stages are configured (whether the synonym stage is used). NLTK's implementation also selects alignments sequentially, which differs in detail from the paper's crossing minimization. When comparing with prior work, use the same implementation and version and state them explicitly.

Validation in the original paper

The paper used the TIDES 2003 translation evaluation data released by LDC for Arabic→English (664 sentences) and Chinese→English (920 sentences). Each sentence has 4 references, and each translation was rated by 2 judges for adequacy and fluency on a 1–5 scale. The paper took the average as the human score and examined the correlation.

At the system level (7 Chinese→English systems), the Pearson correlation coefficients with human judgments were as follows.

MetricCorrelation coefficient
BLEU0.817
NIST0.892
Precision0.752
Recall0.941
F1 (harmonic mean of precision and recall)0.948
FmeanF_{\mathrm{mean}} (recall-weighted)0.952
METEOR0.964

Recall alone far exceeded BLEU and NIST, and the correlation rose a little with each step: adding precision, weighting recall more heavily, and applying the word-order penalty.

The paper's main goal was sentence-level evaluation. Computing the sentence-level correlation for each system and averaging, METEOR scored 0.347 for Arabic and 0.331 for Chinese (precision 0.287 and 0.286, recall 0.334 and 0.320). A comparison of alignment stages showed that the correlation rose as the stem and synonym stages were added, as follows.

Alignment stagesArabicChinese
Exact match only0.3120.293
Exact match, stem (Porter)0.3290.318
Exact match, stem (WordNet base form)0.3300.312
Exact match, stem (Porter), synonym0.3470.331

Against human scores corrected for rater variability (normalization by MITRE), the correlation rose to 0.403 for Arabic and 0.365 for Chinese. The paper notes that noise in the human judgments themselves lowers the correlation.

Where it is used

METEOR is mainly used in the following settings.

  • Evaluating machine translation: it is used alongside BLEU, especially for sentence-level evaluation and for translations that include paraphrases.
  • Text generation with English output in general: stemmers and synonym dictionaries are readily available for English, so it is an easy metric to use for tasks whose output is English.

Comparison with similar metrics

The table compares METEOR with other metrics used to evaluate text generation from the same viewpoints.

MetricUnit of comparisonPrecision / recallRobustness to paraphraseWord orderExtra tools
METEORWord alignmentBoth (recall-weighted)Fairly strong (stems and synonyms also match)Penalty by number of chunksStemmer, synonym dictionary
BLEUWord n-grams (1–4)Precision + brevity penaltyWeak (surface matches only)Matches of longer n-gramsTokenization
chrFCharacter n-grams (1–6)Both (F-measure)Somewhat strong (robust to inflection)Matches of longer character n-gramsNone
ROUGEWord n-grams, longest common subsequenceMainly recallWeakLongest common subsequenceTokenization
BERTScoreSimilarity of embedding vectorsBoth (F-measure)Strong (looks at semantic similarity)Indirectly through contextPretrained language model

Rough guidelines for choosing:

  • Comparing with prior work on translation benchmarks: use BLEU as the main metric, and add METEOR to complement sentence-level evaluation and paraphrase evaluation.
  • Output in languages other than English: stemmers and synonym tools are often unavailable, so the language-independent chrF is an easy choice.
  • Evaluating paraphrases more broadly: also use BERTScore, which looks at semantic similarity beyond word-level synonyms.

PyTorch example

Show code
python
def meteor(hyp, ref, synonyms=()):
  """METEOR of Banerjee & Lavie (2005) (one sentence, one reference). hyp and ref are lists of words.
  Alignment stage 1: exact match, stage 2: synonym pairs (synonyms). A small implementation that omits the stem stage.
  In each stage, words not yet aligned are aligned one to one from left to right (the paper's crossing minimization is omitted)."""
  pairs = {}  # candidate position -> reference position
  used = set()
  stages = [lambda a, b: a == b,
            lambda a, b: any(a in s and b in s for s in synonyms)]
  for same in stages:
    for i, w in enumerate(hyp):
      if i in pairs:
        continue
      for j, v in enumerate(ref):
        if j not in used and same(w, v):
          pairs[i] = j
          used.add(j)
          break
  m = len(pairs)
  if m == 0:
    return 0.0
  P, R = m / len(hyp), m / len(ref)
  fmean = 10 * P * R / (R + 9 * P)
  # chunks: runs of alignments adjacent in the candidate and also adjacent in the reference
  idx = sorted(pairs)
  chunks = 1 + sum(1 for a, b in zip(idx, idx[1:]) if b != a + 1 or pairs[b] != pairs[a] + 1)
  penalty = 0.5 * (chunks / m) ** 3
  return fmean * (1 - penalty)


ref = "the president then spoke to the audience".split()
hyp = "the president spoke to the audience".split()
print(round(meteor(hyp, ref), 4))  # 2 chunks (the president / spoke to the audience)

# With NLTK (requires the WordNet data: nltk.download("wordnet")). Inputs are lists of tokenized words.
# The defaults alpha=0.9, beta=3, gamma=0.5 match the original paper's formula (10PR/(R+9P), 0.5 × (chunks/matches)^3)
from nltk.translate.meteor_score import meteor_score

print(meteor_score([ref], hyp))  # for multiple references, pass [ref1, ref2, ...]; returns the highest value

FAQ

Q. Should I use METEOR or BLEU?
A.

For comparison with prior work, BLEU, which most papers report, is the baseline. METEOR handles recall and word order explicitly and also counts stem and synonym matches, so it suits sentence-level evaluation and translations with many paraphrases. In the original paper's system-level experiment, the correlation with human judgments was 0.964 for METEOR versus 0.817 for BLEU. Reporting both side by side is a common practice.

Q. Can METEOR be used for Japanese translation?
A.

Not effectively as is, because the original paper's stemmer (Porter) and synonym dictionary (WordNet) are for English. For Japanese, only the exact-match stage can be used after word segmentation, and METEOR loses its strengths. For Japanese translation, chrF, which does not depend on word segmentation, and BERTScore, which uses a multilingual language model, are commonly used.

Q. Why is the penalty at most 0.5?
A.

The penalty coefficient is set to 0.5 so that a scrambled word order alone cannot bring the score to 0. When the number of chunks equals the number of aligned words (no match of two or more consecutive words), the penalty reaches its maximum 0.5×13=0.50.5 \times 1^3 = 0.5, halving FmeanF_{\mathrm{mean}}. The 0.5 and the cube were chosen through trials on development data, and the improved 2007 version made them tunable to match human judgments.

References

  1. Banerjee, S., & Lavie, A. (2005). METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments. Proceedings of the ACL Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, 65–72.
  2. Lavie, A., & Agarwal, A. (2007). METEOR: An Automatic Metric for MT Evaluation with High Levels of Correlation with Human Judgments. Proceedings of the Second Workshop on Statistical Machine Translation, 228–231.
  3. NLTK. nltk.translate.meteor_score (source code).