Ceci est le code pour reproduire les résultats clés pour Grad: Distillation de graphes sur les graphiques textuels.

Veuillez vous rendre à GradBERT ou GradMLP pour plus d'instructions.
Les dépendances pour exécuter le code sont dans le fichier requirements.txt .
Nous suivons également le processus d'installation de [géant].
Installons d'abord un environnement conda
conda create -n " grad " python=3.8
conda activate gradEnsuite, nous installons Pytorch:
conda install pytorch==1.9.0 cudatoolkit=10.2 -c pytorch
# check the pytorch version and cuda availability
python -c " import torch; print('torch={}, cuda={}'.format(torch.__version__, torch.cuda.is_available())) "Finall, nous installons les packages liés à GNN
ptcu_version= " 1.9.0+cu102 "
pip install torch-scatter -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-sparse -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-cluster -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-spline-conv -f " https://pytorch-geometric.com/whl/torch- ${ptcu_version} .html "
pip install torch-geometric
pip install ogb==1.3.2
# our ogb version is 1.3.2
python -c " import ogb; from ogb.graphproppred import PygGraphPropPredDataset; print(ogb.__version__) " Veuillez télécharger les incorporations de nœuds Gradbert pré-entraînées à partir de ce lien https://drive.google.com/drive/folders/1tol67yewyogusf4t2qwrds-hbhbg-icx?usp=Sharing et extraire dans ce dossier. Veuillez vous assurer que le dossier extrait a ce substrucutre GradBERT/embeddings/ogbn-*/ .
Ensuite, vous pouvez accéder à un dossier ogbn-arxiv ou ogbn-products et exécuter les commandes sh correspondantes pour reproduire les résultats Gradbert pour le classement OGB.
Ci-dessous, vous pouvez trouver les scripts pour reproduire les résultats clés.
./GRAD
| ---- GradBERT/ # OGB datasets
| | ---- embeddings/
| | ---- ogbn-arxiv/
| | | ---- gradbert_mlp.sh # MLP with GradBERT feats
| | | ---- gradbert_sage.sh # SAGE with GradBERT feats
| | | ---- RevGAT-ori
| | ---- gradbert_RevGAT_ogbnarxiv.sh # RevGAT with GradBERT feats
| | ---- ogbn-products/
| | | ---- gradbert_mlp.sh # MLP with GradBERT feats
| | | ---- gradbert_giant_sage.sh # SAGE with GradBERT+GIANT feats
| | | ---- SAGN_with_SLE
| | ---- Runexp_SAGN_SLE_ogbnproducts_morestages.sh # SAGN_SLE with GradBERT+GIANT feats
| ---- GradMLP/ # CPF data from GLNN
| | ---- experiments/
| | | ---- cora_gradmlp.sh
| | | ---- cora_gradmlp_kd.sh
| | | ---- etc.
Please go to ` GradBERT ` or ` GradMLP ` for more details.