Skip to content

Commit 4302228

Browse files
committed
upload readme
1 parent 543981d commit 4302228

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Graph Information Propagation Network (GripNet) Model
22

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:
44

55
[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)
66

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+
79
## GripNet and Baselines
810

911
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
1315
- TransE, RotatE, ComplEx, DistMult and RGCN on link prediction (LP) in `baselines/LP_baselines/`, and
1416
- GCN, GAT, and RGCN on node classification (NC) in `baselines/NC_baselines/`.
1517

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.
1721

1822
### Step 1: Installation
1923

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.
2125

22-
Install `gripnet` from source:
26+
Then, install `gripnet` from source:
2327
```bash
2428
git clone https://github.com/NYXFLOWER/GripNet.git
2529
cd GripNet
@@ -46,10 +50,11 @@ wget https://www.dropbox.com/s/g81hgxnewi7br8d/datasets_baselines.zip
4650
unzip datasets_baselines.zip && rm datasets_baselines.zip
4751
```
4852

49-
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).
5054

5155
### Step 3: Running scripts
5256

57+
We provide descriptions of arguments in these bash scripts.
5358
To run a given experiment, execute our bash scripts as follows:
5459

5560
#### Run GripNet demo:
@@ -66,7 +71,9 @@ bash run_lp.sh # link prediction
6671
bash run_nc.sh # node classification
6772
```
6873

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`*:
75+
76+
https://github.com/NYXFLOWER/GripNet/blob/master/GripNet-pose.py#L109-L113
7077

7178
## Citation
7279

0 commit comments

Comments
 (0)