A repo for baseline of graph pooling methods.
- TuDataset
- D&D
- PROTEINS
- ENZYMES
- NCI1/NCI109
- Reddit-Binary
- OGB
- ogbg-molhiv
- ogbg-ppa
- ogbg-code2
- set2set
- sagpool(sequence/hierarchical)
- graph-U-net
- Diffpool
- hierarchical model
- sequencial model
- U-net-like model: only for graph U-net model
- diffpooling model: only for diffpool model
- mean
- max
- sum
- set2set
- GCN:
layers/gcn_layer.py
- GIN:
layers/gin_layer.py
- GraphSAGE:
layers/graphsage_layer.py
create a config.json
in configs
folder, an example is like this:
{
"dataset_name": ["ENZYMES"],
"batch_size": 2,
"epochs": 100,
"seed": [1,2,3,4,5],
"model":"global",
"gnn_type": "gcn",
"num_layer": 3,
"emb_dim": 300,
"drop_ratio": 0.5,
"virtual_node": "False",
"residual": "False",
"JK": "last",
"pooling": "sagpool",
"sagpool": {
"keep_ratio": 0.8,
"activation": "tanh",
"layer_num": 1
}
}
When the key is a list such as dataset_name, all permutation will be trained and log in the csv file named as the comabination of the key values of 'dataset_name' and 'pooling'. In the examle, the final result will be saved in ENZYMES_sagpool.csv.
Warn:
Not all values can be written list-like, only the following keys can:
- dataset_name
- seed
python graphpoolinggarden/train.py --config configs/config.json
The program is built based on the code of the following released codes and programs:
We appreciate the authors' effort for the contribution to the research community.