=Paper=
{{Paper
|id=Vol-3739/abstract-22
|storemode=property
|title=Semantic Explanations of Classifiers through the Ontology-Based Data Management Paradigm (Extended Abstract)
|pdfUrl=https://ceur-ws.org/Vol-3739/abstract-22.pdf
|volume=Vol-3739
|authors=Laura Papi,Gianluca Cima,Marco Console,Maurizio Lenzerini
|dblpUrl=https://dblp.org/rec/conf/dlog/PapiCCL24
}}
==Semantic Explanations of Classifiers through the Ontology-Based Data Management Paradigm (Extended Abstract)==
Semantic Explanations of Classifiers through the Ontology-Based Data Management Paradigm (Extended Abstract) Laura Papi, Gianluca Cima, Marco Console and Maurizio Lenzerini Department of Computer, Control and Management Engineering, 25 Via Ariosto, Rome, 00185 Abstract One of the main challenges in modern AI systems is to explain the decisions of complex machine learning models, and recent years have seen a burgeoning of novel approaches. These approaches often rely on some structural components of the models under consideration, e.g., the set of features used for the classification task. As a result, explanations provided by these approaches are expressed in terms of the sub-symbolic information and, therefore, they are hard to interpret for users. In this paper, we argue that, in order to foster interpretability, these explanations should be expressed in terms of the knowledge that the users posses on the underlying application domain rather than on the sub-symbolic components of the model. To this end, our first contribution is the illustration of a novel formal framework for explaining the decisions of machine learning classifiers grounded on the Ontology-Based Data Management paradigm. Within this framework, explanations are defined by logical formulae using the symbols that an ontology defines and, as such, they posses a well-defined semantics. As a second contribution, we provide an algorithm that computes the best explanations that can be expressed in the class of conjunctive queries. Keywords Ontology-Based Data Management, Machine Learning Classifiers, Explainable AI. 1. Introduction Classifiers form a prominent family of modern AI systems. Intuitively, a classifier is a systems used to predict whether an object belongs to a specific class given a set of its relevant attributes [1]. Due to the nature of the techniques involved, the behavior of classifiers is often regarded as opaque by end users [2] and several techniques have been proposed to elucidate it [2]. An important notion in this context is that of local explanations, i.e., answers for the question why a given object is assigned to a specific class. Concretely, these explanations usually consist of a set of properties of the given object that dictate the behavior of the classifier expressed in terms of the raw data attributes used to operate it [3, 4, 5, 6]. While explanations based on raw data attributes may convey some information to AI Experts, it is often hard for general users to understand their meaning. This is especially true in the typical machine learning scenario where attributes are the results of a complex process of feature selection and carry little to no meaning by themselves. The goal of our work is to define a novel framework to express explanations using conceptual properties of the scenario of interest that are not limited by the data attributes used by the classifier. Our framework is based on the notion of mappings, well-known by the AI community and widely used in the context of Information Integration [7] and Ontology-Based Data Management [8]. These mappings define the relation between the objects of the world that are relevant for a classifier and a set of conceptual notions that are relevant for the application domain. To formalize these conceptual notions, our framework makes use of ontologies that formalize the application domain. Combining domain ontologies and mappings is a well-established approach to lift information about raw data to the DL 2024: 37th International Workshop on Description Logics, June 18β21, 2024, Bergen, Norway $ laup.97@gmail.com (L. Papi); cima@diag.uniroma1.it (G. Cima); console@diag.uniroma1.it (M. Console); lenzerini@diag.uniroma1.it (M. Lenzerini) 0009-0003-2281-9500 (L. Papi); 0000-0003-1783-5605 (G. Cima); 0009-0004-5526-019X (M. Console); 0000-0003-2875-6187 (M. Lenzerini) Β© 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings conceptual level [9, 10, 11, 12]. In our framework, these combinations, called ontological specifications, are used to formalize the relation between the classifier whose behavior we want to explain and the notions that users understand. We then use ontological specifications to provide a local explanation of a classifier expressed at the conceptual level of their ontologies via their mappings. In this way, we obtain explanations expressed as logical formulae over the symbols of the ontology and grounded on a formal semantics. In this context, the contribution of this paper is the following. Firstly, we present the framework of ontological specifications together with a suitable notion of explanation (Section 2). Secondly, when ontologies and mappings are expressed in reasonably expressive languages, we study the computational complexity of verifying whether a given formula is an explanation. Finally, we present a general algorithm for the computation of best explanations (Section 3). 2. Formal Framework We proceed to present our framework for semantic explanations of ML models. Assume a possibly infinite set β of elements that we call instances. Intuitively, β is the set of all possible elements that the instance space of an ML model in our framework may possibly contain. Observe that instances are not yet characterized by their attributes as it is customary in learning algorithms. To bridge this gap, we further assume a countably infinite set A of unary function symbols that we call the set of attribute symbols. To each ππ β A, we associate a surjective function πsem π : β β ππ that we call the semantics of ππ . Whenever the co-domain of πsem π is finite, we say that ππ is a finite attribute. Intuitively, a pair π¦ = β¨β, Aβ© provides a formal background to instance space elements and, for this reason, we refer to it as a data layer. A classifier for β is a function πΎ from β to {0, 1}. Usually, classifiers operate on a restricted set of attributes of the input instances. To capture this property, we say that a classifier πΎ operates over a set of attributes π΄ β A if, for every pair π, πβ² β β, the fact that ππ (π) = ππ (πβ² ), for each ππ β π΄, implies πΎ(π) = πΎ(πβ² ). We will call π΄ relevant attributes for πΎ. A classifier πΎ for β is a π¦-classifier if there exists a unique and finite set of relevant attributes π΄ β A for πΎ. βοΈ Let π be the set of all possible values that an attribute in A may take, i.e., π = π ππ . We assume two countably infinite sets F and C of function symbols and relation symbols, respectively. For each ππ β F with arity π, the semantics of ππ is a function ππsem : ππ β π. Similarly, for each π π β C with arity π, the semantics of π π is a relation π πsem β ππ . Intuitively, A, F, and C will form the terms of our declarative language. Assume a countably infinite set of variables π±, the set π ππππ π¦ (F, C) is the set of all the expressions of the following forms: π, with π β β, π(π₯), with π β A and π₯ β π±, or π (π‘1 , . . . , π‘π ), with π a function symbol of arity π in F and π‘1 , . . . , π‘π β π ππππ π¦ (F, C). The language βπ¦ (F, C) is defined as the set of all first-order formulae that can be expressed using terms in π ππππ π¦ (F, C). The semantics of βπ¦ (F, C) is defined as customary using π, πsem , and π sem to interpret π β β, π β A and π β F, respectively. Given π β βπ¦ (F, C) with free variables π₯ Β― and a function π£ : π± β β, we write π£ |= π to say that the formula obtained from π by replacing each π₯ β π₯ Β― with π£(π₯) is true. Assume a countably infinite set of predicate symbols P disjoint from C. A mapping assertion from βπ¦ (F, C) to P is an expression of the form β¨π(π₯), π(π₯)β© where π(π₯) is a formula in βπ¦ (F, C) with one free variable π₯ and π(π₯) is a first-order formula over P with the single free variable π₯. A mapping from βπ¦ (F, C) to P is a finite set of mapping assertions from βπ¦ (F, C) to P. Intuitively, mappings define the connection between the instances in the data layer and the predicates in P. To express such connection, we use ontological specifications. Formally, an ontological specification for βπ¦ (F, C) to P (simply, ontological specification) is a pair πͺ = β¨π, π β© where π is a first-order theory over P and π is a mapping from βπ¦ (F, C) to P. The semantics of an ontological specification is defined in terms of its models. An interpretation for P (simply, interpretation) is a first-order logic interpretation β for the symbols of P whose domain is β. Given a mapping assertion π = β¨π, πβ©, we say that β satisfies π, if, for every function π£ : π± β β, π£ |= π implies π£, β |= π. A model for πͺ is an interpretation β such that β satisfies π and β satisfies π, for each π β π . We use πππ(πͺ) for the set of all models of β. With ontological specifications in place, we are now ready to formalize our notion of explanation. Let πͺ be an ontological specification as above and π a first-order formula over P. We use ππππ‘(π, πͺ) for the set {π β β | π β πβ , for each β β πππ(πͺ)}. Assume now a classifier πΎ for the data layer π¦ and an instance π β β. A Weak Ontology-Based eXplanations (w-OBX) for the decision of πΎ over π based on πͺ is a first-order formula π(π₯) over the alphabet P and one free variable π₯ with the following properties: π β ππππ‘(π, πͺ), and, πΎ(π) = πΎ(π), for each π β ππππ‘(π, πͺ). The next definition formalizes the notion of explanation we are looking for. Definition 1. Let πΏ be a language of first-order formulae over P. A w-OBX π for the decision of πΎ over π based on πͺ is the best Ontology-Based Explanation in πΏ (πΏ-OBX) if π β πΏ and there exists no w-OBX π β² for the decision of πΎ over π based on πͺ such that π β² β πΏ and ππππ‘(π, πͺ) β ππππ‘(π β² , πͺ). Example 1. Consider a scenario where a classifier πΎ is used to provide movie recommendations. The relevant attributes for πΎ are ππ (Critic Rating) and ππ (Public Rating) with domain [0, 10]; and ππ (Low (οΈ(οΈ Cast) with domain )οΈ{π¦, π}. Budget) and π π (Famous )οΈ Moreover, πΎ(π) = 1 if and only if π satisfies the following 1 βπ¦ (F, C) formula: 2 Β· (ππ(π₯) + ππ(π₯)) β₯ 5 β§ (π π(π₯) = π). Intuitively, πΎ recommends a movie if it received a good average score from critics and public and it stars non-famous actors. Suppose that we want to explain the decision πΎ(π) = 1 taken by πΎ for the movie π such that ππ(π) = 10, ππ(π) = 10, ππ(π) = π¦ππ , π π(π) = ππ. For the explanation, we want to use the ontological symbols π π΄ (Publicly Acclaimed), πΆπ΄ (Critically Acclaimed), π΅π (B-Movie), and πΆπ (Cult Movie). Let π and π be, respectively, the TBox {π π΄ β πΆπ ; πΆπ΄ β πΆπ ; } and(οΈ mapping {π1 , π2 , π3 } with π )οΈ 1 = {(ππ(π₯) = 10), π π΄(π₯)}, π2 = {(ππ(π₯) = 10), πΆπ΄(π₯); π3 = { (ππ(π₯) = π¦ππ ) β§ (π π(π₯) = ππ) , π΅π (π₯)}. Let πͺ = β¨π, π β©. It is easy to verify that the following are all w-OBX for the decision of πΎ over π based on πͺ: (π π΄(π₯)β§π΅π (π₯)), (πΆπ΄(π₯) β§ π΅π (π₯)), and (πΆπ (π₯) β§ π΅π (π₯)). However, πΆπ (π₯) β§ π΅π (π₯) is the only CQ-OBX for the decision of πΎ over π based on πͺ, where CQ is the language of conjunctive queries. 3. Some Preliminary Technical Results Let ββπ¦ (F, C) be the quantifier-free subset of βπ¦ (F, C) that uses only finite attributes. In what follows, we assume that π) classifiers and formulae π(π₯) in the left-hand side of mapping assertions are defined in ββπ¦ (F, C); ππ) the right-hand side of mapping assertions allows only for formulae of the form π΅(π₯), βπ¦.π (π₯, π¦), and βπ¦.π (π¦, π₯); πππ) theories over P are formulated in DL-Liteβ [13]; and ππ£) the language for expressing explanations is the class of conjunctive queries CQ. In this scenario, we consider the following computational problems. Verification: given also a CQ π(π₯) over the alphabet P, check whether π is a w-OBX of the decision of πΎ over π based on πͺ; Computation: compute all the CQ-OBXs of the decision of πΎ over π based on πͺ. Theorem 1. Verification is coNP-complete. Next, we provide a technique to return the set of all CQ-OBXs of the decision of πΎ over π based on πͺ (clearly, if two formulae π(π₯) and π β² (π₯) are such that ππππ‘(π, πͺ) = ππππ‘(π β² , πͺ), then we say that they are equivalent w.r.t. πͺ and treat them as the same formula). Given an instance π β β and a mapping π from βπ¦ (F, C) to P in our considered scenario, we denote by π (π) the set of atoms obtained by chasing the instance π w.r.t. π , i.e: π (π) contains the atom π΅(π) (resp. βπ (π), βπ β (π)) if and only if there exists a mapping assertion of the form β¨π(π₯), π΅(π₯)β© (resp. β¨π(π₯), βπ¦.π (π₯, π¦)β©, β¨π(π₯), βπ¦.π (π¦, π₯)β©) in π such that π(π) is true. Furthermore, given a set π (π) of atoms as above, we denote by ππ π (π₯) the CQ obtained by conjoining all the atoms in π (π), where we select a free variable π₯ and each atom of the form π΅(π) is replaced with π΅(π₯), and each atom of the form βπ (π) (resp. βπ β (π)) is replaced with βπ¦.π (π₯, π¦) (resp. βπ¦.π (π¦, π₯)) in which π¦ is always a fresh existential variable. Given an instance π β β and an ontology πͺ = β¨π, π β© in our scenario, we now prove that ππ π (π₯) is actually the smallest (up to equivalence w.r.t. πͺ) CQ such that π β ππππ‘(π π , πͺ), π in the sense that there exists no other CQ π(π₯) for which π β ππππ‘(π, πͺ) and there is an instance π β β satisfying π β ππππ‘(πππ , πͺ) and π ΜΈβ ππππ‘(π, πͺ). π (π₯) is the Proposition 1. Given an instance π β β and an ontology πͺ = β¨π, π β©, we have that ππ π smallest (up to equivalence w.r.t. πͺ) CQ such that π β ππππ‘(ππ , πͺ). Given an instance π β β and an ontology πͺ = β¨π, π β© in our considered scenario, we denote by ππͺ (π) the set of atoms obtained from π (π) by adding the atom πΆ(π) if and only if there exists an atom of the form πΆ β² (π) β π (π) and π |= πΆ β² β πΆ, where both πΆ and πΆ β² can be any basic DL-Liteβ concept, i.e. concepts of the form π΅, βπ , and βπ β with π΅ and π in P. Theorem 2. Let πΎ be a classifier, π β β be an instance, πͺ = β¨π, π β© be an ontology specification, and π(π₯) be a CQ-OBX of the decision πΎ over π w.r.t. πͺ. We have that π(π₯) is equivalent w.r.t. πͺ to a query of π (π₯), where π β² β π (π). the form ππ β² πͺ Actually, the above results suggest a naive algorithm to compute the set of all the CQ-OBXs. Specifi- π (π₯), where π β² β π (π), and check that 1) π π (π₯) is a cally, it is enough to consider all the possible ππ β² πͺ πβ² w-OBX of the decision πΎ over π based on πͺ, and 2) there is no other π β²β² β ππͺ (π) for which ππ π (π₯) is β²β² π a w-OBX of the decision πΎ over π based on πͺ and the formula PerfectRef(ππ β² , πͺ) is strictly contained in the formula PerfectRef(ππ π , πͺ), meaning that it can be the case that ππππ‘(π π , πͺ) β (π π , πͺ). β²β² πβ² π β²β² Here, PerfectRef denotes the algorithm used for rewriting CQs w.r.t. DL-Liteβ TBoxes [13]. Acknowledgments This work has been supported by MUR under the PNRR project FAIR (PE0000013) and by the EU under the H2020-EU.2.1.1 project TAILOR (grant id. 952215). References [1] S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning - From Theory to Algorithms, Cambridge University Press, 2014. URL: http://www.cambridge.org/ de/academic/subjects/computer-science/pattern-recognition-and-machine-learning/ understanding-machine-learning-theory-algorithms. [2] A. B. Arrieta, N. D. RodrΓguez, J. D. Ser, A. Bennetot, S. Tabik, A. Barbado, S. GarcΓa, S. Gil-Lopez, D. Molina, R. Benjamins, R. Chatila, F. Herrera, Explainable artificial intelligence (XAI): concepts, taxonomies, opportunities and challenges toward responsible AI, Inf. Fusion 58 (2020) 82β115. URL: https://doi.org/10.1016/j.inffus.2019.12.012. doi:10.1016/J.INFFUS.2019.12.012. [3] M. C. Cooper, J. Marques-Silva, Tractability of explaining classifier decisions, Artif. Intell. 316 (2023) 103841. URL: https://doi.org/10.1016/j.artint.2022.103841. doi:10.1016/J.ARTINT.2022. 103841. [4] A. Shih, A. Choi, A. Darwiche, A symbolic approach to explaining bayesian network classifiers, in: J. Lang (Ed.), Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden, ijcai.org, 2018, pp. 5103β5111. URL: https://doi.org/10.24963/ijcai.2018/708. doi:10.24963/IJCAI.2018/708. [5] A. Darwiche, Three modern roles for logic in AI, in: D. Suciu, Y. Tao, Z. Wei (Eds.), Proceedings of the 39th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2020, Portland, OR, USA, June 14-19, 2020, ACM, 2020, pp. 229β243. URL: https://doi.org/10.1145/ 3375395.3389131. doi:10.1145/3375395.3389131. [6] Y. Izza, J. Marques-Silva, On explaining random forests with SAT, in: Z. Zhou (Ed.), Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI 2021, Virtual Event / Montreal, Canada, 19-27 August 2021, ijcai.org, 2021, pp. 2584β2591. URL: https://doi.org/10. 24963/ijcai.2021/356. doi:10.24963/IJCAI.2021/356. [7] M. Lenzerini, Data integration: A theoretical perspective., in: Proceedings of the Twenty-First ACM SIGACT SIGMOD SIGART Symposium on Principles of Database Systems (PODS 2002), 2002, pp. 233β246. [8] M. Lenzerini, Ontology-based data management, in: Proceedings of the Twentieth International Conference on Information and Knowledge Management (CIKM 2011), 2011, pp. 5β6. doi:10. 1145/2063576.2063582. [9] G. Cima, M. Console, M. Lenzerini, A. Poggi, A review of data abstraction, Frontiers Artif. Intell. 6 (2023). URL: https://doi.org/10.3389/frai.2023.1085754. doi:10.3389/FRAI.2023.1085754. [10] F. Croce, G. Cima, M. Lenzerini, T. Catarci, Ontology-based explanation of classifiers, in: A. Poulo- vassilis, D. Auber, N. Bikakis, P. K. Chrysanthis, G. Papastefanatos, M. A. Sharaf, N. Pelekis, C. Renso, Y. Theodoridis, K. Zeitouni, T. Cerquitelli, S. Chiusano, G. Vargas-Solar, B. Omidvar- Tehrani, K. Morik, J. Renders, D. Firmani, L. Tanca, D. Mottin, M. Lissandrini, Y. Velegrakis (Eds.), Proceedings of the Workshops of the EDBT/ICDT 2020 Joint Conference, Copenhagen, Den- mark, March 30, 2020, volume 2578 of CEUR Workshop Proceedings, CEUR-WS.org, 2020. URL: https://ceur-ws.org/Vol-2578/PIE3.pdf. [11] T. Catarci, M. Scannapieco, M. Console, C. Demetrescu, My (fair) big data, in: J. Nie, Z. Obradovic, T. Suzumura, R. Ghosh, R. Nambiar, C. Wang, H. Zang, R. Baeza-Yates, X. Hu, J. Kepner, A. Cuz- zocrea, J. Tang, M. Toyoda (Eds.), 2017 IEEE International Conference on Big Data (IEEE BigData 2017), Boston, MA, USA, December 11-14, 2017, IEEE Computer Society, 2017, pp. 2974β2979. URL: https://doi.org/10.1109/BigData.2017.8258267. doi:10.1109/BIGDATA.2017.8258267. [12] G. Cima, A. Poggi, M. Lenzerini, The notion of abstraction in ontology-based data management, Artificial Intelligence 323 (2023) 103976. [13] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, R. Rosati, Tractable reasoning and efficient query answering in description logics: The DL-Lite family, Journal of Automated Reasoning 39 (2007) 385β429.