https://github.com/alexduvalinho/graphshap
https://github.com/alexduvalinho/graphshap
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alexduvalinho/graphshap
- Owner: AlexDuvalinho
- Created: 2020-07-21T14:18:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T11:04:06.000Z (10 months ago)
- Last Synced: 2025-03-26T01:01:39.292Z (2 months ago)
- Language: Python
- Homepage:
- Size: 15.2 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GraphSVX: Shapley Value Explanations for Graph Neural Networks
In this folder, we provide the code of GraphSVX, as well as the evaluation
pipeline defined in the paper, which we use to show the functioning of GraphSVX.If needed, install the required packages contained in requirements.txt
To run the code, type: python3 filename (below)
- script_train.py: train models for all node classification and graph classification tasks.
- script_explain.py: explain node prediction or graph classification with GraphSVX, for any dataset
- script_eval_noise.py: evaluate GraphSVX on noisy dataset and observe number of
noisy features/nodes included in explanations
- script_eval_gt.py: evaluate GraphSVX on synthetic datasets with a ground truth.
All parameters are in the configs.py file, along with a small documentation.The structure of the code is as follows:
In src:
- explainers.py: defines GraphSVX and main baselines
- data.py: import and process the data
- models.py: define GNN models
- train.py: train GNN models
- utils.py: stores useful variables
- eval.py: one of the evaluation of the paper, with real world datasets
- eval_multiclass.py: explain all classes predictions
- plots.py: code for nice renderings
- gengraph.py: generates synthetic datasetsOutside:
- results: stores visualisation and evaluation results
- data: contains some datasets, others will be downloaded automatically
when launching the training script (Cora, PubMed)
- models: contains our trained models
- utils: some useful functions to construct datasets, store them,
create plots, train models etc.