Skip to content

HipGraph/ExplainableGraphSparsification

Repository files navigation

Explainable Graph Sparsification with Shapley Values

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.

Sparsification Comparison

GNNShap sparsification comparison.

Setup

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 install

Dataset Configs

Dataset and dataset-specific model configurations are in the dataset/configs.py file.

Model training

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 Cora

Experiments

Local Node explanations with GNNShap

Running the following script generates local explanations.

./run_gnnshap.sh

Global edge scores & sparsification

AggregateResults.ipynb notebook aggregates results and create plots.

Citation

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

About

WWW '26 - Explainable Graph Sparsification with Shapley Values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors