NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Generating Robust Counterfactual Witnesses for Graph Neural Networks

Dazhuo Qiu, Mengying Wang, Arijit Khan, Yinghui Wu

TL;DR

This paper introduces Robust Counterfactual Witnesses (RCWs), a new class of explanations for Graph Neural Networks (GNNs) that are simultaneously factual, counterfactual, and resilient to noise. Unlike traditional explainers that can be "fooled" by minor graph edits, the proposed RoboGExp algorithm identifies invariant subgraphs that maintain their explanatory power even when the underlying graph is disturbed.

What Problem Does This Paper Address?

As GNNs are increasingly deployed in high-stakes fields like drug discovery and cybersecurity, the "black box" nature of these models becomes a liability. We need to know why a GNN labeled a molecule as mutagenic or a network node as vulnerable.

Existing GNN explanation methods (like GNNExplainer or SubgraphX) often struggle with three specific requirements:

  1. Factuality: The explanation should be sufficient to produce the original classification.
  2. Counterfactuality: Removing the explanation should flip the classification (proving it was necessary).
  3. Robustness: The explanation should remain valid even if the graph undergoes small changes (e.g., a few missing bonds in a molecule or deceptive "noise" in a cyberattack).

Most current tools provide "fragile" explanations that change drastically with tiny perturbations, making them unreliable for domain experts who need to identify stable, "invariant" structures like toxicophores in chemistry.

Methods

The authors formalize the RCW as a subgraph that preserves a GNN's result, flips it if removed, and remains a valid explanation even if up to $k$ node pairs in the rest of the graph are "flipped" (added or deleted).

Key technical contributions include:

  • Complexity Analysis: They prove that verifying if a subgraph is an RCW is generally NP-hard. However, they identify a tractable case for APPNPs (a class of PageRank-based GNNs) by introducing a "local budget" constraint on disturbances.
  • RoboGExp Algorithm: A greedy "expand-verify" approach. It starts with a minimal set of test nodes and iteratively grows the explanation subgraph. It specifically targets and includes edges that are "most likely" to change the node's label if disturbed, effectively "securing" the classification.
  • Parallelization (paraRoboGExp): To handle massive graphs, they developed a coordinator-worker architecture that partitions the graph and synchronizes verified disturbances across threads, ensuring scalability without sacrificing the robustness guarantee.

Datasets

The researchers evaluated their approach on four diverse datasets:

  • BAHouse: A synthetic dataset where "house-shaped" motifs determine node labels.
  • PPI (Protein-Protein Interaction): A biological dataset where nodes are human proteins and labels reflect functional properties.
  • CiteSeer: A classic citation network where labels represent academic fields.
  • Reddit: A large-scale social network dataset used to test the scalability of the parallel algorithm.

Key Insights and Ideas

  • The "Worst-Case Margin": Instead of just looking for influential edges, the algorithm looks for the weakest links—the edges that, if edited, would most easily flip the GNN's prediction. By including these in the explanation, the result becomes robust.
  • Invariance over Instances: In the molecular case study, the RCW successfully ignored "noisy" hydrogen atoms and focused on the aldehyde group—a known toxicophore. While other explainers provided different subgraphs for similar molecules, RoboGExp found the common, invariant structure.
  • Efficiency over Learning: Many modern explainers require retraining a model or optimizing a complex loss function for every single explanation. RoboGExp uses a search-based approach that is significantly faster and avoids the overhead of gradient-based optimization.

Key Results

  • Robustness: RoboGExp outperformed state-of-the-art methods (CF2 and CF-GNNExp) in Graph Edit Distance (GED), producing explanations that were 2x to 2.3x more stable under graph disturbances.
  • Fidelity: It achieved higher "Fidelity+" scores, meaning its counterfactuals were more effective at actually flipping the model's labels when removed.
  • Speed: RoboGExp was remarkably efficient, taking only 12.03% of the time required by CF2 to generate explanations.
  • Scalability: The parallel version, paraRoboGExp, showed a 70.7% speedup when scaled from 2 to 10 threads on the large Reddit dataset, proving it can handle real-world, massive graphs.

Limitations and Future Work

  • Model Specificity: While the general framework is model-agnostic, the specific "tractable" proofs and optimized procedures in this paper are tailored toward APPNP-style GNNs. Extending the same level of efficiency to other architectures (like GATs or GINs) remains a challenge.
  • Explanation Size: The current algorithm focuses on finding a robust explanation, but not necessarily the minimum possible explanation. Future work could focus on further "distilling" these robust witnesses.
  • Task Expansion: The paper focuses on node classification. The authors suggest that extending RCWs to graph-level classification or link prediction is a promising next step.

Summary updated

BibTeX
@inproceedings{qiu2024generating,
  author = {Dazhuo Qiu and Mengying Wang and Arijit Khan and Yinghui Wu},
  title = {{Generating Robust Counterfactual Witnesses for Graph Neural Networks}},
  booktitle = {ICDE},
  year = {2024},
  doi = {10.1109/icde60146.2024.00259},
}

Loading related content...

Figure