This repo contains the official code release for NeurIPS 2020 paper Towards Interpretable Natural Language Understanding with Explanations as Latent Variables.
Directory ELV_re and ELV_sa contain source code for Relation Extraction task and Sentimental Analysis task in supervised setting. There are some tiny differences in training details and pre-processing. Directory EST_re and EST_sa contain codes in semi-supervised setting.
Directory data contain data used in our experiments. TACRED is not released because of its copyright, which can be downloaded at LDC TACRED webpage.
To replicate the result of experiment, run the bash script in each directory. For example, to replicate the ELV result on Semeval dataset, just use
bash train_semeval.sh
We implement Bert classifier based on Huggingface transformers and Unilm generator based on Microsoft Unilm.
If you find this repo useful, please cite:
@inproceedings{zhou2020towards,
title={Towards Interpretable Natural Language Understanding with Explanations as Latent Variables},
author={Zhou, Wangchunshu and Hu, Jinyi and Zhang, Hanlin and Liang, Xiaodan and Sun, Maosong and Xiong, Chenyan and Tang, Jian},
booktitle={NeurIPS},
year={2020}
}