arXiv:2506.01734cs.CL2025-06NeurIPS被引 8

发现大模型生成数字时存在系统性偏差,根源是训练数据中的数字分布不均。

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

  • 通过分析预训练数据中数字频率,发现其符合本福德定律。
  • 开源大模型在七类任务中生成数字时普遍出现与本福德定律相似的偏差。
  • 定位到深层网络中少数特定神经元导致该偏差,修剪后可减轻错误生成。

大型语言模型在复杂推理任务上表现优异,但在基础数值问题上常出错,产生错误输出。受本福德定律启发——即较低数字作为首位出现频率更高——我们推测,网络收集语料库中数字分布的偏斜可能被模型在预训练阶段习得,导致生成时的数值偏差。为验证此假设,我们首先检查了预训练语料库(OLMo2)中数字频率是否符合本福德定律;随后构建了一个评估基准,其中各数值推理任务的真值数字均匀分布。评估结果显示,主流开源大模型在七类任务中表现出一致的数字偏差模式,与本福德定律高度相似。通过对日志概率进行追踪和神经元级剖析,我们发现该偏差主要源于深层网络中少量高度选择性的前馈网络(FFN)神经元。最后,我们证明剪枝这些神经元能缓解过度生成的不平衡现象,并部分纠正错误输出,为细粒度预训练数字偏见传播至模型行为提供了因果证据。研究揭示了语料库统计特征与模型符号性失败模式之间的根本联系,为诊断和缓解数值任务中的幻觉提供了新视角。

原文摘要 · Abstract (English)

Large Language Models (LLMs) exhibit impressive performance on complex reasoning tasks, yet they frequently fail on basic numerical problems, producing incorrect outputs. Inspired by Benford's Law, a statistical pattern in which lower digits occur more frequently as leading digits, we hypothesize that the skewed digit distributions in web-collected corpora may be learned by LLMs during pretraining, leading to biased numerical generation. To investigate the hypothesis, we first examine whether digits frequencies in pretraining corpus (OLMo2) follows Benford's law. We then construct an evaluation benchmark in which the ground-truth digits are uniformly distributed within each of the seven numerical reasoning tasks. Our evaluation results demonstrate that leading open-source LLMs show a consistent pattern of digit bias that resembles Benford's law. Through logit-lens tracing and neuron-level dissection, we identify that this bias arises predominantly from a small subset of highly digit-selective feed-forward network (FFN) neurons in the deeper layers. Finally, we demonstrate that pruning these neurons mitigates imbalanced overgeneration and partially corrects erroneous outputs, providing causal evidence that fine-grained pretraining digit bias can propagate into model behavior. Our findings reveal a fundamental connection between corpus-level statistics and symbolic failure modes in LLMs, offering a new lens for diagnosing and mitigating hallucinations in numerical tasks.

大模型数字偏差本福德定律幻觉诊断

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。