Abstract
The generation of comprehensible explanations is an essential feature of modern artificial intelligence systems. In this work, we consider probabilistic logic programming, an extension of logic programming which can be useful to model domains with relational structure and uncertainty. Essentially, a program specifies a probability distribution over possible worlds (i.e., sets of facts). The notion of explanation is typically associated with that of a world, so that one often looks for the most probable world as well as for the worlds where the query is true. Unfortunately, such explanations exhibit no causal structure. In particular, the chain of inferences required for a specific prediction (represented by a query) is not shown. In this paper, we propose a novel approach where explanations are represented as programs that are generated from a given query by a number of unfolding-like transformations. Here, the chain of inferences that proves a given query is made explicit. Furthermore, the generated explanations are minimal (i.e., contain no irrelevant information) and can be parameterized w.r.t. a specification of visible predicates, so that the user may hide uninteresting details from explanations.
This work has been partially supported by the EU (FEDER) and the Spanish MCI under grant PID2019-104735RB-C41/ AEI/10.13039/501100011033 (SAFER), by the Generalitat Valenciana under grant Prometeo/2019/098 (DeepTrust), and by TAILOR, a project funded by EU Horizon 2020 research and innovation programme under GA No. 952215.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Publicly available from https://github.com/mistupv/xgen.
- 2.
We do not consider function symbols in this work.
- 3.
We follow Prolog’s notation in examples: variables start with an uppercase letter and the implication “\(\leftarrow \)” is denoted by “:-”.
- 4.
See Sato’s seminal paper [29] for the distribution semantics in the infinite case.
- 5.
Equivalently, has a successful SLD derivation; see Sect. 3.1 for a precise definition of SLD (Selective Linear Definite clause) resolution.
- 6.
Observe that each fact should only be considered once. E.g., given a successful SLD derivation that uses the ground probabilistic fact \(\mathtt{0.4::person(ann)}\) twice, the associated probability is \(\mathtt{0.4}\) rather than \(\mathtt{0.4\cdot 0.4 = 0.16}\).
- 7.
The interested reader can try the online ProbLog interpreter at https://dtai.cs.kuleuven.be/problog/editor.html.
- 8.
We only show the relevant bindings of the computed \(\mathsf {mgu}\)’s in the examples.
- 9.
The use of rule-based models to explain the predictions of AI systems is not new in the field of XAI (see, e.g., [3]).
- 10.
Nevertheless, our tool \(\mathsf {xgen}\) considers more general programs by requiring the specification of those predicates that may violate the above condition (see Sect. 4).
- 11.
Proofs of technical results can be found in [35].
- 12.
Let \(B_1,a,B_2 \leadsto _\theta (B_1,B,B_2)\theta \) an SLD resolution step using clause \(h\leftarrow B\) and \(\mathsf {mgu}(a,h)=\theta \). Then, a is the direct ancestor of the atoms in B. The notion of ancestor is the transitive closure of this relation.
- 13.
Considering negated ground probabilistic facts is straightforward, but dealing with negated derived atoms is much more challenging.
References
Apt, K.R.: From Logic Programming to Prolog. Prentice Hall, Hoboken (1997)
Arias, J., Carro, M., Chen, Z., Gupta, G.: Justifications for goal-directed constraint answer set programming. In: Ricca, F., et al. (eds.) Proceedings of the 36th International Conference on Logic Programming (ICLP Technical Communications 2020). EPTCS, vol. 325, pp. 59–72 (2020). https://doi.org/10.4204/EPTCS.325.12
Arrieta, A.B., et al.: Explainable artificial intelligence (XAI): concepts, taxonomies, opportunities and challenges toward responsible AI. Inf. Fusion 58, 82–115 (2020). https://doi.org/10.1016/j.inffus.2019.12.012
Azzolini, D., Riguzzi, F.: Syntactic requirements for well-defined hybrid probabilistic logic programs. In: Formisano, A., et al. (eds.) Proceedings of the 37th International Conference on Logic Programming (Technical Communications) (ICLP Technical Communications 2021). EPTCS, vol. 345, pp. 14–26 (2021). https://doi.org/10.4204/EPTCS.345.12
Bol, R.N.: Loop checking in partial deduction. J. Log. Program. 16(1), 25–46 (1993). https://doi.org/10.1016/0743-1066(93)90022-9
Bol, R.N., Apt, K.R., Klop, J.W.: An analysis of loop checking mechanisms for logic programs. Theor. Comput. Sci. 86(1), 35–79 (1991)
Brewka, G., Eiter, T., Truszczynski, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011). https://doi.org/10.1145/2043174.2043195
Cabalar, P., Fandinno, J., Muñiz, B.: A system for explainable answer set programming. In: Ricca, F., et al. (eds.) Proceedings of the 36th International Conference on Logic Programming (ICLP Technical Communications 2020). EPTCS, vol. 325, pp. 124–136 (2020). https://doi.org/10.4204/EPTCS.325.19
Choudhury, A., Gupta, D.: A survey on medical diagnosis of diabetes using machine learning techniques. In: Kalita, J., Balas, V.E., Borah, S., Pradhan, R. (eds.) Recent Developments in Machine Learning and Data Analytics. AISC, vol. 740, pp. 67–78. Springer, Singapore (2019). https://doi.org/10.1007/978-981-13-1280-9_6
EU, EEA: Regulation (EU) 2016/679 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data. https://eur-lex.europa.eu/eli/reg/2016/679/oj
Fierens, D., et al.: Inference and learning in probabilistic logic programs using weighted boolean formulas. Theory Pract. Log. Program. 15(3), 358–401 (2015). https://doi.org/10.1017/S1471068414000076
Hruza, J., Stepánek, P.: Speedup of logic programs by binarization and partial deduction. Theory Pract. Log. Program. 4(3), 355–380 (2004). https://doi.org/10.1017/S147106840300190X
Kersting, K., Raedt, L.D.: Bayesian logic programs. CoRR cs.AI/0111058 (2001). https://arxiv.org/abs/cs/0111058
Kimmig, A., Demoen, B., Raedt, L.D., Costa, V.S., Rocha, R.: On the implementation of the probabilistic logic programming language ProbLog. Theory Pract. Log. Program. 11(2–3), 235–262 (2011). https://doi.org/10.1017/S1471068410000566
Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987). https://doi.org/10.1007/978-3-642-83189-8
Lloyd, J.W., Shepherdson, J.C.: Partial evaluation in logic programming. J. Log. Program. 11(3&4), 217–242 (1991). https://doi.org/10.1016/0743-1066(91)90027-M
Mantadelis, T., Rocha, R.: Using iterative deepening for probabilistic logic inference. In: Lierler, Y., Taha, W. (eds.) PADL 2017. LNCS, vol. 10137, pp. 198–213. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-51676-9_14
Molnar, C., Casalicchio, G., Bischl, B.: Interpretable machine learning – a brief history, state-of-the-art and challenges. In: Koprinska, I., et al. (eds.) ECML PKDD 2020. CCIS, vol. 1323, pp. 417–431. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-65965-3_28
Muggleton, S.: Stochastic logic programs. In: de Raedt, L. (ed.) Advances in Inductive Logic Programming, pp. 254–264. IOS Press (1996)
Muggleton, S.: Semantics and derivation for stochastic logic programs. In: Proceedings of the UAI-2000 Workshop on Fusion of Domain Knowledge with Data for Decision Support (2000)
Pettorossi, A., Proietti, M.: Transformation of logic programs: foundations and techniques. J. Log. Program. 19(20), 261–320 (1994). https://doi.org/10.1016/0743-1066(94)90028-0
Poole, D.: Probabilistic horn abduction and Bayesian networks. Artif. Intell. 64(1), 81–129 (1993). https://doi.org/10.1016/0004-3702(93)90061-F
Poole, D.: The independent choice logic for modelling multiple agents under uncertainty. Artif. Intell. 94(1–2), 7–56 (1997). https://doi.org/10.1016/S0004-3702(97)00027-1
De Raedt, L., Kimmig, A.: Probabilistic (logic) programming concepts. Mach. Learn. 100(1), 5–47 (2015). https://doi.org/10.1007/s10994-015-5494-z
Raedt, L.D., Kimmig, A., Toivonen, H.: ProbLog: a probabilistic Prolog and its application in link discovery. In: Veloso, M.M. (ed.) Proceedings of the 20th International Joint Conference on Artificial Intelligence (IJCAI 2007), pp. 2462–2467 (2007). http://ijcai.org/Proceedings/07/Papers/396.pdf
Ricci, F., Rokach, L., Shapira, B. (eds.): Recommender Systems Handbook. Springer, Boston (2015). https://doi.org/10.1007/978-1-4899-7637-6
Riguzzi, F.: Foundations of Probabilistic Logic Programming: Languages, Semantics, Inference and Learning. River Publishers (2018)
Riguzzi, F., Swift, T.: Well-definedness and efficient inference for probabilistic logic programming under the distribution semantics. Theory Pract. Log. Program. 13(2), 279–302 (2013)
Sato, T.: A statistical learning method for logic programs with distribution semantics. In: Sterling, L. (ed.) Logic Programming, Proceedings of the Twelfth International Conference on Logic Programming, Tokyo, Japan, 13–16 June 1995, pp. 715–729. MIT Press (1995)
Sato, T., Kameya, Y.: PRISM: a language for symbolic-statistical modeling. In: Proceedings of the Fifteenth International Joint Conference on Artificial Intelligence, IJCAI 1997, Nagoya, Japan, 23–29 August 1997, vol. 2, pp. 1330–1339. Morgan Kaufmann (1997). http://ijcai.org/Proceedings/97-2/Papers/078.pdf
Shterionov, D., Renkens, J., Vlasselaer, J., Kimmig, A., Meert, W., Janssens, G.: The most probable explanation for probabilistic logic programs with annotated disjunctions. In: Davis, J., Ramon, J. (eds.) ILP 2014. LNCS (LNAI), vol. 9046, pp. 139–153. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23708-4_10
Vennekens, J., Verbaeten, S., Bruynooghe, M.: Logic programs with annotated disjunctions. In: Demoen, B., Lifschitz, V. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 431–445. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-27775-0_30
Veres, M., Moussa, M.: Deep learning for intelligent transportation systems: a survey of emerging trends. IEEE Trans. Intell. Transp. Syst. 21(8), 3152–3168 (2020). https://doi.org/10.1109/TITS.2019.2929020
Vidal, G.: A hybrid approach to conjunctive partial evaluation of logic programs. In: Alpuente, M. (ed.) LOPSTR 2010. LNCS, vol. 6564, pp. 200–214. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-20551-4_13
Vidal, G.: Explanations as programs in probabilistic logic programming (2022). http://personales.upv.es/gvidal/german/flops22/tr.pdf
Acknowledgements
I would like to thank the anonymous reviewers for their suggestions to improve this paper.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Vidal, G. (2022). Explanations as Programs in Probabilistic Logic Programming. In: Hanus, M., Igarashi, A. (eds) Functional and Logic Programming. FLOPS 2022. Lecture Notes in Computer Science, vol 13215. Springer, Cham. https://doi.org/10.1007/978-3-030-99461-7_12
Download citation
DOI: https://doi.org/10.1007/978-3-030-99461-7_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-99460-0
Online ISBN: 978-3-030-99461-7
eBook Packages: Computer ScienceComputer Science (R0)