All Projects → MichelDeudon → Encode Attend Navigate

MichelDeudon / Encode Attend Navigate

Licence: mit
Learning Heuristics for the TSP by Policy Gradient

Projects that are alternatives of or similar to Encode Attend Navigate

Juniperkernel
R Kernel for Jupyter
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Puzzlemix
Official PyTorch implementation of "Puzzle Mix: Exploiting Saliency and Local Statistics for Optimal Mixup" (ICML'20)
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Hass Amazon Rekognition
Home Assistant Object detection with Amazon Rekognition
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Stock2vec
📈 Stock embeddings based on PE context
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
E2e Ml App Pytorch
🚀 An end-to-end ML applications using PyTorch, W&B, FastAPI, Docker, Streamlit and Heroku → https://e2e-ml-app-pytorch.herokuapp.com/ (may take few minutes to spin up occasionally).
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Remote Sensing With Python
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Mas Memory Aware Synapses
Memory Aware Synapses method implementation code
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Backdrop
Implementation and demonstration of backdrop in pytorch. Code and demonstration of GP dataset generator.
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Covid 19 Dataviz
Simple data visualization on Covid-19 data using Pandas and Google Colaboratory
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Equivariant Transformers
Equivariant Transformer (ET) layers are image-to-image mappings that incorporate prior knowledge on invariances with respect to continuous transformations groups (ICML 2019). Paper: https://arxiv.org/abs/1901.11399
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Zipline Poloniex
Poloniex bundle for zipline
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Data bootcamp
Materials for a course at NYU Stern using Python to study economic and financial data.
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Qpga
Simulations of photonic quantum programmable gate arrays
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Pysabr
SABR model Python implementation
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Twitter sentiment analysis
A guide for binary class sentiment analysis of tweets.
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Bitcoin Price Prediction Using Lstm
Bitcoin price Prediction ( Time Series ) using LSTM Recurrent neural network
Stars: ✭ 67 (-1.47%)
Mutual labels:  jupyter-notebook
Deep Learning
深度学习的实战项目
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Predictive Maintenance
Demonstration of MapR for Industrial IoT
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook
Pynq
Python Productivity for ZYNQ
Stars: ✭ 1,152 (+1594.12%)
Mutual labels:  jupyter-notebook
Concrete Autoencoders
Stars: ✭ 68 (+0%)
Mutual labels:  jupyter-notebook

Encode, Attend & Navigate

Overview

Tensorflow implementation of
Learning Heuristics for the TSP by Policy Gradient, Deudon M., Cournut P., Lacoste A., Adulyasak Y. and Rousseau L.M.

Requirements

Usage

  • To train a model from scratch (data is generated on the fly), run blocks 1.DataGenerator, 2.Config, 3.Model and 4.Train with the Jupyter Notebook (Neural_Reinforce.ipynb). You can change parameters in the Config block. Default parameters should replicate results reported in our paper (2D TSP50).

  • If training is successful, the model will be saved in a "save" folder (filename depends on config) and training statistics will be reported in a "summary" folder. To visualize training on tensorboard, run:

> tensorboard --logdir=summary
  • To test a trained model, run block 5.Test with the Jupyter Notebook (Neural_Reinforce.ipynb).

What is Combinatorial Optimization ?

  • Combinatorial Optimization: A topic that consists of finding an optimal object from a finite set of objects.
  • Sequencing problems: The best order for performing a set of tasks must be determined.
  • Applications: Manufacturing, routing, astrology, genetics...

Can we learn data-driven heuristics, competitive with existing man-engineered heuristics ?

What is Deep Reinforcement Learning ?

  • Reinforcement Learning: A general purpose framework for Decision Making in a scenario where a learner actively interacts with an environment to achieve a certain goal.
  • Deep Learning: A general purpose framework for Representation Learning
  • Successful applications: Playing games, navigating worlds, controlling physical systems and interacting with users.

Related Work

Our work draws inspiration from Neural Combinatorial Optimization with Reinforcement Learning to solve the Euclidean TSP. Our framework gets a 5x speedup compared to the original framework, while achieving similar results in terms of optimality.

Architecture

Following Bello & al., 2016, our Neural Network overall parameterizes a stochastic policy over city permutations. Our model is trained by Policy Gradient (Reinforce, 1992) to learn to assign high probability to "good tours", and low probability to "undesirable tours".

Neural Encoder

Our neural encoder takes inspiration from recent advances in Neural Machine Translation The purpose of our encoder is to obtain a representation for each action (city) given its context.

The output of our encoder is a set of reference vectors ref = (enc1, ..., encn), each representing a city interacting with other cities.

Neural Decoder

Similar to Bello & al., 2016, our Neural Decoder uses a Pointer to effectively point to a city given a trajectory. Our model however explicity forgets after K steps, dispensing with LSTM networks.


Local Search

We use a simple 2-OPT post-processing to clean best sampled tours during test time. One contribution we would like to emphasize here is that simple heuristics can be used in conjunction with Deep Reinforcement Learning, shedding light on interesting hybridization between Artificial Intelligence (AI) & Operations Research (OR).

Results

tsp1000.1

tsp100.2

We evaluate on TSP100 our model pre-trained on TSP50 and the results show that that it performs relatively well even though the model was not trained directly on the same instance size as in Bello & al, 2016.

Acknowledgments

Special thanks:

Author

Michel Deudon / @mdeudon

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].