/SAE

Code for AAAI 2020 paper "Select, Answer and Explain: Interpretable Multi-hop Reading Comprehension over Multiple Documents"

Primary LanguagePythonMIT LicenseMIT

SAE

Code for AAAI 2020 paper "Select, Answer and Explain: Interpretable Multi-hop Reading Comprehension over Multiple Documents"

Based on PyTorch

Overview

Evaluation code for SAE-large on HotpotQA leaderboad with pretrained models.

Installation

  1. git clone

  2. Install PyTorch. The code has been tested with PyTorch >= 1.1

  3. Install the requirements

  4. python -m spacy download en_core_web_sm

  5. Download pretrained models. Put zip file into the same folder with main.py, and unzip it.

Running

Create a directory output in the same folder with main.py and then run

python main.py input_file

input_file can be HotpotQA dev file or other data sets organized in the same format with HotpotQA.

By default, the code uses the 0th GPU but you can change it the main.py.

The final prediction pred.json will be in the output folder.

Citation

@inproceedings{tu2020sae,
  title={Select, Answer and Explain: Interpretable Multi-hop Reading Comprehension over Multiple Documents},
  author={Tu, Ming and Huang, Kevin and Wang, Guangtao and Huang, Jing and He, Xiaodong and Zhou, Bowen},
  booktitle={{AAAI 2020 (accepted)}},
  year={2020}
}