<!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>Workshop on Artificial Intelligence and Formal Verification, Logic, Automata, and Synthesis,
November</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Heuristic Minimization Modulo Theory of Modal Decision Trees Class-Formulas</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giovanni Pagliarini</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Paradiso</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sasha Rubin</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guido Sciavicco</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ionel Eduard Stan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Free University of Bozen-Bolzano</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Ferrara</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Sydney</institution>
          ,
          <country country="AU">Australia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>7</volume>
      <issue>2023</issue>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>One way towards the design of trustable, explainable, and interpretable artificial intelligence models is to focus on symbolic machine learning models, such as decision trees. While decision trees are already intelligible in principle, the logical rules they enclose may still be redundant, in particular with respect to some underlying theory. Moreover, propositional decision trees have been recently generalized to the case of modal logic; modal decision trees turn out to be more expressive than propositional ones, so their corresponding modal rules are proportionally harder to understand and minimize. In this paper we approach the problem of minimizing logical rules extracted from (modal) decision trees modulo some external theory.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;decision trees</kwd>
        <kwd>formula minimization</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Decision trees are part of a collection of logic-based learning methods that include learning
DNF/CNF formulas, Horn formulas, and decision lists, and characterized by the implicit
assumption that each instance of a dataset can be seen as a logical model. Among such methods, decision
trees are probably the most successful one. Learning an optimal decision tree, that is, a decision
tree with a minimum number of nodes, is an Σ 1 -hard problem [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], so learning decision trees is
often accomplished with heuristics such as entropy-based algorithms (e.g., CART [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], C4.5 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
or ID3 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]). Classic decision trees are propositional. Typically, edge conditions are simple literals
(e.g.,  &gt; 45,  =  ), so given the set  of the variables of the problem, one can fix
a propositional vocabulary  = { ◁▷  |  ∈  ,  ∈ R}, where ◁▷ ∈ {&lt;, ≤ , =, ≥ , &gt;} and
then interpret edge conditions as literals built from propositions in  . As a consequence, a
branch in a classic propositional decision tree is seen as a logical term, that is, a conjunction
of literals, and a class  is identified by the union of branches that are labeled with it; the
corresponding formula, which is a disjunction of conjunctions of literals, that is, a DNF formula,
is called class-formula. In this sense, each data point, or instance, of a dataset, can be seen
as a propositional interpretation. If  is the class-formula for  in the tree  , from a logical
point of view a decision tree assigns an instance  to the class  if , viewed as propositional
interpretation, satisfies  .
      </p>
      <p>
        To overcome some of the limitations of propositional decision trees, several generalizations
have been proposed; a very recent one consists of replacing propositional logic with modal
logic [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Modal decision trees are based on the idea that instances of non-scalar datasets (e.g.,
time series, texts, images, videos, and graphs) can be seen as finite Kripke structure (i.e., a certain
type of transition system). Thus, in the simplest case, a (non-scalar) instance  is described as
a tuple  = (, ,  ), where  is a finite set of worlds (among which an initial world 0 is
identified),  ⊆  ×  is an accessibility relation, and  :  → 2 is a valuation function
that maps every world to the subset of propositional letters that are true on it. It can be shown
that most types of data points can be, in fact, seen as Krikpe structure, allowing one to efectively
generalize propositional learning to modal (propositional) learning (instances with a single
world are, in fact, propositional). Modal decision trees have been introduced in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] in their
temporal form, and later extended and applied to a variety of domains and tasks [
        <xref ref-type="bibr" rid="ref10 ref11 ref7 ref8 ref9">7, 8, 9, 10, 11</xref>
        ]),
and their properties have been studied in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Modal decision trees have a general, syntactical
definition, which can be instantiated with a specific modal language ℒ; real-world non-scalar
datasets can be seen as sets of multi-relation Kripke models, and real-world modal logics used
in learning are in fact multi-modal logics with high expressive power. However, most basic
results can be stated in the simple case of single-relation structures and uni-modal logic, and
then easily generalized. Learning modal decision trees is accomplished with heuristic learning
algorithms inspired by their propositional counterparts. Class-formulas from modal decision
trees can be extracted as in the propositional case, and they have the form of conjunctions of
disjunctions of formulas (each called a path-formula); as before, an instance  is classified into a
class  by a decision tree  if and only if , seen as a Kripke interpretation, satisfies  on the
initial world 0, where  is the class-formula extracted from  for .
      </p>
      <p>Since decision tree learning algorithms are sub-optimal, class-formulas may display some
kind of redundancy. At the propositional level, for example, a very simple case occurs when a
product includes the conjunction of two literals of the type  &gt;  and  &gt; ′, being  ≥ ′;
clearly,  &gt; ′ can be omitted. More generally, one can consider the situation in which a given
learning problem is linked to a finite theory  , possibly provided by an expert and/or induced
by the nature of propositional letters, that may help simplifying the learned model; for example,
we may know that   &gt; 38 implies ℎ =  , so that a term that contains both
literals may, again, be simplified. In this paper, we want to define the problem of simplifying
class-formulas modulo a theory, and discuss an initial approach to its solution.
2. Minimization of Modal Class-Formulas Modulo Theory
Given a (modal) decision tree for a fixed language ℒ and vocabulary , a theory  written
in the language ℒ, a class , and the class-formula  for , we can formulate the problem of
Algorithm 1: TheoryMinimize.</p>
      <p>function TheoryMinimize(,  ):</p>
      <p>return TMin(,  ,  )
end
function TMin(,  ,  ):
if  ̸=   then
if  =  1 ∧  2 then  ← (TMin( 1, ,  ) ∧ TMin( 2, ,  ))
else if  =  1 →  2 then  ← (TMin( 1, ,  ) → TMin( 2, ,  ))
else if  = ♢  then  ← ♢ TMin(, ,  )
else if  = □  then  ← □ TMin(, ,  )
if  ̸=  1 ∧  2 then  ←  ( )
else if  =  1 ∧  2 and   ̸=  1 ∧  2 then
(,   ) ← ReplaceMarkedSubFormulasWithNewLetters( )
 ′ ← CNFMin( ∧  )
 ← ReplaceLettersWithSubFormulas( ′,  )
return 
end
ifnding the smallest (in terms of number of symbols)  ′ equivalent to  in every model in which 
holds universally; in other words, we ask that for every instance  such that for every world  it
is the case that ,  ⊩  for each  ∈  , it so happens that , 0 ⊩  if and only if , 0 ⊩  ′.
In the general case of modal decision trees, class-formulas have the form</p>
      <p>
        ( 11 ∧  21 ∧ . . . ∧  11 ) ∨ . . . ∨ ( 1 ∧  2 ∧ . . . ∧   ),
where each   (called path-formula) is a formula that belongs to a specific grammar. So, this
problem is at least Σ 2 -hard, as it can be reduced to the propositional DNF minimization with
an empty theory [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and it is its natural generalization to the case of decision trees.
      </p>
      <p>A two-step sub-optimal approach towards the solution to the above problem, in the particular
case in which  only contains propositional implications of the type ( 1 ∧  2 ∧ . . . ∧   →  )
(where  and each   is a propositional literal); the eficiency of such an approach depends,
among other aspects, on the eficiency of the algorithm Norm( ) that, given  , returns its logical
negation  ′ (in the same grammar).</p>
      <p>In step one (Alg. 1) we take advantage from the fact that class-formulas present typical
patterns for which the theory can be exploited towards a simplification, considering each
pathformula of each term ( 1 ∧  2 ∧ . . . ∧   ) individually. First, the procedure inductively searches
for a maximal subtree of the syntax tree of the considered formula that is a conjunction. Then, it
substitutes every conjunct that is not a literal with a fresh propositional letter
(ReplaceMarkedSubformulasWithNewLetters), using a map to keep trace of each substitution. Finally, it delegates
the process of minimizing the size of the obtained conjunctive formula within the theory to
an heuristic minimization algorithm CNFMin, before replacing back the fresh letters with the
original subtrees (ReplaceLettersWithSubFormulas). The call CNFMin( 1 ∧  2 ∧ . . . ∧   ∧  )
returns a conjunction  1 ∧ . . . ∧   ( ≤ , 1, . . . ,  ∈ [1, ]) such that for every   with
Algorithm 2: PropositionalMinimize.</p>
      <p>function PropositionalMinimize( ):
(,   ) ← ReplaceConjunctsWithNewLiterals( )
 ′ ← DNFMin( )
return ReplaceLiteralsWithConjuncts( ′,  )
end
function ReplaceSubFormulasWithNewLiterals( ):
  ← ∅
foreach  ∈ Conjuncts( ) do
if  [ ] does not exist then
˜ ←  ()
 [ ] ← ˜</p>
      <p>
        ˜
 [Norm(¬ )] ← ¬ 
 ←  [ ]
return (,   )
end
 ∈/ {1, . . . , } it is the case that  1 ∧ . . . ∧   ∧  →   is valid, and that the subset
{ 1 , . . . ,   } is minimal. A procedure CNFMin as we have described it can be obtained by
simply adapting a deletion-based procedure, namely, plain deletion-based MES extraction, from [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
As an example, the term
□ ( ∧ ¬ ∧ ♢  ∧ ) ∧
      </p>
      <p>□ (¬ ∧ ♢ ) ∧ 
would be reduced to the term
if  contained the implications ¬ →  and ¬ → .</p>
      <p>
        In step two (Alg. 2), we operate on the whole class-formula by uniformly substituting every
(top-level) conjunct in every term of the class-formula being considered with a fresh literal
(ReplaceConjunctsWithNewLiterals), delegating the size minimization of the resulting DNF
formula to a procedure DNFMin [
        <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
        ], and performing a backward, consistent substitution
(ReplaceLiteralsWithConjuncts). The correctness of this approach is based on the auxiliary
function Norm, whose existence we assumed. As an example, the class-formula
would be reduced to the class-formula
      </p>
    </sec>
    <sec id="sec-2">
      <title>3. Conclusions</title>
      <p>( 1 ∧ ¬ 2 ∧  3) ∨ ( 1 ∧  3)</p>
      <p>1 ∧  3.</p>
      <p>We defined the problem of minimization of class-formulas extracted from (modal) decision trees,
and we proposed an initial, heuristic approach to its solution.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>L.</given-names>
            <surname>Hyafil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Rivest</surname>
          </string-name>
          ,
          <article-title>Constructing optimal binary decision trees is NP-complete</article-title>
          ,
          <source>Information Processing Letters</source>
          <volume>5</volume>
          (
          <year>1976</year>
          )
          <fpage>15</fpage>
          -
          <lpage>17</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>L.</given-names>
            <surname>Breiman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Friedman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Olshen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Stone</surname>
          </string-name>
          ,
          <article-title>Classification and regression trees</article-title>
          ,
          <source>Wadsworth Publishing Company</source>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          ,
          <year>C4</year>
          .
          <article-title>5: Programs for Machine Learning</article-title>
          , Morgan Kaufmann,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          ,
          <article-title>Simplifying decision trees</article-title>
          ,
          <source>International Journal of Human-Computer Studies</source>
          <volume>51</volume>
          (
          <year>1999</year>
          )
          <fpage>497</fpage>
          -
          <lpage>510</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Della Monica</surname>
          </string-name>
          , G. Pagliarini, G. Sciavicco,
          <string-name>
            <surname>I. Stan</surname>
          </string-name>
          ,
          <article-title>Decision trees with a modal flavor</article-title>
          ,
          <source>in: Proc. of the 21st International Conference of the Italian Association for Artificial Intelligence (AIxIA)</source>
          ,
          <source>number 13796 in LNCS</source>
          , Springer,
          <year>2023</year>
          , pp.
          <fpage>47</fpage>
          -
          <lpage>56</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Brunello</surname>
          </string-name>
          , G. Sciavicco,
          <string-name>
            <surname>I. Stan</surname>
          </string-name>
          ,
          <article-title>Interval temporal logic decision tree learning</article-title>
          ,
          <source>in: Proc. of the 16th European Conference on Logics in Artificial Intelligence (JELIA)</source>
          , volume
          <volume>11468</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>778</fpage>
          -
          <lpage>793</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>F.</given-names>
            <surname>Manzella</surname>
          </string-name>
          , G. Pagliarini, G. Sciavicco,
          <string-name>
            <surname>I. Stan</surname>
          </string-name>
          ,
          <article-title>Interval Temporal Random Forests with an Application to COVID-19 Diagnosis</article-title>
          , in
          <source>: Proc. of the 28th International Symposium on Temporal Representation and Reasoning (TIME)</source>
          , volume
          <volume>206</volume>
          of LIPIcs, Schloss Dagstuhl,
          <year>2021</year>
          , pp.
          <volume>7</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          :
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Manzella</surname>
          </string-name>
          , G. Pagliarini, G. Sciavicco,
          <string-name>
            <surname>I. Stan</surname>
          </string-name>
          ,
          <article-title>The voice of COVID-19: Breath and cough recording classification with temporal decision trees and random forests</article-title>
          ,
          <source>Artificial Intelligence in Medicine</source>
          (
          <year>2023</year>
          )
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Pagliarini</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Sciavicco, Decision Tree Learning with Spatial Modal Logics</article-title>
          ,
          <source>in: Proc. of the 12th International Symposium on Games, Automata, Logics, and Formal Verification (GANDALF)</source>
          , volume
          <volume>346</volume>
          <source>of EPTCS</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>273</fpage>
          -
          <lpage>290</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Coccagna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Manzella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mazzacane</surname>
          </string-name>
          , G. Pagliarini, G. Sciavicco,
          <article-title>Statistical and Symbolic Neuroaesthetics Rules Extraction from EEG Signals</article-title>
          ,
          <source>in: Proc. of the 9th International Work-Conference on the Interplay Between Natural and Artificial Computation (IWINAC)</source>
          , volume
          <volume>13258</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2022</year>
          , pp.
          <fpage>536</fpage>
          -
          <lpage>546</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>G.</given-names>
            <surname>Sciavicco</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Stan</surname>
          </string-name>
          ,
          <article-title>Knowledge extraction with interval temporal logic decision trees</article-title>
          ,
          <source>in: Proc. of the 27th International Symposium on Temporal Representation and Reasoning (TIME)</source>
          , volume
          <volume>178</volume>
          of LIPIcs, Schloss Dagstuhl,
          <year>2020</year>
          , pp.
          <volume>9</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>9</lpage>
          :
          <fpage>16</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C.</given-names>
            <surname>Umans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Villa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Sangiovanni-Vincentelli</surname>
          </string-name>
          ,
          <article-title>Complexity of two-level logic minimization</article-title>
          ,
          <source>IEEE Trans. Comput. Aided Des. Integr. Circuits Syst</source>
          .
          <volume>25</volume>
          (
          <year>2006</year>
          )
          <fpage>1230</fpage>
          -
          <lpage>1246</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Belov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Janota</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Lynce</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Marques-Silva</surname>
          </string-name>
          ,
          <article-title>Algorithms for computing minimal equivalent subformulas</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>216</volume>
          (
          <year>2014</year>
          )
          <fpage>309</fpage>
          -
          <lpage>326</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>J.</given-names>
            <surname>Hlavicka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fiser</surname>
          </string-name>
          ,
          <article-title>Boom-a heuristic boolean minimizer</article-title>
          ,
          <source>in: Proc. of the IEEE/ACM International Conference on Computer Aided Design (ICCAD)</source>
          ,
          <year>2001</year>
          , pp.
          <fpage>439</fpage>
          -
          <lpage>442</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>R.</given-names>
            <surname>Rudell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sangiovanni-Vincentelli</surname>
          </string-name>
          ,
          <article-title>Multiple-valued minimization for pla optimization</article-title>
          ,
          <source>IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems</source>
          <volume>6</volume>
          (
          <year>1987</year>
          )
          <fpage>727</fpage>
          -
          <lpage>750</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>