Papers › GNNExplainer: Generating Explanations for Graph Neural Networks

GNNExplainer: Generating Explanations for Graph Neural Networks

10 Mar 2019NeurIPS 2019 12arXiv:1903.03894archive 2025-07-28

Rex Ying, Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, Jure Leskovec

Graph Neural Networks (GNNs) are a powerful tool for machine learning on graphs.GNNs combine node feature information with the graph structure by recursively passing neural messages along edges of the input graph. However, incorporating both graph structure and feature information leads to complex models, and explaining predictions made by GNNs remains unsolved. Here we propose GNNExplainer, the first general, model-agnostic approach for providing interpretable explanations for predictions of any GNN-based model on any graph-based machine learning task. Given an instance, GNNExplainer identifies a compact subgraph structure and a small subset of node features that have a crucial role in GNN's prediction. Further, GNNExplainer can generate consistent and concise explanations for an entire class of instances. We formulate GNNExplainer as an optimization task that maximizes the mutual information between a GNN's prediction and distribution of possible subgraph structures. Experiments on synthetic and real-world graphs show that our approach can identify important graph structures as well as node features, and outperforms baselines by 17.1% on average. GNNExplainer provides a variety of benefits, from the ability to visualize semantically relevant structures to interpretability, to giving insights into errors of faulty GNNs.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1903.03894")

Code

Syntology Ran 1 of 22 code samples harvested from 5 repositories linked to this paper; 21 have no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 0 ran; community (archive-listed): 13 samples from 4 repositories, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

RexYing/gnn-model-explainer officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
Aditya239233/GNNExplainer mentioned on GitHubpytorchApache-2.0 report
AlexDuvalinho/GNNE_eval mentioned on GitHubpytorchApache-2.0 report
OpenXAIProject/GNNExplainer-Tutorial mentioned on GitHubpytorch report
ShaharGottlieb/GNNExplainer_DGL mentioned on GitHubpytorch report
VisiumCH/AMLD-2021-Graphs mentioned on GitHubpytorch report
anshul3899/GNNExplainer-Experiments mentioned on GitHubpytorchApache-2.0 report
ipolharvard/readmit-stgnn mentioned on GitHubpytorchMIT report
realmoana/proxyexplainer mentioned on GitHubpytorch report
tsy935/readmit-stgnn mentioned on GitHubpytorchMIT report
dmlc/dgl pytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 1 ran; 0 honoured the contract we drafted; 21 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
21unverified

Licence: 0 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

create_filename RexYing/gnn-model-explainer/utils/io_utils.py official repository unverified Apache-2.0 (permissive) · b5d664d8043db74c · report
exp_moving_avg RexYing/gnn-model-explainer/utils/math_utils.py official repository unverified Apache-2.0 (permissive) · 07dd564321cae261 · report
gen_explainer_prefix RexYing/gnn-model-explainer/utils/io_utils.py official repository unverified Apache-2.0 (permissive) · 4d79e3489891364a · report
gen_prefix RexYing/gnn-model-explainer/utils/io_utils.py official repository unverified Apache-2.0 (permissive) · b787b2d1149916ac · report
neighborhoods RexYing/gnn-model-explainer/utils/graph_utils.py official repository unverified Apache-2.0 (permissive) · aeb67cb379f56302 · report
perturb RexYing/gnn-model-explainer/gengraph.py official repository unverified Apache-2.0 (permissive) · 11e1d48886273577 · report
preprocess_input_graph RexYing/gnn-model-explainer/gengraph.py official repository unverified Apache-2.0 (permissive) · 5dbca373321f92ca · report
test RexYing/gnn-model-explainer/explain_pyg.py official repository unverified Apache-2.0 (permissive) · 1194b67a9fa45964 · report
tv_norm RexYing/gnn-model-explainer/utils/math_utils.py official repository unverified Apache-2.0 (permissive) · c872f4cd90fce281 · report
join_graph Aditya239233/GNNExplainer/gengraph.py community (archive-listed) ran Apache-2.0 (permissive) · 9e838e040242f5eb · report
date_ranges_to_days ipolharvard/readmit-stgnn/stgnn/preprocess_ehr.py community (archive-listed) unverified MIT (permissive) · 9d2a8b77cbe3adb0 · report
denoise_graph AlexDuvalinho/GNNE_eval/plots.py community (archive-listed) unverified Apache-2.0 (permissive) · ea9f4e76fa4b2cdf · report
find_icd_group tsy935/readmit-stgnn/ehr/get_mimic_cohort.py community (archive-listed) unverified MIT (permissive) · 3e89f6550fc6950a · report
get_logger tsy935/readmit-stgnn/utils.py community (archive-listed) unverified MIT (permissive) · 725051c1c5a70fdf · report
get_save_dir tsy935/readmit-stgnn/utils.py community (archive-listed) unverified MIT (permissive) · cd9f64817c619200 · report
get_transform tsy935/readmit-stgnn/cxr/extract_cxr_features.py community (archive-listed) unverified MIT (permissive) · d95d163bbf721125 · report
last_relevant_pytorch tsy935/readmit-stgnn/utils.py community (archive-listed) unverified MIT (permissive) · 7dfa7b4c71704350 · report
load_cxrs_moco_single_split tsy935/readmit-stgnn/cxr/extract_cxr_features.py community (archive-listed) unverified MIT (permissive) · 362713dfa016e305 · report
plot_dist AlexDuvalinho/GNNE_eval/plots.py community (archive-listed) unverified Apache-2.0 (permissive) · 2da026cd7d9d780d · report
str2bool ipolharvard/readmit-stgnn/stgnn/args.py community (archive-listed) unverified MIT (permissive) · f2e7e16c79c41137 · report
test AlexDuvalinho/GNNE_eval/explain_pyg.py community (archive-listed) unverified Apache-2.0 (permissive) · b35616ed5d1efd11 · report
visualize_subgraph AlexDuvalinho/GNNE_eval/plots.py community (archive-listed) unverified Apache-2.0 (permissive) · ef9363492fc8a07b · report

Tasks

BIG-bench Machine LearningExplainable artificial intelligenceGraph ClassificationGraph Neural NetworkLink Prediction

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections