As pre-trained models automate many code intelligence tasks, a widely used paradigm is to fine-tune a model on the task dataset for each programming language. A recent study reported that multilingual fine-tuning benefits a range of tasks and models. However, we find that multilingual fine-tuning leads to performance degradation on recent models UniXcoder and CodeT5. To alleviate the potentially catastrophic forgetting issue in multilingual models, we fix all pre-trained model parameters, insert the parameter-efficient structure adapter, and fine-tune it. Updating only 0.6\% of the overall parameters compared to full-model fine-tuning for each programming language, adapter tuning yields consistent improvements on code search and summarization tasks, achieving state-of-the-art results. In addition, we experimentally show its effectiveness in cross-lingual and low-resource scenarios. Multilingual fine-tuning with 200 samples per programming language approaches the results fine-tuned with the entire dataset on code summarization. Our experiments on three probing tasks show that adapter tuning significantly outperforms full-model fine-tuning and effectively overcomes catastrophic forgetting.


翻译:随着预先训练的模型自动完成许多代码智能任务,一种广泛使用的范式是对每种编程语言的任务数据集微调模型。最近的一项研究报告称,多语言微调有助于一系列任务和模型。但是,我们发现多语言微调会导致最新的UniXcoder和CodeT5模型性能下降。为了缓解多语言模型中可能发生的灾难性遗忘问题,我们固定了所有预训练模型参数,插入参数有效的结构适配器,然后微调它。与针对每种编程语言的全模型微调相比,适配器调优仅更新全局参数的0.6%,在代码搜索和摘要任务上产生了一致的改进效果,并取得了最先进的结果。此外,我们通过实验证明了它在跨语言和低资源情况下的有效性。针对每种编程语言的多语言微调,每种只使用200个样本,在代码摘要方面接近使用整个数据集微调的结果。我们在三个探测任务上的实验表明,适配器调优显着优于全模型微调,并有效地克服了灾难性遗忘。

0
下载
关闭预览

相关内容

NeurlPS 2022 | 深度双向语言-知识图谱预训练
专知会员服务
9+阅读 · 2022年11月28日
IJCAI 2022 | 使用陈述句进行视觉问答的Prompt Tuning
NAACL 2022 | 基于Prompt的文本生成迁移学习
PaperWeekly
1+阅读 · 2022年8月31日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Perseus-BERT——业内性能极致优化的BERT训练方案
云栖社区
15+阅读 · 2019年2月20日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Arxiv
0+阅读 · 2023年5月18日
Arxiv
0+阅读 · 2023年5月15日
VIP会员
相关VIP内容
NeurlPS 2022 | 深度双向语言-知识图谱预训练
专知会员服务
9+阅读 · 2022年11月28日
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员