A Self-Attentional Neural Architecture for Code Completion with Multi-Task Learning
Authors:
Open Access
- 13 July 2020
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 37-47
Abstract
Code completion, one of the most useful features in the Integrated Development Environments (IDEs), can accelerate software development by suggesting the libraries, APIs, and method names in real-time. Recent studies have shown that statistical language models can improve the performance of code completion tools through learning from large-scale software repositories. However, these models suffer from three major drawbacks: a) The hierarchical structural information of the programs is not fully utilized in the program's representation; b) In programs, the semantic relationships can be very long. Existing recurrent neural networks based language models are not sufficient to model the long-term dependency. c) Existing approaches perform a specific task in one model, which leads to the underuse of the information from related tasks. To address these challenges, in this paper, we propose a self-attentional neural architecture for code completion with multi-task learning. To utilize the hierarchical structural information of the programs, we present a novel method that considers the path from the predicting node to the root node. To capture the long-term dependency in the input programs, we adopt a self-attentional architecture based network as the base language model. To enable the knowledge sharing between related tasks, we creatively propose a Multi-Task Learning (MTL) framework to learn two related tasks in code completion jointly. Experiments on three real-world datasets demonstrate the effectiveness of our model when compared with state-of-the-art methods.Keywords
This publication has 20 references indexed in Scilit:
- Multi-task Domain Adaptation for Sequence Tagging2017
- TIPMerge: recommending experts for integrating changes across branches2016
- Probabilistic model for code with decision trees2016
- Multi-Task Learning for Multiple Language Translation2015
- Representation Learning Using Multi-Task Deep Neural Networks for Semantic Classification and Information Retrieval2015
- New types of deep neural network learning for speech recognition and related applications: an overview2013
- Learning from examples to improve code completion systems2009
- How Program History Can Improve Code Completion2008
- Bidirectional recurrent neural networksIEEE Transactions on Signal Processing, 1997
- Long Short-Term MemoryNeural Computation, 1997