Counterfactual Generation with Answer Set Programming
Abstract: Machine learning models that automate decision-making are increasingly being used in consequential areas such as loan approvals, pretrial bail approval, hiring, and many more. Unfortunately, most of these models are black-boxes, i.e., they are unable to reveal how they reach these prediction decisions. A need for transparency demands justification for such predictions. An affected individual might also desire explanations to understand why a decision was made. Ethical and legal considerations may further require informing the individual of changes in the input attribute that could be made to produce a desirable outcome. This paper focuses on the latter problem of automatically generating counterfactual explanations. We propose a framework Counterfactual Generation with s(CASP) (CFGS) that utilizes answer set programming (ASP) and the s(CASP) goal-directed ASP system to automatically generate counterfactual explanations from rules generated by rule-based machine learning (RBML) algorithms. In our framework, we show how counterfactual explanations are computed and justified by imagining worlds where some or all factual assumptions are altered/changed. More importantly, we show how we can navigate between these worlds, namely, go from our original world/scenario where we obtain an undesired outcome to the imagined world/scenario where we obtain a desired/favourable outcome.
- 1987. Congressional Voting Records. UCI Machine Learning Repository. DOI: https://doi.org/10.24432/C5C01P.
- 1987. Mushroom. UCI Machine Learning Repository. DOI: https://doi.org/10.24432/C5959T.
- Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answer Set Programming. Theory and Practice of Logic Programming 22, 1 (2022), 51ā80. https://doi.org/10.1017/S1471068421000156
- Constraint Answer Set Programming without Grounding. Theory and Practice of Logic Programming 18, 3-4 (2018), 337ā354. https://doi.org/10.1017/S1471068418000285
- C. Baral. 2003. Knowledge representation, reasoning and declarative problem solving. Cambridge University Press.
- Barry Becker and Ronny Kohavi. 1996. Adult. UCI Machine Learning Repository. DOI: https://doi.org/10.24432/C5XW20.
- LeopoldoĀ E. Bertossi and Gabriela Reyes. 2021. Answer-Set Programs for Reasoning About Counterfactual Interventions and Responsibility Scores for Classification. In Inductive Logic Programming - 30th International Conference, ILP 2021, Virtual Event, October 25-27, 2021, Proceedings (Lecture Notes in Computer Science, Vol.Ā 13191), Nikos Katzouris and Alexander Artikis (Eds.). Springer, 41ā56. https://doi.org/10.1007/978-3-030-97454-1_4
- Marko Bohanec. 1997. Car Evaluation. UCI Machine Learning Repository. DOI: https://doi.org/10.24432/C5JP48.
- Answer set programming at a glance. Commun. ACM 54, 12 (2011), 92ā103.
- Ruth M.Ā J. Byrne. 2019. Counterfactuals in Explainable Artificial Intelligence (XAI): Evidence from Human Reasoning. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, Sarit Kraus (Ed.). ijcai.org, 6276ā6282. https://doi.org/10.24963/ijcai.2019/876
- Tianqi Chen and Carlos Guestrin. 2016. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, Balaji Krishnapuram, Mohak Shah, AlexanderĀ J. Smola, CharuĀ C. Aggarwal, Dou Shen, and Rajeev Rastogi (Eds.). ACM, 785ā794. https://doi.org/10.1145/2939672.2939785
- WilliamĀ W. Cohen. 1995. Fast Effective Rule Induction. In Machine Learning, Proceedings of the Twelfth International Conference on Machine Learning, Tahoe City, California, USA, July 9-12, 1995, Armand Prieditis and Stuart Russell (Eds.). Morgan Kaufmann, 115ā123. https://doi.org/10.1016/B978-1-55860-377-6.50023-2
- Will Cukierski. 2012. Titanic - Machine Learning from Disaster. https://kaggle.com/competitions/titanic
- M. Gelfond and Y. Kahl. 2014. Knowledge representation, reasoning, and the design of intelligent agents: Answer Set Programming approach. Cambridge Univ. Press.
- Automating Commonsense Reasoning with ASP and s(CASP) *. https://api.semanticscholar.org/CorpusID:251793743
- Model-Agnostic Counterfactual Explanations for Consequential Decisions. In The 23rd International Conference on Artificial Intelligence and Statistics, AISTATS 2020, 26-28 August 2020, Online [Palermo, Sicily, Italy] (Proceedings of Machine Learning Research, Vol.Ā 108), Silvia Chiappa and Roberto Calandra (Eds.). PMLR, 895ā905. http://proceedings.mlr.press/v108/karimi20a.html
- Algorithmic Recourse: from Counterfactual Explanations to Interventions. In FAccT ā21: 2021 ACM Conference on Fairness, Accountability, and Transparency, Virtual Event / Toronto, Canada, March 3-10, 2021, MadeleineĀ Clare Elish, William Isaac, and RichardĀ S. Zemel (Eds.). ACM, 353ā362. https://doi.org/10.1145/3442188.3445899
- JohnĀ W. Lloyd. 1987. Foundations of Logic Programming. In Symbolic Computation. https://api.semanticscholar.org/CorpusID:46408498
- Judea Pearl. 2009. Causal inference in statistics: An overview. Statistics Surveys 3, none (2009), 96 ā 146. https://doi.org/10.1214/09-SS057
- Predict studentsā dropout and academic success. UCI Machine Learning Repository. DOI: https://doi.org/10.24432/C5MC89.
- Chris Russell. 2019. Efficient Search for Diverse Coherent Explanations. In Proceedings of the Conference on Fairness, Accountability, and Transparency (Atlanta, GA, USA) (FAT* ā19). Association for Computing Machinery, New York, NY, USA, 20ā28. https://doi.org/10.1145/3287560.3287569
- A new algorithm to automate inductive learning of default theories. Theory Pract. Log. Program. 17, 5-6 (2017), 1010ā1026. https://doi.org/10.1017/S1471068417000333
- Interpretable Predictions of Tree-based Ensembles via Actionable Feature Tweaking. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13 - 17, 2017. ACM, 465ā474. https://doi.org/10.1145/3097983.3098039
- Actionable Recourse in Linear Classification. CoRR abs/1809.06514 (2018). arXiv:1809.06514 http://arxiv.org/abs/1809.06514
- Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPR. CoRR abs/1711.00399 (2017). arXiv:1711.00399 http://arxiv.org/abs/1711.00399
- Huaduo Wang and Gopal Gupta. 2022. FOLD-R++: A Scalable Toolset for Automated Inductive Learning of Default Theories from Mixed Data. In Functional and Logic Programming - 16th International Symposium, FLOPS 2022, Kyoto, Japan, May 10-12, 2022, Proceedings (Lecture Notes in Computer Science, Vol.Ā 13215), Michael Hanus and Atsushi Igarashi (Eds.). Springer, 224ā242. https://doi.org/10.1007/978-3-030-99461-7_13
- Huaduo Wang and Gopal Gupta. 2024. FOLD-SE: An Efficient Rule-Based Machine Learning Algorithm with Scalable Explainability. 14512 (2024), 37ā53.
- FOLD-RM: A Scalable, Efficient, and Explainable Inductive Learning Algorithm for Multi-Category Classification of Mixed Data. Theory Pract. Log. Program. 22, 5 (2022), 658ā677. https://doi.org/10.1017/S1471068422000205
- Adam White and ArturĀ S. dāAvila Garcez. 2020. Measurable Counterfactual Local Explanations for Any Classifier. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020) (Frontiers in Artificial Intelligence and Applications, Vol.Ā 325), GiuseppeĀ De Giacomo, Alejandro CatalĆ”, Bistra Dilkina, Michela Milano, SenĆ©n Barro, Alberto BugarĆn, and JĆ©rĆ“me Lang (Eds.). IOS Press, 2529ā2535. https://doi.org/10.3233/FAIA200387
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.