Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ conda create -n graphgps python=3.10
conda activate graphgps

conda install pytorch=1.13 torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
conda install pyg=2.2 -c pyg -c conda-forge
conda install pyg=2.3 -c pyg -c conda-forge
pip install pyg-lib -f https://data.pyg.org/whl/torch-1.13.0+cu117.html

# RDKit is required for OGB-LSC PCQM4Mv2 and datasets derived from it.
Expand All @@ -31,6 +31,9 @@ pip install tensorboardX
pip install ogb
pip install wandb

# DGL - install for your environment: https://www.dgl.ai/pages/start.html, e.g.,
conda install -c dglteam/label/cu117 dgl

conda clean --all
```

Expand Down
82 changes: 82 additions & 0 deletions configs/GPS/amazon-ratings-CL.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
out_dir: results
metric_best: accuracy
wandb:
use: False
project: probing-heterophilous
entity: null
dataset:
format: PyG-HeterophilousGraphDataset
name: Amazon-ratings
task: node
task_type: classification
transductive: True
split_mode: standard
node_encoder: True
node_encoder_name: LinearNode
node_encoder_bn: False
edge_encoder: False
edge_encoder_name: DummyEdge
edge_encoder_bn: False
store_precompute: True
posenc_GraphormerBias:
enable: False
node_degrees_only: True
num_spatial_types: 0
num_in_degrees: 729
num_out_degrees: 700
graphormer:
use_graph_token: False
posenc_LapPE:
enable: False
eigen:
laplacian_norm: none
eigvec_norm: L2
max_freqs: 10
model: DeepSet
dim_pe: 32
layers: 2
n_heads: 4 # Only used when `posenc.model: Transformer`
raw_norm_type: none
posenc_RWSE:
enable: False
kernel:
times_func: range(1,21)
model: Linear
dim_pe: 32
raw_norm_type: BatchNorm
train:
mode: custom
sampler: full_batch
# sampler: saint_rw
# batch_size: 32
eval_period: 5
enable_ckpt: False
model:
type: GPSModel
loss_fun: cross_entropy
edge_decoding: dot
gt:
layer_type: GAT+Performer
layers: 1
n_heads: 8
dim_hidden: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
dropout: 0.2
attn_dropout: 0.0
layer_norm: False
batch_norm: False
hidden_dim_multiplier: 2
gnn:
head: node
layers_pre_mp: 0
layers_post_mp: 1
dim_inner: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
act: gelu
dropout: 0.2
normalize_adj: False
optim:
clip_grad_norm: False
optimizer: adamW
weight_decay: 0.0
base_lr: 3e-5
max_epoch: 1000
scheduler: null
82 changes: 82 additions & 0 deletions configs/GPS/minesweeper-CL.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
out_dir: results
metric_best: auc
wandb:
use: False
project: probing-heterophilous
entity: null
dataset:
format: PyG-HeterophilousGraphDataset
name: Minesweeper
task: node
task_type: classification
transductive: True
split_mode: standard
node_encoder: True
node_encoder_name: LinearNode
node_encoder_bn: False
edge_encoder: False
edge_encoder_name: DummyEdge
edge_encoder_bn: False
store_precompute: True
posenc_GraphormerBias:
enable: False
node_degrees_only: True
num_spatial_types: 0
num_in_degrees: 729
num_out_degrees: 700
graphormer:
use_graph_token: False
posenc_LapPE:
enable: False
eigen:
laplacian_norm: none
eigvec_norm: L2
max_freqs: 10
model: DeepSet
dim_pe: 32
layers: 2
n_heads: 4 # Only used when `posenc.model: Transformer`
raw_norm_type: none
posenc_RWSE:
enable: False
kernel:
times_func: range(1,21)
model: Linear
dim_pe: 32
raw_norm_type: BatchNorm
train:
mode: custom
sampler: full_batch
# sampler: saint_rw
# batch_size: 32
eval_period: 5
enable_ckpt: False
model:
type: GPSModel
loss_fun: cross_entropy
edge_decoding: dot
gt:
layer_type: GAT+Performer
layers: 1
n_heads: 8
dim_hidden: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
dropout: 0.2
attn_dropout: 0.0
layer_norm: False
batch_norm: False
hidden_dim_multiplier: 2
gnn:
head: node
layers_pre_mp: 0
layers_post_mp: 1
dim_inner: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
act: gelu
dropout: 0.2
normalize_adj: False
optim:
clip_grad_norm: False
optimizer: adamW
weight_decay: 0.0
base_lr: 3e-5
max_epoch: 1000
scheduler: null
82 changes: 82 additions & 0 deletions configs/GPS/questions-CL.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
out_dir: results
metric_best: auc
wandb:
use: False
project: probing-heterophilous
entity: null
dataset:
format: PyG-HeterophilousGraphDataset
name: Questions
task: node
task_type: classification
transductive: True
split_mode: standard
node_encoder: True
node_encoder_name: LinearNode
node_encoder_bn: False
edge_encoder: False
edge_encoder_name: DummyEdge
edge_encoder_bn: False
store_precompute: True
posenc_GraphormerBias:
enable: False
node_degrees_only: True
num_spatial_types: 0
num_in_degrees: 2000
num_out_degrees: 2000
graphormer:
use_graph_token: False
posenc_LapPE:
enable: False
eigen:
laplacian_norm: none
eigvec_norm: L2
max_freqs: 10
model: DeepSet
dim_pe: 32
layers: 2
n_heads: 4 # Only used when `posenc.model: Transformer`
raw_norm_type: none
posenc_RWSE:
enable: False
kernel:
times_func: range(1,21)
model: Linear
dim_pe: 32
raw_norm_type: BatchNorm
train:
mode: custom
sampler: full_batch
# sampler: saint_rw
# batch_size: 32
eval_period: 5
enable_ckpt: False
model:
type: GPSModel
loss_fun: cross_entropy
edge_decoding: dot
gt:
layer_type: GAT+Performer
layers: 1
n_heads: 8
dim_hidden: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
dropout: 0.2
attn_dropout: 0.0
layer_norm: False
batch_norm: False
hidden_dim_multiplier: 2
gnn:
head: node
layers_pre_mp: 0
layers_post_mp: 1
dim_inner: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
act: gelu
dropout: 0.2
normalize_adj: False
optim:
clip_grad_norm: False
optimizer: adamW
weight_decay: 0.0
base_lr: 3e-5
max_epoch: 1000
scheduler: null
82 changes: 82 additions & 0 deletions configs/GPS/roman-empire-CL.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
out_dir: results
metric_best: accuracy
wandb:
use: False
project: probing-heterophilous
entity: null
dataset:
format: PyG-HeterophilousGraphDataset
name: Roman-empire
task: node
task_type: classification
transductive: True
split_mode: standard
node_encoder: True
node_encoder_name: LinearNode
node_encoder_bn: False
edge_encoder: False
edge_encoder_name: DummyEdge
edge_encoder_bn: False
store_precompute: True
posenc_GraphormerBias:
enable: False
node_degrees_only: True
num_spatial_types: 0
num_in_degrees: 729
num_out_degrees: 700
graphormer:
use_graph_token: False
posenc_LapPE:
enable: False
eigen:
laplacian_norm: none
eigvec_norm: L2
max_freqs: 10
model: DeepSet
dim_pe: 32
layers: 2
n_heads: 4 # Only used when `posenc.model: Transformer`
raw_norm_type: none
posenc_RWSE:
enable: False
kernel:
times_func: range(1,21)
model: Linear
dim_pe: 32
raw_norm_type: BatchNorm
train:
mode: custom
sampler: full_batch
# sampler: saint_rw
# batch_size: 32
eval_period: 5
enable_ckpt: False
model:
type: GPSModel
loss_fun: cross_entropy
edge_decoding: dot
gt:
layer_type: GAT+Performer
layers: 1
n_heads: 8
dim_hidden: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
dropout: 0.2
attn_dropout: 0.0
layer_norm: False
batch_norm: False
hidden_dim_multiplier: 2
gnn:
head: node
layers_pre_mp: 0
layers_post_mp: 1
dim_inner: 512 # `gt.dim_hidden` must match `gnn.dim_inner`
act: gelu
dropout: 0.2
normalize_adj: False
optim:
clip_grad_norm: False
optimizer: adamW
weight_decay: 0.0
base_lr: 3e-5
max_epoch: 1000
scheduler: null
Loading