Pre and Post Preferences over Abductive Models Luís Moniz Pereira 1 Gonçalo Lopes 1 Pierangelo...

32
Pre and Post Preferences Pre and Post Preferences over Abductive Models over Abductive Models Luís Moniz Pereira Luís Moniz Pereira 1 Gonçalo Lopes Gonçalo Lopes 1 Pierangelo Dell'Acqua Pierangelo Dell'Acqua 2 1 1 CENTRIA – Universidade Nova de Lisboa, Portug CENTRIA – Universidade Nova de Lisboa, Portug 2 2 ITN – Department of Science and Technology ITN – Department of Science and Technology Linköping University, Sweden Linköping University, Sweden

Transcript of Pre and Post Preferences over Abductive Models Luís Moniz Pereira 1 Gonçalo Lopes 1 Pierangelo...

Pre and Post PreferencesPre and Post Preferencesover Abductive Modelsover Abductive Models

Luís Moniz PereiraLuís Moniz Pereira11 Gonçalo LopesGonçalo Lopes11

Pierangelo Dell'AcquaPierangelo Dell'Acqua22

1 1 CENTRIA – Universidade Nova de Lisboa, PortugalCENTRIA – Universidade Nova de Lisboa, Portugal2 2 ITN – Department of Science and TechnologyITN – Department of Science and Technology Linköping University, SwedenLinköping University, Sweden

BackgroundBackground

● PreferencesPreferences in Logic Programming have mostly in Logic Programming have mostly been focused on:been focused on:

preferences among rules of a theorypreferences among rules of a theory

preferences over theory literalspreferences over theory literals

BackgroundBackground

● AbductionAbduction is a powerful mechanism to account for is a powerful mechanism to account for defeasible reasoning and incomplete knowledge.defeasible reasoning and incomplete knowledge.

● Abductive Logic Programs allow for Abductive Logic Programs allow for

incompletely defined literals.incompletely defined literals.

Each abductive literal (abducible) can be assumed Each abductive literal (abducible) can be assumed either true or false in a 2-valued semantics.either true or false in a 2-valued semantics.

Abductive Logic Programs typically have several Abductive Logic Programs typically have several models that are derived from the abduced literals.models that are derived from the abduced literals.

Enabling Pre and Post PreferencesEnabling Pre and Post Preferences

● Our approach is based on handling preference Our approach is based on handling preference relations between abducibles.relations between abducibles.

● Preferences over abducibles can be enacted both a Preferences over abducibles can be enacted both a priori or a posteriori w.r.t. the model generation:priori or a posteriori w.r.t. the model generation:

a prioria priori: to enact preferences during the computation of : to enact preferences during the computation of the models of a theory.the models of a theory.

a posterioria posteriori: to enact preferences on the computed : to enact preferences on the computed models of a theory.models of a theory.

LanguageLanguage

● A A literalliteral can be either a domain atom can be either a domain atom AA or its default or its default negation negation not Anot A..

● A A rulerule takes the form: takes the form:A A ← L← L

11, ... , L, ... , Ltt (t (t ≥≥ 0) 0)

● An integrity constraints has the form:An integrity constraints has the form: ← ← LL11, ... , L, ... , L

tt (t (t ≥≥ 0) 0)

● Each program is associated with a set of abduciblesEach program is associated with a set of abducibles , , literals which do not occur in any rule head.literals which do not occur in any rule head.

Hypotheses GenerationHypotheses Generation

● Abducibles extend a theory and can be used to provide Abducibles extend a theory and can be used to provide alternative explanations for a given query.alternative explanations for a given query.

● Generating all alternative explanations for a query is a Generating all alternative explanations for a query is a central problem in abduction because of the combinatorial central problem in abduction because of the combinatorial explosion.explosion.

● Generate only those explanations which are Generate only those explanations which are preferredpreferred and and relevantrelevant for the query. for the query.

Enabling the Assumption of AbduciblesEnabling the Assumption of Abducibles

● An abducible is said to be An abducible is said to be consideredconsidered if there is an if there is an expectation for it and there is not an expectation to expectation for it and there is not an expectation to the contrary:the contrary:

consider(A) consider(A) ← expect(A), not expect_not(A)← expect(A), not expect_not(A)

expectexpect and and expect_not expect_not are domain-specific literals are domain-specific literals which encode the preconditions for assuming an which encode the preconditions for assuming an abducible abducible AA..

A Priori PreferencesA Priori Preferences

● To express a priori preferences between abducibles To express a priori preferences between abducibles we employ preference rules which are embedded in we employ preference rules which are embedded in the theory.the theory.

● A A preference rulepreference rule takes the form: takes the form:

a < b a < b ← L← L11, ... , L, ... , L

tt

an abducible an abducible aa is preferred to an abducible is preferred to an abducible bb if the if the body of the rule body of the rule holds.holds.

Example: Claire's DrinkExample: Claire's Drink

● Claire drinks either tea or coffee (but not both). Claire drinks either tea or coffee (but not both). Suppose Claire prefers coffee over tea when sleepy.Suppose Claire prefers coffee over tea when sleepy.

● This situation can be represented as:This situation can be represented as:

expect(tea)expect(tea) drink ← teadrink ← teaexpect(coffee) expect(coffee) drink ← coffeedrink ← coffee

expect_not(coffee) ← blood_pressure_highexpect_not(coffee) ← blood_pressure_high

coffee < tea ← sleepycoffee < tea ← sleepy

Abducible SetsAbducible Sets

● It is often desirable to express a priori preferences It is often desirable to express a priori preferences over sets of abducibles.over sets of abducibles.

● The assumption of abducibles in such sets is The assumption of abducibles in such sets is highly context-dependent and should be embedded highly context-dependent and should be embedded over rules in the theory.over rules in the theory.

● The problem has an analogy to issues addressed by The problem has an analogy to issues addressed by cardinality and weight constraint rules for the cardinality and weight constraint rules for the Stable Model semantics and we can exploit those Stable Model semantics and we can exploit those results.results.

Abducible SetsAbducible Sets

● A A cardinality constraintcardinality constraint takes the form: takes the form:

L { aL { a11, ..., a, ..., a

nn, not b, not b11, ..., not b, ..., not b

mm } U (n, m } U (n, m ≥≥ 0) 0)

L and U are the lower and upper bound on the L and U are the lower and upper bound on the cardinality of literals.cardinality of literals.

● Cardinality constraints can also occur in the heads Cardinality constraints can also occur in the heads of rules, meaning that they are enforced if the of rules, meaning that they are enforced if the body of the rule holds.body of the rule holds.

Example: Claire's MealExample: Claire's Meal

● Claire is deciding what to have for a meal from a Claire is deciding what to have for a meal from a limited buffet. The menu has appetizers, three limited buffet. The menu has appetizers, three main dishes (max 2 per person) and drinks.main dishes (max 2 per person) and drinks.

● This situation can be represented as:This situation can be represented as:

0 { bread, salad, cheese } 3 ← appetizers0 { bread, salad, cheese } 3 ← appetizers1 { fish, meat, veggie } 2 ← main_dishes1 { fish, meat, veggie } 2 ← main_dishes1 { wine, juice, water } 1 ← drinks1 { wine, juice, water } 1 ← drinks

Example: Claire's MealExample: Claire's Meal

● Claire may skip the appetizers unless she's very Claire may skip the appetizers unless she's very hungry.hungry.

2 { appetizers, main_dishes, drinks } 32 { appetizers, main_dishes, drinks } 3

main_dishes < appetizersmain_dishes < appetizersdrinks < appetizersdrinks < appetizersappetizers ← very_hungryappetizers ← very_hungry

● AppetizersAppetizers is the least preferred set and thus is the least preferred set and thus effectively constrains the abduction of abducibles effectively constrains the abduction of abducibles contained in it.contained in it.

SemanticsSemantics

● The declarative semantics is given in terms of Preferred Relevant Abductive Partial Stable Models

- It is a Stable Model based semantics.

● The procedural semantics is based on a syntactic transformation translating a program with preferences into a normal logic program with cardinality constraints.

A Posteriori PreferencesA Posteriori Preferences

● A priori preferences are often insufficient to express final A priori preferences are often insufficient to express final choices.choices.

● Sometime we are able to enact certain choices only after Sometime we are able to enact certain choices only after looking at their consequences.looking at their consequences.

● These consequences are only available These consequences are only available after model after model generation.generation.

● Only after the relevant models are computed we can reason Only after the relevant models are computed we can reason about which consequences, or other features of the model, about which consequences, or other features of the model, are determinant for the final choice, ie the quality of the are determinant for the final choice, ie the quality of the model.model.

Additional Consequences of Additional Consequences of Abductive HypothesesAbductive Hypotheses

● Consider the simple abductive logic program:Consider the simple abductive logic program:c c ← a← a 1 { a, b } 11 { a, b } 1expect(a)expect(a)expect(b)expect(b)

● Two abductive stable models can be derived:Two abductive stable models can be derived:MM11 = { expect(a), expect(b), a, c } = { expect(a), expect(b), a, c }MM22 = { expect(a), expect(b), b } = { expect(a), expect(b), b }

● Suppose that Suppose that c is an “unwanted”c is an “unwanted” literal. literal.Hence, we would like to prefer models without c.Hence, we would like to prefer models without c.

Additional Consequences …Additional Consequences …

● For this particular program we could simply state:For this particular program we could simply state:

b < a ← cb < a ← c

● However, we should add a similar rule for every possible However, we should add a similar rule for every possible combination of abducibles which implies combination of abducibles which implies c.c.

● To express this meta-preference it is convenient to simply To express this meta-preference it is convenient to simply look at the computed models, and prefer a posteriori the look at the computed models, and prefer a posteriori the ones where c is not present.ones where c is not present.

Utility TheoryUtility Theory

● Quantitative decision making mechanisms can be Quantitative decision making mechanisms can be employed a posteriori for enacting the final choice.employed a posteriori for enacting the final choice.

● Simple Methodology:Simple Methodology:

Associate every model with an expected utility value Associate every model with an expected utility value computed upon the hypotheses assumed in the model.computed upon the hypotheses assumed in the model.

Prefer a posteriori by choosing those models with Prefer a posteriori by choosing those models with greater expected utility.greater expected utility.

Example: Claire Goes on Holiday!Example: Claire Goes on Holiday!

● Claire is spending a day on the beach and must Claire is spending a day on the beach and must decide what means of transportation to adopt:decide what means of transportation to adopt: Car is faster, but there may be traffic jamCar is faster, but there may be traffic jam Train takes a lot of time, but it is more environmentally Train takes a lot of time, but it is more environmentally

friendlyfriendly Bus, but it is really a pain..Bus, but it is really a pain..

● There are several utility factors for Claire in this There are several utility factors for Claire in this situation: getting to the beach fast, the level of situation: getting to the beach fast, the level of comfort, being more environmentally friendly, etc.comfort, being more environmentally friendly, etc.

Example: Claire's Holiday, never by busExample: Claire's Holiday, never by bus● Consider the abductive logic program:Consider the abductive logic program:

go_to(beach) go_to(beach) ← car← car expect(car)expect(car)go_to(beach) ← traingo_to(beach) ← train expect(train)expect(train)go_to(beach) ← busgo_to(beach) ← bus expect(bus)expect(bus)1 { car, train, bus } 11 { car, train, bus } 1 hothot

prob(traffic_jam, 0.7) ← hotprob(traffic_jam, 0.7) ← hot car < buscar < busprob(⌐traffic_jam, 0.3) ← hotprob(⌐traffic_jam, 0.3) ← hot train < bustrain < bus

utility(comfort, 10)utility(comfort, 10)utility(stuck_in_traffic, -8)utility(stuck_in_traffic, -8)utility(wasting_time, -4)utility(wasting_time, -4)utility(environment_friend, 3)utility(environment_friend, 3)

Example: Claire's HolidayExample: Claire's Holiday

● For each scenario compute the expected utility:For each scenario compute the expected utility:

Car scenarioCar scenario

Exp.Utility = Ut.Comfort * Prob(⌐Traffic Jam) + Ut. Stuck Exp.Utility = Ut.Comfort * Prob(⌐Traffic Jam) + Ut. Stuck in Traffic * Prob(Traffic Jam) = 10 * 0.3 + 0.7 * -8 = -2.6in Traffic * Prob(Traffic Jam) = 10 * 0.3 + 0.7 * -8 = -2.6

Train scenarioTrain scenario

Exp. Utility = Ut. Wasting Time + Ut. Environment Exp. Utility = Ut. Wasting Time + Ut. Environment Friendly = -4 + 3 = -1Friendly = -4 + 3 = -1

OraclesOracles

● When faced with several hypotheses for which we When faced with several hypotheses for which we cannot prefer (neither a priori nor a posteriori), cannot prefer (neither a priori nor a posteriori), then additional information can be acquired.then additional information can be acquired.

● This can be done by:This can be done by:- by performing an experiment or- by performing an experiment or- by asking an external system, oracle- by asking an external system, oracle

● Information provided by the oracle has to be Information provided by the oracle has to be incorporated in the abductive logic program and a incorporated in the abductive logic program and a new reasoning cycle must be performed.new reasoning cycle must be performed.

OraclesOracles

● This process can be iterated as many times as This process can be iterated as many times as necessary to yield a final choice.necessary to yield a final choice.

● A possible termination condition is reaching a A possible termination condition is reaching a fixed point:fixed point:- there are no further experiments to perform and- there are no further experiments to perform and- the additional information doesn't change the - the additional information doesn't change the scenaria obtained in the previous step.scenaria obtained in the previous step.

Example: Medical DiagnosisExample: Medical Diagnosis

● A patient shows up at the dentist with signs of pain A patient shows up at the dentist with signs of pain upon teeth percussion. The expected causes for the upon teeth percussion. The expected causes for the observed signs are:observed signs are:

Periapical lesionPeriapical lesion Horizontal Fracture of the root and/or crownHorizontal Fracture of the root and/or crown Vertical Fracture of the root and/or crownVertical Fracture of the root and/or crown

● Producing a diagnosis is deriving abductive Producing a diagnosis is deriving abductive hypotheses to explain the query percussion_pain.hypotheses to explain the query percussion_pain.

Example: Medical DiagnosisExample: Medical Diagnosis

● A medical knowledge base can point to these A medical knowledge base can point to these diagnoses, and also to additional consequences diagnoses, and also to additional consequences expected by assuming each of the scenaria:expected by assuming each of the scenaria:

percussion_pain percussion_pain ←← periapical_lesion periapical_lesion percussion_pain percussion_pain ←← fracture fracture fracture fracture ←← horizontal_fracture horizontal_fracture fracture fracture ← ← vertical_fracturevertical_fracture

radiolucency radiolucency ← ← periapical_lesionperiapical_lesion tooth_mobility tooth_mobility ←← horizontal_fracture horizontal_fracture elliptic_fracture_trace elliptic_fracture_trace ←← horizontal_fracture horizontal_fracture decompression_pain decompression_pain ←← vertical_fracture vertical_fracture

Example: Medical DiagnosisExample: Medical Diagnosis

● The literals periapical_lesion, horizontal_fracture The literals periapical_lesion, horizontal_fracture and vertical_fracture are abducibles.and vertical_fracture are abducibles.

● There are three possible explanatory scenaria for There are three possible explanatory scenaria for percussion_pain.percussion_pain.

● We can attempt to disprove/confirm some of the We can attempt to disprove/confirm some of the hypotheses by performing experiments on the hypotheses by performing experiments on the expected consequences of each scenaria.expected consequences of each scenaria.

Example: Medical DiagnosisExample: Medical Diagnosis

● The experiments and their results are derived from The experiments and their results are derived from a secondary reasoning process over a knowledge a secondary reasoning process over a knowledge base of experiments (example):base of experiments (example):

expect(xray) expect(xray) ←← possible(radiolucency) possible(radiolucency)expect(xray) expect(xray) ←← possible(elliptic_fracture_trace) possible(elliptic_fracture_trace)expect_not(xray) expect_not(xray) ←← radiotherapy_patient radiotherapy_patient

● Expected consequences of each abducible Expected consequences of each abducible scenaria are asserted as possibilities in this scenaria are asserted as possibilities in this knowledge base.knowledge base.

Example: Medical DiagnosisExample: Medical Diagnosis

● The choice of what experiment to perform can be The choice of what experiment to perform can be realized by an abductive process, in which the realized by an abductive process, in which the experiments are now the abducibles.experiments are now the abducibles.

● In this way it is possible to declaratively specify In this way it is possible to declaratively specify preferences between possible experiments (e.g. preferences between possible experiments (e.g. attending to the patient's comfort, economic attending to the patient's comfort, economic possibilities, etc.)possibilities, etc.)

● After choosing which oracle to consult, the After choosing which oracle to consult, the experiment is performed.experiment is performed.

Example: Medical DiagnosisExample: Medical Diagnosis

● Confirming or disconfirming an expected Confirming or disconfirming an expected consequence can introduce new constraints in the consequence can introduce new constraints in the knowledge base, for instance, the constraint:knowledge base, for instance, the constraint:

← ← tooth_mobilitytooth_mobility

can be derived after confirmation that the tooth can be derived after confirmation that the tooth has no mobility.has no mobility.

● These new constraints will possibly change the These new constraints will possibly change the scenaria which were derived previously.scenaria which were derived previously.

ImplementationImplementation

● The proposed framework has been implemented in The proposed framework has been implemented in a combination of XSB Prolog with Smodels.a combination of XSB Prolog with Smodels.

● The top-down query driven Prolog complements The top-down query driven Prolog complements the bottom-up model computation of the Stable the bottom-up model computation of the Stable Models semantics.Models semantics.

● We can compute preferred, relevant partial stable We can compute preferred, relevant partial stable models, which in practice means we drastically models, which in practice means we drastically prune the combinatorial explosion of abducibles.prune the combinatorial explosion of abducibles.

ConclusionsConclusions

● A priori and a posteriori preference handling are A priori and a posteriori preference handling are complementary choice mechanisms that can be complementary choice mechanisms that can be easily combined.easily combined.

● A posteriori preferences enable more flexible A posteriori preferences enable more flexible meta-reasoning and the combination with other meta-reasoning and the combination with other approaches for decision making (e.g. Utility approaches for decision making (e.g. Utility Theory).Theory).

ConclusionsConclusions

● Hybrid implementations combining top-down and Hybrid implementations combining top-down and bottom-up reasoning mechanisms can account for bottom-up reasoning mechanisms can account for interesting additional properties (efficiency-wise).interesting additional properties (efficiency-wise).

● Other complementary work:Other complementary work: Belief revision over preference rules (how to deal with Belief revision over preference rules (how to deal with

contradictory preferences)contradictory preferences) Prospective logic programmingProspective logic programming