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

By Daniel Zügner, Tobias Kirschstein, Michele Catasta, Jure Leskovec, Stephan Günnemann. 2021

133 citations recorded by the source corpus.

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.

Subfields: Information Systems, Software, Natural Language Processing, Representation & Self-Supervised Learning, Signal Processing, Software Engineering

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Information Systems

  1. Uri Alon
  2. Ge Li
  3. Graham Neubig
  4. Zhi Jin
  5. Frank F. Xu
  6. Yunfei Zhao
  7. Daniel Tarlow
  8. Vincent J. Hellendoorn

In Software

  1. Ge Li
  2. Zhi Jin
  3. Graham Neubig
  4. Daniel Tarlow
  5. Steven C. H. Hoi
  6. Han Peng
  7. Yunfei Zhao
  8. Vincent J. Hellendoorn

In Natural Language Processing

  1. Tie-Yan Liu
  2. Graham Neubig
  3. Uri Alon
  4. Di He
  5. Ge Li
  6. Zhi Jin
  7. Frank F. Xu
  8. Yunfei Zhao

In Representation & Self-Supervised Learning

  1. Steven C. H. Hoi
  2. Tie-Yan Liu
  3. Daniel Tarlow
  4. Petros Maniatis
  5. Shafiq R. Joty
  6. Vincent J. Hellendoorn
  7. Tianle Cai
  8. Di He

In Signal Processing

  1. Ge Li
  2. Zhi Jin
  3. Petros Maniatis
  4. Uri Alon
  5. Di He
  6. Shuxin Zheng
  7. Graham Neubig
  8. Daniel Tarlow

Citations in the corpus