Skip to main content
QUICK REVIEW

[Paper Review] Beyond Edge Deletion: A Comprehensive Approach to Counterfactual Explanation in Graph Neural Networks

Matteo De Sanctis, Riccardo De Sanctis|arXiv (Cornell University)|Mar 4, 2026
Advanced Graph Neural NetworksComputer Science0 citations
TL;DR

XPlore broadens counterfactual search for GNNs by allowing edge insertions/removals and node-feature perturbations, guided by gradients and cosine similarity to improve validity and fidelity.

ABSTRACT

Graph Neural Networks (GNNs) are increasingly adopted across domains such as molecular biology and social network analysis, yet their black-box nature hinders interpretability and trust. This is especially problematic in high-stakes applications, such as predicting molecule toxicity, drug discovery, or guiding financial fraud detections, where transparent explanations are essential. Counterfactual explanations - minimal changes that flip a model's prediction - offer a transparent lens into GNNs' behavior. In this work, we introduce XPlore, a novel technique that significantly broadens the counterfactual search space. It consists of gradient-guided perturbations to adjacency and node feature matrices. Unlike most prior methods, which focus solely on edge deletions, our approach belongs to the growing class of techniques that optimize edge insertions and node-feature perturbations, here jointly performed under a unified gradient-based framework, enabling a richer and more nuanced exploration of counterfactuals. To quantify both structural and semantic fidelity, we introduce a cosine similarity metric for learned graph embeddings that addresses a key limitation of traditional distance-based metrics, and demonstrate that XPlore produces more coherent and minimal counterfactuals. Empirical results on 13 real-world and 5 synthetic benchmarks show up to +56.3% improvement in validity and +52.8% in fidelity over state-of-the-art baselines, while retaining competitive runtime.

Motivation & Objective

  • Motivate explainability for GNNs in high-stakes domains.
  • Develop a comprehensive counterfactual explainer that goes beyond edge deletions.
  • Leverage gradient signals to find minimal, semantically faithful counterfactuals.
  • Mitigate out-of-distribution artifacts via a cosine-similarity fidelity metric.
  • Empirically demonstrate superior validity and fidelity over state-of-the-art methods.

Proposed method

  • Introduce XPlore, a gradient-guided perturbation framework that can modify edges (insertions and deletions) and node features.
  • Formulate counterfactual search as a soft optimization with loss L(G,G′)=Lpred(G,G′|Φ)+β Ldist(G,G′).
  • Perturb adjacency via a reversible P gate and allow edge insertions using a swapped A/P scheme with self-loops.
  • Enable node-feature perturbations through gating or continuous changes, integrated into the same gradient loop.
  • Use a cosine similarity measure to quantify semantic fidelity between original and counterfactual graph embeddings.
  • Provide convergence guarantees and an efficient, scalable algorithm with complexity roughly O(|E| d + n d f).
  • Employ straight-through estimator to backpropagate through non-differentiable thresholding when generating binary adjacency perturbations.
Figure 1 . (left) original graph $G$ predicted mutagenic. (right) Counterfactual $G^{\prime}$ predicted non-mutagenic with highlighted edge additions and removals, as well as potentially node additions to flip the prediction. Note that, although in this example, we illustrate valid chemical properti
Figure 1 . (left) original graph $G$ predicted mutagenic. (right) Counterfactual $G^{\prime}$ predicted non-mutagenic with highlighted edge additions and removals, as well as potentially node additions to flip the prediction. Note that, although in this example, we illustrate valid chemical properti

Experimental results

Research questions

  • RQ1How can counterfactual explanations for GNNs be generated beyond edge deletions by allowing edge insertions and node-feature perturbations?
  • RQ2Do gradient-guided perturbations across structural and feature spaces yield more valid, faithful, and semantically coherent counterfactuals compared to edge-deletion-only methods?
  • RQ3Does incorporating cosine-based semantic fidelity reduce out-of-distribution artifacts in graph counterfactuals?
  • RQ4How does XPlore perform relative to state-of-the-art graph counterfactual explainer baselines across diverse datasets?
  • RQ5What is the impact of allowing free node-feature perturbations versus gating mechanisms on explanation quality?

Key findings

  • XPlore achieves higher validity and fidelity across 17/18 datasets compared to baselines.
  • XPlore shows up to +56.3% improvement in validity and +52.8% in fidelity over state-of-the-art baselines on benchmarks.
  • Allowing edge insertions and node-feature perturbations yields richer and more coherent counterfactuals than edge deletions alone.
  • Cosine similarity of graph embeddings correlates with semantic fidelity, indicating better preservation of meaning in counterfactuals.
  • Variants with free node perturbations (and gating) outperform edge-deletion-only or gating-only variants in validity and fidelity.
  • XPlore maintains competitive runtime while delivering clearly superior explainability metrics.
(a) BAS house motif.
(a) BAS house motif.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.