<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Journal of
Applied Logic 1 (2003) 273-308.
[25] U. Straccia</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1017/S1471068422000163</article-id>
      <title-group>
        <article-title>Verifying Properties of a MultiLayer Network for the Recognition of Basic Emotions in a Conditional DL with Typicality (Extended Abstract)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mario Alviano</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesco Bartoli</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Botta</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roberto Esposito</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Laura Giordano</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniele Theseider Dupré</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DEMACS, Università della Calabria</institution>
          ,
          <addr-line>Via Bucci 30/B, 87036 Rende (CS)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>DISIT, Università del Piemonte Orientale</institution>
          ,
          <addr-line>Viale Michel 11, 15121 Alessandria</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Dipartimento di Informatica, Università di Torino</institution>
          ,
          <addr-line>Corso Svizzera 185, 10149 Torino</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2017</year>
      </pub-date>
      <volume>12678</volume>
      <fpage>2</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>The extended abstract (an abridged version of [1]) reports about our work investigating the relationships between a multi-preferential semantics for defeasible reasoning in knowledge representation and a multilayer neural network model. Weighted knowledge bases for a simple description logic with typicality are considered under a (many-valued) “concept-wise” multipreference semantics. The semantics is used to provide a preferential interpretation of MultiLayer Perceptrons (MLPs). A model checking and an entailment based approach are exploited in the verification of properties of neural networks for the recognition of basic emotions.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Description Logics</kwd>
        <kwd>Preferential and Conditional reasoning</kwd>
        <kwd>Typicality</kwd>
        <kwd>Explainability</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>have exceptions.</p>
      <p>In weighted defeasible knowledge bases (KBs) typicality inclusions come with a weight. A concept
 can be associated with a set of typicality inclusions (conditionals) of the form T() ⊑ ,, with
a weight  , representing the prototypical properties of concept . The weight  is a real number
representing the plausibility or implausibility of the property , for members of . For instance, one
may want to represent a situation in which horses are normally tall and run fast, it is very plausible that
they have a tail, but implausible that they have stripes. In a weighted KB these defeasible properties of
horses may be represented as:</p>
      <p>T(Horse) ⊑ Tall , 4 .5 T(Horse) ⊑ RunFast , 4 .2</p>
      <p>T(Horse) ⊑ ∃has_Tail .⊤, 9 .7 T(Horse) ⊑ ∃has_Stripes.⊤, − 20
where negative weights represent implausible properties. The defeasible Tbox above can be used to
define an ordering among domain elements, comparing their typicality as horses. For instance, assuming
that Spirit is tall, has tail, no stripes and does not run fast, while Buddy is tall, has tail, runs fast and has
stripes, we can expect that spirit &lt;Horse buddy . In our approach such features (such as, being tall or
having a tail) are as well represented as concepts in the DL.</p>
      <p>
        In the two valued case, the preference relations &lt; can be constructed from the KB by defining
the weight  () of a domain element  with respect to a concept , by summing up the weights
of the typicality inclusions for  satisfied by . The preference relations are then induced from such
weights as:  &lt;  if  () &gt;  (). In the example: Spirit satisfies the first and the third
default, hence WHorse (spirit ) = 14 .2 , while Buddy satisfies all the defaults, hence, WHorse (buddy ) =
− 1.6. As WHorse (spirit ) &gt; WHorse (buddy ) then spirit &lt;Horse buddy . The semantic construction is
in the spirit of other semantics for conditionals [
        <xref ref-type="bibr" rid="ref9">23, 9, 24</xref>
        ], but it adopts multiple preferences.
      </p>
      <p>Note that the interpretation of a typicality concept T(), for an arbitrary  (e.g., T(Student
⊓Employee)) would require the definition of a preference &lt; for each , or the definition of a global
preference relation &lt;. In [20], e.g., a global preference &lt; is defined based on a (modified)
Paretocombination of preferences &lt; . An alternative route is to move to a fuzzy interpretation of concepts,
and define &lt; based on the fuzzy interpretation of .</p>
      <p>
        Fuzzy and many-valued DLs are well studied in the literature (see, for instance, [25, 26, 27, 28, 29]).
In fuzzy DLs, the idea is that a concept  is interpreted as a function  : ∆ → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ] mapping each
domain element to a value in the unit interval [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ]. Then, for a domain element  ∈ ∆ ,  () is
regarded the degree of membership of  in concept . In the fuzzy case [
        <xref ref-type="bibr" rid="ref1">21, 1</xref>
        ], the preference relation &lt;
of any concept  is induced by the fuzzy interpretation  of concept :  &lt;  if  () &gt;  ().
In a non-crisp interpretation of typicality [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the fuzzy interpretation of typicality concepts T() in
an interpretation  is defined as: (T()) () =  (), if there is no  ∈ ∆ such that  &lt; ;
(T()) () = 0, otherwise. This choice has some impact on the (KLM) properties of entailment. When
(T()) () &gt; 0, we say that  is a typical -element in  (and all typical -elements have the same
membership degree in ).
      </p>
      <p>As in the two-valued case, besides usual fuzzy DL axioms, a weighted KB includes a defeasible TBox,
a set of weighted typicality inclusions T() ⊑ ,, with weight  , for each distinguished concept
. The definition of  () in a fuzzy interpretation  is defined by considering the degree to which 
satisfies the properties (being tall, running fast, etc.). The weight  () of  wrt  in an interpretation
 = ⟨∆ , ·  ⟩ is defined as follows:  () = ∑︀ℎ ℎ ,ℎ(), if  () &gt; 0;  () = −∞ , otherwise.</p>
      <p>
        The models of a KB are required to satisfy further properties beyond satisfying fuzzy DL axioms
[30], by enforcing that the membership degree  () of  in  is aligned with the weight  ()
in . For instance, in coherent models [21] of a KB, we require that  &lt;  if  () &gt;  ().
Faithful models [31] exploit a slightly weaker condition, while the stronger notion of  -coherence of a
fuzzy interpretation  wrt a KB exploits a monotonically non-decreasing function  : R → [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ].  is
 -coherent with respect to a weighted KB if: for all  ∈  and  ∈ ∆ ,  () =  ( ()).
      </p>
      <p>
        A mapping of a multilayer network to a conditional KB can be be defined in a simple way [
        <xref ref-type="bibr" rid="ref1">21, 1</xref>
        ], by
associating a concept name  with each unit  in the network and by introducing, for each synaptic
connection from neuron ℎ to neuron  with weight ℎ, a conditional T() ⊑ ℎ with weight ℎ. If
we assume that  is the activation function of all units in the network (having value in the unit interval
[
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ]), then the  -coherent semantics characterizes unit activation:  () corresponds to the activation
of unit  for some input stimulus . The semantics can also consider multiple functions   to represent
the activation functions of diferent units.  -coherent interpretations capture the stationary states of
the network, both for MLPs and for recurrent networks, which allow for feedback cycles (a weighted
KB can indeed have cycles).
      </p>
      <p>
        Since a multilayer network can be regarded as a conditional KB, entailment in the conditional
logic can be used for the verification of conditional properties of the network for post-hoc verification .
Undecidability results for fuzzy DLs with general inclusion axioms [32, 29] have led to considering a
ifnitely-valued version of  -coherent semantics, which provides an approximation of the fuzzy semantics
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], by taking  = {0, 1 , . . . , − 1 , 1}, for  ≥ 1, as the truth space. For the boolean fragment, in
the finitely-valued case, an ASP-based approach has been proposed for defeasible reasoning under
 -coherent entailment [33]. Complexity results have been investigated, as well as the scalability of
diferent encodings of entailment in ASP, by taking advantage of custom propagators, weak constraints
and weight constraints [34].
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] we consider both the entailment based approach and a model checking approach in the
verification of conditional properties of some trained multilayer feedforward networks for the recognition
of basic emotions, using the Facial Action Coding System (FACS) [35] and the RAF-DB [36] data set,
containing almost 30000 images labeled with basic emotions or combinations of two emotions. The
images were input to OpenFace 2.0 [37], which detects a subset of the Action Units (AUs) in [35],
corresponding to facial muscle contractions; The AUs were used as input layer of an MLP, trained to
recognize four emotions. The relations between such AUs and emotions, studied by psychologists [38],
have been used as a reference for formulae to be verified.
      </p>
      <p>The model checking approach exploits the behavior of the network  over a set ∆ of input exemplars
(e.g., the test set), to construct a single multi-preferential interpretation  with domain ∆ , considering
only some units of interest (e.g., input and output units). For such units , the associated concept  is
 () be the activity of unit  for input . Graded conditional properties of the
interpreted by letting 
form T() ⊑  ≥  (as well as strict properties  ⊑  ≥ ) can then be checked in  . Verifying the
satisfiability of an inclusion in the interpretation  requires polynomial time in the size of  and of
the formula.</p>
      <p>The entailment based approach has been experimented for a binary classification task, for the class
happiness vs other emotions. A set of 8 835 images was used. The OpenFace output intensities were
rescaled in order to make their distribution conformant to the expected one in case AUs are recognized
by humans [35]. The resulting 17 AUs were used as input units of a fully connected feed forward NN,
with two hidden layers of 50 and 25 nodes, using the logistic activation function for all layers. The F1
score of the trained network was 0.831. Verification has been performed taking 5 as the truth value
space (given that a scale of five values, plus absence, is used by humans for AU intensities), and using
minimum t-norm, the associated t-conorm, and standard involutive negation. With truth space 5 and
17 AUs as input units, the size of the search space for the solver was 617, i.e., more than 1013. The
weighted conditional knowledge base associated to the network contains 2 201 weighted typicality
inclusions. The version of the solver in [34] based on weight constraints and order encoding was used.</p>
      <p>Let us consider the two graded inclusion axioms: (a) T(happiness) ⊑ au1 ⊔au6 ⊔au12 ⊔au14 ≥ /5
and (b) T(happiness) ⊑ au6 ⊔ au12 ≥ /5. The model checking approach, applied to the test set
(2 651 individuals with 390 instances of T(happiness)), finds that both formulae hold for  = 3 and do
not hold for  = 4.</p>
      <p>
        In the entailment approach, the solver finds in seconds that (a) is not entailed for  = 4, and in
minutes that it is entailed for  = 1, while for  = 2, 3, it does not provide a result in hours. On a
variant of the experiment, using as inputs AU intensities that are not rescaled, the solver finds in seconds
that (a) is not entailed for  = 2, and in minutes that it is entailed for  = 1. The graded inclusion
axiom (b) is entailed for  = 1 and not for  = 3. In the latter case, then, a counterexample is found by
entailment, whose search space includes all possible combinations of input vectors, while it is not found
by model checking on the test set. The co-existence of strict and defeasible inclusions in weighted KBs
also allows for combining empirical knowledge with elicited knowledge for reasoning and for post-hoc
verification. A diferent experiment in the verification of properties of a network trained to classify its
input as an instance of four emotions surprise, fear, happiness, anger, is also reported in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        While the model-checking approach does not require to consider the activity of all units to build
a preferential interpretation of a network, in the entailment-based approach all units are considered.
Also, the model-checking approach, based on the conditional multi-preferential semantics, is a general
(model agnostic) approach, which may be suitable to explain diferent network models (and was first
considered for SOMs [22]). On the other hand, the entailment-based approach is specific for MLPs.
Both approaches are global ones (see, e.g., [39]), as they consider the behavior of the network over a set
∆ of input stimuli. We refer to [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for detailed results, discussion and related work on this conditional
approach to explainability.
      </p>
      <p>Acknowledgments
The work was partially supported by the INDAM-GNCS Project 2024 “LCXAI: Logica Computazionale
per eXplainable Artificial Intelligence”.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Alviano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Bartoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Botta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Esposito</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Giordano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. Theseider</given-names>
            <surname>Dupré</surname>
          </string-name>
          ,
          <article-title>A preferential interpretation of multilayer perceptrons in a conditional logic with typicality</article-title>
          ,
          <source>Int. Journal of Approximate Reasoning</source>
          <volume>164</volume>
          (
          <year>2024</year>
          ). URL: https://doi.org/10.1016/j.ijar.
          <year>2023</year>
          .
          <volume>109065</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Delgrande</surname>
          </string-name>
          ,
          <article-title>A first-order conditional logic for prototypical properties</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>33</volume>
          (
          <year>1987</year>
          )
          <fpage>105</fpage>
          -
          <lpage>130</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Makinson</surname>
          </string-name>
          ,
          <article-title>General theory of cumulative inference</article-title>
          ,
          <source>in: Non-Monotonic Reasoning</source>
          , 2nd International Workshop, Grassau, FRG, June 13-15,
          <year>1988</year>
          , Proceedings,
          <year>1988</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kraus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Magidor</surname>
          </string-name>
          ,
          <article-title>Nonmonotonic reasoning, preferential models and cumulative logics</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>44</volume>
          (
          <year>1990</year>
          )
          <fpage>167</fpage>
          -
          <lpage>207</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pearl</surname>
          </string-name>
          , System
          <string-name>
            <surname>Z</surname>
          </string-name>
          :
          <article-title>A natural ordering of defaults with tractable applications to nonmonotonic reasoning</article-title>
          , in: TARK'
          <fpage>90</fpage>
          ,
          <string-name>
            <surname>Pacific</surname>
            <given-names>Grove</given-names>
          </string-name>
          , CA, USA,
          <year>1990</year>
          , pp.
          <fpage>121</fpage>
          -
          <lpage>135</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Magidor</surname>
          </string-name>
          ,
          <article-title>What does a conditional knowledge base entail?</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>55</volume>
          (
          <year>1992</year>
          )
          <fpage>1</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S.</given-names>
            <surname>Benferhat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Cayrol</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dubois</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Prade</surname>
          </string-name>
          ,
          <article-title>Inconsistency management and prioritized syntax-based entailment</article-title>
          ,
          <source>in: Proc. IJCAI'93</source>
          ,
          <string-name>
            <surname>Chambéry</surname>
          </string-name>
          „
          <year>1993</year>
          , pp.
          <fpage>640</fpage>
          -
          <lpage>647</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Booth</surname>
          </string-name>
          , J. B. Paris,
          <article-title>A note on the rational closure of knowledge bases with both positive and negative knowledge</article-title>
          ,
          <source>Journal of Logic, Language and Information</source>
          <volume>7</volume>
          (
          <year>1998</year>
          )
          <fpage>165</fpage>
          -
          <lpage>190</lpage>
          . doi:
          <volume>10</volume>
          .1023/A:
          <fpage>1008261123028</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Kern-Isberner</surname>
          </string-name>
          ,
          <article-title>Conditionals in Nonmonotonic Reasoning and Belief Revision - Considering Conditionals as Agents</article-title>
          , volume
          <volume>2087</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lewis</surname>
          </string-name>
          , Counterfactuals, Basil Blackwell Ltd,
          <year>1973</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>D.</given-names>
            <surname>Nute</surname>
          </string-name>
          , Topics in conditional logic, Reidel, Dordrecht (
          <year>1980</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>L.</given-names>
            <surname>Giordano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Gliozzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Olivetti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Pozzato</surname>
          </string-name>
          , Preferential Description Logics,
          <source>in: LPAR</source>
          <year>2007</year>
          , volume
          <volume>4790</volume>
          <source>of LNAI</source>
          , Springer, Yerevan, Armenia,
          <year>2007</year>
          , pp.
          <fpage>257</fpage>
          -
          <lpage>272</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>K.</given-names>
            <surname>Britz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Heidema</surname>
          </string-name>
          , T. Meyer, Semantic preferential subsumption, in: G. Brewka, J. Lang (Eds.),
          <source>KR</source>
          <year>2008</year>
          , AAAI Press, Sidney, Australia,
          <year>2008</year>
          , pp.
          <fpage>476</fpage>
          -
          <lpage>484</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>L.</given-names>
            <surname>Giordano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Gliozzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Olivetti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Pozzato</surname>
          </string-name>
          , ALC+T:
          <article-title>a preferential extension of Description Logics</article-title>
          ,
          <source>Fundamenta Informaticae</source>
          <volume>96</volume>
          (
          <year>2009</year>
          )
          <fpage>1</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G.</given-names>
            <surname>Casini</surname>
          </string-name>
          , U. Straccia,
          <article-title>Rational Closure for Defeasible Description Logics</article-title>
          , in: T. Janhunen, I. Niemelä (Eds.),
          <source>JELIA</source>
          <year>2010</year>
          , volume
          <volume>6341</volume>
          <source>of LNCS</source>
          , Springer, Helsinki,
          <year>2010</year>
          , pp.
          <fpage>77</fpage>
          -
          <lpage>90</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>G.</given-names>
            <surname>Casini</surname>
          </string-name>
          , T. Meyer, K. Moodley,
          <string-name>
            <given-names>R.</given-names>
            <surname>Nortje</surname>
          </string-name>
          ,
          <article-title>Relevant closure: A new form of defeasible reasoning for description logics</article-title>
          ,
          <source>in: JELIA</source>
          <year>2014</year>
          , LNCS 8761, Springer,
          <year>2014</year>
          , pp.
          <fpage>92</fpage>
          -
          <lpage>106</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>