Code for SAIS: Supervising and Augmenting Intermediate Steps for Document-Level Relation Extraction (NAACL 2022).
PyTorch = 1.9.0
HuggingFace Transformers = 4.8.1
Given an input dataset (e.g., DocRED):
- The
Data/{dataset}/Original
folder contains the original files provided by the corresponding dataset that are necessary for our experiments. - The command
bash Code/prepare.sh
transforms the original data structure into the structure acceptable to our model and stores the output files in theData/{dataset}/Processed
folder. - The command
bash Code/main.sh
trains the model, writes the standard output in theData/{dataset}/Stdout
folder, and delivers the set of predicted relations and corresponding evidence for the develop and test sets in theData/{dataset}/Processed
folder.
The set of hyperparameters for Step 2 and 3 are specified in prepare.sh
and main.sh
, respectively.
Our model trained on DocRED can be downloaded here.
@inproceedings{xiao2022sais,
title={SAIS: Supervising and Augmenting Intermediate Steps for Document-Level Relation Extraction},
author={Xiao, Yuxin and Zhang, Zecheng and Mao, Yuning and Yang, Carl and Han, Jiawei},
booktitle={NAACL},
year={2022}
}