• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PyTorch codebase for zero-shot dialog generation SIGDIAL 2018, It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU

Zero-shot Dialog Generation (ZSDG) for End-to-end Neural Dialog Models

Codebase for Zero-Shot Dialog Generation with Cross-Domain Latent Actions, published as a long paper in SIGDIAL 2018. Reference information is in the end of this page. Presentation slides can be found here.

This work won the best paper award at SIGDIAL 2018.

If you use any source codes or datasets included in this toolkit in your work, please cite the following paper. The bibtex are listed below:

@article{zhao2018zero,
  title={Zero-Shot Dialog Generation with Cross-Domain Latent Actions},
  author={Zhao, Tiancheng and Eskenazi, Maxine},
  journal={arXiv preprint arXiv:1805.04803},
  year={2018}
}

Requirements

python 2.7
pytorch >= 0.3.0.post4
numpy
nltk

Datasets

The data folder contains three datasets:

Getting Started

The following scripts implement 4 different models, including:

  • Baseline: standard attentional encoder-decoder and encoder with pointer-sentinel-mixture decoder (see the paper for details).
  • Out Models: cross-domain Action Matching training for the above two baseline systems.

Training

Run the following to experiment on the SimDial dataset

python simdial-zsdg.py

Run the following to experiment on the Stanford Multi-Domain Dataset

python stanford-zsdg.py

Switching Model

The hyperparameters are exactly the same for the above two scripts. To train different models, use the following configurations. The following examples are for simdial-zsdg.py, which also apply to stanford-zsdg.py.

For baseline model with attetnion decoder:

python simdial-zsdg.py --action_match False --use_ptr False

For baseline model with pointer-sentinel mixture decoder:

python simdial-zsdg.py --action_match False --use_ptr True    

For action matching model with attetnion decoder:

python simdial-zsdg.py --action_match True --use_ptr False

For action matching model with attetnion decoder:

python simdial-zsdg.py --action_match True --use_ptr True    

Hyperparameters

The following are some of key hyperparameters:

  • action_match: if or not using the proposed AM algorithm for training
  • target_example_cnt: the number of seed response from each domain used for training.
  • use_ptr: if or not using pointer-sentinel-mixture decoder
  • black_domains: define which domains are excluded from training
  • black_ratio: the percentage of training data from black_domains are excluded. Range=[0,1], where 1 means removed 100% of the training data.
  • forward_only: use existing model or train a new one
  • load_sess: the path to the existing model
  • rnn_cell: the type of RNN cell, supporting LSTM or GRU
  • dropout: the chance for dropout.

Test a existing model

All trained models and log files are saved to the log folder. To run a existing model, you can:

  • Set the forward_only argument to be True
  • Set the load_sess argument to te the path to the model folder in log
  • Run the script

More Repositories

1

NeuralDialogPapers

Summary of deep learning models for dialog systems (Tiancheng Zhao LTI, CMU)
651
star
2

NeuralDialog-CVAE

Tensorflow Implementation of Knowledge-Guided CVAE for dialog generation ACL 2017. It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU
OpenEdge ABL
309
star
3

NeuralDialog-LAED

PyTorch implementation for Interpretable Dialog Generation ACL 2018, It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU
OpenEdge ABL
198
star
4

NeuralDialog-LaRL

PyTorch implementation of latent space reinforcement learning for E2E dialog published at NAACL 2019. It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU
Python
144
star
5

SimDial

Synthetic task-oriented dialog generator with controllable complexity. It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU
Python
51
star
6

How-to-Utilize-Unstructured-Text

This blog describes one future path on how to use unstructured data for future text data apps.
7
star
7

tantivy-ztc

Modifications on tantivy to support neural index.
Rust
6
star
8

RnnLM

A baseline sequence-based LM
OpenEdge ABL
6
star
9

NeuralDialog-DM

Code for SIGDial 2016. Towards End-to-end RL for DST and DM
Jupyter Notebook
5
star
10

10-601PyTorchTutorial

Recitation notebook for Pytorch (Tiancheng Zhao)
Jupyter Notebook
4
star
11

TfLibrary

Python
2
star
12

clip_tome

Jupyter Notebook
2
star
13

NeuralImageCaption

11-777 Class Project
Python
2
star
14

mini_dpo

Python
2
star
15

HrlPy

A Python based HRL Library
Python
2
star
16

mini_vqvae

1
star
17

TemplateEditor

1
star