Proceedings

Semifactual Explanations for GNN-based Classification: Formal Foundations, Complexity and Computation

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 4125-4134.

https://doi.org/10.24963/ijcai.2026/459

Abstract

Graph Neural Networks (GNNs) have become increasingly central to several analysis tasks in various domains, ranging, e.g., from social networks to molecular analysis. Understanding the decision-making process of GNNs is a critical challenge in machine learning, particularly when post-hoc explanations, attempting to answer why specific inputs are classified in a certain way by a given model, are required for specific input predictions. Existing post-hoc explainability methods for GNNs often rely on counterfactual reasoning, grounded in the `if this had not occurred' thinking, that typically identifies minimal subgraphs perturbations that would change a prediction. Notably, less attention has been posed on the equally important semifactual reasoning, grounded in the `even if this has not occurred' thinking, that results in identifying maximal subgraphs perturbations that would not change a prediction. In this paper, we introduce a novel technique for post-hoc explainability queries in GNNs by focusing on the semifactual reasoning. We first thoroughly investigate the computational complexity of several reasoning and optimization problems related to the computation of semifactuals, and then propose a novel learning architecture for addressing their computation. Finally, we experimentally evaluate the proposed approach in a variety of settings, showing its effectiveness in generating high-quality semifactual explanations.

  1. [Alfano et al., 2024] Gianvincenzo Alfano, Sergio Greco, Francesco Parisi, and Irina Trubitsyna. Counterfactual and semifactual explanations in abstract argumentation: Formal foundations, complexity and computation. In Proceedings of International Conference on Principles of Knowledge Representation and Reasoning (KR), pages 14-26, 2024.
  2. [Alfano et al., 2025a] Gianvincenzo Alfano, Adam Gould, Francesco Leofante, Antonio Rago, and Francesca Toni. Counterfactual explanations under model multiplicity and their use in computational argumentation. In Proceedings of International Joint Conference on Artificial Intelligence (IJCAI), pages 4321-4329. ijcai.org, 2025. IJCAI
  3. [Alfano et al., 2025b] Gianvincenzo Alfano, Sergio Greco, Domenico Mandaglio, Francesco Parisi, Reza Shahbazian, and Irina Trubitsyna. Decentralized federated learning meets physics-informed neural networks. Knowledge- Based Systems, 323:113717, 2025.
  4. [Alfano et al., 2025c] Gianvincenzo Alfano, Sergio Greco, Domenico Mandaglio, Francesco Parisi, Reza Shahbazian, and Irina Trubitsyna. Even-if explanations: Formal foun- dations, priorities and complexity. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pages 15347-15355, 2025.
  5. [Allamanis et al., 2018] Miltiadis Allamanis, Earl T Barr, Premkumar Devanbu, and Charles Sutton. A survey of machine learning for big code and naturalness. ACM Com- puting Surveys (CSUR), 51(4):1-37, 2018.
  6. [Arenas et al., 2021] Marcelo Arenas, Daniel Baez, Pablo Barceló, Jorge Pérez, and Bernardo Subercaseaux. Foun- dations of symbolic languages for model interpretability. Proceedings of Advances in Neural Information Process- ing Systems, 34:11690-11701, 2021.
  7. [Arenas et al., 2022] Marcelo Arenas, Pablo Barceló, Miguel Romero Orth, and Bernardo Subercaseaux. On computing probabilistic explanations for decision trees. Proceedings of Advances in Neural Information Processing Systems, 35:28695-28707, 2022.
  8. [Arora and Barak, 2009] Sanjeev Arora and Boaz Barak. Computational Complexity -A Modern Approach. Cam- bridge University Press, 2009.
  9. [Artelt et al., 2025] André Artelt, Martin Olsen, and Kevin Tierney. On the hardness of computing counterfactual and semi-factual explanations in XAI. Transactions on Ma- chine Learning Research, 2025.
  10. [Aryal and Keane, 2023] Saugat Aryal and Mark T. Keane. Even if explanations: Prior work, desiderata & bench- marks for semi-factual xai. In Proceedings of Interna- tional Joint Conference on Artificial Intelligence (IJCAI), pages 6526-6535, 2023. IJCAI
  11. [Azzolin et al., 2025] Steve Azzolin, Sagar Malhotra, An- drea Passerini, and Stefano Teso. Beyond topological self-explainable gnns: A formal explainability perspective. In Proceedings of International Conference on Machine Learning (ICML), pages 2045-2080, 2025.
  12. [Barceló et al., 2020] Pablo Barceló, Mikaël Monet, Jorge Pérez, and Bernardo Subercaseaux. Model interpretabil- ity through the lens of computational complexity. In Pro- ceedings of Advances in Neural Information Processing Systems, 2020.
  13. [Bassan et al., 2025] Shahaf Bassan, Ron Eliav, and Shlomit Gur. Explain yourself, briefly! self-explaining neural net- works with concise sufficient reasons. In Proceedings of International Conference on Learning Representations, 2025.
  14. [Borgwardt et al., 2005] Karsten M Borgwardt, Cheng Soon Ong, Stefan Schönauer, SVN Vishwanathan, Alex J Smola, and Hans-Peter Kriegel. Protein function predic- tion via graph kernels. Bioinformatics, 21(suppl 1):i47- i56, 2005.
  15. [Calautti et al., 2025] Marco Calautti, Enrico Malizia, and Cristian Molinaro. On the complexity of global necessary reasons to explain classification. In Proceedings of Inter- national Conference on Principles of Knowledge Repre- sentation and Reasoning (KR), pages 206-217, 2025.
  16. [Cho et al., 2011] Eunjoon Cho, Seth A Myers, and Jure Leskovec. Friendship and mobility: user movement in location-based social networks. In Proceedings of ACM SIGKDD International Conference on Knowledge Discov- ery and Data Mining, pages 1082-1090, 2011.
  17. [Dandl et al., 2023] Susanne Dandl, Giuseppe Casalicchio, Bernd Bischl, and Ludwig Bothmann. Interpretable re- gional descriptors: Hyperbox-based local explanations. In Proceedings of Machine Learning and Knowledge Dis- covery in Databases, volume 14171, pages 479-495. Springer, 2023.
  18. [Debnath et al., 1991] Asim Kumar Debnath, Rosa L Lopez de Compadre, Gargi Debnath, Alan J Shusterman, and Corwin Hansch. Structure-activity relationship of mutagenic aromatic and heteroaromatic nitro compounds. correlation with molecular orbital energies and hydropho- bicity. Journal of medicinal chemistry, 34(2):786-797, 1991.
  19. [Eiben et al., 2023] Eduard Eiben, Sebastian Ordyniak, Gia- como Paesani, and Stefan Szeider. Learning small decision trees with large domain. In Proceedings of International Joint Conference on Artificial Intelligence (IJCAI), pages 3184-3192, 2023. IJCAI
  20. [El Harzli et al., 2023] Ouns El Harzli, Bernardo Cuenca Grau, and Ian Horrocks. Cardinality-minimal explanations for monotonic neural networks. In Proceedings of Interna- tional Joint Conference on Artificial Intelligence (IJCAI), pages 3677-3685, 2023. IJCAI
  21. [Guidotti, 2024] Riccardo Guidotti. Counterfactual expla- nations and how to find them: literature review and benchmarking. Data Mining and Knowledge Discovery, 38(5):2770-2824, 2024.
  22. [Guo et al., 2025] Zhimeng Guo, Zongyu Wu, Teng Xiao, Charu Aggarwal, Hui Liu, and Suhang Wang. Counterfac- tual learning on graphs: A survey. Machine Intelligence Research, 22(1):17-59, 2025.
  23. [Huang et al., 2023] Zexi Huang, Mert Kosan, Sourav Me- dya, Sayan Ranu, and Ambuj Singh. Global counterfactual explainer for graph neural networks. In Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining, pages 141-149, 2023.
  24. [Ignatiev et al., 2019] Alexey Ignatiev, Nina Narodytska, and João Marques-Silva. Abduction-based explanations for machine learning models. In Proceedings of AAAI Conference on Artificial Intelligence, pages 1511-1519, 2019.
  25. [Ignatiev et al., 2022] Alexey Ignatiev, Yacine Izza, Peter J. Stuckey, and João Marques-Silva. Using maxsat for ef- ficient explanations of tree ensembles. In Proceedings of AAAI Conference on Artificial Intelligence, pages 3776- 3785, 2022.
  26. [Ivanov et al., 2019] Sergei Ivanov, Sergei Sviridov, and Evgeny Burnaev. Understanding isomorphism bias in graph data sets. arXiv preprint arXiv:1910.12091, 2019.
  27. [Kenny and Huang, 2023] Eoin M. Kenny and Weipeng Huang. The utility of "even if" semi-factual explanation to optimise positive outcomes. In Thirty-seventh Confer- ence on Neural Information Processing Systems, 2023.
  28. [Kenny and Keane, 2021] Eoin M Kenny and Mark T Keane. On generating plausible counterfactual and semi-factual explanations for deep learning. In Proceedings of AAAI Conference on Artificial Intelligence, pages 11575-11585, 2021.
  29. [Kipf and Welling, 2016] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
  30. [Kosan et al., 2024] Mert Kosan, Samidha Verma, Burouj Armgaan, Khushbu Pahwa, Ambuj Singh, Sourav Medya, and Sayan Ranu. Gnnx-bench: Unravelling the utility of perturbation-based gnn explainers through in-depth bench- marking. In International Conference on Learning Repre- sentations, 2024.
  31. [Lin et al., 2021] Wanyu Lin, Hao Lan, and Baochun Li. Generative causal explanations for graph neural networks. In International Conference on Machine Learning, pages 6666-6679. PMLR, 2021.
  32. [Luo et al., 2020] Dongsheng Luo, Wei Cheng, Dongkuan Xu, Wenchao Yu, Bo Zong, Haifeng Chen, and Xiang Zhang. Parameterized explainer for graph neural net- work. Advances in Neural Information Processing Sys- tems, 33:19620-19631, 2020.
  33. [Malfa et al., 2021] Emanuele La Malfa, Rhiannon Michel- more, Agnieszka M. Zbrzezny, Nicola Paoletti, and Marta Kwiatkowska. On guaranteed optimal robust explanations for NLP models. In Proceedings of International Joint Conference on Artificial Intelligence (IJCAI), pages 2658- 2665, 2021. IJCAI
  34. [Marques-Silva and Ignatiev, 2022] João Marques-Silva and Alexey Ignatiev. Delivering trustworthy AI through for- mal XAI. In Proceedings of AAAI Conference on Artificial Intelligence, pages 12342-12350, 2022.
  35. [Marzari et al., 2023] Luca Marzari, Davide Corsi, Ferdi- nando Cicalese, and Alessandro Farinelli. The #dnn- verification problem: Counting unsafe inputs for deep neu- ral networks. In Proceedings of International Joint Con- ference on Artificial Intelligence (IJCAI), pages 217-224, 2023.
  36. [Ordyniak et al., 2023] Sebastian Ordyniak, Giacomo Pae- sani, and Stefan Szeider. The parameterized complexity of finding concise local explanations. In Proceedings of In- ternational Joint Conference on Artificial Intelligence (IJ- CAI), pages 3312-3320, 2023. IJCAI
  37. [Prado-Romero et al., 2024a] Mario Alfonso Prado- Romero, Bardh Prenkaj, and Giovanni Stilo. Robust stochastic graph generator for counterfactual explana- tions. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 21518-21526, 2024.
  38. [Prado-Romero et al., 2024b] Mario Alfonso Prado- Romero, Bardh Prenkaj, Giovanni Stilo, and Fosca Giannotti. A survey on graph counterfactual explanations: definitions, methods, evaluation, and research challenges. ACM Computing Surveys, 56(7):1-37, 2024.
  39. [Riesen and Bunke, 2008] Kaspar Riesen and Horst Bunke. Iam graph database repository for graph based pattern recognition and machine learning. In Structural, Syntactic, and Statistical Pattern Recognition: Joint IAPR Interna- tional Workshop, SSPR & SPR 2008, Orlando, USA, De- cember 4-6, 2008. Proceedings, pages 287-297. Springer, 2008.
  40. [Tan et al., 2022] Juntao Tan, Shijie Geng, Zuohui Fu, Yingqiang Ge, Shuyuan Xu, Yunqi Li, and Yongfeng Zhang. Learning and evaluating graph neural network ex- planations based on counterfactual and factual reasoning. In Proceedings of the ACM Web Conference, pages 1018- 1027, 2022.
  41. [Verma et al., 2024] Samidha Verma, Burouj Armgaan, Sourav Medya, and Sayan Ranu. Induce: Inductive coun- terfactual explanations for graph neural networks. Trans- actions on Machine Learning Research, 2024.
  42. [Wale et al., 2008] Nikil Wale, Ian A Watson, and George Karypis. Comparison of descriptor spaces for chemical compound retrieval and classification. Knowledge and In- formation Systems, 14:347-375, 2008.
  43. [Xie et al., 2022] Yaochen Xie, Sumeet Katariya, Xianfeng Tang, Edward Huang, Nikhil Rao, Karthik Subbian, and Shuiwang Ji. Task-agnostic graph explanations. Advances in Neural Information Processing Systems, 35:12027- 12039, 2022.
  44. [Ying et al., 2019] Zhitao Ying, Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, and Jure Leskovec. Gnnexplainer: Generating explanations for graph neural networks. Ad- vances in Neural Information Processing Systems, 32, 2019.
  45. [You et al., 2018] Jiaxuan You, Bowen Liu, Zhitao Ying, Vi- jay Pande, and Jure Leskovec. Graph convolutional pol- icy network for goal-directed molecular graph generation. Advances in Neural Information Processing Systems, 31, 2018.
  46. [Yuan et al., 2021] Hao Yuan, Haiyang Yu, Jie Wang, Kang Li, and Shuiwang Ji. On explainability of graph neural net- works via subgraph explorations. In International Confer- ence on Machine Learning, pages 12241-12252. PMLR, 2021.
  47. [Yuan et al., 2022] Hao Yuan, Haiyang Yu, Shurui Gui, and Shuiwang Ji. Explainability in graph neural networks: A taxonomic survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(5):5782-5799, 2022.
  48. [Zhang et al., 2022] Shichang Zhang, Yozen Liu, Neil Shah, and Yizhou Sun. Gstarx: Explaining graph neural net- works with structure-aware cooperative games. In Ad- vances in Neural Information Processing Systems, 2022.
  49. [Zitnik et al., 2018] Marinka Zitnik, Monica Agrawal, and Jure Leskovec. Modeling polypharmacy side effects with graph convolutional networks. Bioinformatics, 34(13):i457-i466, 2018.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards