A lot of problems in the field of software engineering - bug fixing, commit message generation, etc. - require analyzing not only the code itself but specifically code changes. Applying machine learning models to these tasks requires us to create numerical representations of the changes, i.e. embeddings. Recent studies demonstrate that the best way to obtain these embeddings is to pre-train a deep neural network in an unsupervised manner on a large volume of unlabeled data and then further fine-tune it for a specific task. In this work, we propose an approach for obtaining such embeddings of code changes during pre-training and evaluate them on two different downstream tasks - applying changes to code and commit message generation. The pre-training consists of the model learning to apply the given change (an edit sequence) to the code in a correct way, and therefore requires only the code change itself. To increase the quality of the obtained embeddings, we only consider the changed tokens in the edit sequence. In the task of applying code changes, our model outperforms the model that uses full edit sequences by 5.9 percentage points in accuracy. As for the commit message generation, our model demonstrated the same results as supervised models trained for this specific task, which indicates that it can encode code changes well and can be improved in the future by pre-training on a larger dataset of easily gathered code changes.


翻译:软件工程 — 错误修正、 承诺生成信息等等 — 领域的许多问题不仅需要分析代码本身, 还需要分析代码本身, 还需要具体代码修改。 应用机器学习模型来完成这些任务, 需要我们创建这些变化的数字表示, 即嵌入。 最近的研究显示, 获得这些嵌入的最佳方式是, 以不受监督的方式对大量无标签数据进行深层神经网络前导, 然后对它进行进一步微调, 具体任务。 在这项工作中, 我们建议了一种方法, 在培训前获得这种代码修改的嵌入, 并且对两个不同的下游任务进行评估 : 将修改应用到代码并承诺生成信息。 预培训包括模型学习将给定的修改( 编辑序列) 正确应用到代码中, 因此只需要代码本身改变。 为了提高获得的嵌入数据的质量, 我们只在编辑序列中考虑修改的符号。 在应用代码修改的过程中, 我们的模型比模型要优于模型, 使用完全编辑序列的模型, 在精确度上应用5.9 百分比 点 。 对于将 修改 的模型来说, 将 用于 将 改进 修改 改进 修改 的 修改 的 将 修改 用于 修改 修改 修改 的 修改 的 的 将 用于 修改 修改 修改 用于 修改 的 修改 的 用于 修改 的 修改 的 的 用于 的 修改 修改 修改 修改 修改 修改 的 的 的 修改 修改 修改 修改 修改 修改 修改 的 修改 的 修改 修改 修改 修改 修改 的 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 的 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 修改 的 修改 的 的 的 的 的 的 修改 修改 的 的 的 的 的 的 修改 修改 修改 修改 修改 修改 修改 修改 的 的

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
161+阅读 · 2020年3月18日
吴恩达新书《Machine Learning Yearning》完整中文版
专知会员服务
144+阅读 · 2019年10月27日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
13+阅读 · 2020年4月12日
Paraphrase Generation with Deep Reinforcement Learning
Arxiv
7+阅读 · 2018年5月23日
VIP会员
相关资讯
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员