LGPLMLAug 4, 2018

code2seq: Generating Sequences from Structured Representations of Code

arXiv:1808.01400v6801 citationsHas Code
Originality Highly original
AI Analysis

This addresses code summarization and documentation tasks for software developers, representing a novel method rather than an incremental improvement.

The paper tackles the problem of generating natural language sequences from source code by leveraging syntactic structure, achieving significant performance improvements over previous models designed for programming languages and state-of-the-art neural machine translation models.

The ability to generate natural language sequences from source code snippets has a variety of applications such as code summarization, documentation, and retrieval. Sequence-to-sequence (seq2seq) models, adopted from neural machine translation (NMT), have achieved state-of-the-art performance on these tasks by treating source code as a sequence of tokens. We present ${\rm {\scriptsize CODE2SEQ}}$: an alternative approach that leverages the syntactic structure of programming languages to better encode source code. Our model represents a code snippet as the set of compositional paths in its abstract syntax tree (AST) and uses attention to select the relevant paths while decoding. We demonstrate the effectiveness of our approach for two tasks, two programming languages, and four datasets of up to $16$M examples. Our model significantly outperforms previous models that were specifically designed for programming languages, as well as state-of-the-art NMT models. An interactive online demo of our model is available at http://code2seq.org. Our code, data and trained models are available at http://github.com/tech-srl/code2seq.

Code Implementations6 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes