<!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>These authors contributed equally.
$ kilian.rueckschloss@lmu.de (K. Rückschloß); felix.weitkaemper@lmu.de (F. Weitkämper)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>On the Subtlety of Causal Reasoning in Probabilistic Logic Programming: A Bug Report about the Causal Interpretation of Annotated Disjunctions</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kilian Rückschloß</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Felix Weitkämper</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ludwig-Maximilians-Universität München Institut für Informatik Oettingenstraße 67 D-80538 München</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>In this work in progress, we give an example for a logic program with annotated disjunctions where the do-operator does not behave as intended. In particular, we see that the mutual exclusivity of heads in an annotated disjunction is not preserved after intervention.</p>
      </abstract>
      <kwd-group>
        <kwd>In this contribution</kwd>
        <kwd>we study the causal semantics of the LPAD-language [1]</kwd>
        <kwd>Assume for instance that we throw a die if we decide to play</kwd>
        <kwd>denoted</kwd>
        <kwd>In this case</kwd>
        <kwd>we throw</kwd>
        <kwd>1</kwd>
        <kwd>ℎ</kwd>
        <kwd />
        <kwd>or  each with a probability of</kwd>
        <kwd>This scenario can now be modelled 6 with the LPAD-clause</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>1
6
;  :
;  :
; ℎ :
;   :
;   :
.</p>
      <p>
        (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
To establish a causal semantics for LPAD-programs we rely on the functional causal model
semantics or FCM-semantics [2] for ProbLog programs and use the fact that the languages
ProbLog and LPAD are expressively equivalent [3, §2.4]. Generally, the FCM-semantics
associates to each (acyclic) ProbLog program a system of Boolean equations that is uniquely solvable
in terms of some independent predefined random variables, i.e. a functional causal model in the
sense of Pearl [4].
      </p>
      <p>To illustrate this, we consider a road, which passes along a field with a sprinkler in it. It
is spring or summer, denoted __ with a probability of  1 := 0.5. The sprinkler is
switched on, written , by a weather sensor with probability  2 := 0.7 in spring or
summer. Moreover, it rains, denoted by , with probability  3 := 0.1 in spring or summer
and with probability  4 := 0.6 in fall or winter. If it rains or the sprinkler is on, the pavement
of the road gets wet, denoted by . And in the case where the pavement is wet we observe
that the road is slippery, denoted by .</p>
      <p>
        To model this situation we generate mutually independent Boolean random variables 1-4
with  () =   for all 1 ≤  ≤ 4. The described mechanism is then represented by the following
system of equations:
__ := 1
 := __ ∧ 2
 := (__ ∧ 3) ∨ (¬__ ∧ 4)
 := ( ∨ )
 := 
Furthermore, the FCM-semantics identifies the System of Equations (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) with the following
ProbLog program.
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
0.5 :: __
0.7 ::  ← __
0.1 ::  ← __
      </p>
      <p>__
0.6 ::  ← ¬
 ← 
 ← 
 ← 
Using the FCM-semantics, we can now transfer Pearl’s causal reasoning [4] to probabilistic logic
programming. This enables us to evaluate queries about the efect of external interventions [ 2]
and about counterfactuals [5]. In this contribution, we focus on modeling external interventions.</p>
      <p>What happens in Model 2 if we switch the sprinkler on/of?</p>
      <p>
        As switching the sprinkler on/of basically means that nothing changes but the fact that
 is set to / , we can model this action by replacing the equation for 
by  := / . This can be modelled in Program (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) by erasing the clause
0.7 ::  ← __ and adding the fact  ← in case we switched the
sprinkler on.
      </p>
      <p>Generally, intervening on a proposition  in a propositional ProbLog program P is done by
erasing all clauses defining  and adding the fact  ← in the case where  is set to true.</p>
      <p>
        However, remember that we were initially interested in the LPAD-language. As already
mentioned earlier to define a semantics for a LPAD-program P, for each proposition  we
introduce an auxiliary proposition  and transform it to an equivalent ProbLog program
according to Riguzzi [3, §2.4]. In our example, we transform the Program (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) to the following
ProbLog program.
      </p>
      <p>1
6
 ←
1 :: 
5
 ←
1
4
ℎ ←
1
3
  ←
1
2
  ←
1 :: 
 ←
ℎ</p>
      <p>←</p>
      <p>←

::  ←
1
6
 ←
1 :: 
5
 ←
1
4
ℎ ←
1
3
  ←
1
2
  ←
1 :: 
 ←
ℎ</p>
      <p>←

:: ℎ ←</p>
      <p>, ¬ , ¬
::   ←</p>
      <p>, ¬ , ¬ , ¬ℎ
::   ←</p>
      <p>, ¬ , ¬ , ¬ℎ , ¬ 
, ¬ , ¬ , ¬ℎ , ¬  ,  

, ¬

, ¬
Further, assume we “play” and just turn over the die to show the number four, i.e. we intervene
in our model and force the dice to show  . As already discussed, this results in the following
ProbLog program.</p>
      <p>:: ℎ ←</p>
      <p>, ¬ , ¬
::   ←</p>
      <p>, ¬ , ¬ , ¬ℎ
::   ←</p>
      <p>
        , ¬ , ¬ , ¬ℎ , ¬ 
, ¬ , ¬ , ¬ℎ , ¬  ,  
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
Querying the Program (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) for the probability of  should now yield the probability
 (| do( )) of the die showing one if we force it to show four. As a die normally
cannot show two numbers at the same time we expect  (| do( )) to be zero; however,
1
evaluating (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) yields  (| do( )) = .
      </p>
      <p>6</p>
      <p>It is worth mentioning that CP-logic [6] is another causal semantics for LPAD-programs,
which also supports queries about the efect of external interventions. Moreover, the reasoning
about external interventions provided by CP-logic is implemented in cplint [7]. However, we
showed in Kiesel et al. [5] that evaluating counterfactal queries in CP-logic is the same as
translating a LPAD-program P into its associated ProbLog program and evaluating the query
there under the FCM-semantics. As determining the efect of external interventions is a special
1</p>
      <p>if we
6
case of counterfactual reasoning [4], we obtain the same result  (| do( )) =
had evaluated the query under CP-logic.</p>
      <p>
        In particular, let us encode a modified version of Program (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) into the following cplint program.
:- use_module(library(pita)).
:- use_rendering(graphviz).
:- pita.
:- begin_lpad.
:- action d/1.
d(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):1/6; d(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ):1/6; d(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ):1/6; d(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ):1/6; d(
        <xref ref-type="bibr" rid="ref5">5</xref>
        ):1/6;d(
        <xref ref-type="bibr" rid="ref6">6</xref>
        ):1/6.
:- end_lpad.
      </p>
      <p>
        Here, () means that the die shows the number . As expected, we also obtain the wrong result
when querying for the probability that the dice shows one if we force it to show four.
?- prob(d(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ),do(d(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )),P).
      </p>
      <p>
        P = 0.16666666666666666
Discussion
The previous discussion reveals that the information about the mutually exclusiveness of the
events , , ℎ,  ,   and  encoded by the annotated disjunction (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) is lost by
intervening in the corresponding ProbLog program (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ). In particular, the post-interventional
program (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) makes no statement to exclude the possible worlds in which the dice shows both
four and one.
      </p>
      <p>
        In logic programming, one would fix this issue by adding an integrity constraint to the
Program (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) that encodes that the events , , ℎ,  ,   and  exclude each other.
However, in ProbLog, adding such an integrity constraint is equivalent to an observation [8].
This means we would not query the modiefid ProbLog Program (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) for the probability of  but
for the marginal probability of  given that we observe the mutual exclusiveness of all events
at hand. Hence, we expect that observing the mutual exclusiveness of the atoms occurring in
an annotated disjunction would resolve our bug in some cases.
      </p>
      <p>
        However, if we reconsider the situation modelled in Program (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) and assume a sensor
guarantees that the sprinkler is of if it rains, this could result in the following LPAD-program.
__ : 0.5
 : 0.6 ← ¬
 : 0.1;  : 0.7 ←
__
__
 ←
 ←
 ←
In this case, switching the sprinkler on does not avoid raining. Hence, it now makes sense that
the mutual exclusiveness of an annotated disjunction is destroyed by an intervention.
      </p>
      <p>Therefore, we think that a correct causal interpretation of annotated disjunctions requires to
operators to express the “Or” in head of a LPAD-clause. One operator for which the mutual
exclusivity pertains under an intervention and one for which it does not. Finally, one then
needs to find the right notion of intervention for either operators in the LPAD language.
Acknowledgements
The research leading to this publication was supported by LMUexcellent, funded by the Federal
Ministry of Education and Research (BMBF) and the Free State of Bavaria under the Excellence
Strategy of the Federal Government and the Länder.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Vennekens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Verbaeten</surname>
          </string-name>
          , M. Bruynooghe,
          <article-title>Logic programs with annotated disjunctions</article-title>
          ,
          <source>in: Logic Programming</source>
          , Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2004</year>
          , pp.
          <fpage>431</fpage>
          -
          <lpage>445</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>540</fpage>
          -27775-0_
          <fpage>30</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>K.</given-names>
            <surname>Rückschloß</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Weitkämper</surname>
          </string-name>
          ,
          <article-title>Exploiting the full power of pearl's causality in probabilistic logic programming</article-title>
          ,
          <source>in: Proceedings of the International Conference on Logic Programming</source>
          <year>2022</year>
          <article-title>Workshops co-located with the 38th International Conference on Logic Programming (ICLP</article-title>
          <year>2022</year>
          ), Haifa, Israel,
          <source>July 31st - August 1st</source>
          ,
          <year>2022</year>
          , volume
          <volume>3193</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2022</year>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>3193</volume>
          /paper1PLP.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Riguzzi</surname>
          </string-name>
          ,
          <article-title>Foundations of Probabilistic Logic Programming: Languages, Semantics, Inference and Learning</article-title>
          , River Publishers,
          <year>2022</year>
          . doi:
          <volume>10</volume>
          .1017/9781108770750.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pearl</surname>
          </string-name>
          , Causality, 2 ed., Cambridge University Press, Cambridge, UK,
          <year>2000</year>
          . doi:
          <volume>10</volume>
          .1017/ CBO9780511803161.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Kiesel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Rückschloß</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Weitkämper</surname>
          </string-name>
          , “
          <article-title>What if?” in probabilistic logic programming</article-title>
          ,
          <source>Accepted for TPLP Proceedings of ICLP</source>
          (
          <year>2023</year>
          ). URL: https://arxiv.org/abs/2305.15318.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Vennekens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Denecker</surname>
          </string-name>
          , M. Bruynooghe,
          <article-title>CP-logic: A language of causal probabilistic events and its relation to logic programming</article-title>
          ,
          <source>Theory and Practice of Logic Programming</source>
          <volume>9</volume>
          (
          <year>2009</year>
          )
          <fpage>245</fpage>
          -
          <lpage>308</lpage>
          . doi:
          <volume>10</volume>
          .1017/S1471068409003767.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>F.</given-names>
            <surname>Riguzzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Cota</surname>
          </string-name>
          , E. Bellodi,
          <string-name>
            <given-names>R.</given-names>
            <surname>Zese</surname>
          </string-name>
          , Causal inference in cplint,
          <source>International Journal of Approximate Reasoning</source>
          <volume>91</volume>
          (
          <year>2017</year>
          )
          <fpage>216</fpage>
          -
          <lpage>232</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.ijar.
          <year>2017</year>
          .
          <volume>09</volume>
          .007.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Fierens</surname>
          </string-name>
          , G. Van den Broeck, M. Bruynooghe, L. De Raedt,
          <article-title>Constraints for probabilistic logic programming</article-title>
          , in: D.
          <string-name>
            <surname>Roy</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Mansinghka</surname>
          </string-name>
          , N. Goodman (Eds.),
          <source>Proceedings of the NIPS Probabilistic Programming Workshop„ 2012. doi:10.1145/377978</source>
          .377983.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>