All Projects → wyu-du → Reinforce-Paraphrase-Generation

wyu-du / Reinforce-Paraphrase-Generation

Licence: MIT License
This repository contains the data and code for the paper "An Empirical Comparison on Imitation Learning and Reinforcement Learning for Paraphrase Generation" (EMNLP2019).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Reinforce-Paraphrase-Generation

Mil
Code for "One-Shot Visual Imitation Learning via Meta-Learning"
Stars: ✭ 254 (+234.21%)
Mutual labels:  imitation-learning
imitation learning
PyTorch implementation of some reinforcement learning algorithms: A2C, PPO, Behavioral Cloning from Observation (BCO), GAIL.
Stars: ✭ 93 (+22.37%)
Mutual labels:  imitation-learning
CoDAIL
Implementation of CoDAIL in the ICLR 2021 paper <Multi-Agent Interactions Modeling with Correlated Policies>
Stars: ✭ 17 (-77.63%)
Mutual labels:  imitation-learning
rpg
Ranking Policy Gradient
Stars: ✭ 22 (-71.05%)
Mutual labels:  imitation-learning
Gumbel-CRF
Implementation of NeurIPS 20 paper: Latent Template Induction with Gumbel-CRFs
Stars: ✭ 51 (-32.89%)
Mutual labels:  paraphrase-generation
synpg
Code for our EACL-2021 paper "Generating Syntactically Controlled Paraphrases without Using Annotated Parallel Pairs".
Stars: ✭ 30 (-60.53%)
Mutual labels:  paraphrase-generation
Tianshou
An elegant PyTorch deep reinforcement learning library.
Stars: ✭ 4,109 (+5306.58%)
Mutual labels:  imitation-learning
Imitation-Learning-from-Imperfect-Demonstration
[ICML 2019] Implementation of "Imitation Learning from Imperfect Demonstration"
Stars: ✭ 36 (-52.63%)
Mutual labels:  imitation-learning
vnla
Code accompanying the CVPR 2019 paper: https://arxiv.org/abs/1812.04155
Stars: ✭ 60 (-21.05%)
Mutual labels:  imitation-learning
Coordinated-Multi-Agent-Imitation-Learning
This is an implementation of the paper "Coordinated Multi Agent Imitation Learning", or the Sloan version "Data-Driven Ghosting using Deep Imitation Learning" using Tensorflow
Stars: ✭ 35 (-53.95%)
Mutual labels:  imitation-learning
end2end-self-driving-car
End-to-end Self-driving Car (Behavioral Cloning)
Stars: ✭ 19 (-75%)
Mutual labels:  imitation-learning
SGCP
TACL 2020: Syntax-Guided Controlled Generation of Paraphrases
Stars: ✭ 67 (-11.84%)
Mutual labels:  paraphrase-generation
Comyco
The implementation of "Comyco: Quality-Aware Adaptive Video Streaming via Imitation Learning" (ACM MM 2019)
Stars: ✭ 38 (-50%)
Mutual labels:  imitation-learning
Pontryagin-Differentiable-Programming
A unified end-to-end learning and control framework that is able to learn a (neural) control objective function, dynamics equation, control policy, or/and optimal trajectory in a control system.
Stars: ✭ 111 (+46.05%)
Mutual labels:  imitation-learning
robInfLib-matlab
Kernelized Movement Primitives (KMP)
Stars: ✭ 24 (-68.42%)
Mutual labels:  imitation-learning
Awesome Carla
👉 CARLA resources such as tutorial, blog, code and etc https://github.com/carla-simulator/carla
Stars: ✭ 246 (+223.68%)
Mutual labels:  imitation-learning
dril
Disagreement-Regularized Imitation Learning
Stars: ✭ 25 (-67.11%)
Mutual labels:  imitation-learning
data aggregation
This repository contains the code for the CVPR 2020 paper "Exploring Data Aggregation in Policy Learning for Vision-based Urban Autonomous Driving"
Stars: ✭ 26 (-65.79%)
Mutual labels:  imitation-learning
use-cases-of-bert
Use-cases of Hugging Face's BERT (e.g. paraphrase generation, unsupervised extractive summarization).
Stars: ✭ 18 (-76.32%)
Mutual labels:  paraphrase-generation
magical
The MAGICAL benchmark suite for robust imitation learning (NeurIPS 2020)
Stars: ✭ 60 (-21.05%)
Mutual labels:  imitation-learning

A Unified Reinforcement Learning Framework for Pointer Generator Model

This repository contains the data and code for the paper "An Empirical Comparison on Imitation Learning and Reinforcement Learning for Paraphrase Generation".

Useage

Training

  1. Model Setting: modify the path where the model will be saved.
vim config.py
log_root = os.path.join(root_dir, "Reinforce-Paraphrase-Generation/log_twitter")
  1. Pre-train: train the standard pointer-generator model with supervised learning from scratch.
python train.py
  1. Fine-tune: modify the training mode and the path where the fine-tuned model will be saved.
vim config.py
log_root = os.path.join(root_dir, "Reinforce-Paraphrase-Generation/log_rl")
mode = "RL"

Fine tune the pointer-generator model with REINFORCE algorithm.

python train.py -m ../log_twitter/best_model/model_best_XXXXX

Decoding & Evaluation

  1. Decoding: first, specify the model path.
vim config.py
log_root = os.path.join(root_dir, "Reinforce-Paraphrase-Generation/log_twitter")

Second, apply beam search to generate sentences on test set:

python decode.py ../log_twitter/best_model/model_best_XXXXX
  1. Evaluation:
    • The average BLEU score will show up automatically in the terminal after finishing decoding.

    • If you want to get the ROUGE scores, you should first intall pyrouge, here is the guidance. Then, you can uncomment the code snippet specified in utils.py and decode.py. Finally, run decode.py to get the ROUGE scores.

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