Skip to content
Open access

Unified counterfactual explainer for graph neural networks

Jul 2026 · npj Artificial Intelligence · 1 citation · ⚡ 1 influential

TL;DR

A novel Unified Counterfactual Explainer for GNNs that generates counterfactual explanations for both node and graph classification tasks through a unified approach, and offers maximum flexibility by supporting maximum flexibility.

Abstract

Counterfactual explanations emerged as a powerful tool to unveil the opaque decision-making processes of Graph Neural Networks (GNNs). However, existing techniques primarily focus on edge modifications, often overlooking the crucial role of node features and edge attributes changes in shaping the model predictions. To address this limitation, we propose a novel Unified Counterfactual Explainer (UCExplainer) for GNNs that generates counterfactual explanations for both node and graph classification tasks. Unlike prior methods, UCExplainer generates realistic and interpretable counterfactuals through a unified approach. It balances modifications by jointly optimizing perturbations across edges, edge attributes, and node features, ensuring the minimal changes required to flip a model’s prediction. Furthermore, UCExplainer offers maximum flexibility by supporting: (1) perturbations of both discrete and continuous values, (2) the clipping of values to a user-defined ranges, and (3) the exclusion of specific elements, such as entire nodes, edges, or individual features, from modification. Experiments on real-world datasets demonstrate the effectiveness and robustness of our approach over existing baselines.

Read PDF

Similar papers

Preprint Aug 2026

Faithful, Sufficient and Understandable: Rethinking Graph Counterfactual Explanations via Discrete Diffusion Inversion

This work proposes Graph Diffusion Counterfactual Explanation via Inversion (GDCE-I), a discrete denoising diffusion model with a novel discrete inversion scheme that enables distribution-aware edits leveraging the whole domain edit space and qualitatively shows that GDCE-I attains interpretable in-distribution solutions.

David Bechtoldt, Sidney Bender · 0 citations
Book Open access Aug 2026

Counterfactual Analysis on Large Graphs

Counterfactual analysis aims to identify minimal and semantically meaningful changes that alter a model's prediction. Existing perturbation approaches generate counterfactuals by directly editing nodes, edges, or attributes, often producing explanations that are model-dependent and detached from the underlying data distribution. In this paper, we introduce Counterfactual Subgraph Retrieval (CF-SGR), a dataset-grounded formulation that retrieves from a large graph subgraphs that are structurally and semantically similar to a query but induce different predictions under the same model, yielding domain-valid and verifiable counterfactual explanations. To solve CF-SGR, we propose Concept-guided Counterfactual Subgraph Retrieval (CCSGR), which operates in a shared multi-scale graph concept space aligned with a trained GNN and replaces fine-grained node-level edits with concept-level reasoning. CCSGR performs retrieval via concept-based filtering, robustness-aware ranking, and diversity-aware selection, enabling scalable and non-redundant search over large graphs. We provide theoretical guarantees on correctness, robustness, and efficiency and demonstrate that CCSGR improves retrieval quality by up to 40% while achieving speedups of 20× on large-scale graphs across six real-world datasets spanning five domains.

Hsi-Wen Chen, Jian Pei, De-Nian Yang et al. · 0 citations
Preprint Aug 2026

Overcoming Shortcut Learning in Graph Neural Networks through Active Explanation Guidance

This work introduces XIGL, an architecture-agnostic human-in-the-loop strategy for removing shortcuts from GNNs, and develops an active learning strategy for prioritizing explanations that are more likely to display shortcut behavior, lowering annotation and cognitive costs.

Taraneh Younesian, Steve Azzolin, A. Longa et al. · 0 citations
Preprint Jul 2026

Towards Faithful Graph Explanations with Synergistic Edge Effects via Granular Balls

Instance-level explanations aim to reveal the rationale behind a model's decisions for a specific graph. Previous methods explain graph neural networks (GNNs) by selecting important edges to induce subgraphs, where edge importance is assessed by perturbing each edge and observing changes in the model predictions. However, they often neglect the synergistic effects among edges, which are crucial for accurately characterizing edge importance. To address this issue, we propose SeeExplainer, a parameter-free explainer to interpret GNNs. Specifically, we first introduce a granular-ball graph refinement mechanism that decomposes a graph into several disjoint granular-balls with no fixed size, and utilize them as nodes to construct a structural graph. This process can better capture the synergistic effects among edges. Then, we perturb nodes and edges in the structural graph to generate explanatory subgraphs based on their respective contributions. Experiments on several graph classification datasets of different networks show that SeeExplainer outperforms state-of-the-art baselines.

Jiancu Chen, Shuyin Xia, Guan Wang et al. · 0 citations