Delving into Parameter-Efficient Fine-Tuning in Code Change Learning: an Empirical Study

Shuo Liu,Jacky Keung,Zhen Yang,Fang Liu,Qilin Zhou,Yihan Liao
DOI: https://doi.org/10.1109/saner60148.2024.00055
2024-01-01
Abstract:Compared to Full-Model Fine-Tuning (FMFT), Parameter Efficient Fine-Tuning(PEFT) has demonstrated superior performance and lower computational overheadin several code understanding tasks, such as code summarization and codesearch. This advantage can be attributed to PEFT's ability to alleviate thecatastrophic forgetting issue of Pre-trained Language Models (PLMs) by updatingonly a small number of parameters. As a result, PEFT effectively harnesses thepre-trained general-purpose knowledge for downstream tasks. However, existingstudies primarily involve static code comprehension, aligning with thepre-training paradigm of recent PLMs and facilitating knowledge transfer, butthey do not account for dynamic code changes. Thus, it remains unclear whetherPEFT outperforms FMFT in task-specific adaptation for code-change-relatedtasks. To address this question, we examine two prevalent PEFT methods, namelyAdapter Tuning (AT) and Low-Rank Adaptation (LoRA), and compare theirperformance with FMFT on five popular PLMs. Specifically, we evaluate theirperformance on two widely-studied code-change-related tasks: Just-In-TimeDefect Prediction (JIT-DP) and Commit Message Generation (CMG). The resultsdemonstrate that both AT and LoRA achieve state-of-the-art (SOTA) results inJIT-DP and exhibit comparable performances in CMG when compared to FMFT andother SOTA approaches. Furthermore, AT and LoRA exhibit superiority incross-lingual and low-resource scenarios. We also conduct three probing tasksto explain the efficacy of PEFT techniques on JIT-DP and CMG tasks from bothstatic and dynamic perspectives. The study indicates that PEFT, particularlythrough the use of AT and LoRA, offers promising advantages incode-change-related tasks, surpassing FMFT in certain aspects.
What problem does this paper attempt to address?