To ensure compatibility, we recommend using the following versions:
- python==3.10.10
- spacy==3.5.2
- torch==1.13.1
- pytorch-geometric==2.2.0
Additional dependencies and exact package versions can be found in the environment.yml file.
To create the environment with all dependencies:
conda env create -f environment.ymlThe main scripts for running the model on synthetic and real datasets are provided below:
python pipeline_syn.py --dataset=syn1 --ood=1 --date=0301- Replace
syn1with your target synthetic dataset (syn1-syn4). - The
--oodflag specifies the OOD Structure-level OOD (0–3).
python pipeline_real.py --dataset=Cora --ood=2 # Feature-level OOD (level 2)
python pipeline_real.py --dataset=Citeseer --ood=label1 # Unseen-label OOD- Structure-level / Feature-level OOD: set
--oodto an integer between0–3(higher = stronger OOD level). - Unseen-Label OOD: set
--oodtolabel0(disabled) orlabel1(enabled). - dataset: choose from
CoraorCiteseer.
For better traceability of results, we recommend appending a date-based identifier to your save directory or experiment name.
| OOD Type | Dataset | Learning rate | Epochs |
|
|
|
|---|---|---|---|---|---|---|
| Structure | syn1 | 0.003 | 10 | 0.05 | 1.0 | 5.0 |
| syn2 | 0.003 | 20 | 0.05 | 1.0 | 5.0 | |
| syn3 | 0.003 | 20 | 0.1 | 1.0 | 5.0 | |
| syn4 | 0.003 | 30 | 1.0 | 1.0 | 10.0 | |
| Feature | Cora | 0.005 | 20 | 1.0 | 0.1 | |
| Citeseer | 0.005 | 20 | 1.0 | 0.1 | ||
| Unseen | Cora | 0.005 | 20 | 1.0 | 0.1 | |
| Citeseer | 0.005 | 20 | 1.0 | 0.05 |
This project is based on methodologies from:
- DIG Library - A Deep Graph Library that provides a framework for graph learning.
- RE-Parameterized Explainer - From LarsHoldijk/RE-ParameterizedExplainerForGraphNeuralNetworks, an approach for graph neural network explanations.