# Code for paper : LEARNING TO DISENTANGLE TEXTUAL REPRESENTATIONS AND ATTRIBUTES VIA MUTUAL INFORMATION

To train the model refer to the `zhcc026.sh` for binary and the `zhcc026_category.sh` for the multiclass model.

To train the different metrics for sentence generation please refer to `train_style_accuracy_classifier_category.sh` and  `train_style_accuracy_classifier_gender.sh` and `train_gpt2_category.sh` and `train_gpt2_gender.sh` for gpt2.

Evaluation can be performed by running the sh scripts names ``evaluate_*.sh``

The code can be used to train additionnal models and results that are note reported in the paper:
> -  The DAE model from :
```bibtex
@article{john2018disentangled,
  title={Disentangled representation learning for non-parallel text style transfer},
  author={John, Vineet and Mou, Lili and Bahuleyan, Hareesh and Vechtomova, Olga},
  journal={arXiv preprint arXiv:1808.04339},
  year={2018}
}
```
> -  The multi decoder model from :
```bibtex
@article{fu2017style,
  title={Style transfer in text: Exploration and evaluation},
  author={Fu, Zhenxin and Tan, Xiaoye and Peng, Nanyun and Zhao, Dongyan and Yan, Rui},
  journal={arXiv preprint arXiv:1711.06861},
  year={2017}
}
```

Implementation of those model can be found in ```other_models.py```