paperbot · PL 论文追踪

全部论文 待读 收藏

P2 On Calibration of Pre-trained Code Models

预训练代码模型的校准研究
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 2/10 · 该论文关注预训练代码模型的校准与过自信问题,属于代码模型可靠性与不确定性估计,与用户核心方向(静态分析、Agentic程序、浮点程序分析、贝叶斯程序分析及其与LLM交叉)没有直接关联。它既不把静态分析用于ML/Agent系统,也不利用LLM/Agent改进静态分析或形式化验证。引用 4 inbox
Zhenhao Zhou, Chaofeng Sha, Xin Peng
crossref: 2026-09-12

AI 速览

一句话:系统评估五种预训练代码模型在四项代码理解任务中的校准表现,揭示其过自信问题及现有校准方法的局限。

本文关注预训练代码模型在软件工程中的预测不确定性校准问题。现有研究多聚焦性能提升,忽视模型校准。作者选取五种预训练代码模型和四项代码理解任务,在分布内与多种分布外设置下系统评估校准性能,并考察温度缩放与标签平滑等校准方法。结果发现:模型常表现出过自信;温度缩放和标签平滑在分布内数据上有效;在分布外设置中过自信加剧,且这两种方法的校准效果下降。实验材料已开源。

问题
预训练代码模型在软件工程任务中性能突出,但其预测不确定性是否被良好校准,尤其在分布外场景下如何,仍缺乏系统认识。
方法
选取五种预训练代码模型与四项代码理解任务,在分布内和多种分布外设置下评估校准,并测试温度缩放与标签平滑的效果。
评估
通过多模型多任务实验比较校准指标,分析分布内与分布外校准表现,并验证温度缩放和标签平滑的有效性及其局限。
原文摘要(Abstract)

Pre-trained code models have achieved notable success in the field of Software Engineering (SE). However, existing studies have predominantly focused on improving model performance, with limited attention given to other critical aspects such as model calibration. Model calibration, which refers to the accurate estimation of predictive uncertainty, is a vital consideration in practical applications. Therefore, in order to advance the understanding of model calibration in SE, we conduct a comprehensive investigation into the calibration of pre-trained code models in this paper. Our investigation focuses on five pre-trained code models and four code understanding tasks, including analyses of calibration in both in-distribution and out-of-distribution settings. Several key insights are uncovered: (1) pre-trained code models may suffer from the issue of over-confidence; (2) temperature scaling and label smoothing are effective in calibrating code models in in-distribution data; (3) the issue of over-confidence in pre-trained code models worsens in different out-of-distribution settings, and the effectiveness of temperature scaling and label smoothing diminishes. All materials used in our experiments are available at https://github.com/queserasera22/Calibration-of-Pretrained-Code-Models.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11326,
  title = {On Calibration of Pre-trained Code Models},
  author = {Zhenhao Zhou and Chaofeng Sha and Xin Peng},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3597503.3639126}
}