清晨好,您是今天最早来到科研通的研友!由于当前在线用户较少,发布求助请尽量完整的填写文献信息,科研通机器人24小时在线,伴您科研之路漫漫前行!

RAPID: Zero-Shot Domain Adaptation for Code Search with Pre-Trained Models

计算机科学 域适应 零(语言学) 适应(眼睛) 领域(数学分析) 编码(集合论) 人工智能 理论计算机科学 程序设计语言 算法 机器学习 数学 心理学 神经科学 集合(抽象数据类型) 哲学 数学分析 分类器(UML) 语言学
作者
Guodong Fan,Shizhan Chen,Cuiyun Gao,Jianmao Xiao,Tao Zhang,Zhiyong Feng
出处
期刊:ACM Transactions on Software Engineering and Methodology [Association for Computing Machinery]
卷期号:33 (5): 1-35
标识
DOI:10.1145/3641542
摘要

Code search, which refers to the process of identifying the most relevant code snippets for a given natural language query, plays a crucial role in software maintenance. However, current approaches heavily rely on labeled data for training, which results in performance decreases when confronted with cross-domain scenarios including domain- or project-specific situations. This decline can be attributed to their limited ability to effectively capture the semantics associated with such scenarios. To tackle the aforementioned problem, we propose a ze R o-shot dom A in ada P tion with pre-tra I ned mo D els framework for code search named RAPID. The framework first generates synthetic data by pseudo labeling, then trains the CodeBERT with sampled synthetic data. To avoid the influence of noisy synthetic data and enhance the model performance, we propose a mixture sampling strategy to obtain hard negative samples during training. Specifically, the mixture sampling strategy considers both relevancy and diversity to select the data that are hard to be distinguished by the models. To validate the effectiveness of our approach in zero-shot settings, we conduct extensive experiments and find that RAPID outperforms the CoCoSoDa and UniXcoder model by an average of 15.7% and 10%, respectively, as measured by the MRR metric. When trained on full data, our approach results in an average improvement of 7.5% under the MRR metric using CodeBERT. We observe that as the model’s performance in zero-shot tasks improves, the impact of hard negatives diminishes. Our observation also indicates that fine-tuning CodeT5 for generating pseudo labels can enhance the performance of the code search model, and using only 100-shot samples can yield comparable results to the supervised baseline. Furthermore, we evaluate the effectiveness of RAPID in real-world code search tasks in three GitHub projects through both human and automated assessments. Our findings reveal RAPID exhibits superior performance, e.g., an average improvement of 18% under the MRR metric over the top-performing model.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
大意的晓亦完成签到 ,获得积分10
12秒前
1分钟前
fangyifang完成签到,获得积分10
1分钟前
小蘑菇应助jyy采纳,获得10
1分钟前
KINGAZX完成签到 ,获得积分10
2分钟前
2分钟前
jyy发布了新的文献求助10
2分钟前
通科研完成签到 ,获得积分10
3分钟前
科研通AI5应助科研通管家采纳,获得10
3分钟前
MchemG应助科研通管家采纳,获得30
3分钟前
科研通AI2S应助科研通管家采纳,获得10
3分钟前
wujuan1606完成签到 ,获得积分10
3分钟前
胖小羊完成签到 ,获得积分10
5分钟前
yo一天完成签到,获得积分10
5分钟前
星际舟完成签到,获得积分10
6分钟前
凡笙发布了新的文献求助10
6分钟前
科研通AI5应助凡笙采纳,获得10
6分钟前
MchemG应助科研通管家采纳,获得20
7分钟前
科研通AI2S应助科研通管家采纳,获得15
7分钟前
Dave完成签到 ,获得积分10
7分钟前
7分钟前
tian发布了新的文献求助10
7分钟前
科研通AI5应助tian采纳,获得10
7分钟前
穆一手完成签到 ,获得积分10
8分钟前
8分钟前
yuzao发布了新的文献求助10
8分钟前
实力不允许完成签到 ,获得积分10
8分钟前
研友_nxw2xL完成签到,获得积分10
9分钟前
muriel完成签到,获得积分10
9分钟前
9分钟前
凡笙发布了新的文献求助10
9分钟前
lyj完成签到 ,获得积分10
9分钟前
牛八先生完成签到,获得积分10
9分钟前
minuxSCI完成签到,获得积分10
9分钟前
林利芳完成签到 ,获得积分10
9分钟前
貔貅完成签到 ,获得积分10
10分钟前
闪闪的谷梦完成签到 ,获得积分10
10分钟前
Emperor完成签到 ,获得积分0
10分钟前
oscar完成签到,获得积分10
11分钟前
cy0824完成签到 ,获得积分10
11分钟前
高分求助中
All the Birds of the World 4000
Production Logging: Theoretical and Interpretive Elements 3000
Animal Physiology 2000
Les Mantodea de Guyane Insecta, Polyneoptera 2000
Am Rande der Geschichte : mein Leben in China / Ruth Weiss 1500
CENTRAL BOOKS: A BRIEF HISTORY 1939 TO 1999 by Dave Cope 1000
Machine Learning Methods in Geoscience 1000
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3736655
求助须知:如何正确求助?哪些是违规求助? 3280645
关于积分的说明 10020153
捐赠科研通 2997322
什么是DOI,文献DOI怎么找? 1644527
邀请新用户注册赠送积分活动 782060
科研通“疑难数据库(出版商)”最低求助积分说明 749656