Tensorflow Implementation of Variational Attention for Sequence to Sequence Models (COLING 2018)
This is the official codebase for the following paper, implemented in tensorflow:
Hareesh Bahuleyan*, Lili Mou*, Olga Vechtomova, and Pascal Poupart. Variational Attention for Sequence-to-Sequence Models. COLING 2018. https://arxiv.org/pdf/1712.08207.pdf
This package consists of 3 models, each of which have been organized into separate folders:
ded_detAttn
)ved_detAttn
)ved_varAttn
)The proposed model and baselines have been evaluated on two experiments:
The data has been preprocessed and the train-val-test split is provided in the data/
directory.
python w2v_generator.py --dataset qgen
model_config.py
file. For example,cd ved_varAttn
vim model_config.py # Make necessary edits
python train.py
models/
directory, the summaries for Tensorboard are stored in summary_logs/
directory. As training progresses, the metrics on the validation set are dumped intolog.txt
and bleu/
directory.predict.ipynb
to load desired checkpoint, calculate performance metrics (BLEU and diversity score) on the test set, and generate sample outputs.If you found this code useful in your research, please cite:
@inproceedings{varAttn2018,
title={Variational Attention for Sequence-to-Sequence Models},
author={Bahuleyan, Hareesh and Mou, Lili and Vechtomova, Olga and Poupart, Pascal},
booktitle={Proceedings of the 27th International Conference on Computational Linguistics (COLING)},
year={2018}
}