Source-linked AI summary

Evaluating Explainability for Graph Neural Networks

Chirag Agarwal, Owen Queen, Himabindu Lakkaraju, Marinka Zitnik

arXiv:2208.09339v2cs.LGcs.AI

TL;DR

GNN explanation quality is difficult to assess because available datasets lack reliable ground-truth explanations and may not represent diverse applications. The paper introduces ShapeGGen and integrates it with GraphXAI, a framework providing varied benchmark graphs, explanation resources, and evaluation tools. Experiments show that existing explainers perform better on homophilic graphs but considerably worse on heterophilic graphs and larger ground-truth explanations.

  • Problem

    GNN explanation evaluation lacks reliable ground-truth explanations and standardized, diverse data resources for testing and comparing explanation quality.

  • Method

    The paper introduces ShapeGGen, a flexible synthetic graph generator, and incorporates it with synthetic and real-world datasets and evaluation utilities into GraphXAI.

  • Results

    Existing explainers perform well on homophilic ground-truth explanations but considerably worse on heterophilic graphs and larger ground-truth explanations.

  • Takeaways & Limitations

    ShapeGGen and GraphXAI enable systematic benchmarking of GNN explanation methods across varied graph structures and explanation properties.

  • Takeaways & Limitations

    Ground-truth explanations cannot assess post hoc explanations when the trained GNN uses a different rationale or is a weak predictor.

Abstract

from arXiv · show

As post hoc explanations are increasingly used to understand the behavior of graph neural networks (GNNs), it becomes crucial to evaluate the quality and reliability of GNN explanations. However, assessing the quality of GNN explanations is challenging as existing graph datasets have no or unreliable ground-truth explanations for a given task. Here, we introduce a synthetic graph data generator, ShapeGGen, which can generate a variety of benchmark datasets (e.g., varying graph sizes, degree distributions, homophilic vs. heterophilic graphs) accompanied by ground-truth explanations. Further, the flexibility to generate diverse synthetic datasets and corresponding ground-truth explanations allows us to mimic the data generated by various real-world applications. We include ShapeGGen and several real-world graph datasets into an open-source graph explainability library, GraphXAI. In addition to synthetic and real-world graph datasets with ground-truth explanations, GraphXAI provides data loaders, data processing functions, visualizers, GNN model implementations, and evaluation metrics to benchmark the performance of GNN explainability methods.

Introduction

GNN explanation evaluation lacks standardized strategies and reliable, diverse datasets with trustworthy ground-truth explanations. The paper introduces ShapeGGen and GraphXAI to provide flexible benchmark data, explanations, tooling, and metrics, then uses them to expose weaknesses in existing explainers.

  • Motivation and challenges: Existing GNN explanation evaluation relies on specific datasets whose ground-truth explanations can be redundant, non-unique, weakly aligned with trained models, or trivially recoverable.Multiple rationales can produce the correct label, while a model may use a different rationale or a weak predictor; some explanations can be matched by random baselines.
  • Motivation and challenges: Current graph benchmarks and deep-learning libraries mainly evaluate GNN predictor performance and do not capture ground-truth explanations for assessing explainer correctness.The paper identifies a need for general-purpose resources that support reliable evaluation across diverse applications.
  • Contributions: ShapeGGen automatically generates XAI-ready synthetic benchmark datasets with ground-truth explanations across graph sizes, degree distributions, and homophilic or heterophilic structures.The generator is designed to avoid redundant explanations, weak predictors, and trivially correct explanations while mimicking real-world data properties.
  • Contributions: GraphXAI incorporates ShapeGGen, synthetic and real-world graphs, data loaders, processing functions, visualizers, GNN implementations, and metrics for benchmarking node-, edge-, and feature-based explanations.Its metrics include accuracy, faithfulness, stability, and fairness.
  • Contributions: Benchmarking eight state-of-the-art explainers reveals failures on large ground-truth explanations and an inability to preserve fairness properties of underlying methods.The experiments use synthetic and real-world datasets and cover diverse graphs and graph tasks.

Results

GraphXAI benchmarks eight GNN explainers across synthetic and real-world datasets, varying graph structure, explanation size, fairness, and feature informativeness. Results show that explainer quality depends strongly on explanation type and graph properties, with substantial weaknesses on heterophilic, large, sparse-feature, and fairness-sensitive settings.

  • Evaluation setup: The study benchmarks eight explainers, including gradient-, perturbation-, and surrogate-based methods, against random explanation references.The explainers include Grad, GradCAM, GuidedBP, Integrated Gradients, GNNExplainer, PGExplainer, SubgraphX, and PGMExplainer.
  • Evaluation setup: The evaluation combines four metric categories—accuracy, faithfulness, stability, and fairness—using predicted explanations, ground-truth masks, and user-controlled parameters.Accuracy uses the Jaccard index between ground-truth and predicted explanation masks.
  • Node classification: SubgraphX outperforms other methods on node-classification datasets, producing 145.95% more accurate and 64.80% less unfaithful explanations.These values are reported as average comparisons against other GNN explanation methods.
  • Overall results: Node explanation masks are more reliable than edge and node-feature masks, while explainers achieve better faithfulness on synthetic than real-world graph datasets.This pattern summarizes results across Tables 1–5.
  • Graph structure: 55.98% more faithful explanations are produced for homophilic than heterophilic ground-truth explanations, exposing poor performance across diverse graph types.The reported comparison uses unfaithfulness scores, with lower scores indicating better faithfulness.
  • Explanation size: 0.7476 average GEF is observed for large ground-truth explanations across all eight explainers, while triangular explanations are 59.98% less unfaithful than house explanations.The results indicate that larger explanation subgraphs are especially challenging for existing explainers.
  • Fairness: Most explainers fail to preserve counterfactual fairness, although PGExplainer performs best for weakly unfair explanations and PGMExplainer for strongly unfair ones.Weakly unfair explanations should remain unchanged because their label-generating process is independent of the protected attribute.
  • Node features: Faithfulness worsens with fewer informative node features, and Gradient’s best node-feature faithfulness is only 0.001 better than random explanation.The results show limited robustness of node-feature explanations under sparse informative features.

Discussion

GRAPHXAI combines flexible synthetic and real-world datasets, ground-truth explanations, and evaluation tools to benchmark GNN explainers systematically. Experiments show that current explainers vary substantially across graph properties and explanation requirements.

  • GRAPHXAI provides data loaders, processing functions, visualizers, real-world datasets with ground-truth explanations, and metrics for evaluating GNN explanation methods.
  • ShapeGGen automatically generates benchmark datasets and ground-truth explanations designed to avoid known GNN explainability pitfalls.
  • Existing GNN explainers perform well on homophilic ground-truth explanations but considerably worse on heterophilic and attributed graphs.
  • Existing explanation methods fail on graphs with larger ground-truth explanations and cannot preserve the fairness properties of the underlying GNN model.
  • Explainability methods underperform with sparse node-feature signals, motivating methodological innovation and broader evaluation across performance dimensions.

Methods

SHAPEGGEN is a graph-theory-based generator for flexible, XAI-ready synthetic datasets with ground-truth explanations. Its parameters control graph structure, node features, fairness, homophily, and explanation scope for benchmarking GNN explainers.

  • SHAPEGGEN generates XAI-ready graph datasets to facilitate development, analysis, and evaluation of GNN explainability methods.
  • The generator varies graph sizes, degree distributions, homophily or heterophily, and other properties to mimic diverse real-world applications.
  • SHAPEGGEN defines graphs through parameters controlling motifs, subgraph counts and sizes, connection probability, classes, and node-feature dimensions.
  • Informative node-feature indices define the ground-truth feature explanation mask, while the GNN layer count defines each node’s ground-truth receptive-field explanation size.
  • Protected-feature noise controls correlation with labels, enabling generated graphs for studying fairness alongside explainability.
  • The framework includes synthetic and real-world graph resources and supports benchmarking explainers and studying their limitations.
Loading 2208.09339v2…