14
Vu Pham Causal Analysis of Probabilistic Counterexamples 1 Hichem Debbi [email protected] University of M’Sila Causal Analysis of Probabilistic Counterexamples Mustapha Bourahla [email protected] Hichem Debbi

Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Causal Analysis of

Probabilistic Counterexamples

1

Hichem Debbi [email protected]

University of M’Sila

Causal Analysis of Probabilistic Counterexamples

Mustapha Bourahla [email protected]

Hichem Debbi

Page 2: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Motivation

ARIOUA Abdallah

Inevitable complementary task to counterexample generation

Error location is the most difficult part of debugging [Vesey]

Counterexample Analysis

Multiple Paths

Probabilistic Nature

Challenges for Analysing Probabilistic Counterexamples

2

To answer the question:

Why is the probability threshold violated ?

Debugging Probabilistic Models

Hichem Debbi Causal Analysis of Probabilistic Counterexamples

Page 3: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Computation Tree Logic

ARIOUA Abdallah

PCTL Logic

PCTL Property Satisfaction

State Formula

Path Formula

PCTL is an extension of CTL for specifying probabilistic properties

3 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

~ ∈ {<,≤,>,≥}

Page 4: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Counterexamples

4

A counterexample C for 𝑷≤𝑝 𝞅 is a set of finite paths with

Pr( ) 0.01C 0.01( )or errP F

Probabilistic Counterexample

Pr( )C p

𝑠 ⊭

Hichem Debbi Causal Analysis of Probabilistic Counterexamples

Page 5: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Counterexamples

ARIOUA Abdallah

{b,e}

5 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

𝒔𝟎

𝒔𝟏 𝒔𝟓 𝒔𝟒

𝒔𝟑 𝒔𝟐 {a} {c,d} 0.5

0.25

0.25

0.4

0.6

0.3

0.5 0.2

{a, b}

{c,d} {c,d}

𝑃 𝐶𝑋2 = 𝑃 𝑠0𝑠1, 𝑠0𝑠2𝑠3, 𝑠0𝑠2𝑠4𝑠3, 𝑠0𝑠2𝑠4𝑠5,𝑠0𝑠4𝑠5 = 0.25 + 0.2 + 0.09 + 0.15 + 0.12 = 𝟎. 𝟖𝟏

Page 6: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Counterexamples

ARIOUA Abdallah

{b,e}

6 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

𝒔𝟎

𝒔𝟏 𝒔𝟓 𝒔𝟒

𝒔𝟑 𝒔𝟐 {a} {c,d} 0.5

0.25

0.25

0.4

0.6

0.3

0.5 0.2

{a, b}

{c,d} {c,d}

MINIMAL

𝑃 𝐶𝑋2 = 𝑃 𝑠0𝑠1, 𝑠0𝑠2𝑠3, 𝑠0𝑠2𝑠4𝑠3, 𝑠0𝑠2𝑠4𝑠5,𝑠0𝑠4𝑠5 = 0.25 + 0.2 + 0.09 + 0.15 + 0.12 = 𝟎. 𝟓𝟐

Page 7: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Counterexamples

ARIOUA Abdallah

{b,e}

7 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

𝒔𝟎

𝒔𝟏 𝒔𝟓 𝒔𝟒

𝒔𝟑 𝒔𝟐 {a} {c,d} 0.5

0.25

0.25

0.4

0.6

0.3

0.5 0.2

{a, b}

{c,d} {c,d}

Most Indicative

𝑃 𝐶𝑋2 = 𝑃 𝑠0𝑠1, 𝑠0𝑠2𝑠3, 𝑠0𝑠2𝑠4𝑠3, 𝑠0𝑠2𝑠4𝑠5,𝑠0𝑠4𝑠5 = 0.25 + 0.2 + 0.09 + 0.15 + 0.12 = 𝟎. 𝟔𝟎

Page 8: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham ARIOUA Abdallah

𝑀𝐼𝑃𝐶𝑋(𝑠0 ⊨ 𝞥)

𝞥 = 𝑃≤𝑝(𝜑)

Find

Labeling and probability values in the counterexample that cause

the probability to exceed the given upper bound over the model

8 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

𝝋

𝝋

0.5 0.5

Given

Most Indicative Probabilistic Counter Example (MIPCX)

Counterexample Debugging

Page 9: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Causality and Responsibility for MIPCX

𝑠, 𝑋 = 𝑥 is a cause for violating MIPCX

if either(𝑠, 𝑋 = 𝑥)is critical

or 𝑊←𝑤′ makes (𝑠, 𝑋 = 𝑥) critical, for variable subset 𝑊

𝑑𝑅(𝑠, 𝑋 = 𝑥,𝞥) = 1 if (𝑠, 𝑋 = 𝑥)iscritical

= 1/( 𝑊 + 1) otherwise

(𝑠, 𝑋 = 𝑥) is critical

if 𝑀𝐼𝑃𝐶𝑋(𝑠,𝑋←𝑥′) 𝑠0 ⊨ 𝞥 is not a valid counterexample.

𝑀𝐼𝑃𝐶𝑋(𝑠,𝑋←𝑥′) 𝑠0 ⊨ 𝞥 :

The set of finite paths resulting from 𝑀𝐼𝑃𝐶𝑋 𝑠0 ⊨ 𝞥

by switching the value 𝑥 of variable 𝑋 in state 𝑠

Criticality

Causality (adapted from Halpern & Pearl)

Degree of Responsibility (adapted from Chockler & Halpern)

9 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

Page 10: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Causality and Responsibility for MIPCX

ARIOUA Abdallah

Probabilistic Causality Model

is a tuple < 𝑀, 𝑃𝑟 >

𝑀 ∶ causality model and 𝑃𝑟 : probability function defined over the states of 𝑀𝐼𝑃𝐶𝑋 𝑠0 ⊨ 𝞥

10 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

Most Responsible Cause

Cause C is a most responsible cause for violating 𝞥 = 𝑃≤𝑝 𝜑

if 𝑑𝑅 𝐶 𝑃𝑟 𝐶 ≥ 𝑑𝑅 𝐶′ Pr (𝐶′) for any cause C’.

Pr 𝑠 = 𝑃(𝜎)

𝑠∈𝜎| 𝜎∈𝑀𝐼𝑃𝑋(𝑠0⊨𝞥)

Pr 𝑠, 𝑋 = 𝑥 = Pr(𝑠)

Page 11: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Counterexamples Revisited

ARIOUA Abdallah

{b,e}

11 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

𝒔𝟎

𝒔𝟏 𝒔𝟓 𝒔𝟒

𝒔𝟑 𝒔𝟐 {a} {c,d} 0.5

0.25

0.25

0.4

0.6

0.3

0.5 0.2

{a, b}

{c,d} {c,d}

Most Indicative

𝑃 𝐶𝑋2 = 𝑃 𝑠0𝑠1, 𝑠0𝑠2𝑠3, 𝑠0𝑠2𝑠4𝑠3, 𝑠0𝑠2𝑠4𝑠5,𝑠0𝑠4𝑠5 = 0.25 + 0.2 + 0.09 + 0.15 + 0.12 = 𝟎. 𝟔𝟎

Page 12: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Probabilistic Counterexamples Revisited

ARIOUA Abdallah

{b,e}

12 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

𝒔𝟎

𝒔𝟏 𝒔𝟓 𝒔𝟒

𝒔𝟑 𝒔𝟐 {a} {c,d} 0.5

0.25

0.25

0.4

0.6

0.3

0.5 0.2

{a, b}

{c,d} {c,d}

(s2,b=1) is the

most responsible cause 𝒅𝑹 𝒔𝟐, 𝒃 = 𝟏 = 𝟏

𝒅𝑹 𝒔𝟒, 𝒃 = 𝟏 = 𝟏/| 𝒂 | + 𝟏 = 𝟎. 𝟓

𝒅𝑹 𝒔𝟐, 𝒃 = 𝟏 𝐏𝐫 𝒔𝟐, 𝒃 = 𝟏 = 0.35

𝑷𝒓 𝒔𝟐, 𝒃 = 𝟏 = 𝟎. 𝟐 + 𝟎. 𝟏𝟓 = 𝟎. 𝟑𝟓

: highest

Page 13: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Algorithm and Implementation

13 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

Probabilistic Symbolic Model Checker

[Kwiatkowska et al.]

Probabilistic Counterexample Generator

[Aljazzar et al.]

𝑀𝐼𝑃𝐶𝑋 𝑠0 ⊨ 𝞥

𝞥 = 𝑃≤𝑝(𝜑)

Debugging Algorithm

(Debbi-Bourahla)

Causes with Responsibilities

and Probabilities

Diagnosis

Page 14: Causal Analysis of Probabilistic Counterexamplesmemocode.irisa.fr/2013/Final/Session-3-1-Debbi-Causal...Probabilistic Counterexamples 4 A counterexample C for 𝑷≤𝑝𝞅 is a

Vu Pham

Conclusion and Future Work

• We adapted and showed the usefulness of Causality and Responsibility

in the context of debugging probabilistic counterexamples

• We introduced the notion of Most Responsible Cause

as an indicator for the source of the error

• We developed a Debugging Algorithm, and tested it on real case studies

with good performance

Conclusion

Future Work

14 Hichem Debbi Causal Analysis of Probabilistic Counterexamples

• Visualization of diagnosis results