arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.11845cs.CL
收藏

概率校准是语言模型中的可训练能力

Probabilistic Calibration Is a Trainable Capability in Language Models

Chandar Research Lab(昌达尔研究实验室);Mila – Quebec AI Institute(魁北克人工智能研究所);LAMA-WeST Lab(LAMA-WeST实验室);Polytechnique Montréal(蒙特利尔理工学院);Université de Montréal(蒙特利尔大学);Independent researcher(独立研究者)

Davide Baldelli, Sruthi Kuriakose, Maryam Hashemzadeh, Amal Zouaq, Sarath Chandar

AI总结:

本文研究通过微调提升语言模型的概率校准能力,发现两种微调方法在不同任务中表现各异,硬目标方法在结构化数值采样更优,软目标方法在广泛随机生成任务中表现更好。

摘要:

语言模型越来越多地应用于需要满足用户指定随机性约束的场景,但其生成概率往往难以校准到这些目标。我们研究是否可以通过微调直接改进这一能力。具体来说,我们对语言模型进行微调,使用合成提示要求从数学分布中采样,并比较两种校准微调变体:一种是将期望输出分布转换为trie衍生的下一个token目标的软目标方法,另一种是训练时使用从相同目标分布采样的完成内容的硬目标方法。在12个模型上,两种方法显著提高了在保留分布家族和未见过的参数设置上的结构化采样保真度,表明概率校准是一种可训练的能力。在我们选择的训练配置下,两种方法表现出不同的经验特征:硬目标微调在结构化数值采样中往往表现最强,而软目标微调在更广泛的随机生成基准测试中表现更好,包括开放性随机生成、多选答案位置平衡和NoveltyBench。这些收益有时会减少下游能力,尤其是在算术推理方面,成本因模型而异。总体而言,我们的结果表明,通过微调可以提高概率校准能力,我们的硬目标配置更有利于精确的数值保真度,而我们的软目标配置更有利于广泛的随机转移。代码可在https://github.com/chandar-lab/calibration-finetuning获取。

英文摘要:

Language models are increasingly used in settings where outputs should follow an intended distribution, yet their generation probabilities are often poorly calibrated to it. In many such requests the distribution is implicit and the valid outputs cannot be listed in advance, so the task cannot be passed to an external random number generator. We study whether this capability can be improved directly through fine-tuning. Concretely, we fine-tune language models on synthetic prompts that require sampling from mathematical distributions, and compare two Calibration Fine-Tuning variants: a soft-target method that converts the desired output distribution into trie-derived next-token targets, and a hard-target method that trains on sampled completions from the same target distribution. Across 12 models spanning four families, both methods substantially improve structured-sampling fidelity on held-out distribution families and unseen parameter settings, showing that training on cheap synthetic mathematical distributions improves sampling on unseen distributions, even in natural language. The gains also transfer to broader stochastic generation benchmarks, including open-ended random generation, where fine-tuned models broaden their first-token support by one to two orders of magnitude, and NoveltyBench. The gains sometimes reduce downstream capability, especially arithmetic reasoning, with costs varying by model. Overall, our results show that probabilistic calibration can be improved through fine-tuning with either objective, and that calibration learned on mathematical distributions transfers to natural-language stochastic generation. Code is available at https://github.com/chandar-lab/calibration-finetuning.

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

↑