This is the public codes for TMLR2025 paper: "Heterophily-informed Message Passing"
Get into the experiment directory of node classification at first:
cd node_classification
The environment of node classification experiment is installed by the following command
conda env create -f environment.yml
conda activate himp-nc
The data is donwloaded automatically if you run the training script.
This is how to train a GNN model with different versions of message passing
python main.py --data_name ${dataname} --model_name ${gnn} --het_mode ${het_mode} --save_dir ${save_dir}
The arguments notes:
--data_name
, the name of dataset. Options:( Cora CiteSeer PubMed Cornell Texas Wisconsin Computers Photo Chameleon Squirrel Roman-empire Amazon-ratings Minesweeper Tolokers Questions )
--model_name
, the GNN types. Options:( GCN GAT GIN GraphSAGE )
het_mode
, the heterophily-preference of message passing. Options:( original heterophily homophily mix )
save_dir
, the path of running result, including the metric of best model, and trained model. One example script for runningGCN+het.
on Cora dataset:
source scripts/example_nc.sh
Get into the experiment directory of molecular generation at first:
cd molecule_generation
conda env create -f environment.yml
conda activate hetflow
Preprocess SMILES strings to be molecular graphs
python data/data_preprocess.py --data_name qm9
python data/data_preprocess.py --data_name zinc250k