大模型生成文本时熵不准确,且规模越大越难自动校准。
On the Entropy Calibration of Language Models
- 通过理论与实证分析,发现模型熵校准随规模提升缓慢。
- 700亿参数模型的熵偏差与0.5亿参数模型相当。
- 理论上可不牺牲生成质量实现熵校准,需预知未来文本熵。
我们研究语言模型的熵校准问题,即模型生成过程中的熵是否与其在人类文本上的对数损失一致。以往研究发现模型存在校准偏差,生成越长,每步熵越高,源于错误累积。当前标准做法是截断分布以校准,但这会降低输出多样性。本文探究:校准能否随模型规模自动改善?若不能,是否可能无代价实现校准?首先在简化理论框架下分析数据集规模下的校准偏差变化,发现其缩放行为取决于数据分布的幂律指数——当幂律指数接近1时,缩放指数接近0,表明校准改进极慢。接着在0.5B至70B参数的语言模型上实测,结果与理论预测一致:拟合缩放指数接近0,说明大模型与小模型一样累积误差。这一现象解释了为何大模型仍需类似程度的截断,尽管其生成质量更高。但截断导致对数损失上升,非理想方案。理论上,若能访问一个黑箱,可预测未来文本的熵,则可在不牺牲对数损失的前提下降低熵,实现无代价校准。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。