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

对 LLM 校准的影响:响应一致性、损失函数与提示风格研究

Influences on LLM Calibration: A Study of Response Agreement, Loss Functions, and Prompt Styles

Faculty of Computer Science, University of Vienna(维也纳大学计算机学院);UniVie Doctoral School Computer Science(维也纳大学计算机博士学院);Department of Computer Science, Aarhus University(奥胡斯大学计算机系);Faculty of Philological and Cultural Studies, University of Vienna(维也纳大学语文学与文化学院)

Yuxi Xia, Pedro Henrique Luz de Araujo, Klim Zaporojets, Benjamin Roth

AI总结:

本文提出 Calib-n 框架,通过聚合多 LLM 响应一致性并结合 focal、AUC 代理损失训练置信度辅助模型,在 12 个模型、四种提示风格和四个数据集上验证其校准优势。

摘要:

校准,即模型置信度与预测准确率之间的对齐,对于大语言模型(LLM)的可靠部署至关重要。现有工作忽视了衡量其方法对其他提示风格和不同规模 LLM 的泛化能力。为解决这一问题,我们定义了一个涵盖 12 个 LLM 和四种提示风格的受控实验设置。我们还研究了融合多个 LLM 的响应一致性以及合适的损失函数是否能够提升校准性能。具体而言,我们构建了 Calib-n,这是一个新颖框架,用于训练一个置信度估计辅助模型,该模型聚合来自多个 LLM 的响应,以捕捉模型间一致性。为优化校准,我们在二元交叉熵之外整合了 focal 损失和 AUC 代理损失。在四个数据集上的实验表明,响应一致性和 focal 损失均相较基线提升了校准效果。我们发现,少样本提示对于基于辅助模型的方法最为有效,并且辅助模型在准确率变化过程中表现出稳健的校准性能,优于 LLM 的内部概率和语言化置信度。这些洞见加深了对 LLM 校准中影响因素的理解,支持其在多样化应用中的可靠部署。

英文摘要:

Calibration, the alignment between model confidence and prediction accuracy, is critical for the reliable deployment of large language models (LLMs). Existing works neglect to measure the generalization of their methods to other prompt styles and different sizes of LLMs. To address this, we define a controlled experimental setting covering 12 LLMs and four prompt styles. We additionally investigate if incorporating the response agreement of multiple LLMs and an appropriate loss function can improve calibration performance. Concretely, we build Calib-n, a novel framework that trains an auxiliary model for confidence estimation that aggregates responses from multiple LLMs to capture inter-model agreement. To optimize calibration, we integrate focal and AUC surrogate losses alongside binary cross-entropy. Experiments across four datasets demonstrate that both response agreement and focal loss improve calibration from baselines. We find that few-shot prompts are the most effective for auxiliary model-based methods, and auxiliary models demonstrate robust calibration performance across accuracy variations, outperforming LLMs' internal probabilities and verbalized confidences. These insights deepen the understanding of influence factors in LLM calibration, supporting their reliable deployment in diverse applications.

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

↑