All Projects → oswaldoludwig → Adversarial-Learning-for-Generative-Conversational-Agents

oswaldoludwig / Adversarial-Learning-for-Generative-Conversational-Agents

Licence: other
This repository contains a new adversarial training method for Generative Conversational Agents

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Adversarial-Learning-for-Generative-Conversational-Agents

AdverseBiNet
Improving Document Binarization via Adversarial Noise-Texture Augmentation
Stars: ✭ 34 (-52.11%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Ali Pytorch
PyTorch implementation of Adversarially Learned Inference (BiGAN).
Stars: ✭ 61 (-14.08%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Seq2seq Chatbot For Keras
This repository contains a new generative model of chatbot based on seq2seq modeling.
Stars: ✭ 322 (+353.52%)
Mutual labels:  generative-adversarial-network, seq2seq
Semantic Pyramid for Image Generation
PyTorch reimplementation of the paper: "Semantic Pyramid for Image Generation" [CVPR 2020].
Stars: ✭ 45 (-36.62%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Awesome Tensorlayer
A curated list of dedicated resources and applications
Stars: ✭ 248 (+249.3%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Selectiongan
[CVPR 2019 Oral] Multi-Channel Attention Selection GAN with Cascaded Semantic Guidance for Cross-View Image Translation
Stars: ✭ 366 (+415.49%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Adaptsegnet
Learning to Adapt Structured Output Space for Semantic Segmentation, CVPR 2018 (spotlight)
Stars: ✭ 654 (+821.13%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (+36.62%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Mlds2018spring
Machine Learning and having it Deep and Structured (MLDS) in 2018 spring
Stars: ✭ 124 (+74.65%)
Mutual labels:  generative-adversarial-network, seq2seq
Gpnd
Generative Probabilistic Novelty Detection with Adversarial Autoencoders
Stars: ✭ 112 (+57.75%)
Mutual labels:  generative-adversarial-network, adversarial-learning
Arbitrary Text To Image Papers
A collection of arbitrary text to image papers with code (constantly updating)
Stars: ✭ 196 (+176.06%)
Mutual labels:  dialog, generative-adversarial-network
Seq2seqchatbots
A wrapper around tensor2tensor to flexibly train, interact, and generate data for neural chatbots.
Stars: ✭ 466 (+556.34%)
Mutual labels:  dialog, seq2seq
probabilistic nlg
Tensorflow Implementation of Stochastic Wasserstein Autoencoder for Probabilistic Sentence Generation (NAACL 2019).
Stars: ✭ 28 (-60.56%)
Mutual labels:  dialog, seq2seq
Cross-Domain-Image-Translation-Using-CycleGAN
CycleGAN based neural network architecture to change the gender of a person’s face
Stars: ✭ 15 (-78.87%)
Mutual labels:  generative-adversarial-network
WGAN-GP-tensorflow
Tensorflow Implementation of Paper "Improved Training of Wasserstein GANs"
Stars: ✭ 23 (-67.61%)
Mutual labels:  generative-adversarial-network
adversarial-networks
Material de la charla "The bad guys in AI - atacando sistemas de machine learning"
Stars: ✭ 15 (-78.87%)
Mutual labels:  generative-adversarial-network
focus-trap
A lightweight web component that traps focus within a DOM node
Stars: ✭ 44 (-38.03%)
Mutual labels:  dialog
classifier multi label seq2seq attention
multi-label,classifier,text classification,多标签文本分类,文本分类,BERT,ALBERT,multi-label-classification,seq2seq,attention,beam search
Stars: ✭ 26 (-63.38%)
Mutual labels:  seq2seq
dialogbot
dialogbot, provide search-based dialogue, task-based dialogue and generative dialogue model. 对话机器人,基于问答型对话、任务型对话、聊天型对话等模型实现,支持网络检索问答,领域知识问答,任务引导问答,闲聊问答,开箱即用。
Stars: ✭ 96 (+35.21%)
Mutual labels:  dialog
CircularDialogs
Its a library for the creating simple success and warning dialogs for android
Stars: ✭ 34 (-52.11%)
Mutual labels:  dialog

Adversarial Learning for Generative Conversational Agents

This repository contains a new adversarial training method for our Generative Conversational Agent (GCA).

Further details on this new training method can be found in the paper Oswaldo Ludwig, "End-to-end Adversarial Learning for Generative Conversational Agents," arXiv:1711.10122 cs.CL, Nov 2017. In the case of publication using ideas or pieces of code from this repository, please kindly cite this paper.

Our method assumes the GCA as a generator that aims at fooling a discriminator that labels dialogues as human-generated or machine-generated. In our approach, the discriminator performs token-level classification, i.e. it indicates whether the current token was generated by humans or machines. To do so, the discriminator also receives the context utterances (the dialogue history) and the incomplete answer up to the current token as input. This new approach makes possible the end-to-end training by backpropagation. A self-conversation process enables to produce a set of generated data with more diversity for the adversarial training. This approach improves the performance on questions not related to the training data.

The trained model available here used a dataset collected from dialogues of English courses online, available here.

Our GCA model can be explained by the following flowchart:

alt tag

while the following pseudocode explains our GCA algorithm:

alt tag

Our new end-to-end adversarial training can be explained by the following Keras model (implemented in the file train_bot_GAN.py), which is composed by the generator and the discriminator. The yellow blocks belong to the GCA (the generator), while the green blocks belong to the discriminator. The white blocks are shared between generator and discriminator:

alt tag

while the following pseudocode explains the new algorithm (see the paper for the definition of the variables):

alt tag

To chat with the pre-trained models:

  1. Download the python file "conversation_GAN.py", the vocabulary file "vocabulary_movie", and the net weights "my_model_weights20.h5" (trained by teacher forcing) and "my_model_weights.h5" (trained by the new adversarial method), which can be found here;
  2. Run conversation_GAN.py.

To evaluate dialog lines using the pre-trained discriminator:

  1. Download the python file "run_discriminator_GAN.py", the vocabulary file "vocabulary_movie", and the net weights of the discriminator "my_model_weights_discriminator.h5", which can be found here;
  2. Run run_discriminator_GAN.py.

To train end-to-end using the new adversarial method:

  1. Download all the files here;
  2. Download the Glove folder 'glove.6B' and include this folder in the directory of the chatbot (you can find this folder here). This algorithm applies transfer learning by using a pre-trained word embedding;
  3. Run GAN_train_script.py. This script is self-explained and summarizes the new adversarial training. If you want to train on your own data, include it in the files "context_simple" and "answers_simple" following the same pattern. As can be seen in the script, I am using Theano backend and GPU, a few modifications are required to run it with TensorFlow backend.

If you want to start the adversarial training from the scratch, make the weight file my_model_weights.h5 (pre-trained the new adversarial method) equal to my_model_weights20.h5 (pre-trained by teacher forcing) and run train_script.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].