NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Benford’s Curse: Tracing Digit Bias to Numerical Hallucination in LLMs

Jiandong Shao, Yao Lu, Jianfei Yang

Large Language Models (LLMs) often exhibit impressive capabilities in complex reasoning, yet they frequently stumble on basic numerical problems. This phenomenon, often termed "numerical hallucination," has traditionally been blamed on poor reasoning or tokenization issues. However, new research uncovers a more fundamental culprit: pretraining data bias, specifically a phenomenon the authors dub "Benford’s Curse."

LLMs systematically over-generate smaller digits (like 1 and 2) because they internalize the skewed statistical distributions of their pretraining data. By identifying and pruning a tiny fraction of "digit-biased" neurons, researchers causally proved this bias drives numerical errors and demonstrated a method to partially correct them.

The Root Cause: Pretraining Data Bias

In the real world, numbers are not distributed uniformly. Benford’s Law dictates that in many naturally occurring datasets, the leading digit is much more likely to be a "1" (around 30%) than a "9" (less than 5%). The authors hypothesized that LLMs internalize this logarithmic distribution during pretraining.

Comparison of the OLMo2 pretraining corpus digit distribution against Benford's Law predictions

To test this, they analyzed the 22.4TB OLMo-mix-1124 pretraining corpus and found that its digit distribution matched Benford’s Law with a striking Pearson correlation of r = 0.949. Consequently, when a model is uncertain about a math problem, it defaults to its "statistical comfort zone"—predicting smaller digits simply because they appeared more frequently during training.

Methodology: Tracing the Bias

To move from observation to causal proof, the researchers developed a new diagnostic suite called the Digit Bias Benchmark. This benchmark comprises seven tasks (such as Addition, Multiplication, and Sequence Completion) where the ground-truth answers are strictly uniformly distributed (each digit 0–9 appears ~10% of the time). This ensured any observed skew was internal to the model.

They then employed a multi-stage analytical approach:

  • Logit Lens Tracing: Projecting intermediate hidden states into the vocabulary space to observe how digit preferences evolve layer-by-layer.
  • Digit Selectivity Score (DSC): A novel metric to quantify how strongly a specific hidden vector or neuron prefers one digit over others.
  • Component Dissection: Disentangling Self-Attention and Feed-Forward Networks (FFNs) to locate the exact source of the bias.

Key Findings: The "First Error" and Over-generation

The evaluation revealed a consistent over-generation of small digits across leading open-source models (including Llama, Mistral, and Qwen). For instance, despite a 10% uniform target in the benchmark, models generated the digit "1" at significantly higher rates.

Model output proportions showing a massive spike for the digit 1 compared to the uniform ground truth

A fascinating discovery was the "First Error" Phenomenon. When a model makes a numerical mistake (e.g., predicting 714 instead of 758), the first diverging digit is overwhelmingly likely to be a smaller number, mirroring Benford's Law. This suggests the bias acts as a gravitational pull, dragging the model off the correct reasoning path.

Furthermore, the logit lens revealed that this bias is a "deep" problem. It is absent in early layers but emerges and amplifies in the final layers. The study pinpointed FFN neurons as the primary culprits, acting as "key-value memories" that store training data frequencies. The model dedicates significantly more representational space to the digit "1" than to "7" or "9."

Causal Correction and Future Directions

To establish causality, the researchers identified the top 0.01% of FFN neurons most selective for the digit "1" and pruned (suppressed) them during generation. This lightweight intervention successfully reduced the over-generation of "1" and corrected previously erroneous outputs. On standard benchmarks like GSM8k, this pruning corrected 2.35% of Llama2-7B’s errors and 2.12% of Qwen2.5-7B’s errors, proving that fine-grained digit bias mechanistically contributes to hallucination.

While promising, pruning is a blunt instrument that can occasionally disrupt correct reasoning paths. Future work must explore whether massive models (like GPT-4 or Llama-3-70B) overcome this curse through scale, how Mixture-of-Experts (MoE) architectures handle digit bias, and whether balancing digit distributions during the pretraining phase itself is the ultimate cure.

Summary updated

BibTeX
@inproceedings{shao2025benfords,
  author = {Jiandong Shao and Yao Lu and Jianfei Yang},
  title = {{Benford’s Curse: Tracing Digit Bias to Numerical Hallucination in LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=AOe1aUhEQQ},
}
Figure