LGSEMar 21, 2021

Language-Agnostic Representation Learning of Source Code from Structure and Context

arXiv:2103.11318v1131 citations
Originality Incremental advance
AI Analysis

This work addresses the challenge of improving code summarization and representation learning for developers, particularly benefiting low-resource programming languages, though it is incremental as it builds on existing methods by combining structure and context.

The authors tackled the problem of learning representations of source code by jointly using its textual context and structural AST, achieving state-of-the-art results in monolingual code summarization across five programming languages and introducing the first multilingual model that improves performance, especially for low-resource languages.

Source code (Context) and its parsed abstract syntax tree (AST; Structure) are two complementary representations of the same computer program. Traditionally, designers of machine learning models have relied predominantly either on Structure or Context. We propose a new model, which jointly learns on Context and Structure of source code. In contrast to previous approaches, our model uses only language-agnostic features, i.e., source code and features that can be computed directly from the AST. Besides obtaining state-of-the-art on monolingual code summarization on all five programming languages considered in this work, we propose the first multilingual code summarization model. We show that jointly training on non-parallel data from multiple programming languages improves results on all individual languages, where the strongest gains are on low-resource languages. Remarkably, multilingual training only from Context does not lead to the same improvements, highlighting the benefits of combining Structure and Context for representation learning on code.

Code Implementations1 repo
Foundations

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

Your Notes