跳到主要导航 跳到搜索 跳到主要内容

Towards Efficient Fine-Tuning of Pre-trained Code Models: An Experimental Study and Beyond

  • Ensheng Shi
  • , Yanlin Wang
  • , Hongyu Zhang
  • , Lun Du
  • , Shi Han
  • , Dongmei Zhang
  • , Hongbin Sun
  • Xi'an Jiaotong University
  • Sun Yat-Sen University
  • Microsoft USA
  • Chongqing University

科研成果: 书/报告/会议事项章节会议稿件同行评审

41 引用 (Scopus)

摘要

Recently, fine-tuning pre-trained code models such as CodeBERT on downstream tasks has achieved great success in many software testing and analysis tasks. While effective and prevalent, fine-tuning the pre-trained parameters incurs a large computational cost. In this paper, we conduct an extensive experimental study to explore what happens to layer-wise pre-trained representations and their encoded code knowledge during fine-tuning. We then propose efficient alternatives to fine-tune the large pre-trained code model based on the above findings. Our experimental study shows that (1) lexical, syntactic and structural properties of source code are encoded in the lower, intermediate, and higher layers, respectively, while the semantic property spans across the entire model. (2) The process of fine-tuning preserves most of the code properties. Specifically, the basic code properties captured by lower and intermediate layers are still preserved during fine-tuning. Furthermore, we find that only the representations of the top two layers change most during fine-tuning for various downstream tasks. (3) Based on the above findings, we propose Telly to efficiently fine-tune pre-trained code models via layer freezing. The extensive experimental results on five various downstream tasks demonstrate that training parameters and the corresponding time cost are greatly reduced, while performances are similar or better.

源语言英语
主期刊名ISSTA 2023 - Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis
编辑Rene Just, Gordon Fraser
出版商Association for Computing Machinery, Inc
39-51
页数13
ISBN(电子版)9798400702211
DOI
出版状态已出版 - 12 7月 2023
活动32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2023 - Seattle, 美国
期限: 17 7月 202321 7月 2023

出版系列

姓名ISSTA 2023 - Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis

会议

会议32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2023
国家/地区美国
Seattle
时期17/07/2321/07/23

学术指纹

探究 'Towards Efficient Fine-Tuning of Pre-trained Code Models: An Experimental Study and Beyond' 的科研主题。它们共同构成独一无二的指纹。

引用此