通过多模型一致性和优化损失函数提升大模型置信度准确性
Influences on LLM Calibration: A Study of Response Agreement, Loss Functions, and Prompt Styles
- 构建Calib-n框架,融合多模型响应一致性进行置信度估计
- 使用焦点损失和AUC代理损失,使置信度更贴近真实准确率
- 少样本提示效果最佳,适用于不同规模模型的可靠部署
校准性(calibration)指模型置信度与预测准确率的一致性,对大语言模型(LLM)的可靠应用至关重要。现有研究未充分考察方法在不同提示风格和模型规模下的泛化能力。为此,本文设计了涵盖12个LLM和4种提示风格的受控实验设置,探究多模型响应一致性及合适损失函数对校准性能的影响。我们提出Calib-n框架,训练一个辅助模型,聚合多个LLM的输出以捕捉模型间的一致性,并结合焦点损失(focal loss)与AUC代理损失(AUC surrogate loss)优化校准效果。在4个数据集上的实验表明,响应一致性与焦点损失均显著提升校准表现。结果发现,少样本提示对基于辅助模型的方法最为有效,且该类模型在不同准确率水平下均保持稳定校准性能,优于原始LLM内部概率与口语化置信度。这些发现深化了对大模型校准影响因素的理解,支持其在多样化场景中的可靠应用。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。