On the Total Variation Distance of SMPs Giorgio Bacci, Giovanni - - PowerPoint PPT Presentation

on the total variation distance of smps
SMART_READER_LITE
LIVE PREVIEW

On the Total Variation Distance of SMPs Giorgio Bacci, Giovanni - - PowerPoint PPT Presentation

On the Total Variation Distance of SMPs Giorgio Bacci, Giovanni Bacci, Kim G. Larsen, Radu Mardare Aalborg University, Denmark 25-26 September 2014 4 IDEA CPS 1/24 Outline Semi-Markov Processes (SMPs) Total Variation Distance of


slide-1
SLIDE 1

On the Total Variation Distance of SMPs

Giorgio Bacci, Giovanni Bacci, Kim G. Larsen, Radu Mardare Aalborg University, Denmark

IDEA CPS

4

25-26 September 2014

1/24

slide-2
SLIDE 2

Outline

  • Semi-Markov Processes (SMPs)
  • Total

Variation Distance of SMPs

  • Total

Variation vs. Model Checking

  • An Approximation Algorithm
  • Concluding Remarks

2/24

slide-3
SLIDE 3

Before to start...

|| μ - ν || = sup |μ(E) - ν(E)|

E ∈ Σ Given μ,ν: Σ → ℝ+ measures on (X,Σ)

Total Variation Distance

3/24

slide-4
SLIDE 4

Before to start...

|| μ - ν || = sup |μ(E) - ν(E)|

E ∈ Σ

The largest possible difference that μ and ν assign to the same event

Given μ,ν: Σ → ℝ+ measures on (X,Σ)

Total Variation Distance

3/24

slide-5
SLIDE 5

semi-Markov Processes

s0 s2 s1 s3 s4

1/3 1/3 1/3 1/3 2/3 1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r 4/24

slide-6
SLIDE 6

semi-Markov Processes

s0 s2 s1 s3 s4

1/3 1/3 1/3 1/3 2/3 1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r

Given an initial state, SMPs can be interpreted as “machines” that emit timed traces of states at a certain probability

4/24

slide-7
SLIDE 7

Timed paths & Events

핮(S0,R0, ... ,Rn-1,Sn)

s0 s1 sn-1 sn t0 tn-1

... ∈ π:

Cylinder set (si ∈Si, ti ∈Ri and Ri Borel set) residence-time

P[s](핮(S0,R0, ... ,Rn-1,Sn)) = “probability that, starting from s, the SMP emits a timed path with prefix in S0×R0× ... ×Rn-1×Sn”

5/24

slide-8
SLIDE 8
  • Prob. Trace Equivalence

s0 s2 s1 s3 s4

1/3 1/3 1/3 1/3 2/3 1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r 6/24

slide-9
SLIDE 9
  • Prob. Trace Equivalence

s0 s2 s1 s3 s4

1/3 1/3 1/3 1/3 2/3 1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r 6/24

slide-10
SLIDE 10
  • Prob. Trace Equivalence

s0 s2 s1 s3 s4

1/3 1/3 1/3 1/3 2/3 1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r

P[s0](핮( ,R0, ... ,Rn-1, )) = P[s1](핮( ,R0, ... ,Rn-1, ))

L0 Ln L0 Ln 6/24

slide-11
SLIDE 11
  • Prob. Trace Equivalence

s0 s2 s1 s3 s4

1/3 1/3 1/3 1/3 2/3 1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r

P[s0](핮( ,R0, ... ,Rn-1, )) = P[s1](핮( ,R0, ... ,Rn-1, ))

Trace Cylinders (up to label equiv.)

L0 Ln L0 Ln 6/24

slide-12
SLIDE 12
  • Prob. Trace Equivalence

s0 s2 s1 s3 s4 1/3+ε

1/3 1/3 1/3

2/3-ε

1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r

P[s0](핮( ,ℝ, ,)) =1/3+ε ≠ 1/3 = P[s1] (핮( ,ℝ, ,))

p,r q p,r q 7/24

slide-13
SLIDE 13
  • Prob. Trace Equivalence

s0 s2 s1 s3 s4 1/3+ε

1/3 1/3 1/3

2/3-ε

1 1 1 Exp(3) Exp(3) N(2,3) U(2) U(2) p,r q p,r q,r q,r

P[s0](핮( ,ℝ, ,)) =1/3+ε ≠ 1/3 = P[s1] (핮( ,ℝ, ,))

p,r q p,r q

FRAGILE

7/24

slide-14
SLIDE 14

Trace Pseudometric

d(s,s’) = sup |P[s](E) - P[s’](E)|

E ∈ σ(퓣)

σ-algebra generated from Trace Cylinders

(difference w.r.t. linear real-time behaviors)

8/24

slide-15
SLIDE 15

Trace Pseudometric

d(s,s’) = sup |P[s](E) - P[s’](E)|

E ∈ σ(퓣)

It’s a Behavioral Distance! d(s,s’) = 0 iff s≈ s’

σ-algebra generated from Trace Cylinders

(difference w.r.t. linear real-time behaviors)

T

8/24

slide-16
SLIDE 16

Trace Distance vs. Model Checking

(i.e., what do they have in common?)

9/24

slide-17
SLIDE 17

Model Checking SMPs

SMP ⊨ Linear Real-time Spec.

i.e., measuring the likelihood that a a linear real-time property is satisfied by the SMP

10/24

slide-18
SLIDE 18

Model Checking SMPs

SMP ⊨ Linear Real-time Spec.

i.e., measuring the likelihood that a a linear real-time property is satisfied by the SMP

a proper measurable set!

10/24

slide-19
SLIDE 19

Model Checking SMPs

SMP ⊨ Linear Real-time Spec.

i.e., measuring the likelihood that a a linear real-time property is satisfied by the SMP

a proper measurable set! represented as Metric Temporal Logic formulas

10/24

slide-20
SLIDE 20

Model Checking SMPs

SMP ⊨ Linear Real-time Spec.

i.e., measuring the likelihood that a a linear real-time property is satisfied by the SMP

a proper measurable set! represented as Metric Temporal Logic formulas ... or languages recognized by Timed Automata

10/24

slide-21
SLIDE 21

Metric Temporal Logic

φ ≔ p | ⊥ | φ→φ | X φ | φU φ

I

Next

I

Until

(*) I ⊆ ℝ closed interval with rational endpoints (Alur-Henzinger)

11/24

slide-22
SLIDE 22

Metric Temporal Logic

φ ≔ p | ⊥ | φ→φ | X φ | φU φ

I I

φ φ φ ψ t0 ti-1

... ⊨ π:

Next

φU ψ

I

Until

(*) I ⊆ ℝ closed interval with rational endpoints

+ + ∈ I ... ψ within time t ∈ I

(Alur-Henzinger)

11/24

slide-23
SLIDE 23

MTL distance

MTL(s,s’) = sup |P[s]({π⊨φ}) - P[s’]({π⊨φ})|

φ ∈ MTL set of timed paths that satisfy φ

(difference w.r.t. MTL properties)

12/24

slide-24
SLIDE 24

MTL distance

MTL(s,s’) = sup |P[s]({π⊨φ}) - P[s’]({π⊨φ})|

φ ∈ MTL set of timed paths that satisfy φ

(difference w.r.t. MTL properties)

m e a s u r a b l e i n σ ( 퓣 )

MTL(s,s’) ≤ d(s,s’) = sup |P[s](E) - P[s’](E)|

E ∈ σ(퓣)

Relation with Trace Distance

12/24

slide-25
SLIDE 25

MTL distance

MTL(s,s’) = sup |P[s]({π⊨φ}) - P[s’]({π⊨φ})|

φ ∈ MTL set of timed paths that satisfy φ

(difference w.r.t. MTL properties)

m e a s u r a b l e i n σ ( 퓣 )

MTL(s,s’) ≤ d(s,s’) = sup |P[s](E) - P[s’](E)|

E ∈ σ(퓣)

Relation with Trace Distance

=

12/24

slide-26
SLIDE 26

Timed Automata

without invariants ℓ1 ℓ2 ℓ0

p,r x≤1/2 q y≤1/2 p,r , x<3, {y} p,r x≥5, {x} q x≥1/4, {x}

g ≔ x ⋈ q | g ∧ g

for ⋈ ∈ {<,≤,>,≥}, q∈ℚ (ℓ0, )

x=0 y=0

(ℓ2, )

x=2 y=0

(ℓ1, )

x=2.5 y=0.5

...

Clock Guards

p,r , 2 q , 1/2 q , 1/2

accepted!

(Alur-Dill)

13/24

Clocks = {x,y}

slide-27
SLIDE 27

TA distance

TA(s,s’) = sup |P[s]({π∈L(퓐)}) - P[s’]({π∈L(퓐)})|

퓐 ∈ TA set of timed paths accepted by 퓐

(difference w.r.t. regular TA properties)

14/24

slide-28
SLIDE 28

TA distance

TA(s,s’) = sup |P[s]({π∈L(퓐)}) - P[s’]({π∈L(퓐)})|

퓐 ∈ TA set of timed paths accepted by 퓐

(difference w.r.t. regular TA properties)

m e a s u r a b l e i n σ ( 퓣 )

TA(s,s’) ≤ d(s,s’) = sup |P[s](E) - P[s’](E)|

E ∈ σ(퓣)

Relation with Trace Distance

14/24

slide-29
SLIDE 29

TA distance

TA(s,s’) = sup |P[s]({π∈L(퓐)}) - P[s’]({π∈L(퓐)})|

퓐 ∈ TA set of timed paths accepted by 퓐

(difference w.r.t. regular TA properties)

m e a s u r a b l e i n σ ( 퓣 )

TA(s,s’) ≤ d(s,s’) = sup |P[s](E) - P[s’](E)|

E ∈ σ(퓣)

Relation with Trace Distance

=

14/24

slide-30
SLIDE 30

The theorem behind...

|| μ - ν || = sup |μ(E) - ν(E)|

E ∈ F For μ,ν: Σ → ℝ+ finite measures on (X,Σ) and F⊆Σ field such that σ(F)=Σ

Representation Theorem

15/24

slide-31
SLIDE 31

The theorem behind...

|| μ - ν || = sup |μ(E) - ν(E)|

E ∈ F

F is much simpler than Σ, nevertheless it suffices to attain to the supremum!

For μ,ν: Σ → ℝ+ finite measures on (X,Σ) and F⊆Σ field such that σ(F)=Σ

Representation Theorem

15/24

slide-32
SLIDE 32

A series of characterizations

MTL(s,s’) = MTL (s,s’) TA(s,s’) = DTA(s,s’) 1-DTA(s,s’) = 1-RDTA(s,s’) d(s,s’) =

¬U 16/24

slide-33
SLIDE 33

A series of characterizations

MTL(s,s’) = MTL (s,s’) TA(s,s’) = DTA(s,s’) 1-DTA(s,s’) = 1-RDTA(s,s’) d(s,s’) =

¬U distance w.r.t. φ∈MTL without Until 16/24

slide-34
SLIDE 34

A series of characterizations

MTL(s,s’) = MTL (s,s’) TA(s,s’) = DTA(s,s’) 1-DTA(s,s’) = 1-RDTA(s,s’) d(s,s’) =

¬U distance w.r.t. φ∈MTL without Until distance w.r.t. only Deterministic TAs 16/24

slide-35
SLIDE 35

A series of characterizations

MTL(s,s’) = MTL (s,s’) TA(s,s’) = DTA(s,s’) 1-DTA(s,s’) = 1-RDTA(s,s’) d(s,s’) =

¬U distance w.r.t. φ∈MTL without Until distance w.r.t. only Deterministic TAs distance w.r.t. only single-clock DTAs 16/24

slide-36
SLIDE 36

A series of characterizations

MTL(s,s’) = MTL (s,s’) TA(s,s’) = DTA(s,s’) 1-DTA(s,s’) = 1-RDTA(s,s’) d(s,s’) =

¬U distance w.r.t. φ∈MTL without Until distance w.r.t. only Deterministic TAs distance w.r.t. only single-clock DTAs distance w.r.t. only Resetting 1-DTAs 16/24

slide-37
SLIDE 37

Approximation Algorithm for the Trace Distance

(from below & from above)

17/24

slide-38
SLIDE 38

... from below

18/24

slide-39
SLIDE 39

... from below

|| μ - ν || = sup |μ(E) - ν(E)|

E∈F Representation Theorem r e c a l l t h a t . . .

18/24

slide-40
SLIDE 40

... from below

|| μ - ν || = sup |μ(E) - ν(E)|

E∈F F field that generates Σ Representation Theorem r e c a l l t h a t . . .

18/24

slide-41
SLIDE 41

... from below

|| μ - ν || = sup |μ(E) - ν(E)|

E∈F F field that generates Σ Representation Theorem

We need F0 ⊆ F1 ⊆ F2 ⊆ ... such that Ui Fi = F to define

li = sup |μ(E) - ν(E)|

E ∈ Fi

r e c a l l t h a t . . .

18/24

slide-42
SLIDE 42

... from below

|| μ - ν || = sup |μ(E) - ν(E)|

E∈F F field that generates Σ Representation Theorem

We need F0 ⊆ F1 ⊆ F2 ⊆ ... such that Ui Fi = F to define

li = sup |μ(E) - ν(E)|

E ∈ Fi

so that ∀i≥0, li ≤ li+1 & supi li = ||μ - ν||

increasing limiting r e c a l l t h a t . . .

18/24

slide-43
SLIDE 43

... from above

19/24

slide-44
SLIDE 44

... from above

|| μ - ν || = 1 - μ∧ν(X)

Alternative Characterization i t i s k n

  • w

t h a t . . .

19/24

slide-45
SLIDE 45

... from above

|| μ - ν || = 1 - μ∧ν(X)

Alternative Characterization

We need F0 ⊆ F1 ⊆ F2 ⊆ ... such that Ui Fi = F to define

ui = 1- sup {m(X) | m≤F μ & m≤F ν}

i t i s k n

  • w

t h a t . . .

i i

19/24

slide-46
SLIDE 46

... from above

|| μ - ν || = 1 - μ∧ν(X)

field that generates Σ Alternative Characterization

We need F0 ⊆ F1 ⊆ F2 ⊆ ... such that Ui Fi = F to define

ui = 1- sup {m(X) | m≤F μ & m≤F ν}

i t i s k n

  • w

t h a t . . .

i i

19/24

slide-47
SLIDE 47

... from above

|| μ - ν || = 1 - μ∧ν(X)

field that generates Σ Alternative Characterization

We need F0 ⊆ F1 ⊆ F2 ⊆ ... such that Ui Fi = F to define

ui = 1- sup {m(X) | m≤F μ & m≤F ν}

so that ∀i≥0, ui ≥ ui+1 & infi ui = ||μ - ν||

decreasing limiting i t i s k n

  • w

t h a t . . .

i i

19/24

slide-48
SLIDE 48

Approximation Algorithm

ε lk uk l0 l1 ... u1 u0 ...

20/24

slide-49
SLIDE 49

Approximation Algorithm

ε lk uk

lower approximants upper approximants

l0 l1 ... u1 u0 ...

20/24

slide-50
SLIDE 50

Approximation Algorithm

  • Both li and ui are parametric in Fi

ε lk uk

lower approximants upper approximants

l0 l1 ... u1 u0 ...

20/24

slide-51
SLIDE 51

Approximation Algorithm

  • Both li and ui are parametric in Fi
  • If for all E∈Fi μ(E) and ν(E) are computable

then, so are li and ui. ε lk uk

lower approximants upper approximants

l0 l1 ... u1 u0 ...

20/24

slide-52
SLIDE 52

Approximating the Trace Distance

21/24

slide-53
SLIDE 53

Approximating the Trace Distance

just define the Fi’s

21/24

slide-54
SLIDE 54

Approximating the Trace Distance

w.r.t. Trace of Cylinders

핮(S0, [ , ], ... , [ , ], Si+1) s.t.

mi i ni i

mj < nj ≤ i2 Sj = Uk Lk

m0 i n0 i

just define the Fi’s

Lk 21/24

slide-55
SLIDE 55

Approximating the Trace Distance

w.r.t. Trace of Cylinders

핮(S0, [ , ], ... , [ , ], Si+1) s.t.

mi i ni i

mj < nj ≤ i2 Sj = Uk Lk

w.r.t. MTL properties

φ ≔ p | ⊥ | φ→φ | X φ s.t. [ , ] m < n ≤ i2 mdepth(φ) ≤ i

m i n i m0 i n0 i

just define the Fi’s

Lk 21/24

slide-56
SLIDE 56

Approximating the Trace Distance

w.r.t. Trace of Cylinders

핮(S0, [ , ], ... , [ , ], Si+1) s.t.

mi i ni i

mj < nj ≤ i2 Sj = Uk Lk

w.r.t. MTL properties w.r.t. Timed Languages

φ ≔ p | ⊥ | φ→φ | X φ s.t. [ , ] m < n ≤ i2 mdepth(φ) ≤ i

m i n i m0 i n0 i

just define the Fi’s

퓐 ∈ 1-DTA ...guards g≔x≤ | x≥ | g∧g (m≤i2)

m i m i Lk 21/24

slide-57
SLIDE 57

Approximating the Trace Distance

w.r.t. Trace of Cylinders

핮(S0, [ , ], ... , [ , ], Si+1) s.t.

mi i ni i

mj < nj ≤ i2 Sj = Uk Lk

w.r.t. MTL properties w.r.t. Timed Languages

φ ≔ p | ⊥ | φ→φ | X φ s.t. [ , ] m < n ≤ i2 mdepth(φ) ≤ i

m i n i m0 i n0 i

just define the Fi’s

퓐 ∈ 1-DTA ...guards g≔x≤ | x≥ | g∧g (m≤i2)

m i m i Lk 21/24

computable!

Chen et al. [LICS’09]

slide-58
SLIDE 58

Complexity Results

In terms of the complexity of approximating the trace distance we have the following result

NP-hardness [Lyngsø-Pedersen JCSS’02]

Approximating the trace distance up to any ε>0 whose size is polynomial in the size of the SMP is NP-hard.

22/24

slide-59
SLIDE 59

Complexity Results

In terms of the complexity of approximating the trace distance we have the following result

NP-hardness [Lyngsø-Pedersen JCSS’02]

Approximating the trace distance up to any ε>0 whose size is polynomial in the size of the SMP is NP-hard.

reduction from the max-clique problem

22/24

slide-60
SLIDE 60

Concluding Remarks

23/24

slide-61
SLIDE 61

Concluding Remarks

  • A truly genuine connection between trace

distance and the model checking problem

23/24

slide-62
SLIDE 62

Concluding Remarks

  • A truly genuine connection between trace

distance and the model checking problem

  • General results for total variation distance:

23/24

slide-63
SLIDE 63

Concluding Remarks

  • A truly genuine connection between trace

distance and the model checking problem

  • General results for total variation distance:
  • algebraic representation theorem

23/24

slide-64
SLIDE 64

Concluding Remarks

  • A truly genuine connection between trace

distance and the model checking problem

  • General results for total variation distance:
  • algebraic representation theorem
  • approximation strategies (& algorithm)

23/24

slide-65
SLIDE 65

Concluding Remarks

  • A truly genuine connection between trace

distance and the model checking problem

  • General results for total variation distance:
  • algebraic representation theorem
  • approximation strategies (& algorithm)
  • A polynomial upper-bound (not shown)

23/24

slide-66
SLIDE 66

Thank you for the attention

24/24