<!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>Modeling Administrative Discretion Using Goal-Directed Answer Set Programming</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Joaquín Arias</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mar Moreno-Rebato</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>José A. Rodríguez-García</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sascha Ossowski</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CETINIA, Universidad Rey Juan Carlos</institution>
          ,
          <addr-line>Madrid</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper is an extended abstract of: J. Arias, M. Moreno-Rebato, J. A. Rodriguez-García, S. Ossowski, Modeling Administrative Discretion Using Goal-Directed Answer Set Programming, in: Advances in Artificial Intelligence, CAEPIA 20/21, Springer International Publishing, Cham, 2021, pp. 258-267. doi:10.1007/978-3-030-85713-4_25 [1]. The formal representation of a legal text to automatize reasoning about them is well known in literature, and is recently gaining much attention thanks to the interest in the so-called smart contracts, and to autonomous decisions by public administrations [2, 3, 4]. For deterministic rules there are several proposals, often based on logic-based programming languages [5, 6]. However, none of the existing proposals are able to represent the ambiguity and/or administrative discretion present in contracts and/or applicable legislation, e.g., force majeure. In this work we present a framework, called s(LAW) [1], that allows for modeling legal rules involving ambiguity, and supports reasoning and inferring conclusions based on them. Additionally, thanks to the goal-directed execution of s(CASP) [7], the underlying system used to implement our proposal, s(LAW) provides justification [ 8] of the resulting conclusions (in natural language). To evaluate the expressiveness of our proposal we have translated (using a set of patterns) part of the rules of the procedure for awarding school places for the “Educación Secundaria Obligatoria” (ESO) of centers supported with public funds in the Comunidad de Madrid. Patterns to translate law into ASP The first contribution is a set of patterns to translate ambiguity and/or discretion concepts, that in previous proposals required the help of an expert the field of application, to specify only one interpretation and/or decision. 1</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Answer Set Programming</kwd>
        <kwd>Goal-Directed Evaluation</kwd>
        <kwd>Administrative Discretion</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>1. Requirement For Applying These are the most common constructions in legal articles.</p>
      <p>There are two patterns: (i) Disjunction, and (ii) Conjunction.
2. Exceptions For Applying They are encoded using negation as failure.
3. Ambiguity Ambiguity occurs when some aspects of the law can be interpreted in diferent
ways. For example, “proximity to the family or work address” is a specific and defined
requirement based on the distribution by educational districts. However, in case of force
majeure, students from a education district may be reassigned to a school from another
district. The encoding below allows evaluation without having to determine a priori the
force majeure circumstances necessary to justify the reassignment of students.
1 school_proximity
:2 school_proximity
:3 force_majeure
:4 n_force_majeure
:same_education_district.
not same_education_district, force_majeure.
not n_force_majeure.</p>
      <p>not force_majeure.</p>
      <p>This pattern generates a model where force_majeure is assumed to hold and another
model where there is no evidence that force_majeure holds.
4. Discretion To Act The discretion to act introduces diferent possible interpretations
of the law and/or the contract that we intent to model by generating multiple models.
Implementations based on Prolog compute a single, canonical model, and therefore,
bypass this non determinism by selecting one interpretation. Using s(LAW), we obtain
two possible models: In one model the discretion to act is applied (according to the
purpose / intention of the law and it is not unlawful) and in the other it does not.
5. Unknown Information The use of default negation may introduce unexpected results
in the absence of information (positive and/or negative). Therefore, in many cases the
desirable behavior should capture the absence of information by generating diferent
models depending on the relevant information. To state that some information is
certain we would use the predicate evidence/1, and to specify that we have evidences
supporting it falsehood we would use strong negation, i.e., -evidence/1.</p>
      <p>The framework: The second contribution is s(LAW)2, built on top of s(CASP), and composed
by three modules: the rfist contains the articles, the second contains explanations to generate
readable justifications, and the third one contains the evidences for each candidate.
• A priori Deduction Table 1 shows the data corresponding to six candidates and the
conclusion generated by s(LAW) for the query ?- obtain_place. Students 1, 3, 4, and 5
obtain a place at the school while students 2 and 6 do not. Fig. 1 shows the justification
in natural language for student 1.
• A posteriori Deduction s(LAW) generates justifications not only for positive but also
for negative information, so we can analyze the reason for a specific inference and/or
to determine which are the requirements needed to obtain a specific conclusion. E.g,
the query ?- not force_majeure, obtain_place avoids the assumption of force
majeure and the student 3 would not obtain a place.</p>
      <p>2Available at http://platon.etsii.urjc.es/~jarias/papers/slaw-caepia21.
1 s/he may obtain a school place, because
2 a common requirement is met, because
3 s/he is part of a large family.
4 a specific requirement is met, because
5 s/he has siblings enrolled in the center.
6 there is no evidence that an exception applies, because
7 s/he came from a non-bilingual public school, and
8 s/he wish to study 2nd ESO in the Bilingual Section, and
9 s/he accredit required level of English for 2nd ESO, because
10 in the four skills certificate level b1.</p>
      <p>
        Additionally, we can collect the partial models, in which the school place is or is not obtained,
together with their justification and analyze “Epistemic Specifications” [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], that is, what is
true in all/some models, which partial models share certain assumptions, etc. This reasoning
makes it possible to detect the missing information that would change the decision from “not
obtained” (or “obtained” under some assumptions) to “obtained”.
      </p>
      <p>
        In conclusion, we have shown that using goal-directed answer set programming, s(LAW)
is capable of modeling discretion and ambiguity. The deduction based on s(LAW) allows: the
consideration of diferent conclusions (multiple models) which can be analyzed by humans
thanks to the justification generated in natural language; and the reasoning about the set of these
conclusions/models. We would like to emphasize that explainable AI techniques for black-box
AI tools, most of them based on machine learning, are not able to explain how variation in the
input data changes the resulting decision [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. To the best of our knowledge, s(LAW) is the only
system that exhibits the property of modelling vague concepts.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <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>Modeling Administrative Discretion Using Goal-Directed Answer Set Programming</article-title>
          ,
          <source>in: Advances in Artificial Intelligence, CAEPIA</source>
          <volume>20</volume>
          /21, Springer International Publishing, Cham,
          <year>2021</year>
          , pp.
          <fpage>258</fpage>
          -
          <lpage>267</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -85713-4_
          <fpage>25</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>A. Cerrillo i Martínez</surname>
          </string-name>
          ,
          <article-title>El derecho para una inteligencia artificial centrada en el ser humano y al servicio de las instituciones: Presentación del monográfico</article-title>
          ., IDP: Revista de Internet, Derecho y Politica (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Cobbe</surname>
          </string-name>
          ,
          <article-title>Administrative law and the machines of government: judicial review of automated public-sector decision-making</article-title>
          ,
          <source>Legal Studies</source>
          <volume>39</volume>
          (
          <year>2019</year>
          )
          <fpage>636</fpage>
          -
          <lpage>655</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Solé</surname>
          </string-name>
          ,
          <article-title>Inteligencia artificial, derecho administrativo y reserva de humanidad: algoritmos y procedimiento administrativo debido tecnológico</article-title>
          , Revista general de Derecho administrativo
          <volume>50</volume>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Ramakrishna</surname>
          </string-name>
          , Ł. Górski,
          <string-name>
            <given-names>A.</given-names>
            <surname>Paschke</surname>
          </string-name>
          ,
          <article-title>A dialogue between a lawyer and computer scientist: the evaluation of knowledge transformation from legal text to computer-readable format</article-title>
          ,
          <source>Applied Artificial Intelligence</source>
          <volume>30</volume>
          (
          <year>2016</year>
          )
          <fpage>216</fpage>
          -
          <lpage>232</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Sergot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Sadri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Kowalski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Kriwaczek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hammond</surname>
          </string-name>
          , H. T. Cory,
          <article-title>The british nationality act as a logic program</article-title>
          ,
          <source>Communications of the ACM</source>
          <volume>29</volume>
          (
          <year>1986</year>
          )
          <fpage>370</fpage>
          -
          <lpage>386</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <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>E.</given-names>
            <surname>Salazar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Marple</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Gupta, Constraint Answer Set Programming without Grounding</article-title>
          ,
          <source>Theory and Practice of Logic Programming</source>
          <volume>18</volume>
          (
          <year>2018</year>
          )
          <fpage>337</fpage>
          -
          <lpage>354</lpage>
          . doi:
          <volume>10</volume>
          . 1017/S1471068418000285.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <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>
          ,
          <source>in: Proceedings 36th International Conference on Logic Programming (Technical Communications)</source>
          , volume
          <volume>325</volume>
          <source>of EPTCS</source>
          , Open Publishing Association,
          <year>2020</year>
          , pp.
          <fpage>59</fpage>
          -
          <lpage>72</lpage>
          . doi:
          <volume>10</volume>
          .4204/EPTCS.325.12.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Kowalski</surname>
          </string-name>
          , Logical English = Logic + English + Compupting, https://utdallas.app.box. com/s/ngsyloscj5sk24uh3axexxz451o74z0u,
          <year>2021</year>
          .
          <article-title>HackReason Opening Ceremony</article-title>
          .
          <source>Last accessed 19 April</source>
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          ,
          <article-title>Logic programming and reasoning with incomplete information</article-title>
          ,
          <source>Annals of mathematics and artificial intelligence 12</source>
          (
          <year>1994</year>
          )
          <fpage>89</fpage>
          -
          <lpage>116</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <source>[11] DARPA, Explainable Artificial Intelligence (XAI)</source>
          ,
          <source>Defense Advanced Research Projects Agency</source>
          ,
          <year>2017</year>
          . https://www.darpa.mil/program/explainable-artificial-intelligence.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>