Latent Programmer: Discrete Latent Codes for Program Synthesis

12/01/2020
by   Joey Hong, et al.
1

In many sequence learning tasks, such as program synthesis and document summarization, a key problem is searching over a large space of possible output sequences. We propose to learn representations of the outputs that are specifically meant for search: rich enough to specify the desired output but compact enough to make search more efficient. Discrete latent codes are appealing for this purpose, as they naturally allow sophisticated combinatorial search strategies. The latent codes are learned using a self-supervised learning principle, in which first a discrete autoencoder is trained on the output sequences, and then the resulting latent codes are used as intermediate targets for the end-to-end sequence prediction task. Based on these insights, we introduce the Latent Programmer, a program synthesis method that first predicts a discrete latent code from input/output examples, and then generates the program in the target language. We evaluate the Latent Programmer on two domains: synthesis of string transformation programs, and generation of programs from natural language descriptions. We demonstrate that the discrete latent representation significantly improves synthesis accuracy.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/12/2018

Neural Program Search: Solving Programming Tasks from Description and Examples

We present a Neural Program Search, an algorithm to generate programs fr...
research
11/07/2016

Latent Attention For If-Then Program Synthesis

Automatic translation from natural language descriptions into programs i...
research
01/11/2022

Predictive Synthesis of API-Centric Code

Today's programmers, especially data science practitioners, make heavy u...
research
07/28/2020

BUSTLE: Bottom-up program-Synthesis Through Learning-guided Exploration

Program synthesis is challenging largely because of the difficulty of se...
research
01/29/2018

Discrete Autoencoders for Sequence Models

Recurrent models for sequences have been recently successful at many tas...
research
07/25/2023

Synthesis of Procedural Models for Deterministic Transition Systems

This paper introduces a general approach for synthesizing procedural mod...
research
01/10/2020

Searching a Database of Source Codes Using Contextualized Code Search

We assume a database containing a large set of program source codes and ...

Please sign up or login with your details

Forgot password? Click here to reset