Latent Execution for Neural Program Synthesis

Overview

Latent Execution for Neural Program Synthesis

This repo provides the code to replicate the experiments in the paper

Xinyun Chen, Dawn Song, Yuandong Tian, Latent Execution for Neural Program Synthesis, in NeurIPS 2021.

Paper [arXiv] [NeurIPS]

Prerequisites

PyTorch

Dataset

Sample Usage

  1. To run our full latent program synthesizer (LaSynth):

python run.py --latent_execution --operation_predictor --decoder_self_attention

  1. To run our program synthesizer without partial program execution (NoPartialExecutor):

python run.py --latent_execution --operation_predictor --decoder_self_attention --no_partial_execution

  1. To run the RobustFill model:

python run.py

  1. To run the Property Signatures model:

python run.py --use_properties

Run experiments

In the following we list some important arguments for experiments:

  • --data_folder: path to the dataset.
  • --model_dir: path to the directory that stores the models.
  • --load_model: path to the pretrained model (optional).
  • --eval: adding this command will enable the evaluation mode; otherwise, the model will be trained by default.
  • --num_epochs: number of training epochs. The default value is 10, but usually 1 epoch is enough for a decent performance.
  • --log_interval LOG_INTERVAL: saving checkpoints every LOG_INTERVAL steps.
  • --latent_execution: Enable the model to learn the latent executor module.
  • --no_partial_execution: Enable the model to learn the latent executor module, but this module is not used by the program synthesizer, and only adds to the training loss.
  • --operation_predictor: Enable the model to learn the operation predictor module.
  • --use_properties: Run the Property Signatures baseline.
  • --iterative_retraining_prog_gen: Decode training programs for iterative retraining.

More details can be found in arguments.py.

Citation

If you use the code in this repo, please cite the following paper:

@inproceedings{chen2021latent,
  title={Latent Execution for Neural Program Synthesis},
  author={Chen, Xinyun and Song, Dawn and Tian, Yuandong},
  booktitle={Advances in Neural Information Processing Systems},
  year={2021}
}

License

This repo is CC-BY-NC licensed, as found in the LICENSE file.

References

[1] Devlin et al., RobustFill: Neural Program Learning under Noisy I/O, ICML 2017.

[2] Odena and Sutton, Learning to Represent Programs with Property Signatures, ICLR 2020.

[3] Chen et al., Execution-Guided Neural Program Synthesis, ICLR 2019.

Owner
Xinyun Chen
Ph.D. student, UC Berkeley.
Xinyun Chen
Scientific Computation Methods in C and Python (Open for Hacktoberfest 2021)

Sci - cpy README is a stub. Do expand it. Objective This repository is meant to be a ready reference for scientific computation methods. Do ⭐ it if yo

Sandip Dutta 7 Oct 12, 2022
CS_Final_Metal_surface_detection - This is a final project for CoderSchool Machine Learning bootcamp on 29/12/2021.

CS_Final_Metal_surface_detection This is a final project for CoderSchool Machine Learning bootcamp on 29/12/2021. The project is based on the dataset

Cuong Vo 1 Dec 29, 2021
MNIST, but with Bezier curves instead of pixels

bezier-mnist This is a work-in-progress vector version of the MNIST dataset. Samples Here are some samples from the training set. Note that, while the

Alex Nichol 15 Jan 16, 2022
This repository contains datasets and baselines for benchmarking Chinese text recognition.

Benchmarking-Chinese-Text-Recognition This repository contains datasets and baselines for benchmarking Chinese text recognition. Please see the corres

FudanVI Lab 254 Dec 30, 2022
Real-CUGAN - Real Cascade U-Nets for Anime Image Super Resolution

Real Cascade U-Nets for Anime Image Super Resolution 中文 | English 🔥 Real-CUGAN

tarsin 111 Dec 28, 2022
A tool to visualise the results of AlphaFold2 and inspect the quality of structural predictions

AlphaFold Analyser This program produces high quality visualisations of predicted structures produced by AlphaFold. These visualisations allow the use

Oliver Powell 3 Nov 13, 2022
2021 credit card consuming recommendation

2021 credit card consuming recommendation

Wang, Chung-Che 7 Mar 08, 2022
A highly modular PyTorch framework with a focus on Neural Architecture Search (NAS).

UniNAS A highly modular PyTorch framework with a focus on Neural Architecture Search (NAS). under development (which happens mostly on our internal Gi

Cognitive Systems Research Group 19 Nov 23, 2022
PyoMyo - Python Opensource Myo library

PyoMyo Python module for the Thalmic Labs Myo armband. Cross platform and multithreaded and works without the Myo SDK. pip install pyomyo Documentati

PerlinWarp 81 Jan 08, 2023
Official implementation of "Learning to Discover Cross-Domain Relations with Generative Adversarial Networks"

DiscoGAN Official PyTorch implementation of Learning to Discover Cross-Domain Relations with Generative Adversarial Networks. Prerequisites Python 2.7

SK T-Brain 754 Dec 29, 2022
Vector AI — A platform for building vector based applications. Encode, query and analyse data using vectors.

Vector AI is a framework designed to make the process of building production grade vector based applications as quickly and easily as possible. Create

Vector AI 267 Dec 23, 2022
Implementation for "Seamless Manga Inpainting with Semantics Awareness" (SIGGRAPH 2021 issue)

Seamless Manga Inpainting with Semantics Awareness [SIGGRAPH 2021](To appear) | Project Website | BibTex Introduction: Manga inpainting fills up the d

101 Jan 01, 2023
GBIM(Gesture-Based Interaction map)

手势交互地图 GBIM(Gesture-Based Interaction map),基于视觉深度神经网络的交互地图,通过电脑摄像头观察使用者的手势变化,进而控制地图进行简单的交互。网络使用PaddleX提供的轻量级模型PPYOLO Tiny以及MobileNet V3 small,使得整个模型大小约10MB左右,即使在CPU下也能快速定位和识别手势。

8 Feb 10, 2022
Information-Theoretic Multi-Objective Bayesian Optimization with Continuous Approximations

Information-Theoretic Multi-Objective Bayesian Optimization with Continuous Approximations Requirements The code is implemented in Python and requires

1 Nov 03, 2021
Studying Python release adoptions by looking at PyPI downloads

Analysis of version adoptions on PyPI We get PyPI download statistics via Google's BigQuery using the pypinfo tool. Usage First you need to get an acc

Julien Palard 9 Nov 04, 2022
An implementation of Video Frame Interpolation via Adaptive Separable Convolution using PyTorch

This work has now been superseded by: https://github.com/sniklaus/revisiting-sepconv sepconv-slomo This is a reference implementation of Video Frame I

Simon Niklaus 984 Dec 16, 2022
Run Keras models in the browser, with GPU support using WebGL

**This project is no longer active. Please check out TensorFlow.js.** The Keras.js demos still work but is no longer updated. Run Keras models in the

Leon Chen 4.9k Dec 29, 2022
A Python training and inference implementation of Yolov5 helmet detection in Jetson Xavier nx and Jetson nano

yolov5-helmet-detection-python A Python implementation of Yolov5 to detect head or helmet in the wild in Jetson Xavier nx and Jetson nano. In Jetson X

12 Dec 05, 2022
Use of Attention Gates in a Convolutional Neural Network / Medical Image Classification and Segmentation

Attention Gated Networks (Image Classification & Segmentation) Pytorch implementation of attention gates used in U-Net and VGG-16 models. The framewor

Ozan Oktay 1.6k Dec 30, 2022
Differentiable rasterization applied to 3D model simplification tasks

nvdiffmodeling Differentiable rasterization applied to 3D model simplification tasks, as described in the paper: Appearance-Driven Automatic 3D Model

NVIDIA Research Projects 336 Dec 30, 2022