paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An Empirical Study of Parameter-Efficient Fine-Tuning Methods for Pre-Trained Code Models

面向预训练代码模型的参数高效微调方法的实证研究
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 2/10 · 该论文研究预训练代码模型的参数高效微调方法,属于LLM/代码模型适配的实证研究,与研究画像关注的“静态分析用于ML/Agentic程序”“LLM改进静态分析/形式化验证”“浮点程序分析”“贝叶斯程序分析”等核心方向均无直接关联;且研究目标本身是LLM(代码模型)的微调,而非PL与AI交叉的具体分析问题。引用 39 inbox
Jiaxing Liu, Chaofeng Sha, Xin Peng
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:系统实证了参数高效微调方法在预训练代码模型上的表现,涵盖代码理解与生成及跨语言跨项目场景。

全微调预训练代码模型计算昂贵且内存密集,参数高效微调方法(如Adapter、LoRA)虽能仅训练少量参数,但缺乏在多个软件工程任务上的公平比较,且在低资源、跨语言、跨项目场景下的有效性研究不足。本文在代码理解与代码生成任务上,使用这些方法微调最先进的代码模型(如CodeBERT、CodeT5),并与全微调对比。结果显示,仅调0.5%参数,在代码理解任务上性能可比或超过全微调,但在代码生成任务上稍弱;需要大量样本(如克隆检测1000个)才能接近全微调性能。在跨语言和跨项目场景下,冻结大部分参数并微调0.5%参数能持续提升迁移学习能力。代码与数据已开源。

问题
全微调预训练代码模型计算与内存开销大,参数高效微调方法缺乏在多软件工程任务上的全面公平比较,且在低资源、跨语言、跨项目场景下的有效性研究不足。
方法
在代码理解与代码生成任务上,采用Adapter、LoRA等参数高效微调方法微调最先进的代码模型(如CodeBERT、CodeT5),并与全微调进行对比,同时考察训练样本数的影响以及跨语言、跨项目迁移场景。
评估
通过多项软件工程任务实验,比较参数高效微调与全微调的性能,分析训练样本数的影响,并在跨语言和跨项目场景下评估迁移学习能力。
原文摘要(Abstract)

Pre-trained code models (e.g. CodeBERT and CodeT5) have demonstrated their code intelligence in various software engineering tasks, such as code summarization. And full fine-tuning has become the typical approach to adapting these models to downstream tasks. However, full fine-tuning these large models can be computationally expensive and memory-intensive, particularly when training for multiple tasks. To alleviate this issue, several parameter-efficient fine-tuning methods (e.g. Adapter and LoRA) have been proposed to only train a small number of additional parameters, while keeping the original pre-trained parameters frozen. Although these methods claim superiority over the prior techniques, they seldom make a comprehensive and fair comparison on multiple software engineering tasks. Moreover, besides their potential in reducing fine-tuning costs and maintaining approximate performance, the effectiveness of these methods in low-resource, cross-language, and cross-project scenarios is inadequately studied. To this end, we first conduct experiments by fine-tuning state-of-the-art code models with these methods on both code understanding tasks and code generation tasks. The results show that, by tuning only 0.5% additional parameters, these methods may achieve comparable or higher performance than full fine-tuning in code understanding tasks, but they may exhibit slightly weaker performance in code generation tasks. We also investigate the impact of these methods with varying numbers of training samples and find that, a considerable number of samples (e.g. 1000 for clone detection) may be required for them to approximate the performance of full fine-tuning. Our experimental results in cross-language and cross-project scenarios demonstrate that by freezing most pre-trained parameters and tuning only 0.5% additional parameters, these methods achieve consistent improvements in models' transfer learning ability in comparison to full fine-tuning. Our code and data are available at https://github.com/anonymous-ase23/ CodeModelParameterEfficientFinetuning.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{LiuSP23,
  title = {An Empirical Study of Parameter-Efficient Fine-Tuning Methods for Pre-Trained Code Models},
  author = {Jiaxing Liu and Chaofeng Sha and Xin Peng},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00125}
}