arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.11966cs.CLcs.AIcs.LGstat.ML
收藏

对语言模型熵校准的研究

On the Entropy Calibration of Language Models

Stanford University(斯坦福大学)

Steven Cao, Gregory Valiant, Percy Liang

AI总结:

本文研究了语言模型的熵校准问题,发现随着模型规模增大,校准误差缓慢改善,但截断方法会增加对数损失,理论证明在假设可预测文本熵的情况下,可以减少熵而不增加对数损失。

摘要:

我们研究了熵校准问题,即语言模型生成的熵是否与其对人类文本的对数损失相匹配。以往的研究发现,模型存在校准错误,随着生成文本变长,每步的熵增加,这是由于误差积累所致。为了校准模型并提高文本质量,人们通常采用截断分布的方法,但这种方法会降低输出多样性,而我们希望避免这种损失。因此,在本文中,我们提出问题:校准错误是否能随着规模的扩大而自动改善?如果不能,是否有可能在不产生损失的情况下进行校准?为了建立直观,我们首先研究了一个简化的理论环境,以表征校准错误随数据集大小的变化情况。我们发现,校准错误的速率取决于数据分布的幂律指数——特别是,对于接近1的幂律指数,缩放指数接近0,这意味着校准错误随着规模的扩大而缓慢改善。接下来,我们在从0.5B到70B参数的语言模型中经验性地测量了校准误差。我们发现观测到的缩放行为与理论预测相似:我们拟合的文本缩放指数接近0,这意味着较大的模型积累误差的速度与较小的模型相似。这种缩放(或缺乏缩放)为为什么我们从较大的模型中采样时使用与较小模型相似的截断量提供了一个解释,尽管较大的模型质量更高。然而,截断不是一个令人满意的解决方案,因为它会增加对数损失。在理论上,是否有可能在不增加对数损失的情况下减少熵?我们证明这是可能的,如果假设可以访问一个黑箱,可以拟合模型以预测文本的未来熵。

英文摘要:

We study the problem of entropy calibration, which asks whether a language model's entropy over generations matches its log loss on human text. Past work found that models are miscalibrated, with entropy per step increasing as generations grow longer, due to error accumulation. To calibrate the model and improve text quality, it has become standard practice to truncate the distribution, but this approach reduces output diversity, which we would like to avoid. Therefore, in this paper, we ask: does miscalibration improve automatically with scale, and if not, is it theoretically possible to calibrate without tradeoffs? To build intuition, we first study a simplified theoretical setting to characterize the scaling behavior of miscalibration with respect to dataset size. We find that the rate of scaling depends on the power law exponent of the data distribution -- in particular, for a power law exponent close to 1, the scaling exponent is close to 0, meaning that miscalibration improves very slowly with scale. Next, we measure miscalibration empirically in language models ranging from 0.5B to 70B parameters. We find that the observed scaling behavior is similar to what is predicted theoretically: our fitted scaling exponents for text are close to 0, meaning that larger models accumulate error at a similar rate as smaller ones. This scaling (or, lack thereof) provides one explanation for why we sample from larger models with similar amounts of truncation as smaller models, even though the larger models are of higher quality. However, truncation is not a satisfying solution because it comes at the cost of increased log loss. In theory, is it even possible to reduce entropy while preserving log loss? We prove that it is possible, if we assume access to a black box which can fit models to predict the future entropy of text.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑