Code and data Think about it! Improving defeasible reasoning by first modeling the question scenario (EMNLP 2021)
-
Download the pre-trained models from here (or if you use gdown, you can run
gdown --id 1QKSnMLpt0TfM-Jxu-eI-c92qHSjcIAovto directly download the models zip (23GB)). -
Download the data directory from here and unzip in the the root folder (or run
gdown --id 1iexS3RrtSl3T2B2fGDCz9m0nVotula8x).
- Inference
-
Use
scripts/table5.shto run inference for all models/dataset. This will recreate the numbers presented in Table 5 in the paper. -
Each output file contains per-sample inferred and true labels, as well as the MOE gate values if applicable.
- Training
- You can run training using
scripts/train.shscript.
Usage:
scripts/train.sh MODEL_TYPE DATA_DIR GRAPH_NAME GPUwhere:
- MODEL_TYPE: one of str, moe, gcn, gcn_moe
- DATA_DIR: path to the directory containing the dataset.
- GRAPH_NAME: name of the graph to be used for training.
- GPU: GPU to use. If not specified, will use the first available GPU.
- For example, to train an moe model on atomic dataset with cleaned graph, run:
scripts/train.sh moe data/defeasible_graph_augmented_qa/t5/atomic/influence_graphs_cleaned.jsonl 0- Sample unit test data is located in
data/unit_test. The following command runs a unit test:
bash scripts/train.sh moe data/unit_test/ influence_graphs.jsonl 0
