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.
Unified counterfactual explainer for graph neural networks / Giorgi, F., Silvestri, F., Tolomei, G.. - In: NPJ ARTIFICIAL INTELLIGENCE.. - ISSN 3005-1460. - (2026). [10.1038/s44387-026-00135-w]
Unified counterfactual explainer for graph neural networks
Giorgi, Flavio
;Silvestri, Fabrizio
;Tolomei, Gabriele
2026
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.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


