<!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>Extended abstract:  - A forgetting technique for XAI based on goal-directed constraint ASP models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luciana Fidilio-Allende</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Joaquin Arias</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>CETINIA</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Universidad Rey Juan Carlos</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Móstoles</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Spain</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>This paper is an extended abstract of: L. Fidilio-Allende, J. Arias,  : A forgetting technique for XAI based on goal-directed constraint ASP models, in: XXIII Jornadas sobre Programación y Lenguajes (PROLE), 2024. URL: https://hdl.handle.net/11705/PROLE/2024/13. [1]. The automation of all sorts of processes through Artificial Intelligence (AI) systems has made significant progress. More recently, whether through self-regulation and soft law such as guidelines or through legal regulation (e.g., the General Data Protection Regulation (GDPR) or the Regulation on AI, both by the EU), it has become apparent that this development needs to be accompanied by measures that safeguard the fundamental rights and safety of people afected by AI systems. In this sense, Explainable Artificial Intelligence (XAI) [ 2] is of foremost importance to design trustworthy systems. Proposals such as s(LAW) [3], which are based on Answer Set Programming, have shown their ability to model values and explain the reasons for their decisions, thanks to their rule-based models. But these explanations could lead to the disclosure of sensitive information, such as details about victims of gender-based violence. This could violate the right to privacy and confidentiality, or even cause legal issues, among other concerns. Although explanations can be adjusted to prevent leaks, e.g., using the s(CASP) framework to control which elements are shown and/or hidden [4], adapting the models requires the application of techniques such as forgetting (variable elimination) to avoid revealing sensitive information during an audit. However, current forgetting techniques are mostly only applied in propositional ASP programs, and they have limitations dealing with even loops. In this work, we present  , a new forgetting technique that supports the presence of nonstratified negations in Constraint Answer Set Programs.  is based on the dual rules of s(CASP), a goal-directed CASP reasoner, and therefore, we believe that it can be applied to generic CASP programs without grounding. We have validated our proposal by solving flagship examples from the literature, and we plan to use this technique in the context of school places allocation while preserving the privacy of victims of gender-based violence.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Privacy</kwd>
        <kwd>Value Awareness</kwd>
        <kwd>XAI</kwd>
        <kwd>ASP</kwd>
        <kwd>s(CASP)</kwd>
        <kwd>Forgetting</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>(UP)
Yes
Yes
Yes
Yes
Yes
(SP)
No</p>
    </sec>
    <sec id="sec-2">
      <title>Maybe</title>
    </sec>
    <sec id="sec-3">
      <title>Maybe Yes Yes Yes</title>
      <p>No
Yes
Yes
Yes</p>
    </sec>
    <sec id="sec-4">
      <title>Loops</title>
    </sec>
    <sec id="sec-5">
      <title>Commutative</title>
    </sec>
    <sec id="sec-6">
      <title>Predicates</title>
    </sec>
    <sec id="sec-7">
      <title>Constraints No No Yes</title>
      <p>Yes
Yes
4th Workshop on Goal-directed Execution of Answer Set Programs (GDE’24), October 12, 2024
$ luciana.fidilio@urjc.es (L. Fidilio-Allende); joaquin.arias@urjc.es (J. Arias)
0009-0004-7779-8265 (L. Fidilio-Allende); 0000-0003-4148-311X (J. Arias)</p>
      <p>© 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>
        In Table 1, we compare fCASP with other relevant operators such as those described in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], evaluating its preliminary performance and properties. Through validation using literature
examples, we believe that  can generate programs with the same answer sets, even when
additional facts (when complying with UP) or propositional rules (when complying with SP) are added
to both programs, avoiding the removed or auxiliary predicates. Additionally, we have tested the
operator with programs involving even loops, and it can generate equivalent programs regardless of
the order in which predicates are removed, that is, it is commutative. In the future, there is potential to
extend it to programs with variables and constraints, thanks to the use of s(CASP) dual rules.
      </p>
      <p>The preliminary design of the algorithm involves three steps repeated iteratively for each predicate
marked to be forgotten, plus a final optional step.</p>
      <p>Figure 1 shows an implementation sketch of the operator’s steps:
• The first step (lines 2 − 4) involves adding auxiliary predicates (neg_x) and clauses when the
predicate to be forgotten is part of an even loop, is a fact, or is a missing predicate.
• The second step (lines 5 and 6) is generating the dual rule of the predicate to forget, being the dual
rule the negated version of all the predicate’s clauses.
• The third step (lines 7 and 8) is forgetting the predicate, replacing its appearances with the content
of its clauses and its negation with the content of its dual rule.
• The final step (line 12) is transforming the double negations (not not) into even loops, as s(CASP)
does not explicitly support them. This step is optional.</p>
      <p>We have performed an evaluation of fCASP using examples from the literature.</p>
      <p>
        In the first example, we forget predicates in even loops. To conserve the symmetry in answer sets [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
(preserving the predicates not forgotten in the answer sets even when adding additional rules), it is
necessary to add additional predicates (neg_x) as strong persistence (SP) cannot be achieved (in some
cases) without them [
        <xref ref-type="bibr" rid="ref12 ref8">12, 8</xref>
        ]. Below we can see the result of forgetting p and q, and the answer sets of
both the original program and the generated one. As they have the same answer sets (ignoring the
forgotten and auxiliary predicates), the programs are equivalent.
      </p>
      <p>
        1 = Example 3 from [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]
{a, p}, {b, q}
1 a :- p.
2 b :- q.
3 p :- not q.
4 q :- not p.
      </p>
      <p>(1, {, })
{a, neg_2}, {b, neg_1}
1 a :- not not neg_2.
2 b :- not not neg_1.
3 neg_1 :- not not neg_1.</p>
      <p>4 neg_2 :- not neg_1.</p>
      <p>In the second example, we forget predicates present in double negations. This case cannot be resolved
without the use of additional predicates. As we can see on the next example, both the original program
and the one generated with  forgetting p are equivalent.</p>
      <p>
        2 = Example 4 from [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
{p, q}, {r}
1 p :- not not p.
2 q :- p.
3 r :- not p.
3 = Example 1 from [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
{p}, {q}
1 a :- p, q.
2 q :- not p.
3 p :- not not p.
      </p>
      <p>(2, {})
{q}, {r, neg_1}
1 q :- not neg_1.
2 r :- not not neg_1.</p>
      <p>3 neg_1 :- not not neg_1.
 (3, {, }) and  (2, {, })
{}, {neg_1}
1 a :- not neg_1, not not neg_1.</p>
      <p>2 neg_1 :- not not neg_1.</p>
      <p>In the third example we forget multiple predicates regardless of the order.</p>
      <p>In the final example, we compare the performance of  with  , the operator that is closer to
the desired properties. As we can see,  may generate a program that outputs redundant answers,
while the one generated with  preserves the original count.</p>
      <p>
        4 = Example 5 from [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
{c}
1 q :- not not q, b.
2 a :- q.
3 c :- not q.
      </p>
      <p>(4, {}).
{c}, {c,  }</p>
      <p>In the first use case, we model the Spanish Organic Law 2/2004, May 3, Articles 116 and 117 and
the Spanish Constitution Articles 27 and 149.1.30. This legislation establishes the criteria used for
assigning public school places in the Comunidad de Madrid, Spain, when the number of applications for
a given center is greater than the ofer. After applying  , we can successfully remove the students’
medical, socio-economical and gender-based violence related private information while conserving the
original model decisions and explainability, complying with the need for transparency required by the
applicable regulations such as the recent European AI Act.</p>
      <p>
        In the second use case [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], we propose an automated decision-making system for energy assignment
in agricultural cooperatives. In this case, the energy is assigned based on how fairly the workers are
paid, pondering their salary and productivity, which are considered confidential and, in some cases,
private. After applying forgetting, we can preserve the confidentiality of the stakeholders without
afecting the decisions and justifications of the model, crucial to make these answers trustworthy.
      </p>
      <p>In conclusion, we have presented a new forgetting operator,  , designed to work with
goaldirected Answer Set Programs and support dual rules and double negations while being commutative.
As potential lines of work for the future, we have identified the extension of the algorithm to support
variables and constraints, formally determining and proving  ’s properties, and applying the
operator to real use cases.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>L.</given-names>
            <surname>Fidilio-Allende</surname>
          </string-name>
          , J. Arias,
          <article-title>: A forgetting technique for XAI based on goal-directed constraint ASP models, in: XXIII Jornadas sobre Programación y Lenguajes (PROLE</article-title>
          ),
          <year>2024</year>
          . URL: https: //hdl.handle.net/11705/PROLE/
          <year>2024</year>
          /13.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D.</given-names>
            <surname>Gunning</surname>
          </string-name>
          , D. Aha,
          <source>DARPA's Explainable Artificial Intelligence (XAI) Program, AI</source>
          Magazine
          <volume>40</volume>
          (
          <year>2019</year>
          )
          <fpage>44</fpage>
          -
          <lpage>58</lpage>
          . doi:
          <volume>10</volume>
          .1609/aimag.v40i2.
          <fpage>2850</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Arias</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Moreno-Rebato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Rodriguez-García</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ossowski</surname>
          </string-name>
          ,
          <article-title>Automated legal reasoning with discretion to act using s(LAW</article-title>
          ),
          <year>2023</year>
          . doi:
          <volume>10</volume>
          .1007/s10506-023-09376-5.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Arias</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Carro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Chen</surname>
          </string-name>
          , G. Gupta,
          <article-title>Justifications for goal-directed constraint answer set programming</article-title>
          ,
          <year>2020</year>
          . doi:
          <volume>10</volume>
          .4204/EPTCS.325.12.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Gonçalves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Janhunen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Knorr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leite</surname>
          </string-name>
          ,
          <article-title>On Syntactic Forgetting under Uniform Equivalence</article-title>
          ,
          <source>in: European Conference on Logics in Artificial Intelligence</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>297</fpage>
          -
          <lpage>312</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Gonçalves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Knorr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leite</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Woltran</surname>
          </string-name>
          ,
          <article-title>When you must forget: Beyond Strong Persistence when Forgetting in Answer Set Programming</article-title>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Berthold</surname>
          </string-name>
          ,
          <article-title>On Syntactic Forgetting with Strong Persistence</article-title>
          ,
          <source>in: Proceedings of the Int. Conf. on Principles of Knowledge Representation and Reasoning</source>
          , volume
          <volume>19</volume>
          ,
          <year>2022</year>
          , pp.
          <fpage>43</fpage>
          -
          <lpage>52</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M.</given-names>
            <surname>Berthold</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Gonçalves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Knorr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leite</surname>
          </string-name>
          ,
          <article-title>Forgetting in Answer Set Programming with Anonymous Cycles</article-title>
          , in: EPIA, Springer,
          <year>2019</year>
          , pp.
          <fpage>552</fpage>
          -
          <lpage>565</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -30244-3\ _
          <fpage>46</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Kern-Isberner</surname>
          </string-name>
          ,
          <article-title>A Brief Survey on Forgetting from a Knowledge Representation</article-title>
          and
          <string-name>
            <given-names>Reasoning</given-names>
            <surname>Perspective</surname>
          </string-name>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>R.</given-names>
            <surname>Gonçalves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Knorr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leite</surname>
          </string-name>
          , Forgetting in Answer Set
          <string-name>
            <surname>Programming-A Survey</surname>
          </string-name>
          ,
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Knorr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Alferes</surname>
          </string-name>
          , Preserving Strong Equivalence while Forgetting,
          <source>in: Logics in Artificial Intelligence: 14th European Conference, JELIA 2014</source>
          , Springer,
          <year>2014</year>
          , pp.
          <fpage>412</fpage>
          -
          <lpage>425</lpage>
          . doi:
          <volume>10</volume>
          .1007/ 978-3-
          <fpage>319</fpage>
          -11558-0\_
          <fpage>29</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Gonçalves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Knorr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leite</surname>
          </string-name>
          ,
          <article-title>You can't always forget what you want: on the limits of forgetting in Answer Set Programming</article-title>
          ,
          <source>in: Proceedings of the Twenty-second European Conference on Artificial Intelligence</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>957</fpage>
          -
          <lpage>965</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>L.</given-names>
            <surname>Fidilio-Allende</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Arias</surname>
          </string-name>
          ,
          <article-title>Private-safe (logic-based) decision systems for energy assignment in agricultural cooperatives, in: Highlights in Practical Applications of Agents, Multi-Agent Systems, and</article-title>
          <string-name>
            <given-names>Cognitive</given-names>
            <surname>Mimetics</surname>
          </string-name>
          .
          <source>The PAAMS Collection: International Workshops of PAAMS</source>
          <year>2024</year>
          , Salamanca, Spain, June 26-28,
          <year>2024</year>
          , Proceedings, Springer,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>