This PyTorch implementation showcases the DUPLEX model as described in the paper [DUPLEX: Dual GAT for Complex Embedding of Directed Graphs].
Figure 1: The network architecture of DUPLEX.- Ubuntu OS
- Python 3.8
- PyTorch 2.0.1
- CUDA 11.4
You can install the necessary dependencies using the following command:
conda env create -f environment.yml
To preprocess data, follow these steps:
- Navigate to the
./code/
directory using the commandcd ./code/
. - Open the
./generate_data.ipynb
notebook to generate DGL graphs from raw data. - Execute
python ./train_edge/split_data.py
to create the train/validation/test sets for the link prediction task. - Execute
python ./train_node_ind/process_data.py
to create the train/validation/test sets for the node classification task.
To conduct experiments, follow these steps:
- Navigate to the
./code/
directory using the commandcd ./code/
. - Execute
python ./train_edge/train.py
for link prediction. - Execute
python ./train_node_trans/train.py
for transductive node classification. - Execute
python ./train_node_ind/train.py
for inductive node classification.
For details on each command-line argument, please refer to the explanations provided in the respective training scripts.
TODO
For any questions related to DUPLEX, please submit them to Github Issues.