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
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
Giorgio Bacci, Giovanni Bacci, Kim G. Larsen, Radu Mardare Aalborg University, Denmark
IDEA CPS
4
25-26 September 2014
1/24
Variation Distance of SMPs
Variation vs. Model Checking
2/24
|| μ - ν || = sup |μ(E) - ν(E)|
E ∈ Σ Given μ,ν: Σ → ℝ+ measures on (X,Σ)
Total Variation Distance
3/24
|| μ - ν || = sup |μ(E) - ν(E)|
E ∈ Σ
The largest possible difference that μ and ν assign to the same event
Given μ,ν: Σ → ℝ+ measures on (X,Σ)
Total Variation Distance
3/24
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
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
핮(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
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
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
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
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
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
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
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
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
(i.e., what do they have in common?)
9/24
SMP ⊨ Linear Real-time Spec.
i.e., measuring the likelihood that a a linear real-time property is satisfied by the SMP
10/24
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
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
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
φ ≔ p | ⊥ | φ→φ | X φ | φU φ
I
Next
I
Until
(*) I ⊆ ℝ closed interval with rational endpoints (Alur-Henzinger)
11/24
φ ≔ 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
MTL(s,s’) = sup |P[s]({π⊨φ}) - P[s’]({π⊨φ})|
φ ∈ MTL set of timed paths that satisfy φ
(difference w.r.t. MTL properties)
12/24
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
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
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}
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
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
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
|| μ - ν || = sup |μ(E) - ν(E)|
E ∈ F For μ,ν: Σ → ℝ+ finite measures on (X,Σ) and F⊆Σ field such that σ(F)=Σ
Representation Theorem
15/24
|| μ - ν || = 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
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
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
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
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
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
(from below & from above)
17/24
18/24
|| μ - ν || = sup |μ(E) - ν(E)|
E∈F Representation Theorem r e c a l l t h a t . . .
18/24
|| μ - ν || = sup |μ(E) - ν(E)|
E∈F F field that generates Σ Representation Theorem r e c a l l t h a t . . .
18/24
|| μ - ν || = 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
|| μ - ν || = 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
19/24
|| μ - ν || = 1 - μ∧ν(X)
Alternative Characterization i t i s k n
t h a t . . .
19/24
|| μ - ν || = 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
t h a t . . .
i i
19/24
|| μ - ν || = 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
t h a t . . .
i i
19/24
|| μ - ν || = 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
t h a t . . .
i i
19/24
ε lk uk l0 l1 ... u1 u0 ...
20/24
ε lk uk
lower approximants upper approximants
l0 l1 ... u1 u0 ...
20/24
ε lk uk
lower approximants upper approximants
l0 l1 ... u1 u0 ...
20/24
then, so are li and ui. ε lk uk
lower approximants upper approximants
l0 l1 ... u1 u0 ...
20/24
21/24
just define the Fi’s
21/24
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
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
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
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]
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
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
23/24
distance and the model checking problem
23/24
distance and the model checking problem
23/24
distance and the model checking problem
23/24
distance and the model checking problem
23/24
distance and the model checking problem
23/24
24/24