This repository contains the source code of Explainable Graph Sparsification with Shapley Values paper accepted at The ACM Web Conference 2026.
We show that Shapley value–based explainers such as GNNShap enable effective sparsification, allowing up to 80% of edges to be removed without degrading model accuracy.
Our code is based on the source code of GNNShap.
This implementation is based on PyTorch and PyG. It requires a GPU with Cuda support.
The required packages and versions are provided in the requirements.txt file.
We used Cuda 12.4 in our experiments. Please make sure Cuda is already installed.
Please first run the following command in the directory to install the required packages and compile the Cuda extension:
pip install .python setup.py installDataset and dataset-specific model configurations are in the
dataset/configs.py file.
We included pre-trained models in the pretrained folder. However, we
provided the following scripts to retrain models if needed.
To train Cora, CiteSeer, PubMed:
python train.py --dataset CoraRunning the following script generates local explanations.
./run_gnnshap.shAggregateResults.ipynb notebook aggregates results and create plots.
Please cite our work if you find it useful.
Selahattin Akkas and Ariful Azad. 2026. Explainable Graph Sparsification with
Shapley Values. In Proceedings of the ACM Web Conference 2026 (WWW '26).
Association for Computing Machinery, New York, NY, USA, 8557–8560.
https://doi.org/10.1145/3774904.3792909
