models for probabilistic programs with an adversary
play

Models for Probabilistic Programs with an Adversary Robert Rand, - PowerPoint PPT Presentation

Models for Probabilistic Programs with an Adversary Robert Rand, Steve Zdancewic University of Pennsylvania Probabilistic Programming Semantics 2016 Interactive Proofs 2/47 Interactive Proofs 2/47 Interactive Proofs 2/47 Interactive


  1. Models for Probabilistic Programs with an Adversary Robert Rand, Steve Zdancewic University of Pennsylvania Probabilistic Programming Semantics 2016

  2. Interactive Proofs 2/47

  3. Interactive Proofs 2/47

  4. Interactive Proofs 2/47

  5. Interactive Proofs 2/47

  6. Interactive Proofs 2/47

  7. Interactive Proofs 2/47

  8. Interactive Proofs 2/47

  9. Interactive Proofs 2/47

  10. Interactive Proofs 2/47

  11. Graph Non-Isomorphism A 4 B E 5 3 C D 2 1 3/47

  12. Graph Non-Isomorphism A 4 B E 5 3 C D 2 1 3/47

  13. Graph Non-Isomorphism A 4 B E 5 3 C D 2 1 γ α ǫ δ β 3/47

  14. Graph Non-Isomorphism A 4 B E 5 3 C D 2 1 γ α ǫ δ β 3/47

  15. Arthur Merlin Games 4/47

  16. Arthur Merlin Games 4/47

  17. Arthur Merlin Games 4/47

  18. Arthur Merlin Games 4/47

  19. Arthur Merlin Games 4/47

  20. Arthur Merlin Games 4/47

  21. Why Should We Care? ◮ Mixing probability and nondeterminism is powerful. ◮ Private vs. public coins matter. 5/47

  22. Let’s Start with a Deterministic Semantics... σ ( a ) = n skip / σ ⇓ σ x := a / σ ⇓ σ [ x �→ n ] c 2 / σ ′ ⇓ σ ′′ c 1 / σ ⇓ σ ′ c 1 ; c 2 / σ ⇓ σ ′′ c 1 / σ ⇓ σ ′ σ ( b ) = T if b then c 1 else c 2 / σ ⇓ σ ′ 6/47

  23. F or Point Distributions Θ ::= [ σ ] | Θ ⊕ p Θ [ σ ]( a ) = n skip / [ σ ] ⇓ [ σ ] x := a / [ σ ] ⇓ [ σ [ x �→ n ]] c 2 / Θ ⇓ Θ ′ c 1 / [ σ ] ⇓ Θ c 1 ; c 2 / [ σ ] ⇓ Θ ′ σ ( b ) = T c 1 / [ σ ] ⇓ Θ if b then c 1 else c 2 / [ σ ] ⇓ Θ 7/47

  24. T oss in Some Probability Θ ::= [ σ ] | Θ ⊕ p Θ c 1 / [ σ ] ⇓ Θ 1 c 2 / [ σ ] ⇓ Θ 2 ( c 1 ⊕ p c 2 ) / [ σ ] ⇓ Θ 1 ⊕ p Θ 2 8/47

  25. T oss in Some Probability Θ ::= [ σ ] | Θ ⊕ p Θ c 1 / [ σ ] ⇓ Θ 1 c 2 / [ σ ] ⇓ Θ 2 ( c 1 ⊕ p c 2 ) / [ σ ] ⇓ Θ 1 ⊕ p Θ 2 ⊕ 1 / 3 ( x := 0 ⊕ 1 3 x := 1 ) [ σ ] σ [ x �→ 0 ] σ [ x �→ 1 ] 8/47

  26. And Lift! c / Θ 1 ⇓ Θ ′ c / Θ 2 ⇓ Θ ′ 1 2 c / Θ 1 ⊕ p Θ 2 ⇓ Θ ′ 1 ⊕ p Θ ′ 2 9/47

  27. And Lift! c / Θ 1 ⇓ Θ ′ c / Θ 2 ⇓ Θ ′ 1 2 c / Θ 1 ⊕ p Θ 2 ⇓ Θ ′ 1 ⊕ p Θ ′ 2 y := 5 ⊕ 1 / 3 ⊕ 1 / 3 σ 1 σ 2 σ 1 [ y �→ 5 ] σ 2 [ y �→ 5 ] 9/47

  28. The Toss Command c 1 ⊕ 1 5 c 2 ⊕ 1 / 3 ⊕ 1 / 5 ⊕ 1 / 2 � c 1 � σ 1 � c 2 � σ 1 ⊕ 1 / 5 ⊕ 1 / 5 � c 1 � σ 2 � c 2 � σ 2 � c 1 � σ 3 � c 2 � σ 3 10/47

  29. The Skip Command ⊕ 1 / 3 ⊕ 1 / 3 σ 1 ⊕ 1 / 2 σ 1 ⊕ 1 / 2 skip σ 2 σ 3 σ 2 σ 3 skip skip 11/47

  30. More Direct ⊕ 1 / 3 ⊕ 1 / 3 skip σ 1 ⊕ 1 / 2 σ 1 ⊕ 1 / 2 σ 2 σ 3 σ 2 σ 3 12/47

  31. Direct Semantics σ ( a ) = n skip / Θ ⇓ Θ x := a / Θ ⇓ Θ[ σ i ( x ) �→ n ] c 2 / Θ ′ ⇓ Θ ′′ c 1 / Θ ⇓ Θ ′ c 1 ; c 2 / Θ ⇓ Θ ′′ Pr b (Θ 1 ) = 1 c 1 / Θ 1 ⇓ Θ ′ c 2 / Θ 0 ⇓ Θ ′ Pr b (Θ 0 ) = 0 1 0 if b then c 1 else c 2 / Θ 1 ⊕ p Θ 0 ⇓ Θ ′ 1 ⊕ p Θ ′ 0 c 1 / Θ ⇓ Θ 1 c 2 / Θ ⇓ Θ 2 ( c 1 ⊕ p c 2 ) / Θ ⇓ Θ 1 ⊕ p Θ 2 13/47

  32. Direct Toss c 1 ⊕ 1 5 c 2 ⊕ 1 / 5 � c 1 � ⊕ 1 / 3 � c 2 � ⊕ 1 / 3 σ 1 ⊕ 1 / 2 σ 1 ⊕ 1 / 2 σ 2 σ 3 σ 2 σ 3 14/47

  33. The Distinction Recursive c 1 / [ σ ] ⇓ Θ 1 c 2 / [ σ ] ⇓ Θ 2 ( c 1 ⊔ c 2 ) / [ σ ] ⇓ Θ 1 ( c 1 ⊔ c 2 ) / [ σ ] ⇓ Θ 2 vs. c 1 / Θ ⇓ Θ 1 c 2 / Θ ⇓ Θ 2 ( c 1 ⊔ c 2 ) / Θ ⇓ Θ 1 ( c 1 ⊔ c 2 ) / Θ ⇓ Θ 2 Direct 15/47

  34. Let’s Play a Game! 16/47

  35. Let’s Play a Game! P := ⊕ 1 3 ( ⊕ 1 ) 2 O := ⊔ ⊔ 17/47

  36. Let’s Play a Game! c 1 P := ⊕ 1 3 ( ⊕ 1 ) 2 c 2 O := ⊔ ⊔ 17/47

  37. c 1 : P := ⊕ 1 3 ( ⊕ 1 ) Direct Play 2 18/47

  38. c 1 : P := ⊕ 1 3 ( ⊕ 1 ) Direct Play 2 ⊕ 1 / 3 ⊕ 1 / 2 18/47

  39. c 2 : O := ⊔ ⊔ Direct Play � c 2 � ⊕ 1 / 3 ⊕ 1 / 2 18/47

  40. c 2 : O := ⊔ ⊔ Direct Play � � ⊕ 1 / 3 ⊕ 1 / 2 18/47

  41. c 2 : O := ⊔ ⊔ Direct Play ⊕ 1 / 3 ⊕ 1 / 2 18/47

  42. c 2 : O := ⊔ ⊔ Direct Play ⊕ 1 / 3 L ⊕ 1 / 2 T W 18/47

  43. c 1 : P := ⊕ 1 3 ( ⊕ 1 ) Recursive Play 2 19/47

  44. c 1 : P := ⊕ 1 3 ( ⊕ 1 ) Recursive Play 2 ⊕ 1 / 3 ⊕ 1 / 2 19/47

  45. c 2 : O := ⊔ ⊔ Recursive Play � c 2 � ⊕ 1 / 3 ⊕ 1 / 2 19/47

  46. c 2 : O := ⊔ ⊔ Recursive Play ⊕ 1 / 3 � c 2 � ⊕ 1 / 2 � c 2 � � c 2 � 19/47

  47. c 2 : O := ⊔ ⊔ Recursive Play ⊕ 1 / 3 ⊕ 1 / 2 19/47

  48. c 2 : O := ⊔ ⊔ Recursive Play ⊕ 1 / 3 ⊕ 1 / 2 L L L 19/47

  49. Knowledge The two levels of operational semantics reflect whether the adversary knows the outcome of coin flips. 20/47

  50. Levels of Knowledge 1. Adversary is blind to probabilistic outcomes. ◮ Single choice in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) ◮ Distinct choices in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) (Direct) 2. Adversary can see current program state 3. Adversary recalls program history (Recursive) 4. Adversary can foresee all outcomes. ◮ Single coin flip in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) ◮ Distinct coin flips in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) 21/47

  51. Levels of Knowledge 1. Adversary is blind to probabilistic outcomes. ◮ Single choice in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) ◮ Distinct choices in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) (Direct) 2. Adversary can see current program state 3. Adversary recalls program history (Recursive) 4. Adversary can foresee all outcomes. ◮ Single coin flip in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) ◮ Distinct coin flips in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) 21/47

  52. Levels of Knowledge 1. Adversary is blind to probabilistic outcomes. ◮ Single choice in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) ◮ Distinct choices in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) (Direct) 2. Adversary can see current program state 3. Adversary recalls program history (Recursive) 4. Adversary can foresee all outcomes. ◮ Single coin flip in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) ◮ Distinct coin flips in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) 21/47

  53. Levels of Knowledge 1. Adversary is blind to probabilistic outcomes. ◮ Single choice in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) ◮ Distinct choices in (( c 1 ⊔ c 2 ) ⊕ ( c 1 ⊔ c 2 )) (Direct) 2. Adversary can see current program state 3. Adversary recalls program history (Recursive) 4. Adversary can foresee all outcomes. ◮ Single coin flip in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) ◮ Distinct coin flips in (( c 1 ⊕ c 2 ) ⊔ ( c 1 ⊕ c 2 )) 21/47

  54. So... What can we verify? 22/47

  55. Verification: Direct { P } c 1 { Q } { P } c 2 { Q } { P } ( c 1 ⊔ c 2 ) { Q } 23/47

  56. Verification: Recursive { True } b := T { Pr ( b ) = 1 } { True } b := F { Pr ( b ) = 0 } { True } ( b := T ⊔ b := F ) { Pr ( b ) = 1 ∨ Pr ( b ) = 0 } 24/47

  57. Verification: Recursive ⊕ 1 / 2 b = ⊥ b = ⊥ { True } b := T { Pr ( b ) = 1 } { True } b := F { Pr ( b ) = 0 } { True } ( b := T ⊔ b := F ) { Pr ( b ) = 1 ∨ Pr ( b ) = 0 } 24/47

  58. Verification: Recursive ⊕ 1 / 2 b = T b = F { True } b := T { Pr ( b ) = 1 } { True } b := F { Pr ( b ) = 0 } { True } ( b := T ⊔ b := F ) { Pr ( b ) = 1 ∨ Pr ( b ) = 0 } 24/47

  59. Verification: Recursive ⊕ 1 / 2 b = T b = F { True } b := T { Pr ( b ) = 1 } { True } b := F { Pr ( b ) = 0 } { True } ( b := T ⊔ b := F ) { Pr ( b ) = 1 ∨ Pr ( b ) = 0 } 24/47

  60. Verification: Recursive ⊕ 1 / 2 b = T b = F { True } b := T { Pr ( b ) = 1 } { True } b := F { Pr ( b ) = 0 } { True } ( b := T ⊔ b := F ) { Pr ( b ) = 1 ∨ Pr ( b ) = 0 } Q cannot include disjunctions 24/47

  61. Verification: Recursive { Pr ( b ) = 1 2 } skip { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } b := ¬ b { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } ( skip ⊔ b := ¬ b ) { Pr ( b ) = 1 2 } 25/47

  62. Verification: Recursive ⊕ 1 / 2 b = T b = F { Pr ( b ) = 1 2 } skip { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } b := ¬ b { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } ( skip ⊔ b := ¬ b ) { Pr ( b ) = 1 2 } 25/47

  63. Verification: Recursive ⊕ 1 / 2 b = F b = F { Pr ( b ) = 1 2 } skip { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } b := ¬ b { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } ( skip ⊔ b := ¬ b ) { Pr ( b ) = 1 2 } 25/47

  64. Verification: Recursive ⊕ 1 / 2 b = F b = F { Pr ( b ) = 1 2 } skip { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } b := ¬ b { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } ( skip ⊔ b := ¬ b ) { Pr ( b ) = 1 2 } 25/47

  65. Verification: Recursive ⊕ 1 / 2 b = F b = F { Pr ( b ) = 1 2 } skip { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } b := ¬ b { Pr ( b ) = 1 2 } { Pr ( b ) = 1 2 } ( skip ⊔ b := ¬ b ) { Pr ( b ) = 1 2 } P cannot include probabilities in ( 0 , 1 ) 25/47

  66. Verification: Recursive non-probabilistic P { P } c 1 { Q } non-disjunctive Q { P } c 2 { Q } { P } ( c 1 ⊔ c 2 ) { Q } 26/47

  67. C ompositionality ( c 1 ⊔ c 2 ); ( c 3 ⊔ c 4 ) 27/47

  68. C ompositionality { P } ( c 1 ⊔ c 2 ); ( c 3 ⊔ c 4 ) { R } 27/47

  69. C ompositionality { P } ( c 1 ⊔ c 2 ) { Q } ( c 3 ⊔ c 4 ) { R } 27/47

  70. C ompositionality { P } ( c 1 ⊔ c 2 ) { Q } ( c 3 ⊔ c 4 ) { R } 27/47

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend