论文精选

超越事后温度缩放:用于LLM校准的双层优化

Beyond Post-Hoc Temperature Scaling: Bilevel Optimization for LLM Calibration

精选理由

这篇arxiv论文提出用双层优化做LLM校准,不靠事后温度缩放,在开放问答上分布外泛化更稳。

AI 摘要

论文提出用双层优化改进LLM校准,主目标最大化预测分布熵以抑制过度自信。该方法借鉴温度缩放,在低层用参数化损失训练模型,在高层选择损失超参数。为适配大模型规模,采用一阶近似避免二阶计算。在多项选择和开放生成式问答实验中,该方法在分布外泛化上表现尤其突出。

原文 · arXiv cs.LG

Beyond Post-Hoc Temperature Scaling: Bilevel Optimization for LLM Calibration

Preference alignment often makes large language models (LLMs) overconfident and poorly calibrated. Traditional post-hoc temperature scaling is inherently domain-dependent: a temperature fitted on one domain does not generalize across domains. This motivates us to modify model parameters during training to improve calibration. We propose maximizing the entropy of predictive distributions as the calibration objective, which directly targets overconfidence by discouraging overly concentrated predictions. Inspired by temperature scaling, we realize this through a bilevel optimization formulation, where the lower level trains the model under a parametric loss and the upper level selects loss hyperparameters to maximize entropy. To make the framework practical at LLM scale, we adopt an efficient first-order approximation that avoids explicit second-order computation. Across both multiple-choice and open-ended generative question answering, experiments demonstrate that our method yields well-calibrated LLMs with particular advantages in out-of-domain generalization.