• Aucun résultat trouvé

From Hard Work to Trickery: A Systematic Approach to Probabilistic Rewriting.

N/A
N/A
Protected

Academic year: 2022

Partager "From Hard Work to Trickery: A Systematic Approach to Probabilistic Rewriting."

Copied!
15
0
0

Texte intégral

(1)

From Hard Work to Trickery:

A Systematic Approach to Probabilistic Rewriting.

Flavien BREUVART, Ugo Dal Lago

Focus, Inria team, Bologna

Crecogi: August 28 2016

(2)

Probabilistic Rewriting

Motivations

Randomized Algorithmics Efficiency analysis

Cryptography Security

Machine Learning Modeling

Probabilistic

λ

-calculus (Weak head-reduction)

M,N := x|λx.M|M N|MN (λx.M)N 1 M[N/x]

MN

M N

1 2

1 2

YA0 I

YA1

• I

YA2

• I

YA3 A:=λux.x(λy.(u(Sx)y)I) Prob(YA0)<1

1 1 2

1 2

1 1 2

1 2

1 2 1 2

1 1 2

1 2

1 1 2 2

1 2

(3)

The Quest for a Semantics

Denotational Semantics:

a 20 years old challenge

Finding subclass of domains that:

is a Cartesian close

have probabilistic powerdomains Real issue:

higher order probabilities

Unconventional solution:

Probabilistic coherent spaces

[EhrhardPaganiTasson2014]

Operational Semantics:

a hidden challenge

Rewriting theory with:

probabilistic behaviors

systematic proof-schemes Real issue:

proba forces topological arguments

Unconventional solution

???

Our objective

(4)

What is a Systematic Proof Schema?

The Example of Infinite Rewriting

Question:

How to relate small-step and multi-step?

At the beguiling: Topology

Limits for Cantor topologyof sequential small-step reductions.

Now-day: Coinduction

Mf(L1, . . . ,Lk) ik, LiωNi

Mωf(N1, . . . ,Nk)

Coinduction Schema

For any relation over terms, if for allM f(N1, ...,Nk), there is

L1, ...,Lk such thatMf(L1, ...,Lk)andLi Ni, then ⊆→ω.

(5)

What About Probabilistic Rewriting

Probabilities and Non-determinism does not mix well

For now, let’s forget about non determinism. This means:

Fixing a strategy Big step rather than multistep

Probabilities are inherently topological

[0,1] is, before all, a topological space...

Most rewriting theory’s tools are continuous

Bisimulations, encoding, typing, modeling...

Can we treat those tools without referring to topology?

Yes! but there is a price to pay: a dynamic target

(6)

What About Probabilistic Rewriting

Probabilities and Non-determinism does not mix well

For now, let’s forget about non determinism. This means:

Fixing a strategy Big step rather than multistep

Probabilities are inherently topological

[0,1] is, before all, a topological space...

Most rewriting theory’s tools are continuous

Bisimulations, encoding, typing, modeling...

Can we treat those tools without referring to topology?

Yes! but there is a price to pay: a dynamic target

(7)

Probabilistic Rewriting System

Randomized function

f:UV denotes a function f:UD(V)

D(V)={dV[0,1]|ΣvVd(v)1}

Definition of (Abstract) Probabilistic Rewriting System

Terms Λ

Normal forms Λ=ΛVR

Small step reduction:ΛRΛ

Remark: We only considerdeterministicsystems (with a strategy)

Coalgebraic approach of the big step reduction [Hasuo]

The evaluationeval:ΛΛV corresponds to the final arrow

in the(_×N)-coalgebra category over set and randomized functions.

(8)

Theorem: Randomized Encoding

Λ,Π probabilistic rewriting systems.

encoding:ΛΠ a randomized function preserving NF and reducibles.

ΛR ΠR

Λ Π

encoding

encoding reduction reduction

Λ Π

Λv Πv

encoding

encoding

eval eval

(9)

Dynamic is Essential

ΛR

Π

Λ

interpret

interpret reduction

Λ

Π

Λv

interpret

interpret

6⇒

eval

Only true if

||

interpret(M)

|| ≤ ||

eval(M )

||

Require a nontrivial realisability proof.

(10)

Example: Performing Choices First

Example

In any (binary) probabilistic rewriting system, the probabilistic choices can be chosen uniformly overBoolω at the beginning.

ΛR ΛR×Boolω

Λ Λ×Boolω

Unif({_}×Boolω)

Unif({_}×Boolω)

reduction reduction

Λ Λ×Boolω

Λv Λv×Boolω

Unif({_}×Boolω)

Unif({_Boolω)

eval eval

Our theorem is Valid for continuous probabilities!

(11)

Example: Performing Choices First

Example

In any (binary) probabilistic rewriting system, the probabilistic choices can be chosen uniformly overBoolω at the beginning.

ΛR ΛR×Boolω

Λ Λ×Boolω

Unif({_}×Boolω)

Unif({_}×Boolω)

reduction reduction

Λ Λ×Boolω

Λv Λv×Boolω

Unif({_}×Boolω)

Unif({_Boolω)

eval eval

Our theorem is Valid for continuous probabilities!

(12)

Probabilistic Intersection Types

From Probabilistic Coherence Spaces To Probabilistic Intersection Types

Standard translation:

compacts points intersection types

prime algebraic points linear types

π

`M:p·α

probabilistic bound or weight

The adequation (reformulation)

Prob(M) = XW(M)

whereW(M)=hp¯¯¯ π

`M:p·∗

i

Underlying function

||eval(M)|| = ||deriv(M)|| deriv:

ÃΛ → D(Π) M 7→ n π

`M:p·∗ 7→po

!

pIS NOT the probability for M to be of typeα Rather,pIS the probability for πto be a proof of `M:α

(13)

Probabilistic Intersection Types

From Probabilistic Coherence Spaces To Probabilistic Intersection Types

Standard translation:

compacts points intersection types

prime algebraic points linear types

π

`M:p·α

probabilistic bound or weight

The adequation (reformulation)

Prob(M) = XW(M)

whereW(M)=hp¯¯¯ π

`M:p·∗

i

Underlying function

||eval(M)|| = ||deriv(M)|| deriv:

ÃΛ → D(Π) M 7→ n π

`M:p·∗ 7→po

! pIS NOT the probability

for M to be of typeα Rather,pIS the probability for πto be a proof of `M:α

(14)

Sketching the Proof of intersection types

Cut Elimination

π

`M:p·∗

π0

`M0:q·∗

such that: is

normalizing

deterministic

“Poliadicλ-calculus”

Small-step distrib.

ΛR ΠR

Λ Π

deriv

deriv

reduction red.

Value determinism

∀normal formV, Unicity of derivation

`V:1·∗

`λx.M:1·∗

Big-step distribution

Λ Π

Λv ΠV deriv

deriv

eval eval

Conclusion

||eval(M)|| = ||deriv(eval(M))||

= ||eval(deriv(M))||

= ||deriv(M)||

(15)

And Then?

Introduce non-determinism

Convex set of distributions

Arandomized simulation is a function

f :UC(D(V)) targeting convex sets of distributions.

Our Theorem holds for randomized simulation,

A randomized encoding is a functional randomized simulation,

A probabilistic bisimulation a derandomized randomized simulation.

Maybe a direction to treat real rewriting issues

Probabilistic confluence, Powerful bisimulations...

Références

Documents relatifs

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

Afin de stabiliser à proprement parler notre colle, il est important de retirer au mieux cette eau résiduelle qui pourrait interagir avec les cristaux

5 Binned scatterplots of modelled and observed relative flood losses for all events, using all nodes of the flood damage model: building structure (a) and household contents

When dim M = 4, this result is clearly related to Theorem 1.3 and Lemma 2.4 in [24], where convergence of rescaled connections to a non-trivial connection in a vector bundle over R 4

4.1: Backward error and its bounds for the computation in single precision of the inner product y = a T b, for vectors a and b with random uniform entries.. Lower

Theorem 1.1 of Mischler and Scher [33] generalises and unifies earlier results in the literature on convergence with exponential rate for the exponentially damped growth-

• 20% of papers evaluating grassland restoration success with plant taxa as. indicators did use population attributes • Among those, only 11%

Second, we used the fact that all advanced diversification models (ClaDS0-2, LSBDS, BAMM) collapse to the CRBD model under specific conditions, and verified that we obtained the