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

03/21/2021
by   Daniel Zügner, et al.
5

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/13/2022

MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning

Representation learning of source code is essential for applying machine...
research
08/16/2021

Autoencoders as Tools for Program Synthesis

Recently there have been many advances in research on language modeling ...
research
05/01/2022

Unified Abstract Syntax Tree Representation Learning for Cross-Language Program Classification

Program classification can be regarded as a high-level abstraction of co...
research
01/16/2019

Predicting Variable Types in Dynamically Typed Programming Languages

Dynamic Programming Languages are quite popular because they increase th...
research
06/03/2019

A Language-Agnostic Model for Semantic Source Code Labeling

Code search and comprehension have become more difficult in recent years...
research
02/09/2021

Demystifying Code Summarization Models

The last decade has witnessed a rapid advance in machine learning models...
research
08/04/2022

On-the-Fly Syntax Highlighting using Neural Networks

With the presence of online collaborative tools for software developers,...

Please sign up or login with your details

Forgot password? Click here to reset