TL;DR
BLEU is a score from 0 to 1 that measures how close a machine-generated text is to one or more human reference texts. It counts the short word sequences (1 to 4 words long) in the output that also appear in a reference, then combines those overlap rates and multiplies by a penalty if the output is too short.
It was built to score machine translation quickly and repeatedly, without a human reading every output. It is still the default number people quote for translation and many text generation tasks, even though it measures surface overlap rather than meaning.
Where you'll see it: in machine translation papers and leaderboards, in evaluating summarisation and image-caption systems, and as a quick regression check while tuning a text generator.
Intuition
Counting shared phrases
Suppose a translator writes a sentence, and a human also writes a reference translation of the same source. A good machine output should use many of the same words in the same order. The simplest test is to count matching single words. That fails quickly: a sentence made of the words "the" and "of" would score well. So BLEU looks at short phrases (the idea behind an N-gram Language Model) as well: pairs of adjacent words, triples, and quadruples.
Matching phrases, not single words, is the key move. If the output says "the cat sat on the mat" and the reference says "the cat sat on the mat", the four-word sequence "cat sat on the" matches. A random jumble of the same words would share single words but almost no phrases, so it scores low. Word order is rewarded without requiring an exact copy.
Why does this matter? A human judge takes minutes per sentence and disagrees with other judges. A metric that takes milliseconds and gives the same answer every time lets researchers try thousands of model settings. BLEU was designed for that trade: it is not a perfect measure of quality, but it moves in the same direction as human judgement when averaged over a whole test set.
- brevity penalty
The math
Setup
Let a candidate be the machine output and let be one or more human references. For each from 1 to 4, an -gram is a run of consecutive words. Let be the total length of the candidate in words and let be the length of the reference closest to . The "closest" choice matters only when there are several references.
Clipped n-gram precision
For each , count how many times each distinct candidate -gram appears in the candidate, and how many times it appears in the most generous single reference. Clip the candidate count at that reference count. This is a modified form of precision:
Clipping stops a degenerate output from gaming the metric. A candidate that says "the the the the the the" against the reference "the cat sat on the mat" has a unigram precision of , not , because "the" appears only twice in the reference.
Combining the orders
BLEU averages the log precisions with equal weights, up to :
The sum of logs is the logarithm of a geometric mean. A geometric mean punishes a single very low precision much more than an arithmetic mean would. If is zero, the whole score is zero, which is why BLEU is unforgiving on short sentences (see the worked examples). The inner exponential undoes the logs, so BLEU is the geometric mean of the four precisions.
Brevity penalty
Precision alone rewards outputs that are short and safe: a single word like "the" might match well. The brevity penalty corrects this:
If the candidate is as long as the reference or longer, there is no penalty. If it is shorter, the score is scaled down by an amount that grows as shrinks relative to . The plot above shows the curve for .
Corpus-level score
The original definition is computed over a whole test set. Clipped counts are summed across all sentences before the precisions are formed, is the total candidate length, and is the sum over sentences of the closest reference length. Summing before dividing means a long sentence with good overlap counts for more than a short one, which is the behaviour you want. Sentence-level BLEU is also used, but it is noisier and needs smoothing when a sentence has no 4-gram matches.
Worked examples
Candidate: "the cat is on the mat". Reference: "the cat sat on the mat". Both have six words, so and .
- Unigrams. Candidate counts: the 2, cat 1, is 1, on 1, mat 1, total 6. Reference counts: the 2, cat 1, sat 1, on 1, mat 1. Clipped matches: the 2, cat 1, on 1, mat 1. "is" does not match. So .
- Bigrams. Candidate has 5: the cat, cat is, is on, on the, the mat. Matches with the reference: the cat, on the, the mat. So .
- Trigrams. Candidate has 4: the cat is, cat is on, is on the, on the mat. Only "on the mat" matches. So .
- Four-grams. Candidate has 3: the cat is on, cat is on the, is on the mat. None appear in the reference, so .
- Combine. The geometric mean includes , which is minus infinity, so the unsmoothed BLEU is exactly 0.
Interpretation: the sentence means nearly the same thing, yet unsmoothed sentence-level BLEU scores it zero. The fourth-order precision is the problem. Corpus-level BLEU avoids this by pooling counts across many sentences, and sentence-level implementations add smoothing, such as adding one to each count, to keep the score informative.
Suppose a test set has a total candidate length words, against a summed closest-reference length . Pooled precisions are , , , .
- Brevity penalty: .
- Log precisions: , , , .
- Average them with weight : .
- Exponentiate: .
- Multiply by the penalty: .
Interpretation: the score is 0.448, usually reported as 44.8 on a 0 to 100 scale. Setting the penalty aside, the geometric mean is 0.517. Lengthening the output to 1600 words, with the same precisions, would remove the penalty and lift the score to about 0.52, which shows how much the brevity term can matter for systems that drop content.
Tradeoffs and failure modes
BLEU is cheap, deterministic and comparable across papers that use the same tokenisation and references. It is weak at the sentence level and blind to meaning, so it should be read as a rough signal, not a verdict.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Judging one sentence | Short sentences give zero 4-gram matches; scores are noisy | Corpus-level BLEU, or a learned metric |
| Paraphrase is correct | A synonym or reordering is penalised as an error | Metrics with synonyms (METEOR) or embeddings (COMET, BERTScore) |
| Comparing systems with different tokenisers | Scores not comparable; punctuation changes the result | Report a standard tokeniser, or use sacreBLEU |
| Open-ended generation such as chat | Many valid answers; overlap says little about quality | Human or model-based evaluation |
| Only one reference | Common phrases match by chance; ceiling is low | Multiple references, when affordable |
Several known pitfalls deserve a mention. Scores depend heavily on tokenisation, so two papers reporting "BLEU 30" may not mean the same thing. Small test sets give high variance. The brevity penalty can be gamed by padding with words that happen to match, though clipping limits how much. Finally, a system tuned to maximise BLEU can drift toward safe, generic phrasing, which is why several studies have questioned how well BLEU tracks human preference at the level of individual systems.
History
BLEU was introduced in 2002 by Kishore Papineni, Salim Roukos, Todd Ward and Wei-Jing Zhu, working at IBM Research, in a paper at the Association for Computational Linguistics conference. Machine translation research at the time relied on slow human judgements, and each new system needed fresh evaluation. The authors proposed an automatic score that correlated with human ratings over a corpus, so that research cycles could be shorter.
It caught on quickly because it made shared tasks and leaderboards possible. Once many groups used the same metric, progress became measurable, and BLEU became the standard reported number in translation papers for more than a decade. In 2006, Chris Callison-Burch and colleagues examined where BLEU's correlation with human judgement breaks down, and the field has since added complementary metrics. The details of which variant and tokeniser a paper used matter, which is why tools that standardise them are now common.
Check yourself
QuestionWhy does BLEU clip the count of each candidate n-gram at its maximum count in the reference?Show answer
Without clipping, a candidate that repeats a common word would score high even if the word appears only once in the reference. For example, "the the the the the the" against "the cat sat on the mat" would get a unigram precision of 6/6. Clipping limits each matched n-gram to the number of times it appears in the reference, so the output gets credit only for as many occurrences as a human would have written. Here it scores instead.
QuestionA candidate has length and the closest reference has length . What is the brevity penalty? Give the number to three decimal places.Show answer
Since , . Interpretation: the score is multiplied by about 0.78, a 22 percent cut, purely for being two words short. The penalty stops a system from raising precision by just outputting its most confident words.
QuestionWhy is the BLEU combination a geometric mean of the precisions rather than an arithmetic mean? What does this imply for short sentences?Show answer
A geometric mean is the exponential of the average of logs. Because the log of a small number is very negative, one low precision pulls the whole average down strongly. An arithmetic mean would let high precisions compensate for a low one. The consequence is that a sentence with no 4-gram matches gets a score of exactly zero without smoothing, so sentence-level BLEU is unreliable on short texts, and corpus-level pooling is preferred.
QuestionA translation system outputs fluent, correct sentences that use synonyms the single reference does not contain. Why might its BLEU score be low, and what would you do before concluding the system is poor?Show answer
BLEU counts exact word sequences, so each synonym breaks every n-gram that contains it, lowering all four precisions even though the meaning is right. Before concluding the system is poor, add references if possible, check tokenisation and length, look at the brevity penalty, and run a complementary metric or a human evaluation on a sample. The low score is evidence about the metric's blind spot as much as about the system.