跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2012.07023 (cs)
[提交于 2020年12月13日 (v1),最后修订于 2020年12月15日 (此版本, v2)]

标题:InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees

作者:Nghi D. Q. Bui, Yijun Yu, Lingxiao Jiang
查看论文《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Building deep learning models on source code has found many successful software engineering applications, such as code search, code comment generation, bug detection, code migration, and so on. Current learning techniques, however, have a major drawback that these models are mostly trained on datasets labeled for particular downstream tasks, and code representations may not be suitable for other tasks. While some techniques produce representations from unlabeled code, they are far from satisfactory when applied to downstream tasks. Although certain techniques generate representations from unlabeled code when applied to downstream tasks they are far from satisfactory. This paper proposes InferCode to overcome the limitation by adapting the self-supervised learning mechanism to build source code model. The key novelty lies in training code representations by predicting automatically identified subtrees from the context of the ASTs. Subtrees in ASTs are treated with InferCode as the labels for training code representations without any human labeling effort or the overhead of expensive graph construction, and the trained representations are no longer tied to any specific downstream tasks or code units. We trained an InferCode model instance using the Tree-based CNN as the encoder of a large set of Java code and applied it to downstream unsupervised tasks such as code clustering, code clone detection, cross-language code search or reused under a transfer learning scheme to continue training the model weights for supervised tasks such as code classification and method name prediction. Compared to previous code learning techniques applied to the same downstream tasks, such as Code2Vec, Code2Seq, ASTNN, higher performance results are achieved using our pre-trained InferCode model with a significant margin for most tasks including those involving different programming languages.
评论: Accepted at ICSE 2021
主题: 软件工程 (cs.SE); 人工智能 (cs.AI); 机器学习 (cs.LG); 程序设计语言 (cs.PL)
引用方式: arXiv:2012.07023 [cs.SE]
  (或者 arXiv:2012.07023v2 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2012.07023

提交历史

来自:Nghi D. Q. Bui
[v1] 2020年12月13日 星期日 10:33:41 UTC
[v2] 2020年12月15日 星期二 16:37:23 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.AI
< 上一篇   |   下一篇 >
最新 | 近期 | 2020-12
切换浏览方式为:
cs
cs.SE
cs.LG
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站