paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Understanding Code Changes Practically with Small-Scale Language Models

使用小规模语言模型实用地理解代码变更
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 2/10 · 论文关注微调小语言模型以理解代码变更,属于软件工程/代码智能与ML交叉,但未涉及用户核心方向:静态分析在ML/Agentic程序中的应用、用LLM改进静态分析/形式化验证、浮点程序分析或贝叶斯程序分析。其研究目标更偏向提升小模型在代码变更任务上的效果,与用户关注的PL/形式化方法交叉较弱。引用 5 inbox
Cong Li, Zhaogui Xu, Peng Di, Dongxia Wang, Zheng Li, Qian Zheng
crossref: 2026-09-12

AI 速览

一句话:通过专家构建的 HQCM 数据集微调小语言模型,在代码变更理解任务上可与大模型媲美甚至更优。

近期研究表明,直接提示语言模型在代码变更理解上比传统技术更有效,但现有方法依赖 GPT-4、Llama-13b 等昂贵或商业大模型,难以大规模部署。本文探索小规模语言模型(SLM)在保持与 LLM 相当或更优性能下的可行性。作者构建了由五位人类专家严格审查、修订和验证的高质量小数据集 HQCM,并用其微调先进的 7B 和 220M 参数 SLM,与参数量不少于 70B 的 LLM 及传统技术进行比较。评估确认了 HQCM 的益处,并表明微调后的 SLM 在变更摘要、变更分类和代码精化三个任务上均取得更优表现,适合安全、算力和成本受限的工业与边缘设备场景。

问题
传统代码变更理解技术效果不如直接提示语言模型,但现有 LM 方法依赖昂贵、商业或难以大规模部署的大语言模型,限制了实际应用。
方法
构建由五位人类专家审查、修订和验证的高质量小数据集 HQCM,并用其微调 7B 和 220M 参数的小规模语言模型。
评估
在变更摘要、变更分类和代码精化三个任务上,将微调后的 SLM 与传统技术及参数量不少于 70B 的 LLM 进行比较,结果显示 SLM 性能更优。
原文摘要(Abstract)

Recent studies indicate that traditional techniques for understanding code changes are not as effective as techniques that directly prompt language models (LMs). However, current LM-based techniques heavily rely on expensive, large LMs (LLMs) such as GPT-4 and Llama-13b, which are either commercial or prohibitively costly to deploy on a wide scale, thereby restricting their practical applicability. This paper explores the feasibility of deploying small LMs (SLMs) while maintaining comparable or superior performance to LLMs in code change understanding. To achieve this, we created a small yet high-quality dataset called HQCM which was meticulously reviewed, revised, and validated by five human experts. We fine-tuned state-of-the-art 7b and 220m SLMs using HQCM and compared them with traditional techniques and LLMs with ≥70b parameters. Our evaluation confirmed HQCM's benefits and demonstrated that SLMs, after finetuning by HQCM, can achieve superior performance in three change understanding tasks: change summarization, change classification, and code refinement. This study supports the use of SLMs in environments with security, computational, and financial constraints, such as in industry scenarios and on edge devices, distinguishing our work from the others.

链接与引用

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

BibTeX
@inproceedings{paperbot8308,
  title = {Understanding Code Changes Practically with Small-Scale Language Models},
  author = {Cong Li and Zhaogui Xu and Peng Di and Dongxia Wang and Zheng Li and Qian Zheng},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3694999}
}