You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-6
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
# Graph Information Propagation Network (GripNet) Model
2
2
3
-
This repository contains a PyTorch implementation of GripNet, as well as eight datasets and experiments on link prediction and node classification. The description of model and the results can be found in our paper:
3
+
This repository contains the official implementation of GripNet, as well as eight datasets and experiments on link prediction and node classification. The description of model and the results can be found in our paper:
4
4
5
5
[GripNet: Graph Information Propagation on Supergraph for Heterogeneous Graphs](https://www.sciencedirect.com/science/article/pii/S0031320322004538), Hao Xu, Shengqi Sang, Peizhen Bai, Ruike Li, Laurence Yang, Haiping Lu (Pattern Recognition 2022)
6
6
7
+
**Update August 2022**: *Check out [this work](https://doi.org/10.1145/3511808.3557676) by Haiping Lu et al. (CIKM 2022) from the PyKale team. In the `pykale` library, the structure and interface of GripNet implementation are improved, which makes it more convenient to construct GripNet models applied to knowledge graphs with high heterogeneity. Code [here](https://github.com/pykale/pykale).*
8
+
7
9
## GripNet and Baselines
8
10
9
11
GripNet is an effective and efficient framework to learn node representations on **heterogeneous graphs** (or Knowledge Graphs) for multi-relational **link prediction**, and **node classification**, when there is only a type of node/edge related to the task. It is also a natural framework for graph-like **data integration** (i.e. integrating multiple datasets).
@@ -13,13 +15,15 @@ We provide the implementations of GripNet in the root directory, and those of ba
13
15
- TransE, RotatE, ComplEx, DistMult and RGCN on link prediction (LP) in `baselines/LP_baselines/`, and
14
16
- GCN, GAT, and RGCN on node classification (NC) in `baselines/NC_baselines/`.
15
17
16
-
Each model directory contains a bash script, which gives examples to run models. You can explore different model structures and hyperparameter settings by changing input parameters or code directly. It takes three steps to run these scripts.
18
+
Each model directory contains a bash script, which gives examples to run models. You can explore different model structures and hyperparameter settings by changing input parameters or code directly.
19
+
20
+
It takes three steps to run these scripts.
17
21
18
22
### Step 1: Installation
19
23
20
-
(Prerequisites): Before installing `gripnet`, PyTorch (torch>=1.4.0) and PyTorch Geometric (torch_geometric<2.0) are required to be installed matching your hardware.
24
+
All models in this repository are built on top of the [`PyTorch`](https://pytorch.org/get-started/locally/) and [`PyG`](https://github.com/pyg-team/pytorch_geometric). Before installing `gripnet`, `torch>=1.4.0` and `torch_geometric<2.0` are required to be installed matching your hardware.
Additionally, the raw data and code for constructing these datasets are available to download via: https://www.dropbox.com/s/41e43exro113pc9/data.zip
53
+
Additionally, the raw data and code for constructing these datasets are available to download via: https://www.dropbox.com/s/41e43exro113pc9/data.zip. The raw data is collected from [BioSNAP](https://snap.stanford.edu/biodata/index.html), [Arnetminer](https://dl.acm.org/doi/10.1145/1401890.1402008), and [Freebase](https://ieeexplore.ieee.org/document/9300240).
50
54
51
55
### Step 3: Running scripts
52
56
57
+
We provide descriptions of arguments in these bash scripts.
53
58
To run a given experiment, execute our bash scripts as follows:
54
59
55
60
#### Run GripNet demo:
@@ -66,7 +71,9 @@ bash run_lp.sh # link prediction
66
71
bash run_nc.sh # node classification
67
72
```
68
73
69
-
Note that argument descriptions are provided in these bash scripts.
74
+
**Note when using CPU**: *We use the [`pytorch_memlab`](https://github.com/Stonesjtu/pytorch_memlab) package by default to evaluate the GPU memory usage during training. If you are trining GripNet models on CPU, please find and comment the lines of `@profile` in the code. For example, comment the 112 line in `GripNet-pose.py`*:
0 commit comments