Multi-hop Graph Convolutional Network (MultiHopGCN)
The code and dataset for the ACL2021 paper Multi-hop Graph Convolutional Network with High-order Chebyshev Approximation for Text Reasoning, implemented in PyTorch.
Some functions are based on Text GCN. Thank for their work.
Requirements
- Python >=3.6
- PyTorch >=1.12.0
- Scipy 1.5.1
Usage
Download pre-trained word embeddings glove.6B.300d.txt
from here and unzip to the root file.
First, use the remove_words.py
to clean up the original text in datasets
python remove_words.py [DATASET]
Build graphs from the datasets in data/
as:
python build_fixed_graph.py [DATASET] [WINSIZE]
Provided datasets include ohsumed
. The default sliding window size is 5 with weighted connection.
To use your own dataset, put the text file under data/
and the label file under data/
as other datasets do. Preprocess the text by running remove_words.py
before building the graphs.
Start training and inference as:
python train.py [--dataset ohsumed]
Citation
@inproceedings{
jiang2021multi,
title={Multi-hop Graph Convolutional Network with High-order Chebyshev Approximation for Text Reasoning},
author={Jiang, Shuoran and Chen, Qingcai and Liu, Xin and Hu, Baotian and Zhang, Lisai},
booktitle={Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)},
pages={6563--6573},
year={2021}
}