Graph Counterfactual Explainable AI via Latent Space Traversal

Andreas Abildtrup Hansen, Paraskevas Pegios, Anna Calissano, Aasa Feragen
Proceedings of the 6th Northern Lights Deep Learning Conference (NLDL), PMLR 265:75-84, 2025.

Abstract

Explaining the predictions of a deep neural network is a nontrivial task, yet high-quality explanations for predictions are often a prerequisite for practitioners to trust these models. \textit{Counterfactual explanations} aim to explain predictions by finding the “nearest” in-distribution alternative input whose prediction changes in a pre-specified way. However, it remains an open question how to define this nearest alternative input, whose solution depends on both the domain (e.g. images, graphs, tabular data, etc.) and the specific application considered. For graphs, this problem is complicated i) by their discrete nature, as opposed to the continuous nature of state-of-the-art graph classifiers; and ii) by the node permutation group acting on the graphs. We propose a method to generate counterfactual explanations for any differentiable black-box graph classifier, utilizing a case-specific permutation equivariant graph variational autoencoder. We generate counterfactual explanations in a continuous fashion by traversing the latent space of the autoencoder across the classification boundary of the classifier, allowing for seamless integration of discrete graph structure and continuous graph attributes. We empirically validate the approach on three graph datasets, showing that our model is consistently high performing and more robust than the baselines.

Cite this Paper


BibTeX
@InProceedings{pmlr-v265-hansen25a, title = {Graph Counterfactual Explainable {AI} via Latent Space Traversal}, author = {Hansen, Andreas Abildtrup and Pegios, Paraskevas and Calissano, Anna and Feragen, Aasa}, booktitle = {Proceedings of the 6th Northern Lights Deep Learning Conference (NLDL)}, pages = {75--84}, year = {2025}, editor = {Lutchyn, Tetiana and Ramírez Rivera, Adín and Ricaud, Benjamin}, volume = {265}, series = {Proceedings of Machine Learning Research}, month = {07--09 Jan}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v265/main/assets/hansen25a/hansen25a.pdf}, url = {https://proceedings.mlr.press/v265/hansen25a.html}, abstract = {Explaining the predictions of a deep neural network is a nontrivial task, yet high-quality explanations for predictions are often a prerequisite for practitioners to trust these models. \textit{Counterfactual explanations} aim to explain predictions by finding the “nearest” in-distribution alternative input whose prediction changes in a pre-specified way. However, it remains an open question how to define this nearest alternative input, whose solution depends on both the domain (e.g. images, graphs, tabular data, etc.) and the specific application considered. For graphs, this problem is complicated i) by their discrete nature, as opposed to the continuous nature of state-of-the-art graph classifiers; and ii) by the node permutation group acting on the graphs. We propose a method to generate counterfactual explanations for any differentiable black-box graph classifier, utilizing a case-specific permutation equivariant graph variational autoencoder. We generate counterfactual explanations in a continuous fashion by traversing the latent space of the autoencoder across the classification boundary of the classifier, allowing for seamless integration of discrete graph structure and continuous graph attributes. We empirically validate the approach on three graph datasets, showing that our model is consistently high performing and more robust than the baselines.} }
Endnote
%0 Conference Paper %T Graph Counterfactual Explainable AI via Latent Space Traversal %A Andreas Abildtrup Hansen %A Paraskevas Pegios %A Anna Calissano %A Aasa Feragen %B Proceedings of the 6th Northern Lights Deep Learning Conference (NLDL) %C Proceedings of Machine Learning Research %D 2025 %E Tetiana Lutchyn %E Adín Ramírez Rivera %E Benjamin Ricaud %F pmlr-v265-hansen25a %I PMLR %P 75--84 %U https://proceedings.mlr.press/v265/hansen25a.html %V 265 %X Explaining the predictions of a deep neural network is a nontrivial task, yet high-quality explanations for predictions are often a prerequisite for practitioners to trust these models. \textit{Counterfactual explanations} aim to explain predictions by finding the “nearest” in-distribution alternative input whose prediction changes in a pre-specified way. However, it remains an open question how to define this nearest alternative input, whose solution depends on both the domain (e.g. images, graphs, tabular data, etc.) and the specific application considered. For graphs, this problem is complicated i) by their discrete nature, as opposed to the continuous nature of state-of-the-art graph classifiers; and ii) by the node permutation group acting on the graphs. We propose a method to generate counterfactual explanations for any differentiable black-box graph classifier, utilizing a case-specific permutation equivariant graph variational autoencoder. We generate counterfactual explanations in a continuous fashion by traversing the latent space of the autoencoder across the classification boundary of the classifier, allowing for seamless integration of discrete graph structure and continuous graph attributes. We empirically validate the approach on three graph datasets, showing that our model is consistently high performing and more robust than the baselines.
APA
Hansen, A.A., Pegios, P., Calissano, A. & Feragen, A.. (2025). Graph Counterfactual Explainable AI via Latent Space Traversal. Proceedings of the 6th Northern Lights Deep Learning Conference (NLDL), in Proceedings of Machine Learning Research 265:75-84 Available from https://proceedings.mlr.press/v265/hansen25a.html.

Related Material