Accuracy and Normalized Accuracy under Length Bias: Analysis, Guidelines, and a Bayesian Alternative

Koen Oostermeijer

Evaluating Large Language Models (LLMs) often feels like a moving target. One of the most common methods for benchmarking models—ranking multiple-choice answers by their conditional log-probability—turns out to have a significant, hidden flaw: it is deeply biased by the length of the candidate answers.

In a recent paper, researchers analyze why current heuristics to fix this bias often make the problem worse. To resolve this, they propose an elegant, compute-free alternative called Bayesian accuracy, which acts as a drop-in replacement for standard likelihood-based evaluation.

The Problem: The "Goldilocks" Dilemma of Length Bias

When evaluating an LLM on standard benchmarks like MMLU or HellaSwag, researchers typically provide a prompt alongside a few candidate completions. The model's conditional log-probability for each candidate is calculated, and the highest-scoring candidate is selected as the model's prediction.

However, log-probabilities are inherently additive. Because every token carries some level of uncertainty, longer completions naturally accumulate more negative log-probability. As a result, longer answers look "less likely" to the model simply because they contain more tokens, unfairly penalizing them.

To combat this, a common mitigation is length normalization—dividing the total log-probability by the number of tokens or bytes. Yet, the authors demonstrate empirically that this is a blunt instrument that frequently over-corrects. Normalization often flips the bias entirely, leading models to disproportionately prefer longer, wordier answers. This creates a frustrating "Goldilocks" problem: standard accuracy prefers short answers, normalized accuracy prefers long ones, and neither metric truly reflects the model's underlying knowledge.

The Root Cause: The First-Token Penalty

To understand why normalization fails, the authors quantified length bias using Kendall’s rank correlation coefficient ($\tau$). A negative $\tau$ indicates a bias toward short answers, while a positive $\tau$ indicates a bias toward long ones.

By analyzing multiple models and datasets, they observed that log-likelihood decreases approximately linearly with completion length, following the formula $a + bn$. Crucially, they identified a "positive intercept" ($a$): the first token of a completion is usually much harder to predict than subsequent tokens, which benefit from the immediate context of that first token.

Simple length normalization assumes the penalty per token is constant and starts from zero. Because it ignores the disproportionate difficulty of the first token, dividing by total length severely over-penalizes short answers.

The Solution: Bayesian Accuracy

Motivated by this linear trend observation, the authors introduce Bayesian accuracy. Instead of dividing by length, they propose subtracting the linear length trend. By treating the evaluation as a Bayesian posterior calculation, they derive the following scoring rule:

$$S_{Bayes} = \log P(c|x) - bn$$

Here, $b$ acts as a learned "length decay factor." This effectively functions as an explicit, exponential prior over answer lengths that neutralizes the model's inherent length bias.

Crucially, this decay factor $b$ is estimated using within-prompt variation. By examining how scores change relative to length within the same question, the method avoids confounding the data with the varying difficulty levels of different questions.

Experimental Setup and Key Findings

The authors evaluated Bayesian accuracy across a diverse suite of standard multiple-choice benchmarks, including Reasoning & Science (ARC, SciQ, OpenbookQA), Commonsense (HellaSwag, WinoGrande), and General Knowledge (MMLU). They tested open-weight models ranging from 135M to 70B parameters, including the LLaMA, Qwen, Mistral, Pythia, and SmolLM families.

Key insights and results include:

  • Massive Bias Reduction: Bayesian accuracy consistently achieved a Kendall $\tau$ near zero ($|\tau| \le 0.1$) across almost all benchmarks. It reduced length bias by 4x–8x compared to standard length normalization.
  • Superiority Over Baselines: The method significantly outperformed more complex, computationally expensive metrics like Pointwise Mutual Information (PMI) and Asymmetric Normalized PMI (ANPMI).
  • Compute Efficiency: Unlike PMI, Bayesian accuracy requires no additional forward passes. It can be calculated using the exact same log-probabilities already generated during standard evaluation.
  • The "Locally Determined" Exception: The authors noted that standard (unnormalized) accuracy is actually safe to use in highly specific cases—such as MMLU Full-Text—where the first one or two tokens effectively "fix" the answer identity, and the remainder of the completion merely copies text already present in the prompt.

Limitations and Future Work

While Bayesian accuracy is a powerful tool for eliminating length artifacts, it is not a panacea for all evaluation woes. The authors note that it specifically targets length bias; it does not remove other model biases, such as preferences for frequent words, specific phrases, or certain syntactic structures. Furthermore, the decay factor $b$ must be estimated per model and dataset pair, though the authors provide a computationally cheap algorithm to do so.

Finally, this work focuses on making multiple-choice evaluation more statistically sound, leaving open the broader debate over whether multiple-choice performance accurately correlates with a model's real-world generative capabilities.

For researchers and practitioners looking for a more robust way to report benchmark results without the noise of length bias, Bayesian accuracy offers a statistically grounded, highly efficient drop-in solution.

Summary updated

BibTeX
@inproceedings{oostermeijer2026accuracy,
  author = {Koen Oostermeijer},
  title = {{Accuracy and Normalized Accuracy under Length Bias: Analysis, Guidelines, and a Bayesian Alternative}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=SbSFZ9N6DN},
}
Figure