An implement of CompGCN in Pytorch and DGL.
- Paper: ICLR 2020: Composition-Based Multi-Relational Graph Convolutional Networks
- Author's code: https://github.com/malllabiisc/CompGCN
- install Python3
- install requirements
pip install -r requirements.txt
To start training process:
python run.py --score_func conve --opn corr --gpu 0 --epoch 500 --batch 256 --n_layer 1
--score_func
denotes the link prediction score score function--opn
is the composition operation used in CompGCN. It can take the following values:sub
for subtraction operation: Φ(e_s, e_r) = e_s - e_rmult
for multiplication operation: Φ(e_s, e_r) = e_s * e_rcorr
for circular-correlation: Φ(e_s, e_r) = e_s ★ e_r
--gpu
for specifying the GPU to use--epoch
for number of epochs--batch
for batch size--n_layer
for number of GCN Layers to use- Rest of the arguments can be listed using
python run.py -h
model | MRR | MR | Hits@1 | Hits@3 | Hits@10 |
---|---|---|---|---|---|
Conve-mult | 0.35516 | 222 | 0.26337 | 0.39021 | 0.53767 |
Conve-corr | 0.35340 | 199 | 0.26146 | 0.38778 | 0.53791 |
DistMult-mult | 0.33590 | 234 | 0.24697 | 0.36656 | 0.51639 |
DistMult-corr | 0.33680 | 242 | 0.24875 | 0.36624 | 0.51575 |