All Projects → crazydonkey200 → Neural Symbolic Machines

crazydonkey200 / Neural Symbolic Machines

Licence: apache-2.0
Neural Symbolic Machines is a framework to integrate neural networks and symbolic representations using reinforcement learning, with applications in program synthesis and semantic parsing.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Neural Symbolic Machines

Pytorch Trpo
PyTorch implementation of Trust Region Policy Optimization
Stars: ✭ 303 (-0.66%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Gym Gazebo2
gym-gazebo2 is a toolkit for developing and comparing reinforcement learning algorithms using ROS 2 and Gazebo
Stars: ✭ 257 (-15.74%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Roboleague
A car soccer environment inspired by Rocket League for deep reinforcement learning experiments in an adversarial self-play setting.
Stars: ✭ 236 (-22.62%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Machine Learning Uiuc
🖥️ CS446: Machine Learning in Spring 2018, University of Illinois at Urbana-Champaign
Stars: ✭ 233 (-23.61%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Deep rl
PyTorch implementations of Deep Reinforcement Learning algorithms (DQN, DDQN, A2C, VPG, TRPO, PPO, DDPG, TD3, SAC, SAC-AEA)
Stars: ✭ 291 (-4.59%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Pytorch Drl
PyTorch implementations of various Deep Reinforcement Learning (DRL) algorithms for both single agent and multi-agent.
Stars: ✭ 233 (-23.61%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Reinforcement Learning
Minimal and Clean Reinforcement Learning Examples
Stars: ✭ 2,863 (+838.69%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Pytorch A2c Ppo Acktr Gail
PyTorch implementation of Advantage Actor Critic (A2C), Proximal Policy Optimization (PPO), Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation (ACKTR) and Generative Adversarial Imitation Learning (GAIL).
Stars: ✭ 2,632 (+762.95%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Pytorch Soft Actor Critic
PyTorch implementation of soft actor critic
Stars: ✭ 300 (-1.64%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Drq
DrQ: Data regularized Q
Stars: ✭ 268 (-12.13%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Deep Rl Trading
playing idealized trading games with deep reinforcement learning
Stars: ✭ 228 (-25.25%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Tensorforce
Tensorforce: a TensorFlow library for applied reinforcement learning
Stars: ✭ 3,062 (+903.93%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Applied Reinforcement Learning
Reinforcement Learning and Decision Making tutorials explained at an intuitive level and with Jupyter Notebooks
Stars: ✭ 229 (-24.92%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Learning To Communicate Pytorch
Learning to Communicate with Deep Multi-Agent Reinforcement Learning in PyTorch
Stars: ✭ 236 (-22.62%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Gam
A PyTorch implementation of "Graph Classification Using Structural Attention" (KDD 2018).
Stars: ✭ 227 (-25.57%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Learningx
Deep & Classical Reinforcement Learning + Machine Learning Examples in Python
Stars: ✭ 241 (-20.98%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Reinforcementlearning.jl
A reinforcement learning package for Julia
Stars: ✭ 192 (-37.05%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Drl4recsys
Courses on Deep Reinforcement Learning (DRL) and DRL papers for recommender systems
Stars: ✭ 196 (-35.74%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Rad
RAD: Reinforcement Learning with Augmented Data
Stars: ✭ 268 (-12.13%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning
Rlgraph
RLgraph: Modular computation graphs for deep reinforcement learning
Stars: ✭ 272 (-10.82%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning

Introduction

Neural Symbolic Machines (NSM)

Neural Symbolic Machines is a framework to integrate neural networks and symbolic representations using reinforcement learning.

Applications

The framework can be used to learn semantic parsing and program synthesis from weak supervision (e.g., question-answer pairs), which is easier to collect and more flexible than full supervision (e.g., question-program pairs). Applications include virtual assistant, natural language interface to database, human-robot interaction, etc. It has been used to learn semantic parsers on Freebase and natural language interfaces to database tables.

Memory Augmented Policy Optimization (MAPO)

We use Memory Augmented Policy Optimization (MAPO) to train NSM. It is a new policy optimization method that uses a memory buffer of promising trajectories to accelerate and stabilize policy gradient training. It is well suited for deterministic environments with discrete actions, for example, structured prediction, combinatorial optimization, program synthesis, etc.

Distributed Actor-Learner Architecture

Our implementation uses a distributed actor-learner architecture that utilizes multiple CPUs and GPUs for scalable training, similar to the one introduced in the IMPALA paper from DeepMind.

Dependencies

  • Python 2.7
  • TensorFlow>=1.7
  • Other required packages are summarized in requirements.txt.

Quick start

Setup AWS instance

Start a g3.8xlarge instance with “Deep Learning AMI (Ubuntu) Version 10.0” image. (The experiments are conducted using this type of instance and image, you will need to adjust the configurations in scripts to run on other instances.)

Open port (for example, 6000-6010) in the security group for tensorboard. Instructions: https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-tensorboard.html

ssh into the instance.

Download the data and install the dependencies

mkdir ~/projects
cd ~/projects/
git clone https://github.com/crazydonkey200/neural-symbolic-machines.git 

cd ~/projects/neural-symbolic-machines/
./aws_setup.sh

Running experiments and monitor with tensorboard

Start WikiTable experiment

screen -S wtq
source activate tensorflow_p27
cd ~/projects/neural-symbolic-machines/table/wtq/
./run.sh mapo your_experiment_name

This script trains the model for 30k steps and evaluates the checkpoint with the highest dev accuracy on the test set. It takes about 2.5 hrs to finish.

All the data about this experiment will be saved in ~/projects/data/wikitable/output/your_experiment_name, and the evaluation result would be saved in ~/projects/data/wikitable/output/eval_your_experiment_name.

You could also evaluate a trained model on the dev set or test set using

./eval.sh your_experiment_name dev

./eval.sh your_experiment_name test

Start tensorboard to monitor WikiTable experiment

screen -S tb
source activate tensorflow_p27
cd  ~/projects/data/wikitable/
tensorboard --logdir=output

To see the tensorboard, in the browser, go to [your AWS public DNS]:6006 avg_return_1 is the main metric (accuracy).

Start WikiSQL experiment.

screen -S ws
source activate tensorflow_p27
cd ~/projects/neural-symbolic-machines/table/wikisql/
./run.sh mapo your_experiment_name

This script trains the model for 15k steps and evaluates the checkpoint with the highest dev accuracy on the test set. It takes about 6.5 hrs to finish.

All the data about this experiment will be saved in ~/projects/data/wikisql/output/your_experiment_name, and the evaluation result would be saved in ~/projects/data/wikisql/output/eval_your_experiment_name.

You could also evaluate a trained model on the dev set or test set using

./eval.sh your_experiment_name dev

./eval.sh your_experiment_name test

Start tensorboard to monitor WikiSQL experiment

screen -S tb
source activate tensorflow_p27
cd  ~/projects/data/wikisql/
tensorboard --logdir=output

To see the tensorboard, in the browser, go to [your AWS public DNS]:6006 avg_return_1 is the main metric (accuracy).

Example outputs

Example learning curves for WikiTable (left) and WikiSQL (right) experiments (0.9 smoothing):

Citation

If you use the code in your research, please cite:

@incollection{NIPS2018_8204,
title = {Memory Augmented Policy Optimization for Program Synthesis and Semantic Parsing},
author = {Liang, Chen and Norouzi, Mohammad and Berant, Jonathan and Le, Quoc V and Lao, Ni},
booktitle = {Advances in Neural Information Processing Systems 31},
editor = {S. Bengio and H. Wallach and H. Larochelle and K. Grauman and N. Cesa-Bianchi and R. Garnett},
pages = {10015--10027},
year = {2018},
publisher = {Curran Associates, Inc.},
url = {http://papers.nips.cc/paper/8204-memory-augmented-policy-optimization-for-program-synthesis-and-semantic-parsing.pdf}
}

@inproceedings{liang2017neural,
  title={Neural Symbolic Machines: Learning Semantic Parsers on Freebase with Weak Supervision},
  author={Liang, Chen and Berant, Jonathan and Le, Quoc and Forbus, Kenneth D and Lao, Ni},
  booktitle={Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  volume={1},
  pages={23--33},
  year={2017}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].