All Projects → snakeztc → Neuraldialog Cvae

snakeztc / Neuraldialog Cvae

Licence: apache-2.0
Tensorflow Implementation of Knowledge-Guided CVAE for dialog generation ACL 2017. It is released by Tiancheng Zhao (Tony) from Dialog Research Center, LTI, CMU

Projects that are alternatives of or similar to Neuraldialog Cvae

Moel
MoEL: Mixture of Empathetic Listeners
Stars: ✭ 38 (-86.38%)
Mutual labels:  chatbot, dialogue-systems
Generative models tutorial with demo
Generative Models Tutorial with Demo: Bayesian Classifier Sampling, Variational Auto Encoder (VAE), Generative Adversial Networks (GANs), Popular GANs Architectures, Auto-Regressive Models, Important Generative Model Papers, Courses, etc..
Stars: ✭ 276 (-1.08%)
Mutual labels:  generative-model, variational-autoencoder
Convai Bot 1337
NIPS Conversational Intelligence Challenge 2017 Winner System: Skill-based Conversational Agent with Supervised Dialog Manager
Stars: ✭ 65 (-76.7%)
Mutual labels:  chatbot, dialogue-systems
Vae For Image Generation
Implemented Variational Autoencoder generative model in Keras for image generation and its latent space visualization on MNIST and CIFAR10 datasets
Stars: ✭ 87 (-68.82%)
Mutual labels:  generative-model, variational-autoencoder
vae-torch
Variational autoencoder for anomaly detection (in PyTorch).
Stars: ✭ 38 (-86.38%)
Mutual labels:  generative-model, variational-autoencoder
Meld
MELD: A Multimodal Multi-Party Dataset for Emotion Recognition in Conversation
Stars: ✭ 373 (+33.69%)
Mutual labels:  chatbot, dialogue-systems
Lic2019 Competition
2019语言与智能技术竞赛-基于知识图谱的主动聊天
Stars: ✭ 109 (-60.93%)
Mutual labels:  chatbot, dialogue-systems
Awesome Vaes
A curated list of awesome work on VAEs, disentanglement, representation learning, and generative models.
Stars: ✭ 418 (+49.82%)
Mutual labels:  generative-model, variational-autoencoder
DSTC6-End-to-End-Conversation-Modeling
DSTC6: End-to-End Conversation Modeling Track
Stars: ✭ 56 (-79.93%)
Mutual labels:  end-to-end, chatbot
eccv16 attr2img
Torch Implemention of ECCV'16 paper: Attribute2Image
Stars: ✭ 93 (-66.67%)
Mutual labels:  generative-model, variational-autoencoder
Vae protein function
Protein function prediction using a variational autoencoder
Stars: ✭ 57 (-79.57%)
Mutual labels:  generative-model, variational-autoencoder
CHyVAE
Code for our paper -- Hyperprior Induced Unsupervised Disentanglement of Latent Representations (AAAI 2019)
Stars: ✭ 18 (-93.55%)
Mutual labels:  generative-model, variational-autoencoder
Li emnlp 2017
Deep Recurrent Generative Decoder for Abstractive Text Summarization in DyNet
Stars: ✭ 56 (-79.93%)
Mutual labels:  generative-model, variational-autoencoder
Deeppavlov
An open source library for deep learning end-to-end dialog systems and chatbots.
Stars: ✭ 5,525 (+1880.29%)
Mutual labels:  chatbot, dialogue-systems
Simple Variational Autoencoder
A VAE written entirely in Numpy/Cupy
Stars: ✭ 20 (-92.83%)
Mutual labels:  generative-model, variational-autoencoder
Korean restaurant reservation
Implement korean restaurant reservation dialogue system based on hybrid code network.
Stars: ✭ 73 (-73.84%)
Mutual labels:  chatbot, dialogue-systems
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
Stars: ✭ 127 (-54.48%)
Mutual labels:  dialogue-systems, variational-autoencoder
Tensorflow Generative Model Collections
Collection of generative models in Tensorflow
Stars: ✭ 3,785 (+1256.63%)
Mutual labels:  generative-model, variational-autoencoder
AC-VRNN
PyTorch code for CVIU paper "AC-VRNN: Attentive Conditional-VRNN for Multi-Future Trajectory Prediction"
Stars: ✭ 21 (-92.47%)
Mutual labels:  generative-model, variational-autoencoder
SpaceFusion
NAACL'19: "Jointly Optimizing Diversity and Relevance in Neural Response Generation"
Stars: ✭ 73 (-73.84%)
Mutual labels:  chatbot, dialogue-systems

Knowledge-Guided CVAE for dialog generation

We provide a TensorFlow implementation of the CVAE-based dialog model described in Learning Discourse-level Diversity for Neural Dialog Models using Conditional Variational Autoencoders, published as a long paper in ACL 2017. See the paper for more details.

References

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:

[Zhao et al, 2017]:
 @inproceedings{zhao2017learning,
   title={Learning Discourse-level Diversity for Neural Dialog Models using Conditional Variational Autoencoders},
   author={Zhao, Tiancheng and Zhao, Ran and Eskenazi, Maxine},
   booktitle={Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
   volume={1},
   pages={654--664},
   year={2017}
 }

External Implementation

The baseline method HRED using the same SwitchBoard dataset is also implemented on Texar, a general-purpose text generation toolkit. Checkout here.

Prerequisites

  • TensorFlow 1.3.0
  • cuDNN 6
  • Python 2.7
  • Numpy
  • NLTK
  • You may need to pip install beeprint if the module is missing

Usage

Train a new model

python kgcvae_swda.py

will run default training and save model to ./working

Test a existing model

Modify the TF flags at the top of kgcvae_swda.py as follows to run a existing model

forward_only: False -> True
test_path: set to the folder contains the model. E.g. runxxxx

Then you can run the model by:

python kgcvae_swda.py

The outputs will be printed to stdout and generated responses will be saved at test.txt in the test_path.

Use pre-trained Word2vec

Download Glove word embeddings from https://nlp.stanford.edu/projects/glove/ The default setting use 200 dimension word embedding trained on Twitter.

At last, set word2vec_path at line 15 of kgcvae_swda.py.

Dataset

We release two dataset:

  1. full_swda_clean_42da_sentiment_dialog_corpus.p is a binary dump using python Pickle library that contains the raw data and used for training
  2. json_format: the same dialog data also is presented in JSONL format in the data directory.
  3. test_mutl_ref.json is only the test data set with multiple references responses with dialog act annotations. The multiple referneces are collected according to the method described in the Appendix of the paper.

Data Format

If you want to train the model on your own data. Please create a pickle file has the following format:

# The top directory is a python dictionary
type(data) = dict
data.keys() = ['train', 'valid', 'test']

# Train/valid/test is a list, each element is one dialog
train = data['train']
type(train) = list

# Each dialog is a dict
dialog = train[0]
type(dialog)= dict
dialog.keys() = ['A', 'B', 'topic', 'utts']

# A, B contain meta info about speaker A and B.
# topic defines the dialog prompt topic in Switchboard Corpus.

# utts is a list, each element is a tuple that contain info about an utterance
utts = dialog['utts']
type(utts) = list
utts[0] = ("A" or "B", "utterance in string", [dialog_act, other_meta_info])

# For example, a utterance look like this:
('B','especially your foreign cars',['statement-non-opinion'])

Put the resulting file into ./data and set the data_dir in kgcvae_swda.py

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