paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CodeImprove: Program Adaptation for Deep Code Models

CodeImprove:面向深度代码模型的程序适配
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 4/10 · 论文聚焦深度代码模型的输入适配,使用语义保持变换与遗传算法缓解数据偏移,属于PL与ML交叉,但未涉及静态分析、LLM/Agent、浮点或贝叶斯程序分析等核心方向,匹配度有限。引用 1 inbox
Ravishka Rathnasuriya, Zijie Zhao, Wei Yang
crossref: 2026-09-12

AI 速览

一句话:提出 CodeImprove,用有效性评分识别域外程序,并以遗传算法做语义保持变换将其适配为域内输入,提升深度代码模型准确率。

基于深度学习的代码分析模型常因代码数据漂移等原因性能下降,而重训练成本高。本文探索不更新模型、转而适配程序输入的替代方案:先验证输入是否为模型能力范围外的 out-of-scope 程序,再将其转换为 in-scope 程序。针对代码这类离散输入难以直接套用图像输入验证方法、且适配搜索空间巨大的挑战,作者提出 CodeImprove:设计 validity score 识别 out-of-scope 输入,并利用遗传算法施以语义保持的程序变换,将域外输入转回域内输入。在两项软件工程任务、三个代码模型上,CodeImprove 最高提升 8.78% 准确率,相对提升达 51.28%;输入验证检测 out-of-scope 输入的 AUC 为 0.924。

问题
深度代码模型在代码数据漂移等情况下性能下降,频繁重训练标注与部署成本高;需解决如何在不重训练模型的前提下识别并处理超出模型能力范围的 out-of-scope 程序输入。
方法
提出 CodeImprove:用 validity score 度量输入有效性以检测 out-of-scope 输入,并基于遗传算法搜索语义保持的程序变换,将 out-of-scope 输入适配为 in-scope 输入。
评估
在两个软件工程任务和三个代码模型上评估,准确率最高提升 8.78%、相对提升 51.28%;out-of-scope 输入检测 AUC 达 0.924。
原文摘要(Abstract)

Leveraging deep learning (DL)-based code analysis tools to solve software engineering tasks is becoming increasingly popular. Code models often suffer performance degradation due to various reasons (e.g., code data shifts). Retraining is often required to address these issues, but frequent model updates are costly in labeling and deployment. In this paper, we explore an alternative solution: Adapting the program inputs to the code models. This can be achieved by two steps: 1) input validation that focuses on identifying whether an input is an out-of-scope input program that are beyond a model's handling capability, and 2) input adaptation that adapts out-of-scope inputs to become in-scope inputs. Validating program input is challenging, as current techniques focus on continuous inputs such as image data and fail with discrete inputs like code data, which have unique characteristics and are processed differently by deep learning models. Adapting out-of-scope programs is also challenging due to their vast search spaces. Therefore, in this paper, we propose CodeImprove, which distinguishes out-of-scope from normal inputs and converts such out-of-scope inputs back to in-scope inputs through program transformation. In particular, we propose a validity score metric to identify out-of-scope inputs and leverage genetics algorithms to apply semantic preserving program transformation to convert out-ofscope inputs to in-scope inputs. Our experimental results show CodeImprove can enhance upto 8.78% of accuracy, and 51.28% of relative improvements in three code models on two SE tasks. Additionally, our input validation is promising in detecting out-of-scope inputs (AUC score of 0.924).

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8895,
  title = {CodeImprove: Program Adaptation for Deep Code Models},
  author = {Ravishka Rathnasuriya and Zijie Zhao and Wei Yang},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00139}
}