<!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 />
    <article-meta>
      <title-group>
        <article-title>Semi-Factual Explanations in AI</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Saugat Aryal</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University College Dublin</institution>
          ,
          <addr-line>Belfield, Dublin</addr-line>
          ,
          <country country="IE">Ireland</country>
        </aff>
      </contrib-group>
      <fpage>236</fpage>
      <lpage>240</lpage>
      <abstract>
        <p>Recent works on post-hoc example-based eXplainable AI (XAI) methods have focused on counterfactual explanations to provide justifications for predictions made by AI systems. Counterfactuals explain by showing what changes to input-features change the output decision. However, a lesser-known, special-case of the counterfacual is the semi-factual, which provide explanations about what changes to the input-features do not change the output decision. Despite their significant potential, semi-factuals have largely been unexplored in the XAI literature. My PhD research aims to address this gap by establishing a comprehensive framework for the use of semi-factuals in XAI. This includes development of novel methods for their computation, validated through user studies.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;XAI</kwd>
        <kwd>XCBR</kwd>
        <kwd>Semi-Factual</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In recent years, research on eXplainable AI (XAI) have garnered significant attention as it aims to
improve the transparency and interpretability of the black-box AI models. Among diferent XAI
strategies, post-hoc example-based explanation methods which provides after-the-fact justification
have been very popular. Within this landscape, significant efort have been expended on counterfactual
explanations [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4">1, 2, 3, 4</xref>
        ]. However, a special-case of the counterfactual, called semi-factual explanations
have been largely ignored even though they have as much potential as counterfactuals (albeit in diferent
contexts).
      </p>
      <p>
        Counterfactual explanations inform users about how the output-decision can be altered by changing
key input-features in the form of "if only" reasoning. For example, when a customer is refused a loan, the
counterfacutal might say "if only you asked for a loan with shorter term, it would have been approved".
Semi-factual explanations, on the contrary, inform users about how the output-decision remains the
same when the key input-features change using "even if" reasoning. So, in the banking recourse example,
the semi-factual might say "even if you doubled your income, your loan would still be refused". In
cognitive science, counterfactuals and semi-factuals have been shown to have diferent psychological
impacts on users where the former tends to enable strong causal relation whereas the latter weakens
the causal support [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        The origin of semi-factual as explanations can be traced back to early works on post-hoc explanatory
case-based reasoning (XCBR)[
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6, 7, 8</xref>
        ]. In these studies, semi-factuals were used in the form of "a fortiori"
arguments to provide strong convincing explanation for a proposition. The scholars observed that
in some scenarios, a case-based neighbor which was farther away from the query and closer to the
decision boundary (semi-factual) could provide better explanation than the actual nearest neighbor.
However, they lacked to formally define the behaviour of semi-factual as explanations. In recent works,
semi-factuals have emerged mostly in association with counterfactuals in that they are obtained as a
consequence of generating counterfactual explanations [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. As such, semi-factuals as explanations have
not been well-defined and studied independently in the XAI domain which drives the motivation of my
research.
      </p>
      <p>The aim of my PhD thesis primarily focus on defining the characterstics of semi-factual explanations
and establishing a comprehensive framework for their use in XAI.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Research Plan</title>
      <p>My PhD research seek to establish a formal definition for semi-factuals in XAI unifying their
computational (i.e, "what needs to be computed") and cognitive requirements (i.e, "the response to be elicited in
users"). Based on the desiderata, novel methods will be developed to generate these explanations. This
work also intend to propose key evaluation measures to asses their quality and hence provide a strong
foundation for future advancements in this area. Furthermore, user studies will also be conducted to
analyze how people perceive such explanations.</p>
      <sec id="sec-2-1">
        <title>2.1. Research Questions</title>
        <p>My dissertation focuses on 3 main research questions:
• RQ1: What does the prior literature on semi-factuals in the field of Cognitive Science, CBR
and AI tell us about the fundamental characteristics and desiderata for their use? The aim is to
systematically identify and articulate a set of desirable attributes for the utilization of semi-factual
explanations in the context of AI.
• RQ2: What novel methods can be devised to efectively generate, interpret and evaluate
semifactual explanations in AI systems? This research question addresses the core objective of my
PhD thesis which is to explore innovative methodologies for the generation of semi-factual
explanations that meet the established desiderata.
• RQ3: How do people comprehend and interpret semi-factuals and how do these explanations
impact their trust and understanding of AI systems? The objective is to conduct comprehensive
user tests to analyze their impact and efect on people.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Progress Summary</title>
      <p>The progress so far can be divided into three phases.</p>
      <sec id="sec-3-1">
        <title>3.1. Literature Review, MDN &amp; Benchmarking Study</title>
        <p>
          In my first phase of work [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], a systematic literature review was conducted surveying the historical
and recent works on semi-factuals across several domains including Philosophy, Psychology, CBR and
AI. Following the literature, a formalised computational and cognitive desiderata for semi-factuals
in XAI was introduced (RQ1). In the same work, a benchmark evaluation of historical methods was
performed along with the proposal of a novel, baseline algorithm, the Most Distant Neighbor (MDN)
method to support benchmarking.
        </p>
        <p>
          In cognitive science, semi-factuals have been extensively studied in Philosophy [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] and Psychology
[
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] under diferent guises. Philosophers have argued if semi-factuals are fundamentally diferent from
counterfactuals and psychological research show that they have diferent cognitive impact on people.
Specifically, semi-factuals tend to weaken the causal dependencies between the input and the outcome.
When someone is told that “even doubling your income will not lead to a loan approval” they are more
likely to think that income is really not causally important in the domain.
        </p>
        <p>
          Similarly, a number of methods were proposed in early CBR research where semi-factuals were
characterized as a fortiori arguments. Doyle et. al [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] was the seminal paper which first proposed the
use of such reasoning and used utility functions to obtain them. Other works used similarity to Nearest
Unlike Neighbor (NUN) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] and surrogate models (similar to LIME) [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] to compute them. Recently,
Kenny &amp; Keane [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] advanced a generative method for computing both semi-factuals and counterfacutals
in a unified framework which instigated, what could be called, the modern-era of semi-factual XAI
research. Consequently, several uses of semi-factuals have been proposed in several areas such as
healthcare diagnosis [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], decision space analysis [
          <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
          ] and data augmentation [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
        </p>
        <p>The proposed novel MDN method finds the furthest neighbor of the query along some
featuredimension while being in the same class as query (this is analogous to the use of NUNs in counterfactuals,
where an existing datapoint is used as an explanation). MDNs are known data-points in the dataset
that share some common features with the query but are far from it on some key-feature.</p>
        <p>To compute MDNs, for a given feature of q, its neighbours along that dimension are partitioned
into instance-sets that have higher values (i.e., HighSet) or lower values (i.e., LowSet) than the query.
Each of these sets are ranked-ordered separately using a Semi-Factual Scoring (sfs) function, which is a
distance measure that prioritises instances that are sparse (few feature diferences) while also having
the highest value-diferences on the selected dimension, as follows:
sfs(, ,  ) =
where S is High or Low Set and  ∈ , same() counts the features that are equal between q and x, F
is the total number of features, dif() gives the diference-value of key-feature, f, and dif () is the
maximum diference-value for that key-feature in the HighSet/LowSet. Basically, the instance with the
highest overall sfs value from the HighSet/LowSet is the best MDN for that feature. This computation
is done for each feature of q, independently, with the best of the best instance (i.e., with the highest sfs
value across all features) is selected to be the semi-factual for the query as shown in Figure 1.</p>
        <p>SFMDN(, ) = arg max  ()
∈</p>
        <p>
          We show that MDNs meet many of the desiderata for semi-factuals though they may not be an
optimal solution. Furthermore, we experimentally compared four historical CBR methods (three
KLEORvariants [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] and Local-Region [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]) against the MDN algorithm to provide a solid baseline for future
works. The algorithms were evaluated on key distance metrics for assessing good semi-factuals. The
results show that MDN performed best in finding semi-factuals that are farthest away from the query
in both feature and instance space. However, it falls behind on three measures: distance to the query’s
class distribution, distance to the NUN and sparsity.
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Optimized MDNs</title>
        <p>In the second phase, a series of experiments were performed to propose two new MDN variants to
overcome their initial limitations. The custom sfs() function in MDN scores each candidate instance
based on their relative feature-value distance as well as closeness to the query. Along this line, we
modify the scoring function to optimize their behaviour.
(1)
(2)</p>
        <p>The two components in the scoring function are equally weighted to find the best semi-factual.
Since original MDN (MDNv1) performed relatively poorly in the sparsity metric we propose
SparseMDNs (MDNv2), which prioritises the similarity between non-key features. Essentially, we introduce a
regularizer in the original sfs() function, which penalizes the algorithm for finding semi-factuals with
higher feature-diferences, thus promoting sparse explanations. We modify the scoring function by
weighing it with the proportion of features that are "not same" between the query and the instance.
Hence, instances with higher number of similar features will be assigned high scores to obtain sparse
MDNs.</p>
        <p>1 dif ( ,  )
sfs2(, ,  ) =  − (, ) * ( dif ( ,  )
+</p>
        <p>In both MDNv1 and MDNv2, the similarity between non-key features between query and instances
using same() involves a direct comparison of their values. Specifically, the function checks if the values
are identical in case of categorical features, while the continuous features are considered same if they
fall within a predefined threshold range. However, it is not always straight-forward to determine the
optimal threshold and it may vary across diferent features. Hence, we propose Dist-MDNs (MDNv3)
where we modify the scoring function to compute similarity directly in the feature space as:
sfs3(, ) =
dif ( ,  ) * dist( ,  )
where dist() computes the 2-norm distance and q and x represents the query and instance with
only non-key features (i.e excluding the key-feature in consideration) respectively.</p>
        <p>We also performed comprehensive tests to evaluate the proposed methods. The results show that the
proposed variants could improve on the initial MDN limitations, however, the historical CBR methods
still perform better on some measures.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Analysis of Counterfactuals for Semi-Factuals</title>
        <p>Finally, in my most recent work, comprehensive tests were conducted to determine if counterfactuals
are needed to obtain the best semi-factuals.</p>
        <p>We divide the literature on semi-factual methods into two groups: Counterfactual-Guided and
Counterfactual-Free. The Counterfactual-Guided group uses counterfactuals as guides to find the
semi-factuals, whereas, Counterfactual-Free methods considers exploration within the query-class
without explicitly relying on counterfactuals. Specifically, we consider the key question “Are the best
semi-factuals found by using counterfactuals as guides?”. We evaluated 8 semi-factuals methods (4
from each group) on five evaluation metrics that attempt to capture key aspects of the desiderata for
“good” semi-factuals. The results indicate that counterfactual-guidance is "not" necessary to find best
semi-factuals. Each method do well on one or two metrics but then poorly on others. However, there is
no single method that is consistently good across all measures. This work has been accepted in the
main proceedings of ICCBR’24.
(4)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and Future Work</title>
      <p>Overall, [RQ1] have been successfully addressed and completed, and [RQ2] is well underway with
an in-depth exploration. Based on the findings so far, the current focus is to devise novel generative
methods to obtain semi-factual explanations. In the future, a primary emphasis will be on conducting
user tests. The objective will be to study human perception of these explanations and gather insights
about their impact, particularly within the context of AI systems. The collected user feedback will
contribute to a comprehensive understanding of the nature and utility of semi-factual explanations in
AI, thereby facilitating further advancements in this field. The results of these studies will address the
objectives of [RQ3].</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Smyth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Keane</surname>
          </string-name>
          ,
          <article-title>A few good counterfactuals: generating interpretable, plausible and diverse counterfactual explanations</article-title>
          ,
          <source>in: International Conference on Case-Based Reasoning</source>
          , Springer,
          <year>2022</year>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Byrne</surname>
          </string-name>
          ,
          <article-title>Counterfactuals in explainable artificial intelligence (xai): evidence from human reasoning</article-title>
          ,
          <source>in: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>6276</fpage>
          -
          <lpage>6282</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <article-title>Explanation in artificial intelligence: Insights from the social sciences</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>267</volume>
          (
          <year>2019</year>
          )
          <fpage>1</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Keane</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. M.</given-names>
            <surname>Kenny</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Delaney</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Smyth</surname>
          </string-name>
          ,
          <article-title>If only we had better counterfactual explanations</article-title>
          ,
          <source>in: Proceedings of the 30th International Joint Conference on Artificial Intelligence (IJCAI-21)</source>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>McCloy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Byrne</surname>
          </string-name>
          ,
          <article-title>Semifactual "even if" thinking</article-title>
          ,
          <source>Thinking &amp; Reasoning</source>
          <volume>8</volume>
          (
          <year>2002</year>
          )
          <fpage>41</fpage>
          -
          <lpage>67</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Nugent</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cunningham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Doyle</surname>
          </string-name>
          ,
          <article-title>The best way to instil confidence is by being right</article-title>
          ,
          <source>in: International Conference on Case-Based Reasoning</source>
          , Springer,
          <year>2005</year>
          , pp.
          <fpage>368</fpage>
          -
          <lpage>381</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Cummins</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Bridge</surname>
          </string-name>
          ,
          <article-title>Kleor: A knowledge lite approach to explanation oriented retrieval</article-title>
          ,
          <source>Computing and Informatics</source>
          <volume>25</volume>
          (
          <year>2006</year>
          )
          <fpage>173</fpage>
          -
          <lpage>193</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>C.</given-names>
            <surname>Nugent</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Doyle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cunningham</surname>
          </string-name>
          ,
          <article-title>Gaining insight through case-based explanation</article-title>
          ,
          <source>Journal of Intelligent Information Systems</source>
          <volume>32</volume>
          (
          <year>2009</year>
          )
          <fpage>267</fpage>
          -
          <lpage>295</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>E. M.</given-names>
            <surname>Kenny</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Keane</surname>
          </string-name>
          ,
          <article-title>On generating plausible counterfactual and semi-factual explanations for deep learning</article-title>
          ,
          <source>in: Proceedings of the 35th AAAI Conference on Artificial Intelligence (AAAI-21)</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>11575</fpage>
          -
          <lpage>11585</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Aryal</surname>
          </string-name>
          , M. T. Keane,
          <article-title>Even if explanations: Prior work, desiderata &amp; benchmarks for semi-factual xai</article-title>
          , in: E. Elkind (Ed.),
          <source>Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI-23, International Joint Conferences on Artificial Intelligence Organization</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>6526</fpage>
          -
          <lpage>6535</lpage>
          . URL: https://doi.org/10.24963/ijcai.
          <year>2023</year>
          /732. doi:
          <volume>10</volume>
          .24963/ijcai.
          <year>2023</year>
          /732, survey Track.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Bennett</surname>
          </string-name>
          , Even if,
          <source>Linguistics and Philosophy</source>
          <volume>5</volume>
          (
          <year>1982</year>
          )
          <fpage>403</fpage>
          -
          <lpage>418</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D.</given-names>
            <surname>Doyle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cunningham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Bridge</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Rahman</surname>
          </string-name>
          ,
          <article-title>Explanation oriented retrieval</article-title>
          ,
          <source>in: European Conference on Case-Based Reasoning</source>
          , Springer,
          <year>2004</year>
          , pp.
          <fpage>157</fpage>
          -
          <lpage>168</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vats</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mohammed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Pedersen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Wiratunga</surname>
          </string-name>
          ,
          <article-title>This changes to that: Combining causal and non-causal explanations to generate disease progression in capsule endoscopy</article-title>
          ,
          <source>arXiv preprint arXiv:2212.02506</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artelt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Hammer</surname>
          </string-name>
          ,
          <article-title>"even if</article-title>
          ...
          <article-title>"-diverse semifactual explanations of reject</article-title>
          ,
          <source>arXiv preprint arXiv:2207</source>
          .
          <year>01898</year>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>S.</given-names>
            <surname>Mertes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Karle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Huber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Weitz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Schlagowski</surname>
          </string-name>
          , E. André,
          <article-title>Alterfactual explanations-the relevance of irrelevance for explaining ai systems</article-title>
          ,
          <source>arXiv preprint arXiv:2207.09374</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. Mac</given-names>
            <surname>Namee</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y. Zhang,</surname>
          </string-name>
          <article-title>A rationale-centric framework for human-in-the-loop machine learning</article-title>
          ,
          <source>arXiv preprint arXiv:2203.12918</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>