Causal Modelling and Probabilistic Causation in ... - Google Sites

1 downloads 161 Views 604KB Size Report
... freely available at: http://xsb.sourceforge.net and http://www.tcs.hut.fi/Software/smodels .... pected to be a suspe
CENTRIA Departamento de Informática Faculdade de Ciências e Tecnologia Universidade Nova de Lisboa

Causal Modelling and Probabilistic Causation in Acorda European Master's Program in Computational Logic (EMCL) Project Report

Carroline Dewi Puspa Kencana Ramli

author

Prof. Luís Moniz Pereira

advisor

Lisbon

19th October 2008

Causal Modelling and Probabilistic Causation in Acorda

European Master's Program in Computational Logic (EMCL) Project Report

Carroline Dewi Puspa Kencana Ramli

CENTRIA Departamento de Informática Faculdade de Ciências e Tecnologia Universidade Nova de Lisboa

Prof. Luís Moniz Pereira

Lisbon, 19th October 2008

Abstract Basically, humans reason based on cases and eect in combination with probabilistic information. Cause and eect itself is not enough to draw conclusion due to the problem of imperfect regulaties. The probabilistic theorem of causation can help solve these problems. The resulting theory is called causal Bayes nets. Translating human reasoning using the theory described previously to a computational framework is possible using logic programming. Thus, in this work we henceforth adopt a logic programming framework and methodology to model our functional description of causal models and Bayes Nets, building on its many strengths and advantages to derive both a consistent denition of its semantics and a working implementation with which to conduct relevant experiments. Acorda is a prospective logic programming language which simulates humans brain reason multiple steps into the future.

Acorda itself if not

equipped to deal with either utility functions or probabilistic theory.

On

another hand, P-log is a declarative logic programming language that can be used to reason with probabilistic models.

Combining with P-log, now

Acorda is ready to deal with uncertain problems that we face on a daily basis. In this project, we will show how the integration between Acorda and P-log works, and later we present several daily life examples that Acorda can help people to reason about.

Keywords:

P-log, Acorda, Prospective Logic Programming, Human Rea-

soning, Causal Models, Bayes Networks

3

Acknowledgement I would like to say thank my supervisor Prof.

Luís Moniz Pereira for his

patience during our discussions. He gave me a lot of advice in both academic and non-academic life . I'm also very grateful to Martin Slota for his help in the discussion, revising and editing the report. My thanks goes to Gonçalo Lopes for his help with xing Acorda and giving more detailed explanations in Acorda. I'm indebted to Han The Anh for the discussion about P-log and to Michael Gelfond and Weijin Zhu for the discussion and bug xing of the original P-log. Many thanks go also to secretariat personnel: Mrs Sandra, Mrs Filipa, Mrs Anabella for their supporting during my study.

To my fellow EMCL

classmates Mishiko, Rasha, Clemens, João, Luca and Anh I would like to thank for the nice time we had together during our study. Last but denitely not least, I would like to thank my parents and my brother for spiritual support. My study is supported by the Erasmus Mundus Scholarship.

4

Contents 1 Introduction

6

1.1

Causal Models of Human Reasoning

. . . . . . . . . . . . . .

6

1.2

Logic Programming . . . . . . . . . . . . . . . . . . . . . . . .

7

2 Background

9

2.1

Prospective Logic Programming . . . . . . . . . . . . . . . . .

9

2.2

P-log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

2.3

2.2.1

Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

2.2.2

Semantics . . . . . . . . . . . . . . . . . . . . . . . . .

16

XSB-XASP Interface . . . . . . . . . . . . . . . . . . . . . . .

21

3 Implementation

23

3.1

Implementation of Prospective Logic Programming . . . . . .

23

3.2

Implementation of P-log . . . . . . . . . . . . . . . . . . . . .

24

3.3

Integration of Prospective Logic Programming with P-log

. .

26

. . . . . . . . . . . . . . . . . . . . . . . . .

26

3.3.1

Overview

3.3.2

Expected Abducibles . . . . . . . . . . . . . . . . . . .

26

3.3.3

Utility Function . . . . . . . . . . . . . . . . . . . . . .

29

3.3.4

A Priori Preference . . . . . . . . . . . . . . . . . . . .

30

3.3.5

A Posteriori Preference . . . . . . . . . . . . . . . . . .

32

3.3.6

Multiple-step Prospection

36

. . . . . . . . . . . . . . . .

4 Futher Examples

42

4.1

Risk Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.2

Counterfactual

. . . . . . . . . . . . . . . . . . . . . . . . . .

46

4.3

Law Application

. . . . . . . . . . . . . . . . . . . . . . . . .

48

4.3.1

Jury Observation Fallacy

. . . . . . . . . . . . . . . .

5 Conclusion and Future Work

49

54

5.1

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

5.2

Future Work

55

. . . . . . . . . . . . . . . . . . . . . . . . . . .

Bibliography

56

5

Chapter 1

Introduction Studying how human brain works [1] is one of the most astonishing areas of research. It draws from studies of intelligence by psychologists, but even more from ethology, evolutionary biology, linguistics, and the neurosciences [2, 3, 4, 5, 6].

The computational aspects of human brain are one of the

attractive research areas of computer science. Nowadays, a lot of research in the Articial Intelligence (AI) community tries to mimic how humans reason.

1.1

Causal Models of Human Reasoning

Basically humans reason based on cause and eect. David Hume described causes as objects regularly followed by their eects [7] We may dene a cause to be an object, followed by another, and where all the objects similar to the rst, are followed by objects similar to the second. Hume attempted to analyse causation in terms of invariable patterns of succession that are referred to as regularity theories of causation. There are a number of well-known diculties with regularity theories, and these may be used to motivate probabilistic approaches to causation. The dicult part in regularity theories is that most causes are not invariably followed by their eects. For example, it's widely acceptable that smoking is a cause of lung cancer, but not all smokers have lung cancer. By contrast, the central idea behind probabilistic theories of causation is that causes raise the probability of their eects; an eect may still occur in the absence of a cause or fail to occur in its presence. The probabilistic theorem of causation helps in dening a pattern in problems with imperfect regularities [8]. If

A

causes

B,

then, typically,

B

will not also cause

A.

Smoking causes

lung cancer, but lung cancer does not cause someone to smoke.

6

In other

words, causation is usually asymmetric, cause and eect can not be commuted. In addition, the asymmetry of causal relation is unrelated with the asymmetry of causal implication and its contraposition [9]. For example, if

A

stands for the statement Peter smokes and

Peter has lung cancer, then

¬B

doesn't imply

A

implies

B

B

stands for the statement

(smoking causes lung cancer) but

¬A (the absence of lung cancer doesn't cause Peter not to

smoke). This may pose a problem for regularity theories. It would be nice if a theory of causation could provide some explanation of the directionality of causation, rather than merely stipulate it [10]. For a few decades, statisticians, computer scientists and philosophers have worked on developing a theory about how to represent causal relations and how causal claims connect with probabilities.

Those representations

show how information about some features of the world may be used to compute probabilities for other features, how partial causal knowledge may be used to compute the eects of actions and how causal relations can be reliably learned, at least by computers. The resulting theory is called Causal Bayes Nets.

1.2

Logic Programming

Translation of human reasoning using causal models and Bayes Nets described previously into a computational framework would be possible using logic programming. The main argument is that humans reason using logic. Logic itself can be implemented on top of a symbol processing system like a computer. On the other hand, there is an obvious human capacity for understanding logic reasoning, one that might even be said to have developed throughout our evolution. Its most powerful expression today is science itself, and the knowledge amassed from numerous disciplines, each with its own logic. From state laws to quantum physics, logic has become the foundation on which human knowledge is built and improved. A part of the Articial Intelligence community has struggled, for some time now, to turn logic into an eective programming language, allowing it to be used as a system and application specication language which is not only executable, but on top of which one can demonstrate properties and proofs of correctness that validate the very self-describing programs which are produced. At the same time, AI has developed logic beyond the connes of monotonic cumulativity and into the non-monotonic realms that are typical of the real world of incomplete, contradictory, arguable, revised, distributed and evolving knowledge.

Over the years, enormous amount of

work and results have been achieved on separate topics in logic programming (LP), language semantics, revision, preferences, and evolving programs with updates[11, 12, 13]. Computational logic has shown itself capable to evolve and meet the demands of the dicult descriptions it is trying to address.

7

Thus, in this work we henceforth adopt a logic programming framework and methodology to model our functional description of causal models and Bayes Nets, building on its many strengths and advantages to derive both a consistent denition of its semantics and a working implementation with which to conduct relevant experiments. The use of the logic paradigm also allows us to present the discussion of our system at a suciently high level of abstraction and generality to allow for productive interdisciplinary discussions both about its specication and the derived properties.

The language of logic is universally used by both

natural sciences and humanities, and more generally at the core of any source of human derived knowledge, so it provides us with a common ground on which to reason about our theory.

Since the eld of cognitive science is

essentially a joint eort on the part of many dierent kinds of knowledge elds, we believe such language and vocabulary unication eorts are not only useful but mandatory.

8

Chapter 2

Background 2.1

Prospective Logic Programming

Modelling programs that mimic how human brain works and which are capable of non-deterministic self-evolution through self-updating is not so difcult. This possibility is already at hand, since there are working implementations of a logic programming language which was specically designed to model such program evolutions. EVOLP[13] is a non-deterministic LP language, having a well-dened semantics that accounts for self-updates, and we intend to use it to model autonomous agents capable of evolving by making proactive commitments concerning their imagined prospective futures. Such futures can also be prospections of actions, either from the outside environment or originating in the agent itself. This implies the existence of partial internal and external models, which can already be modelled and codied with logic programming. As we now have the real possibility of modelling programs that are capable of non-deterministic self-evolution, through selfupdating, we are confronted with the problem of having several dierent possible futures for a single starting program. It is desirable that such a system be able to somehow look ahead into such possible futures to determine the best paths of evolution from its present, at any moment. Now, we are confronted with the problem of having several dierent possible futures for a single starting program. It is desirable that such a system be able to somehow look ahead into such possible futures to determine the best paths of evolution from its present, at any moment. Prospective logic programming enables an evolving program to look ahead prospectively into its possible future states and to prefer amongst them to satisfy goals [14]. This paradigm is particularly benecial to the agents community, since it can be used to predict an agent's future by employing the methodologies from abductive logic programming [15, 16] in order to synthesize and maintain abductive hypotheses. Prospective logic programming is an instance of an architecture for causal

9

models, which implies a notion of simulation causes and eects in order to solve the choice problem for the alternative futures.

This entails that the

program is capable of conjuring up hypothetical what-if scenaria and formulating abductive explanations for both external and internal observations. Since we have multiple possible scenaria to choose from, we need some form of preference specication, which can be either a priori or a posteriori. A priori preferences are embedded in the program's own knowledge representation theory and can be used to produce the most relevant hypothetical abductions for a given state and observations, in order to conjecture possible future states. A posteriori preferences represent choice mechanisms, which enable the program to commit to one of the hypothetical scenaria engendered by the relevant abductive theories. These mechanisms may trigger additional simulations, by means of the functional connectivity, in order to posit which new information to acquire, so more informed choices can be enacted, in particular by restricting and committing to some of the abductive explanations along the way. Acorda

1 is a system that implements prospective logic programming and

is based on the above architecture. Acorda is implemented based on the implementation of EVOLP [13] and is further developed on top of XSB Prolog. In order to compute abductive stable models [11], Acorda also benets from the XSB-XASP interface to Smodels.

Language Let

L

be a rst order language. A domain literal in

L

is a domain atom A

or its default negation not A, the latter expressing that the atom is false by default (CWA). A domain rule in

L

is a rule of the form:

A ← L1 , . . . , Lt (t ≥ 0) where A is a domain atom and constraint in

L

L1 , . . . , Lt

are domain literals. An integrity

is a rule of the form:

⊥ ← L1 , . . . , Lt (t < 0) where

⊥ is a domain atom denoting falsity, and L1 , . . . , Lt are domain literals. P over L is a set of domain rules and integrity con-

A (logic) program

straints, standing for all their ground instances.

Abducibles Every program

P

is associated with a set of abducibles

A ⊆ L.

Abducibles

can be seen as hypotheses that provide hypothetical solutions or possible

1

Acorda implementation can be downloaded in

http://centria.di.fct.unl.pt/~lmp/publications/talks.html 10

explanations of given queries. An abducible

A

can be assumed only if it is a

considered one, i.e. it is expected in the given situation, and moreover there is no expectation to the contrary [11].

consider(A) ← expect(A), not expect_not(A) The rules about expectations are domain-specic knowledge contained in the theory of the program, and eectively constrain the hypotheses which are available.

Preferring Abducibles To express preference criteria amongst abducibles, we introduce the language

L∗ . A relevance atom is one of the form a / b, where a and b are abducibles. a / b means that the abducible a is more relevant than the abducible b. A relevance rule is one of the form:

a / b ← L1 , . . . , Lt (t ≥ 0) where

a/b

is a relevance atom and every

or a relevance literal. Let

L∗

Li (1 ≤ i ≤ t)

is a domain literal

be a language consisting of domain rules and

relevance rules.

Example 2.1

(Tea 1)

.

Consider a situation where an agent Claire drinks

either tea or coee (but not both). She does not expect to have coee if she has high blood pressure. Also suppose that Claire prefers coee over tea when she is sleepy. This situation can be represented by a program set of abducibles

Q

over

L

with

AQ = {tea, cof f ee}:

falsum

Suggest Documents