Recently, pre-trained programming language models such as CodeBERT have demonstrated substantial gains in code search. Despite showing great performance, they rely on the availability of large amounts of parallel data to fine-tune the semantic mappings between queries and code. This restricts their practicality in domain-specific languages with relatively scarce and expensive data. In this paper, we propose CDCS, a novel approach for domain-specific code search. CDCS employs a transfer learning framework where an initial program representation model is pre-trained on a large corpus of common programming languages (such as Java and Python), and is further adapted to domain-specific languages such as SQL and Solidity. Unlike cross-language CodeBERT, which is directly fine-tuned in the target language, CDCS adapts a few-shot meta-learning algorithm called MAML to learn the good initialization of model parameters, which can be best reused in a domain-specific language. We evaluate the proposed approach on two domain-specific languages, namely, SQL and Solidity, with model transferred from two widely used languages (Python and Java). Experimental results show that CDCS significantly outperforms conventional pre-trained code models that are directly fine-tuned in domain-specific languages, and it is particularly effective for scarce data.


翻译:最近,CodBERT等经过事先培训的编程语言模型在代码搜索方面取得了长足的进展。尽管表现良好,但它们依靠大量平行数据来微调查询和代码之间的语义绘图。这限制了其在特定领域语言中的实际实用性,其数据相对稀缺且费用昂贵。在本文件中,我们建议CDCS,这是对特定领域代码搜索的一种新颖方法。CDCS使用一个传输学习框架,初步方案代表模式在大量通用语言(如Java和Python)上预先培训,并进一步适应SQL和Solidicity等特定领域的语言。与直接调整目标语言的跨语言代码代码BERT不同,CDCS调整了几张通用的元学习算法,称为MAML,以学习模型参数的良好初始化,这种参数最好在特定领域语言中重新使用。我们评估了两种特定领域语言(即SQL和Solidicity)的拟议方法,从两种广泛使用的语言(Python和Java)中转移的模式。实验结果显示,CDCS在直接调整常规代码之前,这种模型是直接调整的。

0
下载
关闭预览

相关内容

不可错过!《机器学习100讲》课程,UBC Mark Schmidt讲授
专知会员服务
70+阅读 · 2022年6月28日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
161+阅读 · 2020年3月18日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
AIART 2022 Call for Papers
CCF多媒体专委会
1+阅读 · 2022年2月13日
【ICIG2021】Check out the hot new trailer of ICIG2021 Symposium3
中国图象图形学学会CSIG
0+阅读 · 2021年11月9日
【ICIG2021】Check out the hot new trailer of ICIG2021 Symposium2
中国图象图形学学会CSIG
0+阅读 · 2021年11月8日
【ICIG2021】Check out the hot new trailer of ICIG2021 Symposium1
中国图象图形学学会CSIG
0+阅读 · 2021年11月3日
强化学习三篇论文 避免遗忘等
CreateAMind
19+阅读 · 2019年5月24日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
2+阅读 · 2011年12月31日
国家自然科学基金
9+阅读 · 2011年12月31日
国家自然科学基金
2+阅读 · 2009年12月31日
Neural Routing in Meta Learning
Arxiv
0+阅读 · 2022年10月14日
Multi-Domain Multi-Task Rehearsal for Lifelong Learning
Arxiv
12+阅读 · 2020年12月14日
Arxiv
13+阅读 · 2020年4月12日
Learning in the Frequency Domain
Arxiv
11+阅读 · 2020年3月12日
Arxiv
13+阅读 · 2019年1月26日
Arxiv
13+阅读 · 2018年4月6日
VIP会员
相关资讯
AIART 2022 Call for Papers
CCF多媒体专委会
1+阅读 · 2022年2月13日
【ICIG2021】Check out the hot new trailer of ICIG2021 Symposium3
中国图象图形学学会CSIG
0+阅读 · 2021年11月9日
【ICIG2021】Check out the hot new trailer of ICIG2021 Symposium2
中国图象图形学学会CSIG
0+阅读 · 2021年11月8日
【ICIG2021】Check out the hot new trailer of ICIG2021 Symposium1
中国图象图形学学会CSIG
0+阅读 · 2021年11月3日
强化学习三篇论文 避免遗忘等
CreateAMind
19+阅读 · 2019年5月24日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
相关论文
Neural Routing in Meta Learning
Arxiv
0+阅读 · 2022年10月14日
Multi-Domain Multi-Task Rehearsal for Lifelong Learning
Arxiv
12+阅读 · 2020年12月14日
Arxiv
13+阅读 · 2020年4月12日
Learning in the Frequency Domain
Arxiv
11+阅读 · 2020年3月12日
Arxiv
13+阅读 · 2019年1月26日
Arxiv
13+阅读 · 2018年4月6日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
2+阅读 · 2011年12月31日
国家自然科学基金
9+阅读 · 2011年12月31日
国家自然科学基金
2+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员