arrow
返回

XCODE: Towards Cross-Language Code Representation with Large-Scale Pre-Training

delete2022-04-09
delete8
PRE
AI
Z
Zehao Lin
G
Guodun Li
J
Jingfeng Zhang
Y
Yue Deng
X
Xiangji Zeng
Y
Yin Zhang *
Y
Yao Wan
DOI:10.1145/3506696delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Source code representation learning is the basis of applying artificial intelligence to many software engineering tasks such as code clone detection, algorithm classification, and code summarization. Recently, many works have tried to improve the performance of source code representation from various perspectives, e.g., introducing the structural information of programs into latent representation. However, when dealing with rapidly expanded unlabeled cross-language source code datasets from the Internet, there are still two issues. Firstly, deep learning models for many code-specific tasks still suffer from the lack of high-quality labels. Secondly, the structural differences among programming languages make it more difficult to process multiple languages in a single neural architecture. To address these issues, in this article, we propose a novel Cross-language Code representation with a large-scale pre-training (XCoDE) method. Concretely, we propose to use several abstract syntax trees and ELMo-enhanced variational autoencoders to obtain multiple pre-trained source code language models trained on about 1.5 million code snippets. To fully utilize the knowledge across programming languages, we further propose a Shared Encoder-Decoder (SED) architecture which uses the multi-teacher single-student method to transfer knowledge from the aforementioned pre-trained models to the distilled SED. The pre-trained models and SED will cooperate to better represent the source code. For evaluation, we examine our approach on three typical downstream cross-language tasks, i.e., source code translation, code clone detection, and code-to-code search, on a real-world dataset composed of programming exercises with multiple solutions. Experimental results demonstrate the effectiveness of our proposed approach on cross-language code representations. Meanwhile, our approach performs significantly better than several code representation baselines on different downstream tasks in terms of multiple automatic evaluation metrics.
Keyword:
Deep learning
neural networks
code representation
cross-language
pre-training

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

Z
zhejiang university
学者数:
17.7W
论文数: 12.1W
被引数: 152
引用论文

引用论文

err
IF0
err
err0
errOAAI
err
err分享
err收藏
The Native Comic Book Project: Native Youth Making Comics and Healthy Decisions
err2012-01-19
err0
errOAAI
errMichelle Montgomery; Brenda Manuelito; Carrie Nass; Tami Chock; Dedra Buchwald
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
学者 查看更多内容