Translation Evaluation Beyond BLEU › Statistical Significance
Language AI HandbookAll chapters Suppose system A scores 31.2 BLEU and system B scores 30.1. Is A better?
The point estimates alone cannot answer that. The variance depends on the sample and on whether both systems succeed or fail on the same items, and a paired analysis preserves those shared items when estimating uncertainty in the metric difference.
Paired bootstrap resampling
The logic: treat the test set as a sample from a larger population of possible segments. Resample segments with replacement, recompute the corpus-level metric for both systems on the same resampled segment indices (this preserves pairing), record the difference, and repeat.
CodeExpand
# Pseudocode for the paired bootstrap
for b in 1..B:
idx = sample_with_replacement(range(n), size=n)
score_A = corpus_metric([A[i] for i in idx], [ref[i] for i in idx])
score_B = corpus_metric([B[i] for i in idx], [ref[i] for i in idx])
deltas[b] = score_A - score_B
# Percentile interval from resamples around the observed difference.
ci = percentile(deltas, [2.5, 97.5])Choose a resampling unit that reflects how the evaluation data were sampled. Resample independent segments for a segment sample. Where segments share document context, resample documents as clusters, keeping the paired system outputs and references together. A percentile interval comes from the observed paired sample. A test based on a p-value requires a well-specified null and a resampling or randomization scheme appropriate to it.
Approximate randomization
Under a null that makes the paired outputs exchangeable, a randomization test swaps the system labels independently within eligible pairs or clusters and recomputes the difference. Compare the observed difference with the resulting null distribution using the pre-specified one- or two-sided alternative. Koehn (2004) describes paired bootstrap resampling for machine translation.
What the tests do not tell you
Three cautions apply when you compare metrics or systems.
- Define what the statistic measures. A reliably positive difference in BLEU can reflect reference phrasing. A translation quality claim needs evidence that the metric captures the relevant quality differences.
- Account for multiple comparisons. Comparing ten systems pairwise yields 45 tests. Pre-specify a primary comparison or account for multiplicity, for example with Holm's procedure.
- Plan around the variation in your sample. A metric gap that is easy to detect on one dataset can be obscured on another. Report the interval and the sampling unit rather than using a universal point threshold.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!