SSDGExplainer: Structure-Semantic Dual-Guided Explainer for Graph Neural Networks

Zhiqiang Wang, Chenchao Zhang, Jianqing Liang, Xingwang Zhao, Jiye Liang, Chuangyin DangNeurIPS 2026

TL;DR

When we ask why a Graph Neural Network (GNN) made a decision, standard explainers isolate a tiny fragment of the graph—creating weird, out-of-distribution shapes that confuse the very model we are trying to probe. Existing fixes try pasting these fragments onto generated backgrounds, which often results in broken connections and nonsensical "Frankenstein" graphs. SSDGExplainer solves this by generating backgrounds conditioned on the explanation's meaning, healing the structural seams, and anchoring the whole creation to reality via contrastive learning.

What Problem Does This Paper Address?

Imagine trying to figure out how an AI recognizes a cat by cutting out just the whiskers and feeding them back into the network. Because the AI was trained on whole animals, a floating pair of whiskers looks completely alien—an out-of-distribution (OOD) sample. The AI’s resulting prediction is unreliable, meaning your "explanation" is built on faulty feedback.

In Graph Neural Networks (used heavily in drug discovery and social networks), post-hoc explainers do this exact thing: they extract sparse subgraphs from full graphs. Recent "proxy graph" methods try to avoid OOD confusion by pasting the extracted explanation subgraph onto a synthetic background graph. However, they typically assume the explanation and background are independent and stitch them together mechanically ("hard splicing"). In molecules, where strict chemical valence rules apply, this creates severed bonds at the seams and warps chemical meanings—like accidentally turning a six-carbon benzene ring into a five-carbon ring.

Figure 1: An example illustrating issues arising during the reconstruction of the explanation subgraph and the original graph. Boundary discontinuities occur when the nitro group is spliced with the background subgraph, and the benzene ring in the background is reconstructed as a five-membered carbon ring, leading to altered molecular chemical semantics.

Methods

SSDGExplainer builds realistic, in-distribution proxy graphs to give a standard parameterized edge-masking explainer trustworthy supervision. While alternating training between a generator and an explainer is standard practice, the authors introduce three novel, synergistic modules to guide proxy generation:

  1. Semantic-Constrained Conditional Generation: Instead of generating backgrounds blindly, the frozen target GNN extracts a global representation of the candidate explanation subgraph—a semantic anchor. A dual-branch Variational Graph Autoencoder (VGAE)—deterministic for the explanation, noisy/variational for diverse backgrounds—conditions both branches on this anchor before combining them.
  2. Topological Boundary Optimization Network: To fix the jagged seams left by splicing, a two-layer Graph Convolutional Network (GCN) inspects local node neighborhoods and uses a lightweight edge predictor to gently adjust edge weights, smoothing out structural fractures.
  3. Contrastive Semantic Constraint: Even structurally clean graphs can suffer from semantic drift (losing a critical bond that flips a molecule's property). Using an InfoNCE contrastive loss, the model pulls the proxy graph’s embedding close to the original graph’s embedding within the target GNN's own feature space.
Figure 2: An overview of the SSDGExplainer. The explainer extracts an explanation subgraph and its background from the input graph, and a pretrained GNN provides a semantic representation as guidance. Under this constraint, a conditional generation module produces a semantically consistent proxy graph, which is further refined by a topology optimization module. Finally, a contrastive semantic constraint aligns the proxy graph with the original graph in the embedding space, enabling stable in-distribution supervision for explanation learning.

Datasets

No new datasets were introduced. The authors evaluated their method on five established graph-classification benchmarks:

  • Synthetic datasets: BA-2motifs and BA-3motifs (Barabási-Albert base graphs attached to specific structural motifs like houses or cycles).
  • Real-world molecular datasets: MUTAG, Alkane-Carbonyl, and Fluoride-Carbonyl (where chemical functional groups dictate molecular properties).

Key Insights and Ideas

  • Explanations and backgrounds aren't independent: In real-world graphs like molecules, a functional group dictates what kind of carbon skeleton it can attach to. Conditioning background generation on the explanation's semantics is critical—removing it caused the largest performance drop on real-world chemical data (MUTAG) in ablation tests.
  • Fixing edges isn't enough; you have to guard the meaning: Local topological smoothing repairs broken boundaries, while global contrastive alignment ensures the GNN actually perceives the proxy graph like the original input.
  • Better proxies don't require a speed penalty: Despite adding conditional generation and boundary refinement, inference remains remarkably fast because the heavy lifting happens via compact MLPs and lightweight GNN layers.

Key Results

Tested against nine state-of-the-art baselines (including PGExplainer, MixupExplainer, and ProxyExplainer), SSDGExplainer swept the board on explanation accuracy:

  • Explanation Quality (AUC-ROC): Achieved 0.950 on BA-2motifs, 0.991 on BA-3motifs, 0.994 on MUTAG (+1.7% over the best baseline), 0.936 on Alkane-Carbonyl, and 0.776 on Fluoride-Carbonyl (+2.4%).
  • Precision & Fidelity: Scored top Average Precision (AP) on BA-2motifs (0.871) and MUTAG (0.900, jumping from ProxyExplainer's 0.756), alongside strong robust fidelity scores.
  • Representation Alignment: Across all five datasets, refined proxy graphs achieved much higher cosine similarity to the original graphs (e.g., 0.985 vs. 0.883 on MUTAG) than isolated ground-truth subgraphs did.
  • Efficiency: Averaged 18.2 ms per instance on BA-2motifs (second fastest overall) and 24.8 ms on MUTAG (fastest overall, beating ProxyExplainer's 25.3 ms and GNNExplainer's 367.3 ms).
Table 1: AUC-ROC scores on five datasets.

Limitations and Future Work

  • Quadratic Scaling: Because the MLP decoder reconstructs dense adjacency matrices, time and memory complexity scale quadratically—$O(n^2)$—with the number of nodes $n$, creating overhead for very large graphs.
  • Graph-Level Only: While effective for whole-graph classification, extending this framework to node-level classification remains challenging due to overlapping receptive fields between neighboring nodes.
  • Future Directions: The authors plan to adapt their dual-guided mechanism for node classification tasks and incorporate stronger, explicit chemical rules (priors) into the generation process.

Summary updated

Abstract

Post-hoc Graph Neural Networks explainers typically extract a compact subgraph to preserve the model’s decision rationale. However, this extraction breaks topological integrity and induces a distribution shift, making predictions on subgraphs unreliable and consequently misleading explainer optimization under out-of-distribution (OOD) conditions. Existing attempts to build in-distribution proxy graphs often assume independence between explanation and background subgraphs and rely on hard splicing, which causes semantic mismatch and boundary discontinuities that degrade explanation reliability. We propose SSDGExplainer, a Structure–Semantic Dual-Guided explainer that formulates proxy-graph generation as conditional modeling under semantic consistency constraints to achieve deep semantic alignment between the explanation subgraph and the generated background, introduces a topology boundary optimization network to smooth structural fractures at the explanation–background interface, and enforces contrastive semantic constraints to prevent semantic drift. Extensive experiments on synthetic and real-world benchmarks demonstrate consistent improvements over state-of-the-art methods in both explanation quality and fidelity.
BibTeX
@inproceedings{wang2026ssdgexplainer,
  author = {Zhiqiang Wang and Chenchao Zhang and Jianqing Liang and Xingwang Zhao and Jiye Liang and Chuangyin Dang},
  title = {{SSDGExplainer: Structure-Semantic Dual-Guided Explainer for Graph Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=RGQy0JzzUL},
}
Figure