efficient synthesis with probabilistic constraints
play

Efficient Synthesis with Probabilistic Constraints Samuel Drews, - PowerPoint PPT Presentation

Efficient Synthesis with Probabilistic Constraints Samuel Drews, Aws Albarghouthi, Loris DAntoni Probabilistic Correctness Properties x ~ Uniform([0, 1]) post := Pr[ P ( x ) = 1] > 0 1 P ( x ) := 0 x 0.2 ] 0 0.2 1 P (


  1. Efficient Synthesis with Probabilistic Constraints Samuel Drews, Aws Albarghouthi, Loris D’Antoni

  2. Probabilistic Correctness Properties x ~ Uniform([0, 1]) post := Pr[ P ( x ) = 1] > ⅓ 0 1 ✗ P ( x ) := 0 ≤ x ≤ 0.2 ] 0 0.2 1 P ( x ) := 0 ≤ x ≤ 0.8 ✓ ] 0 0.8 1

  3. Probabilistic Program Synthesis Progs = { P ( x ) := 0 ≤ x ≤ a | a ∈ R} Progs inputs ~ Uniform([0, 1]) post post := Pr[ P ( x ) = 1] > ⅓ Q P Pr[ Q ( x ) ≠ P ( x )] Q ( x ) := constant-0 function Satisfy post Values of a : 0 ⅓ 1 Decreasing “Error” Pr[ Q ( x ) ≠ P ( x )]

  4. DIGITS (CAV17) Progs = { P ( x ) := 0 ≤ x ≤ a | a ∈ R} For each f : S → {0,1} , inputs ~ Uniform([0, 1]) query a synthesis oracle post := Pr[ P ( x ) = 1] > ⅓ Q ( x ) := constant-0 function Sample Set S {0.4, 0.6} Program Correct? Error Constraints 0 0 [0, 0.3] ✗ 0.3 f : S → {0,1} Sample m inputs 0 1 unsat - - 1 0 [0, 0.5] 0.5 ✓ 1 1 [0, 1] 1.0 ✓ Oracles compute post and Error

  5. DIGITS Convergence (CAV17) Progs post 𝜁 Q P * Pr[ Q ( x ) ≠ P *( x )] P Theorem (Convergence of DIGITS) (Under certain assumptions,) with high probability , DIGITS enumerates some correct, (near-)near-optimal program P .

  6. Which Begs the Questions: Do we really need to make exponentially many queries? No! How high is the “high probability” of optimal convergence? Depends on the number of samples.

  7. DIGITS Trie Implementation (CAV17) Sample Set S {0.4, 0.6} Program Correct? Error Constraints 0 0 [0, 0.3] 0.3 ✗ f : S → {0,1} unsat 0 1 unsat - - 1 0 [0, 0.5] 0.5 ✓ 1 1 [0, 1] ✓ 1.0

  8. Efficiency of the Trie “Heuristic” 5050 <<< 2 100 Polynomial Trendline: f ( x ) = ½ x 2 + ½ x R 2 = 1

  9. Polynomial? Two equivalent ways of thinking: ● The trie avoids unsatisfiable parts of the search space ● The trie stays close to satisfiable parts of the search space # Queries @ next depth = O (# Satisfiable @ current depth)

  10. For [0, a ] intervals and m points, # Satisfiable Queries ( m ) = m + 1 3 samples ] ] ] ] 0 1 4 choices of right endpoint [0, a ] Search Trie, depth m : O ( m 2 ) m O ( m +1)

  11. Finite VC Dimension → Polynomial Bound Progs post

  12. Finite VC Dimension → Polynomial Bound Progs post

  13. Finite VC Dimension → Polynomial Bound Progs post

  14. Finite VC Dimension → Polynomial Bound Progs post unsat

  15. Finite VC Dimension → Polynomial Bound Progs unsat post unsat unsat

  16. Finite VC Dimension → Polynomial Bound Progs unsat post unsat unsat “Sauer-Shelah Lemma”: Only O ( m d ) are satisfiable!

  17. Finite VC Dimension → Polynomial Bound Theorem: If DIGITS runs on Progs using m samples, it performs O ( m d +1 ) synthesis queries. Progs Search Trie, | S | = m : O ( m d +1 ) m O ( m d )

  18. Which Begs the Questions: Do we really need to make exponentially many queries? No!---In fact, we only make O ( m d +1 ) How high is the “high probability” of optimal convergence? Depends on the number of samples.

  19. 𝜐 -DIGITS Use the constraint set to estimate the error Pr[ Q ( x ) ≠ P ( x )] : Fix threshold 𝜐 ∈ (0,1] and skip any f : S → {0,1} such that |{ x ∈ S : Q ( x ) ≠ f ( x )}| > 𝜐 | S | P 4 P 4 Progs Progs 𝜐 post post P 2 P 2 Q Q P 1 P 3 P 3

  20. Choosing 𝜐 Progs Progs 𝜐 post post 𝜐 Q Q

  21. Adaptive 𝜐 -DIGITS Progs post Q

  22. Adaptive 𝜐 -DIGITS Progs post Q P 1

  23. Adaptive 𝜐 -DIGITS Progs 𝜐 post Q P 1

  24. Adaptive 𝜐 -DIGITS Progs 𝜐 post P 2 Q P 1

  25. Adaptive 𝜐 -DIGITS Progs 𝜐 post P 2 Q P 1

  26. Adaptive 𝜐 -DIGITS Efficacy (Fairness Benchmarks)

  27. Which Begs the Questions: Do we really need to make exponentially many queries? No!---in fact, we only make O ( m d +1 ) How high is the “high probability” of optimal convergence? Depends on the number of samples. ---and we can do better with 𝜐 -DIGITS

  28. Thanks! Progs Search Trie, | S | = m : O ( m d +1 ) m O ( m d ) P 4 P 4 Progs Progs 𝜐 post post P 2 P 2 Q Q P 1 P 3 P 3

Recommend


More recommend