This repository includes the source code to reproduce the results presented in the paper Improving Variational Autoencoder for Text Modelling with Timestep-Wise Regularisation (COLING 2020)
To train the TWR-VAE on PTB/Yelp/Yahoo
cd lang_model/
python main.py -dt ptb/yelp/yahoo --z_type normal
To load trained model
python main.py -dt ptb/yelp/yahoo -l --model_dir path-to-the-trained-model/
To train the TWR-VAE-mean or TWR-VAE-sum on PTB/Yelp/Yahoo
python main.py -dt ptb/yelp/yahoo --z_type mean/sum
To train the TWR-VAE-LSTM-last25 or TWR-VAE-LSTM-last50 or TWR-VAE-LSTM-last75 on PTB/Yelp/Yahoo
python main.py -dt ptb/yelp/yahoo --z_type normal -par --partial_type last25/last50/last75
Use pre-trained Word2vec: download Glove word embeddings glove.twitter.27B.200d.txt
from https://nlp.stanford.edu/projects/glove/ and save it to the ./data
folder. The default setting use 200 dimension word embedding trained on Twitter.
To train TWR-VAE on Switchboard
cd dialogue_switchboard/
python train_swda.py
To train TWR-VAE on Dailydialog
cd dialogue_dd/
python train_dailydial.py
Thanks for the code published on Github repositories:
@inproceedings{Li_TWRVAE_2020,
title={Improving Variational Autoencoder for Text Modelling withTimestep-Wise Regularisation},
author={Li, Ruizhe and Li, Xiao and Chen, Guanyi and Lin, Chenghua},
booktitle={COLING},
year={2020}
}