让大模型生成更准:在任务语义空间校准输出分布
Task-Aware Calibration: Provably Optimal Decoding in LLMs

- 在任务隐含结构(如类别、整数)中校准模型输出,而非原始文本
- 基于贝叶斯风险最小化,证明校准后解码是最优策略
- 提出任务校准误差(TCE),可衡量生成偏差并适配不同任务
大语言模型的解码通常依赖其预测分布生成结果,但与真实生成分布的偏差会导致决策不佳。由于自由文本空间组合爆炸,直接校准模型输出不现实。本文提出任务校准范式:将自由形式输出映射到语义有意义的隐空间(如离散标签、整数、集合),在该空间中校准模型预测分布。利用决策理论,证明在任务校准后的隐空间上使用最小贝叶斯风险(MBR)解码,是基于模型信念的最优策略。实验表明,该方法在多种任务和基线中持续提升生成质量。同时引入任务校准误差(TCE),量化因校准不足导致的额外损失。研究表明,任务校准可提升各类任务中模型决策的可靠性。
原文摘要 · Abstract (English)
LLM decoding often relies on the model's predictive distribution to generate an output. Consequently, misalignment with respect to the true generating distribution leads to suboptimal decisions in practice. While a natural solution is to calibrate the model's output distribution, for LLMs, this is ill-posed at the combinatorially vast level of free-form language. We address this by building on the insight that in many tasks, these free-form outputs can be interpreted in a semantically meaningful latent structure, for example, discrete class labels, integers, or sets. We introduce task calibration as a paradigm to calibrate the model's predictive distribution in the task-induced latent space. We apply a decision-theoretic result to show that Minimum Bayes Risk (MBR) decoding on the task-calibrated latent distribution is the optimal decoding strategy on latent model beliefs. Empirically, it consistently improves generation quality across different tasks and baselines. We also introduce Task Calibration Error (TCE), an application-aware calibration metric that quantifies the excess loss due to miscalibration. Our work demonstrates that task calibration enables more reliable model decisions across various tasks and applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。