Causal Analysis of Probabilistic...

Post on 28-Jul-2020

1 views 0 download

transcript

Vu Pham

Causal Analysis of

Probabilistic Counterexamples

1

Hichem Debbi hichem.debbi@gmail.com

University of M’Sila

Causal Analysis of Probabilistic Counterexamples

Mustapha Bourahla mbourahla@hotmail.com

Hichem Debbi

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

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

~ ∈ {<,≀,>,β‰₯}

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

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 = 𝟎. πŸ–πŸ

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 = 𝟎. πŸ“πŸ

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 = 𝟎. πŸ”πŸŽ

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

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

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(𝑠)

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 = 𝟎. πŸ”πŸŽ

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

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

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