Running Probabilistic Running Probabilistic Running Probabilistic - - PowerPoint PPT Presentation

running probabilistic running probabilistic running
SMART_READER_LITE
LIVE PREVIEW

Running Probabilistic Running Probabilistic Running Probabilistic - - PowerPoint PPT Presentation

Running Probabilistic Running Probabilistic Running Probabilistic Programs Backwards Programs Backwards Programs Backwards Neil Toronto * Jay McCarthy David Van Horn * * University of Maryland Vassar College ESOP 2015 2015/04/14


slide-1
SLIDE 1

Running Probabilistic Running Probabilistic Running Probabilistic Programs Backwards Programs Backwards Programs Backwards

Neil Toronto * Jay McCarthy † David Van Horn * * University of Maryland † Vassar College ESOP 2015 2015/04/14

slide-2
SLIDE 2

Roadmap Roadmap Roadmap

  • Probabilistic inference, and why it’s hard

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-3
SLIDE 3

Roadmap Roadmap Roadmap

  • Probabilistic inference, and why it’s hard
  • Limitations of current probabilistic programming languages

(PPLs)

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-4
SLIDE 4

Roadmap Roadmap Roadmap

  • Probabilistic inference, and why it’s hard
  • Limitations of current probabilistic programming languages

(PPLs)

  • Contributions

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-5
SLIDE 5

Roadmap Roadmap Roadmap

  • Probabilistic inference, and why it’s hard
  • Limitations of current probabilistic programming languages

(PPLs)

  • Contributions

Uncomputable, compositional ways to not limit language

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-6
SLIDE 6

Roadmap Roadmap Roadmap

  • Probabilistic inference, and why it’s hard
  • Limitations of current probabilistic programming languages

(PPLs)

  • Contributions

Uncomputable, compositional ways to not limit language Computable, compositional ways to not limit language

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-7
SLIDE 7

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let ([x (flip 0.5)]) x)

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-8
SLIDE 8

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let ([x (flip 0.5)]) x) 0.5

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-9
SLIDE 9

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let ([x (flip 0.5)]) x) 0.5 0.5

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-10
SLIDE 10

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let ([x (flip 0.5)] [y (flip 0.5)]) (cons x y)) 0.5 0.5 ⟨

, ⟩

0.5 ⟨

, ⟩

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-11
SLIDE 11

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let ([x (flip 0.5)] [y (flip 0.5)]) (cons x y)) 0.5 0.5 0.5 ⟨

, ⟩ ⟨ , ⟩

0.5 ⟨

, ⟩ ⟨ , ⟩

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-12
SLIDE 12

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let ([x (flip 0.5)] [y (flip 0.5)]) (cons x y)) 0.5 0.5 0.5 ⟨

, ⟩ ⟨ , ⟩

0.5 ⟨

, ⟩ ⟨ , ⟩

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-13
SLIDE 13

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let* ([x (flip 0.5)] [y (flip (if (equal? x heads) 0.5 0.3))]) (cons x y)) 0.5 0.5 0.5 ⟨

, ⟩ ⟨ , ⟩

0.5 ⟨

, ⟩ ⟨ , ⟩

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-14
SLIDE 14

Programming Coin Flips Programming Coin Flips Programming Coin Flips

(let* ([x (flip 0.5)] [y (flip (if (equal? x heads) 0.5 0.3))]) (cons x y)) 0.5 0.5 0.5 ⟨

, ⟩ ⟨ , ⟩

0.5 ⟨

, ⟩ ⟨

, ⟩

0.3 0.7

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-15
SLIDE 15

Programming Coin Flips Programming Coin Flips Programming Coin Flips

0.5 0.5 0.5 ⟨

, ⟩ ⟨ , ⟩

0.5 ⟨

, ⟩ ⟨

, ⟩

0.3 0.7

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-16
SLIDE 16

Programming Coin Flips Programming Coin Flips Programming Coin Flips

0.5 0.5 0.5 ⟨

, ⟩ ⟨ , ⟩

0.5 ⟨

, ⟩ ⟨

, ⟩

0.3 0.7

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-17
SLIDE 17

Programming Coin Flips Programming Coin Flips Programming Coin Flips

0.5 0.5 ⟨

, ⟩

0.5 ⟨

, ⟩

0.3

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-18
SLIDE 18

Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing

sto·cha·stic /stō-ˈkas-tik/ adj. fancy word for "randomized"

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-19
SLIDE 19

Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing

sto·cha·stic /stō-ˈkas-tik/ adj. fancy word for "randomized"

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-20
SLIDE 20

Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing

ap·er·ture /ˈap-ə(r)-chər/ n. fancy word for "opening"

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-21
SLIDE 21

Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing

ap·er·ture /ˈap-ə(r)-chər/ n. fancy word for "opening"

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-22
SLIDE 22

Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing

Simulate projecting rays onto a sensor...

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-23
SLIDE 23

Stochastic Ray Tracing Stochastic Ray Tracing Stochastic Ray Tracing

... and collect them to form an image

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-24
SLIDE 24

Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing

  • Normally thousands of lines of code

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-25
SLIDE 25

Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing

  • Normally thousands of lines of code
  • Bears little resemblance to the physical process

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-26
SLIDE 26

Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing

  • Normally thousands of lines of code
  • Bears little resemblance to the physical process
  • In DrBayes, it’s simple physics simulation:

(define/drbayes (ray-plane-intersect p0 v n d) (let ([denom (- (dot v n))]) (if (> denom 0) (let ([t (/ (+ d (dot p0 n)) denom)]) (if (> t 0) (collision t (vec+ p0 (vec* v t)) n) #f)) #f)))

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-27
SLIDE 27

Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing

  • Normally thousands of lines of code
  • Bears little resemblance to the physical process
  • In DrBayes, it’s simple physics simulation:

(define/drbayes (ray-plane-intersect p0 v n d) (let ([denom (- (dot v n))]) (if (> denom 0) (let ([t (/ (+ d (dot p0 n)) denom)]) (if (> t 0) (collision t (vec+ p0 (vec* v t)) n) #f)) #f)))

  • Other PPLs really aren’t up to this yet

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-28
SLIDE 28

Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing Programming Stochastic Ray Tracing

  • Normally thousands of lines of code
  • Bears little resemblance to the physical process
  • In DrBayes, it’s simple physics simulation:

(define/drbayes (ray-plane-intersect p0 v n d) (let ([denom (- (dot v n))]) (if (> denom 0) (let ([t (/ (+ d (dot p0 n)) denom)]) (if (> t 0) (collision t (vec+ p0 (vec* v t)) n) #f)) #f)))

  • Other PPLs really aren’t up to this yet
  • The issue is one of theory, not engineering effort

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

slide-29
SLIDE 29

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-30
SLIDE 30

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (random):

x x x x x x x x x p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-31
SLIDE 31

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (random):

x x x x x x x x x p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-32
SLIDE 32

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (random):

x x x x x x x x x p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) p(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-33
SLIDE 33

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (max 0.5 (random)):

x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ???

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-34
SLIDE 34

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (max 0.5 (random)):

x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ???

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-35
SLIDE 35

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (max 0.5 (random)):

x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ??? pₘ(x) = ???

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-36
SLIDE 36

Simpler Example Simpler Example Simpler Example

  • Assume (random) returns a value uniformly in

Density function for value of (max 0.5 (random)):

x x x x x x x x x pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) pₘ(x) .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 .25 .25 .25 .25 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 .75 .75 .75 .75 1 1 1 1 1 1 1 1 1 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist pₘ(x) doesn't exist

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

slide-37
SLIDE 37

What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?

4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

slide-38
SLIDE 38

What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?

  • Results of discontinuous functions (bounded measuring devices)

(let ([temperature (normal 99 1)]) (min 100 temperature))

4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

slide-39
SLIDE 39

What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?

  • Results of discontinuous functions (bounded measuring devices)

(let ([temperature (normal 99 1)]) (min 100 temperature))

  • Variable-dimensional things (union types)

(if test? none (just x))

4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

slide-40
SLIDE 40

What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?

  • Results of discontinuous functions (bounded measuring devices)

(let ([temperature (normal 99 1)]) (min 100 temperature))

  • Variable-dimensional things (union types)

(if test? none (just x))

  • Infinite-dimensional things (recursion)

4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

slide-41
SLIDE 41

What Can’t Densities Model? What Can’t Densities Model? What Can’t Densities Model?

  • Results of discontinuous functions (bounded measuring devices)

(let ([temperature (normal 99 1)]) (min 100 temperature))

  • Variable-dimensional things (union types)

(if test? none (just x))

  • Infinite-dimensional things (recursion)
  • In general: the distributions of program values

4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

slide-42
SLIDE 42

Probability Measures Probability Measures Probability Measures

  • Like already-integrated densities, but a primitive concept

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

slide-43
SLIDE 43

Probability Measures Probability Measures Probability Measures

  • Like already-integrated densities, but a primitive concept
  • Measure of (random) is

, defined by

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

slide-44
SLIDE 44

Probability Measures Probability Measures Probability Measures

  • Like already-integrated densities, but a primitive concept
  • Measure of (random) is

, defined by

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

slide-45
SLIDE 45

Probability Measures Probability Measures Probability Measures

  • Like already-integrated densities, but a primitive concept
  • Measure of (random) is

, defined by

  • Measure of (max 0.5 (random)) defined by

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

slide-46
SLIDE 46

Probability Measures Probability Measures Probability Measures

  • Like already-integrated densities, but a primitive concept
  • Measure of (random) is

, defined by

  • Measure of (max 0.5 (random)) defined by

This term assigns probability

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

slide-47
SLIDE 47

Probability Measures Probability Measures Probability Measures

  • Like already-integrated densities, but a primitive concept
  • Measure of (random) is

, defined by

  • Measure of (max 0.5 (random)) defined by

This term assigns probability

  • Need a way to derive measures from code

5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

slide-48
SLIDE 48

Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages

  • Interpret (max 0.5 (random)) as

, defined

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

slide-49
SLIDE 49

Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages

  • Interpret (max 0.5 (random)) as

, defined

  • Derive measure of (max 0.5 (random)) as

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

slide-50
SLIDE 50

Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages

  • Interpret (max 0.5 (random)) as

, defined

  • Derive measure of (max 0.5 (random)) as

where

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

slide-51
SLIDE 51

Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages

  • Interpret (max 0.5 (random)) as

, defined

  • Derive measure of (max 0.5 (random)) as

where

  • Factored into random and deterministic parts:

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

slide-52
SLIDE 52

Probability Measures Via Preimages Probability Measures Via Preimages Probability Measures Via Preimages

  • Interpret (max 0.5 (random)) as

, defined

  • Derive measure of (max 0.5 (random)) as

where

  • Factored into random and deterministic parts:
  • In other words, compute measures of expressions by running

them backwards

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

slide-53
SLIDE 53

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-54
SLIDE 54

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

Standard interpretation of programs as pure functions from a random source

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-55
SLIDE 55

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-56
SLIDE 56

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-57
SLIDE 57

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets Efficient way to compute areas of preimage sets

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-58
SLIDE 58

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets Efficient way to compute areas of preimage sets Proof of correctness w.r.t. standard interpretation

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-59
SLIDE 59

Crazy Idea is Feasible If... Crazy Idea is Feasible If... Crazy Idea is Feasible If...

  • Seems like we need:

Standard interpretation of programs as pure functions from a random source Efficient way to compute preimage sets Efficient representation of arbitrary sets Efficient way to compute areas of preimage sets Proof of correctness w.r.t. standard interpretation

  • WAT

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

slide-60
SLIDE 60

What About Approximating? What About Approximating? What About Approximating?

Conservative approximation with rectangles:

8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8

slide-61
SLIDE 61

What About Approximating? What About Approximating? What About Approximating?

Conservative approximation with rectangles:

8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8

slide-62
SLIDE 62

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-63
SLIDE 63

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-64
SLIDE 64

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-65
SLIDE 65

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-66
SLIDE 66

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-67
SLIDE 67

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-68
SLIDE 68

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-69
SLIDE 69

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-70
SLIDE 70

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-71
SLIDE 71

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-72
SLIDE 72

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-73
SLIDE 73

What About Approximating? What About Approximating? What About Approximating?

Restricting preimages to rectangular subdomains:

9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

slide-74
SLIDE 74

What About Approximating? What About Approximating? What About Approximating?

Sampling: exponential to quadratic (e.g. days to minutes)

10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10

slide-75
SLIDE 75

What About Approximating? What About Approximating? What About Approximating?

Sampling: exponential to quadratic (e.g. days to minutes)

10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10

slide-76
SLIDE 76

Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible

  • Standard interpretation of programs as pure functions from a

random source

  • Efficient way to compute preimage sets
  • Efficient representation of arbitrary sets
  • Efficient way to compute volumes of preimage sets
  • Proof of correctness w.r.t. standard interpretation

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-77
SLIDE 77

Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible

  • Standard interpretation of programs as pure functions from a

random source

  • Efficient way to compute abstract preimage subsets
  • Efficient representation of arbitrary sets
  • Efficient way to compute volumes of preimage sets
  • Proof of correctness w.r.t. standard interpretation

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-78
SLIDE 78

Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible

  • Standard interpretation of programs as pure functions from a

random source

  • Efficient way to compute abstract preimage subsets
  • Efficient representation of abstract sets
  • Efficient way to compute volumes of preimage sets
  • Proof of correctness w.r.t. standard interpretation

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-79
SLIDE 79

Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible

  • Standard interpretation of programs as pure functions from a

random source

  • Efficient way to compute abstract preimage subsets
  • Efficient representation of abstract sets
  • Efficient way to sample uniformly in preimage sets
  • Proof of correctness w.r.t. standard interpretation

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-80
SLIDE 80

Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible

  • Standard interpretation of programs as pure functions from a

random source

  • Efficient way to compute abstract preimage subsets
  • Efficient representation of abstract sets
  • Efficient way to sample uniformly in preimage sets

Efficient domain partition sampling

  • Proof of correctness w.r.t. standard interpretation

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-81
SLIDE 81

Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible Contribution: Making This Crazy Idea Feasible

  • Standard interpretation of programs as pure functions from a

random source

  • Efficient way to compute abstract preimage subsets
  • Efficient representation of abstract sets
  • Efficient way to sample uniformly in preimage sets

Efficient domain partition sampling Efficient way to determine whether a domain sample is actually in the preimage (just use standard interpretation)

  • Proof of correctness w.r.t. standard interpretation

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-82
SLIDE 82

How Many Meanings? How Many Meanings? How Many Meanings?

  • Start with pure programs, then lift by threading a random store

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-83
SLIDE 83

How Many Meanings? How Many Meanings? How Many Meanings?

  • Start with pure programs, then lift by threading a random store
  • Nonrecursive, nonprobabilistic programs:

, ,

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-84
SLIDE 84

How Many Meanings? How Many Meanings? How Many Meanings?

  • Start with pure programs, then lift by threading a random store
  • Nonrecursive, nonprobabilistic programs:

, ,

  • Add 3 semantic functions for recursion and probabilistic choice

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-85
SLIDE 85

How Many Meanings? How Many Meanings? How Many Meanings?

  • Start with pure programs, then lift by threading a random store
  • Nonrecursive, nonprobabilistic programs:

, ,

  • Add 3 semantic functions for recursion and probabilistic choice
  • Full development needs 2 more to transfer theorems from

measure theory...

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-86
SLIDE 86

How Many Meanings? How Many Meanings? How Many Meanings?

  • Start with pure programs, then lift by threading a random store
  • Nonrecursive, nonprobabilistic programs:

, ,

  • Add 3 semantic functions for recursion and probabilistic choice
  • Full development needs 2 more to transfer theorems from

measure theory...

  • ... oh, and 1 more to collect information for Monte Carlo

integration

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-87
SLIDE 87

How Many Meanings? How Many Meanings? How Many Meanings?

  • Start with pure programs, then lift by threading a random store
  • Nonrecursive, nonprobabilistic programs:

, ,

  • Add 3 semantic functions for recursion and probabilistic choice
  • Full development needs 2 more to transfer theorems from

measure theory...

  • ... oh, and 1 more to collect information for Monte Carlo

integration Tally: 3+3+2+1 = 9 semantic functions, 11 or 12 rules each

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-88
SLIDE 88

Enter Category Theory Enter Category Theory Enter Category Theory

  • Moggi (1989): Introduces monads for interpreting effects

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-89
SLIDE 89

Enter Category Theory Enter Category Theory Enter Category Theory

  • Moggi (1989): Introduces monads for interpreting effects
  • Other kinds of categories: idioms, arrows

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-90
SLIDE 90

Enter Category Theory Enter Category Theory Enter Category Theory

  • Moggi (1989): Introduces monads for interpreting effects
  • Other kinds of categories: idioms, arrows
  • Arrow defined by type constructor

and these combinators:

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-91
SLIDE 91

Enter Category Theory Enter Category Theory Enter Category Theory

  • Moggi (1989): Introduces monads for interpreting effects
  • Other kinds of categories: idioms, arrows
  • Arrow defined by type constructor

and these combinators:

  • Arrows are always function-like

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-92
SLIDE 92

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-93
SLIDE 93

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-94
SLIDE 94

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-95
SLIDE 95

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-96
SLIDE 96

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-97
SLIDE 97

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-98
SLIDE 98

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-99
SLIDE 99

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-100
SLIDE 100

Reducing Complexity Reducing Complexity Reducing Complexity

Function arrow: is just

11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11

slide-101
SLIDE 101

Pair Preimages Pair Preimages Pair Preimages

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-102
SLIDE 102

Pair Preimages Pair Preimages Pair Preimages

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-103
SLIDE 103

Pair Preimages Pair Preimages Pair Preimages

:

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-104
SLIDE 104

Pair Preimages Pair Preimages Pair Preimages

and :

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-105
SLIDE 105

Pair Preimages Pair Preimages Pair Preimages

:

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-106
SLIDE 106

Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices

  • Define

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-107
SLIDE 107

Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices

  • Define
  • Derive

and others so that distributes; e.g.

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-108
SLIDE 108

Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices

  • Define
  • Derive

and others so that distributes; e.g.

  • Distributive properties makes proving this very easy:

Theorem (correctness). For all , .

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-109
SLIDE 109

Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices

  • Define
  • Derive

and others so that distributes; e.g.

  • Distributive properties makes proving this very easy:

Theorem (correctness). For all , . In English: computes preimages under .

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-110
SLIDE 110

Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices

  • Define
  • Derive

and others so that distributes; e.g.

  • Distributive properties makes proving this very easy:

Theorem (correctness). For all , . In English: computes preimages under .

  • Other correctness proofs are similarly easy: prove 5 distributive

properties

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-111
SLIDE 111

Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices Correctness Theorems For Low, Low Prices

  • Define
  • Derive

and others so that distributes; e.g.

  • Distributive properties makes proving this very easy:

Theorem (correctness). For all , . In English: computes preimages under .

  • Other correctness proofs are similarly easy: prove 5 distributive

properties

  • Can add (random) and recursion to all semantics in one shot

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

slide-112
SLIDE 112

Abstraction Abstraction Abstraction

Rectangle: An interval or union of intervals, a subset of , or for rectangles and

13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13

slide-113
SLIDE 113

Abstraction Abstraction Abstraction

Rectangle: An interval or union of intervals, a subset of , or for rectangles and

  • Easy representation; easy intersection, join (which
  • verapproximates union), empty test, etc.

13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13

slide-114
SLIDE 114

Abstraction Abstraction Abstraction

Rectangle: An interval or union of intervals, a subset of , or for rectangles and

  • Easy representation; easy intersection, join (which
  • verapproximates union), empty test, etc.
  • Define

(and therefore ) by replacing sets and set

  • perations with rectangles and rectangle operations

13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13

slide-115
SLIDE 115

Abstraction Abstraction Abstraction

Rectangle: An interval or union of intervals, a subset of , or for rectangles and

  • Easy representation; easy intersection, join (which
  • verapproximates union), empty test, etc.
  • Define

(and therefore ) by replacing sets and set

  • perations with rectangles and rectangle operations
  • Recursion is somewhat tricky—requires fine control over

recursion depth or if choices

13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13

slide-116
SLIDE 116

In Theory... In Theory... In Theory...

Theorem (sound). computes overapproximations of the preimages computed by .

  • Consequence: Sampling in abstract preimages doesn’t leave

anything out

14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14

slide-117
SLIDE 117

In Theory... In Theory... In Theory...

Theorem (sound). computes overapproximations of the preimages computed by .

  • Consequence: Sampling in abstract preimages doesn’t leave

anything out Theorem (decreasing). never returns preimages larger than the given subdomain.

  • Consequence: Refining abstract preimage sets never results in a

worse approximation

14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14

slide-118
SLIDE 118

In Theory... In Theory... In Theory...

Theorem (sound). computes overapproximations of the preimages computed by .

  • Consequence: Sampling in abstract preimages doesn’t leave

anything out Theorem (decreasing). never returns preimages larger than the given subdomain.

  • Consequence: Refining abstract preimage sets never results in a

worse approximation Theorem (monotone). is monotone.

  • Consequence: Partitioning and then refining never results in a

worse approximation

14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14

slide-119
SLIDE 119

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-120
SLIDE 120

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-121
SLIDE 121

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-122
SLIDE 122

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-123
SLIDE 123

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-124
SLIDE 124

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-125
SLIDE 125

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-126
SLIDE 126

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-127
SLIDE 127

In Practice... In Practice... In Practice...

Theorems prove this always works:

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

slide-128
SLIDE 128

Program Domain Values Program Domain Values Program Domain Values

16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16

slide-129
SLIDE 129

Program Domain Values Program Domain Values Program Domain Values

  • Program inputs are infinite binary trees:

16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16

slide-130
SLIDE 130

Program Domain Values Program Domain Values Program Domain Values

  • Program inputs are infinite binary trees:
  • Every expression in a program is assigned a node

16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16

slide-131
SLIDE 131

Program Domain Values Program Domain Values Program Domain Values

  • Program inputs are infinite binary trees:
  • Every expression in a program is assigned a node
  • Implemented using lazy trees of random values

16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16

slide-132
SLIDE 132

Program Domain Values Program Domain Values Program Domain Values

  • Program inputs are infinite binary trees:
  • Every expression in a program is assigned a node
  • Implemented using lazy trees of random values
  • No probability density for domain, but there is a measure

16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16

slide-133
SLIDE 133

Example: Stochastic Ray Tracing Example: Stochastic Ray Tracing Example: Stochastic Ray Tracing

17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17

slide-134
SLIDE 134

Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification

(struct/drbayes float-any ()) (struct/drbayes float (value error))

18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18

slide-135
SLIDE 135

Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification

(struct/drbayes float-any ()) (struct/drbayes float (value error)) (define/drbayes (flsqrt x) (if (float-any? x) x (let ([v (float-value x)] [e (float-error x)]) (cond [(negative? v) (float-any)] [(zero? v) (float 0 0)] [else (float (sqrt v) (+ (- 1 (sqrt (- 1 e))) (* 1/2 epsilon)))]))))

18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18

slide-136
SLIDE 136

Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification

(struct/drbayes float-any ()) (struct/drbayes float (value error)) (define/drbayes (flsqrt x) (if (float-any? x) x (let ([v (float-value x)] [e (float-error x)]) (cond [(negative? v) (float-any)] [(zero? v) (float 0 0)] [else (float (sqrt v) (+ (- 1 (sqrt (- 1 e))) (* 1/2 epsilon)))]))))

  • Idea: sample e where (> (float-error e) threshold)

18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18

slide-137
SLIDE 137

Example: Probabilistic Verification Example: Probabilistic Verification Example: Probabilistic Verification

(struct/drbayes float-any ()) (struct/drbayes float (value error)) (define/drbayes (flsqrt x) (if (float-any? x) x (let ([v (float-value x)] [e (float-error x)]) (cond [(negative? v) (float-any)] [(zero? v) (float 0 0)] [else (float (sqrt v) (+ (- 1 (sqrt (- 1 e))) (* 1/2 epsilon)))]))))

  • Idea: sample e where (> (float-error e) threshold)
  • Verified flhypot, flsqrt1pm1, flsinh in Racket’s math

library, as well as others

18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18

slide-138
SLIDE 138

Examples: Other Inference Tasks Examples: Other Inference Tasks Examples: Other Inference Tasks

  • Typical Bayesian inference

Hierarchical models Bayesian regression Model selection

19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19

slide-139
SLIDE 139

Examples: Other Inference Tasks Examples: Other Inference Tasks Examples: Other Inference Tasks

  • Typical Bayesian inference

Hierarchical models Bayesian regression Model selection

  • Atypical

Programs that halt with probability < 1, or never halt Probabilistic context-free grammars with context-sensitive constraints

19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19

slide-140
SLIDE 140

Summary Summary Summary

  • Probabilistic inference is hard, so PPLs have been popping up

20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

slide-141
SLIDE 141

Summary Summary Summary

  • Probabilistic inference is hard, so PPLs have been popping up
  • Interpreting every program requires measure theory

20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

slide-142
SLIDE 142

Summary Summary Summary

  • Probabilistic inference is hard, so PPLs have been popping up
  • Interpreting every program requires measure theory
  • Defined a semantics that computes preimages

20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

slide-143
SLIDE 143

Summary Summary Summary

  • Probabilistic inference is hard, so PPLs have been popping up
  • Interpreting every program requires measure theory
  • Defined a semantics that computes preimages
  • Measuring abstract preimages or sampling in them carries out

inference

20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

slide-144
SLIDE 144

Summary Summary Summary

  • Probabilistic inference is hard, so PPLs have been popping up
  • Interpreting every program requires measure theory
  • Defined a semantics that computes preimages
  • Measuring abstract preimages or sampling in them carries out

inference

  • Can do a lot of cool stuff that’s normally inaccessible

20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

slide-145
SLIDE 145

https://github.com/ntoronto/drbayes

21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21