No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligence
被引:55
|
作者:
Wang, Chaozheng
论文数: 0引用数: 0
h-index: 0
机构:
Harbin Inst Technol, Shenzhen, Peoples R ChinaHarbin Inst Technol, Shenzhen, Peoples R China
Wang, Chaozheng
[1
]
Yang, Yuanhang
论文数: 0引用数: 0
h-index: 0
机构:
Harbin Inst Technol, Shenzhen, Peoples R ChinaHarbin Inst Technol, Shenzhen, Peoples R China
Yang, Yuanhang
[1
]
Gao, Cuiyun
论文数: 0引用数: 0
h-index: 0
机构:
Harbin Inst Technol, Shenzhen, Peoples R China
Peng Cheng Lab, Shenzhen, Peoples R China
Guangdong Prov Key Lab Novel Secur Intelligence T, Shenzhen, Peoples R ChinaHarbin Inst Technol, Shenzhen, Peoples R China
Gao, Cuiyun
[1
,4
,5
]
Peng, Yun
论文数: 0引用数: 0
h-index: 0
机构:
Chinese Univ Hong Kong, Hong Kong, Peoples R ChinaHarbin Inst Technol, Shenzhen, Peoples R China
Peng, Yun
[2
]
Zhang, Hongyu
论文数: 0引用数: 0
h-index: 0
机构:
Univ Newcastle, Newcastle, NSW, AustraliaHarbin Inst Technol, Shenzhen, Peoples R China
Zhang, Hongyu
[3
]
Lyu, Michael R.
论文数: 0引用数: 0
h-index: 0
机构:
Chinese Univ Hong Kong, Hong Kong, Peoples R ChinaHarbin Inst Technol, Shenzhen, Peoples R China
Lyu, Michael R.
[2
]
机构:
[1] Harbin Inst Technol, Shenzhen, Peoples R China
[2] Chinese Univ Hong Kong, Hong Kong, Peoples R China
[3] Univ Newcastle, Newcastle, NSW, Australia
[4] Peng Cheng Lab, Shenzhen, Peoples R China
[5] Guangdong Prov Key Lab Novel Secur Intelligence T, Shenzhen, Peoples R China
Pre-trained models have been shown effective in many code intelligence tasks. These models are pre-trained on large-scale unlabeled corpus and then fine-tuned in downstream tasks. However, as the inputs to pre-training and downstream tasks are in different forms, it is hard to fully explore the knowledge of pre-trained models. Besides, the performance of fine-tuning strongly relies on the amount of downstream data, while in practice, the scenarios with scarce data are common. Recent studies in the natural language processing (NLP) field show that prompt tuning, a new paradigm for tuning, alleviates the above issues and achieves promising results in various NLP tasks. In prompt tuning, the prompts inserted during tuning provide task-specific knowledge, which is especially beneficial for tasks with relatively scarce data. In this paper, we empirically evaluate the usage and effect of prompt tuning in code intelligence tasks. We conduct prompt tuning on popular pre-trained models CodeBERT and CodeT5 and experiment with three code intelligence tasks including defect prediction, code summarization, and code translation. Our experimental results show that prompt tuning consistently outperforms fine-tuning in all three tasks. In addition, prompt tuning shows great potential in low-resource scenarios, e.g., improving the BLEU scores of fine-tuning by more than 26% on average for code summarization. Our results suggest that instead of fine-tuning, we could adapt prompt tuning for code intelligence tasks to achieve better performance, especially when lacking task-specific data.
机构:
Tsinghua Univ, KEG, Beijing, Peoples R China
Beijing Acad Artificial Intelligence BAAI, Beijing, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Liu, Xiao
Ji, Kaixuan
论文数: 0引用数: 0
h-index: 0
机构:
Tsinghua Univ, KEG, Beijing, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Ji, Kaixuan
Fu, Yicheng
论文数: 0引用数: 0
h-index: 0
机构:
Tsinghua Univ, KEG, Beijing, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Fu, Yicheng
Tam, Weng Lam
论文数: 0引用数: 0
h-index: 0
机构:
Tsinghua Univ, KEG, Beijing, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Tam, Weng Lam
Du, Zhengxiao
论文数: 0引用数: 0
h-index: 0
机构:
Tsinghua Univ, KEG, Beijing, Peoples R China
Beijing Acad Artificial Intelligence BAAI, Beijing, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Du, Zhengxiao
Yang, Zhilin
论文数: 0引用数: 0
h-index: 0
机构:
Tsinghua Univ, KEG, Beijing, Peoples R China
Shanghai Qi Zhi Inst, Shanghai, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Yang, Zhilin
Tang, Jie
论文数: 0引用数: 0
h-index: 0
机构:
Tsinghua Univ, KEG, Beijing, Peoples R China
Beijing Acad Artificial Intelligence BAAI, Beijing, Peoples R ChinaTsinghua Univ, KEG, Beijing, Peoples R China
Tang, Jie
PROCEEDINGS OF THE 60TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2022): (SHORT PAPERS), VOL 2,
2022,
: 61
-
68
机构:
Royal Cornwall Hosp NHS Trust, Dept Gastroenterol, Truro, England
Univ Birmingham, Med & Dent Sci, Birmingham, W Midlands, EnglandRoyal Cornwall Hosp NHS Trust, Dept Gastroenterol, Truro, England
Siau, Keith
Berzin, Tyler M.
论文数: 0引用数: 0
h-index: 0
机构:
Beth Israel Deaconess Med Ctr, Ctr Adv Endoscopy, Boston, MA USA
Harvard Med Sch, Boston, MA 02115 USARoyal Cornwall Hosp NHS Trust, Dept Gastroenterol, Truro, England