Abstract
Answer-Set Programming (ASP) is a popular declarative reasoning and problem solving formalism. Due to the increasing interest in explainability, several explanation approaches have been developed for ASP. However, while those formalisms are correct and interesting on their own, most are more technical and less oriented towards philosophical or social concepts of explanation. In this work, we study the notion of contrastive explanation, i.e., answering questions of the form “Why P instead of Q?”, in the context of ASP. In particular, we are interested in answering why atoms are included in an answer set, whereas others are not. Contrastive explainability has recently become popular due to its strong support from the philosophical, cognitive, and social sciences and its apparent ability to provide explanations that are concise and intuitive for humans. We formally define contrastive explanations for ASP based on counterfactual reasoning about programs. Furthermore, we demonstrate the usefulness of the concept on example applications and give some complexity results. The latter also provide a guideline as to how the explanations can be computed in practice.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Abels, D., Jordi, J., Ostrowski, M., Schaub, T., Toletti, A., Wanko, P.: Train scheduling with hybrid ASP. In: Balduccini, M., Lierler, Y., Woltran, S. (eds.) LPNMR. LNCS, vol. 11481, pp. 3–17. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-20528-7_1
Ali, R., El-Kholany, M.M.S., Gebser, M.: Flexible job-shop scheduling for semiconductor manufacturing with hybrid answer set programming (application paper). In: Hanus, M., Inclezan, D. (eds.) PADL 2023. LNCS, pp. 85–95. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-24841-2_6
Beierle, C., Dusso, O., Kern-Isberner, G.: Using answer set programming for a decision support system. In: Baral, C., Greco, G., Leone, N., Terracina, G. (eds.) LPNMR 2005. LNCS (LNAI), vol. 3662, pp. 374–378. Springer, Heidelberg (2005). https://doi.org/10.1007/11546207_30
Brain, M., Gebser, M., Pührer, J., Schaub, T., Tompits, H., Woltran, S.: Debugging ASP programs by means of ASP. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 31–43. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-72200-7_5
Buss, S.R., Krajıcek, J., Takeuti, G.: On provably total functions in bounded arithmetic theories. In: Clote, P., Krajıcek, J. (eds.) Arithmetic, Proof Theory and Computational Complexity, pp. 116–161. Oxford University Press (1993)
Cabalar, P., Fandinno, J., Muñiz, B.: A system for explainable answer set programming. In: Technical Communications of the 36th International Conference on Logic Programming (ICLP 2020). EPTCS, vol. 325, pp. 124–136 (2020). https://doi.org/10.4204/EPTCS.325.19
Chen, Z., Toda, S.: The complexity of selecting maximal solutions. Inf. Comput. 119(2), 231–239 (1995). https://doi.org/10.1006/inco.1995.1087
Comploi-Taupe, R., Francescutto, G., Schenner, G.: Applying incremental answer set solving to product configuration. In: Proceedings o the 26th ACM International Systems and Software Product Line Conference (SPLC 2022), pp. 150–155. ACM (2022). https://doi.org/10.1145/3503229.3547069
Console, L., Torasso, P.: A spectrum of logical definitions of model-based diagnosis. Comput. Intell. 7, 133–141 (1991). https://doi.org/10.1111/j.1467-8640.1991.tb00388.x
Dantsin, E., Eiter, T., Gottlob, G., Voronkov, A.: Complexity and expressive power of logic programming. ACM Comput. Surv. 33(3), 374–425 (2001). https://doi.org/10.1145/502807.502810
Eiter, T., Geibinger, T., Ruiz, N.H., Oetsch, J.: A logic-based approach to contrastive explainability for neurosymbolic visual question answering. In: Proceedings of the 32rd International Joint Conference on Artificial Intelligence (IJCAI 2023) (2023). https://www.ijcai.org/proceedings/2023/408
Eiter, T., Gottlob, G., Leone, N.: Abduction from logic programs: semantics and complexity. Theor. Comput. Sci. 189(1), 129–177 (1997). https://doi.org/10.1016/S0304-3975(96)00179-X
Erdem, E., Gelfond, M., Leone, N.: Applications of answer set programming. AI Mag. 37(3), 53–68 (2016). https://doi.org/10.1609/aimag.v37i3.2678
Erdem, E., Oztok, U.: Generating explanations for biomedical queries. Theory Pract. Logic Program. 15(1), 35–78 (2015). https://doi.org/10.1017/S1471068413000598
Falkner, A., Friedrich, G., Schekotihin, K., Taupe, R., Teppan, E.C.: Industrial applications of answer set programming. KI - Künstliche Intell. 32(2), 165–176 (2018). https://doi.org/10.1007/s13218-018-0548-6
Fandinno, J.: Deriving conclusions from non-monotonic cause-effect relations. Theory Pract. Logic Program. 16(5–6), 670–687 (2016). https://doi.org/10.1017/S1471068416000466
Fandinno, J., Schulz, C.: Answering the “why’’ in answer set programming - A survey of explanation approaches. Theory Pract. Logic Program. 19(2), 114–203 (2019). https://doi.org/10.1017/S1471068418000534
Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9, 365–385 (1991)
Halpern, J.Y.: A modification of the Halpern-pearl definition of causality. In: Yang, Q., Wooldridge, M.J. (eds.) Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI 2015), pp. 3022–3033. AAAI Press (2015). https://ijcai.org/Abstract/15/427
Halpern, J.Y., Pearl, J.: Causes and explanations: a structural-model approach - part II: explanations. In: Proceedings of the 17th International Joint Conference on Artificial Intelligence (IJCAI 2001), pp. 27–34. Morgan Kaufmann (2001)
Halpern, J.Y., Pearl, J.: Causes and explanations: a structural-model approach: Part 1: causes. In: Proceedings of the 17th Conference in Uncertainty in Artificial Intelligence (UAI 2001), pp. 194–202. Morgan Kaufmann (2001)
Ignatiev, A., Narodytska, N., Asher, N., Marques-Silva, J.: From contrastive to abductive explanations and back again. In: Baldoni, M., Bandini, S. (eds.) AIxIA 2020. LNCS (LNAI), vol. 12414, pp. 335–355. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-77091-4_21
Inclezan, D.: An application of answer set programming to the field of second language acquisition. Theory Pract. Logic Program. 15(1), 1–17 (2015). https://doi.org/10.1017/S1471068413000653
Janota, M., Marques-Silva, J.: On the query complexity of selecting minimal sets for monotone predicates. Artif. Intell. 233, 73–83 (2016). https://doi.org/10.1016/j.artint.2016.01.002
Kakas, A.C., Kowalski, R.A., Toni, F.: Abductive logic programming. J. Logic Comput. 2(6), 719–770 (1992). https://doi.org/10.1093/logcom/2.6.719
Kean, A.: A characterization of contrastive explanations computation. In: Lee, H.-Y., Motoda, H. (eds.) PRICAI 1998. LNCS, vol. 1531, pp. 599–610. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0095304
Krarup, B., Krivic, S., Magazzeni, D., Long, D., Cashmore, M., Smith, D.E.: Contrastive explanations of plans through model restrictions. J. Artif. Intell. Res. 72, 533–612 (2021). https://doi.org/10.1613/jair.1.12813
Lakkaraju, H., Bach, S.H., Leskovec, J.: Interpretable decision sets: a joint framework for description and prediction. In: Proceedings of the 22nd ACM SIGKDD International Conference on (KDD 2016), pp. 1675–1684. ACM (2016). https://doi.org/10.1145/2939672.2939874
Lifschitz, V.: Answer set programming and plan generation. Artif. Intell. 138(1–2), 39–54 (2002). https://doi.org/10.1016/S0004-3702(02)00186-8
Lipton, P.: Contrastive explanation. R. Inst. Philos. Suppl. 27, 247–266 (1990). https://doi.org/10.1017/S1358246100005130
Marques-Silva, J.: Logic-based explainability in machine learning. In: Bertossi, L., Xiao, G. (eds.) Reasoning Web. Causality, Explanations and Declarative Knowledge. LNCS, pp. 24–104. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-31414-8_2
Miller, T.: Explanation in artificial intelligence: insights from the social sciences. Artif. Intell. 267, 1–38 (2019). https://doi.org/10.1016/j.artint.2018.07.007
Miller, T.: Contrastive explanation: a structural-model approach. Knowl. Eng. Rev. 36, e14 (2021). https://doi.org/10.1017/S0269888921000102
Nguyen, V., Stylianos, V.L., Son, T.C., Yeoh, W.: Explainable planning using answer set programming. In: Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning (KR 2020). pp. 662–666 (2020). https://doi.org/10.24963/kr.2020/66
Oetsch, J., Pührer, J., Tompits, H.: Catching the ouroboros: on debugging non-ground answer-set programs. Theory Pract. Log. Program. 10(4–6), 513–529 (2010). https://doi.org/10.1017/S1471068410000256
Oetsch, J., Pührer, J., Tompits, H.: Stepwise debugging of answer-set programs. Theory Pract. Logic Program. 18(1), 30–80 (2018). https://doi.org/10.1017/S1471068417000217
Papadimitriou, C.H.: Computational Complexity. Addison-Wesley, Boston (1994)
Pontelli, E., Son, T.C., Elkhatib, O.: Justifications for logic programs under answer set semantics. Theory Pract. Logic Program. 9(1), 1–56 (2009). https://doi.org/10.1017/S1471068408003633
Sakama, C., Inoue, K.: Updating extended logic programs through abduction. In: Gelfond, M., Leone, N., Pfeifer, G. (eds.) LPNMR 1999. LNCS (LNAI), vol. 1730, pp. 147–161. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-46767-X_11
Schulz, C., Toni, F.: Justifying answer sets using argumentation. Theory Pract. Logic Program. 16(1), 59–110 (2016). https://doi.org/10.1017/S1471068414000702
Schwitter, R.: Specifying and verbalising answer set programs in controlled natural language. Theory Pract. Logic Program. 18(3–4), 691–705 (2018). https://doi.org/10.1017/S1471068418000327
Shen, Y., Eiter, T.: Determining inference semantics for disjunctive logic programs. Artif. Intell. 277, 103165 (2019). https://doi.org/10.1016/j.artint.2019.103165
Son, T.C., Nguyen, V., Vasileiou, S.L., Yeoh, W.: Model reconciliation in logic programs. In: Faber, W., Friedrich, G., Gebser, M., Morak, M. (eds.) JELIA 2021. LNCS (LNAI), vol. 12678, pp. 393–406. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-75775-5_26
Viegas Damásio, C., Analyti, A., Antoniou, G.: Justifications for logic programming. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS (LNAI), vol. 8148, pp. 530–542. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40564-8_53
Wang, Y., Eiter, T., Zhang, Y., Lin, F.: Witnesses for answer sets of logic programs. ACM Trans. Comput. Logic (2022). https://doi.org/10.1145/3568955
Yli-Jyrä, A., Rankooh, M.F., Janhunen, T.: Pruning redundancy in answer set optimization applied to preventive maintenance scheduling. In: Hanus, M., Inclezan, D. (eds.) PADL 2023. LNCS, pp. 279–294. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-24841-2_18
Zhuang, Z., Delgrande, J.P., Nayak, A.C., Sattar, A.: Reconsidering AGM-style belief revision in the context of logic programs. In: Proceedings of the 22nd European Conference on Artificial Intelligence (ECAI 2016). Frontiers in Artificial Intelligence and Applications, vol. 285, pp. 671–679. IOS Press (2016). https://doi.org/10.3233/978-1-61499-672-9-671
Acknowledgments
This work was supported by funding from the Bosch Center for Artificial Intelligence. Furthermore, Tobias Geibinger is a recipient of a DOC Fellowship of the Austrian Academy of Sciences at the Institute of Logic and Computation at the TU Wien.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Eiter, T., Geibinger, T., Oetsch, J. (2023). Contrastive Explanations for Answer-Set Programs. In: Gaggl, S., Martinez, M.V., Ortiz, M. (eds) Logics in Artificial Intelligence. JELIA 2023. Lecture Notes in Computer Science(), vol 14281. Springer, Cham. https://doi.org/10.1007/978-3-031-43619-2_6
Download citation
DOI: https://doi.org/10.1007/978-3-031-43619-2_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-43618-5
Online ISBN: 978-3-031-43619-2
eBook Packages: Computer ScienceComputer Science (R0)