=Paper= {{Paper |id=Vol-3277/short1 |storemode=property |title=Towards a Conditional and Multi-preferential Approach to Explainability of Neural Network Models in Computational Logic (Extended Abstract) |pdfUrl=https://ceur-ws.org/Vol-3277/short1.pdf |volume=Vol-3277 |authors=Mario Alviano,Francesco Bartoli,Marco Botta,Roberto Esposito,Laura Giordano,Valentina Gliozzi,Daniele Theseider Dupré |dblpUrl=https://dblp.org/rec/conf/aiia/AlvianoBBE0GD22 }} ==Towards a Conditional and Multi-preferential Approach to Explainability of Neural Network Models in Computational Logic (Extended Abstract)== https://ceur-ws.org/Vol-3277/short1.pdf
Towards a Conditional and Multi-preferential
Approach to Explainability of Neural Network Models
in Computational Logic (Extended Abstract)
Mario Alviano1 , Francesco Bartoli2 , Marco Botta2 , Roberto Esposito2 ,
Laura Giordano3 , Valentina Gliozzi2 and Daniele Theseider Dupré3
1
  Università della Calabria, Italy
2
  Università di Torino, Italy
3
  Università del Piemonte Orientale, Italy


                                         Abstract
                                         This short paper reports on a line of research exploiting a conditional logic of commonsense reasoning
                                         to provide a semantic interpretation to neural network models. A “concept-wise" multi-preferential
                                         semantics for conditionals is exploited to build a preferential interpretation of a trained neural network
                                         starting from its input-output behavior. The approach is a general one; it has first been proposed for
                                         Self-Organising Maps (SOMs), and exploited for MultiLayer Perceptrons (MLPs) in the verification of
                                         properties of a network by model-checking. An MLPs can be regarded as a (fuzzy) conditional knowledge
                                         base (KB), in which the synaptic connections correspond to weighted conditionals. Reasoners for many-
                                         valued weighted conditional KBs are under development based on Answer Set solving to deal with
                                         entailment and model-checking.

                                         Keywords
                                         Preferential Description Logics, Typicality, Neural Networks, Explainability




1. Introduction
In this short paper we report on an approach to exploit the logic of commonsense reasoning for
the explainability of some neural network models. We also report on preliminary experiments
in the verification of properties of feedforward neural networks by model checking.
   Preferential approaches to commonsense reasoning (e.g., [1]) have their roots in conditional
logics [2, 3], and have been more recently extended to Description Logics (DLs), to deal with
defeasible reasoning in ontologies, by allowing non-strict form of inclusions, called defeasible
or typicality inclusions. Different preferential semantics [4, 5, 6, 7] and closure constructions
(e.g., [8, 9, 10]) have been proposed for defeasible DLs. Among these, the concept-wise multi-
preferential semantics [11], which allows to account for preferences with respect to different
concepts. It has been introduced first as a semantics of ranked knowledge bases in a lightweight


3rd Italian Workshop on Explainable Artificial Intelligence (XAI.it 2022), November 30, 2022
$ mario.alviano@unical.it (M. Alviano); francesco.bartoli@edu.unito.it (F. Bartoli); marco.botta@unito.it
(M. Botta); roberto.esposito@unito.it (R. Esposito); laura.giordano@uniupo.it (L. Giordano); gliozzi@di.unito.it
(V. Gliozzi); dtd@uniupo.it (D. Theseider Dupré)
                                       © 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
    CEUR
    Workshop
    Proceedings
                  http://ceur-ws.org
                  ISSN 1613-0073
                                       CEUR Workshop Proceedings (CEUR-WS.org)
description logic (DL) and then for weighted conditional DL knowledge bases, and proposed as
a semantics for some neural network models [12, 13, 14].
   We have considered both an unsupervised model, Self-organising maps (SOMs) [15], which are
considered a psychologically and biologically plausible neural network model, and a supervised
one, MultiLayer Perceptrons (MLPs) [16]. Learning algorithms in the two cases are quite
different, but our aim was to capture in a semantic interpretation the behavior of the network
after training. Considering a domain of input stimuli presented to a network e.g., during training
or generalization, a semantic interpretation describing the input-output behavior of the network
can be provided as a multi-preferential interpretation, where preferences are associated to
concepts. For SOMs, the learned categories C1 , . . . , Cn are regarded as concepts so that a
preference relation over the domain of input stimuli is associated with each category [12, 14].
For MLPs, each unit of interest in the deep network (including hidden units) can be associated
with a concept and with a preference relation on the domain [13].
   For MLPs, the relationship between the logic of commonsense reasoning and deep neural
networks is even stronger, as the network can itself be regarded as a conditional knowledge
base, i.e., as a set weighted conditionals. This has been achieved by developing a concept-
wise fuzzy multi-preferential semantics for DLs with weighted defeasible inclusions. Some
different preferential closure constructions have been considered for weighted knowledge bases
(the coherent [13], faithful [17] and φ-coherent [18] multi-preferential semantics), and their
relationships with MLPs have been investigated (see [13, 18]). Undecidability results for fuzzy
DLs with general inclusion axioms [19, 20] have motivated the investigation of the (finitely)
many-valued case. An ASP-based approach has been proposed for reasoning with weighted
conditional KBs under φ-coherent entailment [21], and Datalog with weakly stratified negation
has been used for developing a model-checking approach for MLPs in the many-valued case
[22, 23]. Both the entailment and the model-checking approaches have been experimented in
the verification of properties of some trained multilayer feedforward networks. The preliminary
results can be the basis for further solutions for the multi-valued φ-coherent entailment, which
exploit state of the art ASP solving, including custom propagation based on the clingo API [24]
and fuzzy ASP solving [25], in the verification of properties of neural networks.
   The strong relationships between neural networks and conditional logics of commonsense
reasoning suggest that conditional logics can be used for the verification of properties of
neural networks to explain their behavior, in the direction of a trustworthy and explainable AI
[26, 27, 28]. The possibility of combining learned knowledge with elicited knowledge in the
same formalism is also a step towards neuro-symbolic integration.


2. The concept-wise multi-preferential semantics
The idea underlying the multi-preferential semantics is that, for two domain elements x and y
and two concepts, e.g., Horse and Zebra, x can be regarded as being more typical than y as a
horse (x  C I (y).


3. A preferential interpretation of Self-Organising Maps
Once a SOM has learned to categorize, the result of the categorization can be seen as a concept-
wise multi-preferential interpretation over a domain of input stimuli, in which a preference
relation is associated with each concept (learned category). Once the SOM has learned to catego-
rize, to assess category generalization, Gliozzi and Plunkett [29] define the map’s disposition to
consider a new stimulus y as a member of a known category C as a function of the distance of y
from the map’s representation of C. The distance d(x, Ci ) of stimulus x from category Ci can be
used to build a binary preference relation  d(y, Ci ). Based on the assumption that
the abstraction process in the SOM identifies the most typical exemplars for a given category,
in the semantic representation of a category, some specific stimuli (corresponding to the best
matching units) are identified as the typical exemplars of the category.
   The notion of generalization degree introduced by Gliozzi and Plunkett [29] can be used
to define a fuzzy multi-preferential interpretation of SOMs. This is done by interpreting each
category (concept) as a function mapping each input stimulus to a value in [0, 1], based on the
map’s generalization degree of category membership to the stimulus [29].
   In both the two-valued and fuzzy case, the preferential model can be exploited to learn or
validate conditional knowledge from empirical data, by verifying conditional formulas over the
preferential interpretation constructed from the SOM. In both cases, model checking can be
used for the verification of inclusions (either defeasible inclusions or fuzzy inclusion axioms)
over the respective models of the SOM (for instance, do the most typical penguins belong to the
category Bird with at least a degree of membership 0.8?). Starting from the fuzzy interpretation
of the SOM, a probabilistic interpretation of this neural network model is also provided [14],
based on Zadeh’s probability of fuzzy events [30].


4. A preferential interpretation of MultiLayer Perceptrons
The input-output behaviour of MLPs can be captured in a similar way as for SOMs by construct-
ing a preferential interpretation over a domain ∆ of input stimuli, e.g., those stimuli considered
during training or generalization [13]. Each neuron k of interest for property verification can
be associated to a distinguished concept Ck . For each concept Ck , a preference relation