categorical models of probability with symmetries
play

Categorical models of probability with symmetries Sam Staton, - PowerPoint PPT Presentation

Categorical models of probability with symmetries Sam Staton, Oxford Categorical models of probability with symmetries My starting point: Probabilistic programming is an internal language for categorical probability theory (as


  1. Categorical models 
 of probability 
 with symmetries Sam Staton, Oxford

  2. Categorical models 
 of probability with symmetries My starting point: • Probabilistic programming is an internal language for categorical probability theory 
 (as well as a useful practical tool in stats/ML). • Programming languages already have mechanisms for abstraction and invariance. • These can give new perspectives on 
 symmetry in probability.

  3. Plan of talk: 1. Intuitive illustrations of symmetries in a. random graphs b. beta distributions / Pólya urns 2. Models for a. beta / Pólya urns Staton, Stein, Yang, Ackerman, Freer, Roy, ICALP 2018. b. random graphs ongoing work with Ackerman, Freer, Roy, Yang.

  4. Building infinite random graphs a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 && not(edge(b,c)))

  5. Building infinite random graphs a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 && not(edge(b,c))) a b c

  6. Building infinite random graphs a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Example: && not(edge(b,c))) get() = uniform S n edge(p,q) 
 = if d(p,q) < π / 2 
 then True else False

  7. Building infinite random graphs Interface: 
 a <- get() b <- get() get() : node 
 return (edge(a,b)) edge(node,node) : bool Example: get() = uniform S n edge(p,q) 
 = if d(p,q) < π / 2 
 then True else False

  8. Building infinite random graphs a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Example: && not(edge(b,c))) get() = uniform S n edge(p,q) 
 = if d(p,q) < π / 2 
 then True else False

  9. Building infinite random graphs a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Data flow graph && not(edge(b,c))) a get b get horn? get c

  10. Building infinite random graphs c <- get() Interface: 
 b <- get() get() : node 
 a <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Data flow graph && not(edge(b,c))) a get b get horn? get c

  11. Building infinite random graphs a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(c,b) && edge(c,a) 
 Data flow graph && not(edge(b,a))) c get b get horn? get a Invariance under symmetries of data flow = graph exchangeability

  12. Building infinite random graphs Interface: 
 get() : node 
 edge(node,node) : bool a <- get() The b <- get() interface return (a < b) doesn’t a <- get() allow: b <- get() return (sin(a) = cos(b))

  13. Building infinite random graphs Interface: 
 Invariance under changes to implementation 
 get() : node 
 = graph exchangeability edge(node,node) : bool a <- get() The b <- get() interface return (a < b) doesn’t a <- get() allow: b <- get() return (sin(a) = cos(b))

  14. Summary of symmetries Interface: 
 get() : node 
 edge(node,node) : bool Invariance under implementation details 
 + data flow symmetries 
 = 
 graph exchangeability 
 (Aldous-Hoover)

  15. Another model a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Example: && not(edge(b,c))) get() = uniform S n edge(p,q) = [d(p,q) < π / 2 ] building on 
 Bubeck, Ding, Eldan, Racz, 2015 
 Devroye, György, Lugosi, Udina, 2011

  16. Another model a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Example: && not(edge(b,c))) get() = uniform(0,1) edge(p,q) 
 = memoize p,q (bernoulli(0.5)) building on 
 Bubeck, Ding, Eldan, Racz, 2015 
 Devroye, György, Lugosi, Udina, 2011

  17. Another model a <- get() Interface: 
 b <- get() get() : node 
 c <- get() edge(node,node) : bool return (edge(a,b) && edge(a,c) 
 Example: && not(edge(b,c))) get() = uniform(0,1) edge(p,q) 
 = memoize p,q (bernoulli(0.5)) Roy, a Mansinghka, get Goodman, Tenenbaum, ICML 2008 b get horn? building on 
 Bubeck, Ding, Eldan, Racz, 2015 
 get c Devroye, György, Lugosi, Udina, 2011

  18. Summary of symmetries Interface: 
 get() : node 
 edge(node,node) : bool Invariance under implementation details 
 + data flow symmetries 
 = 
 graph exchangeability 
 (Aldous-Hoover)

  19. Plan of talk: 1. Intuitive illustrations of symmetries in a. random graphs b. beta distributions / Pólya urns 2. Models for a. beta / Pólya urns Staton, Stein, Yang, Ackerman, Freer, Roy, ICALP 2018. b. random graphs ongoing work with Ackerman, Freer, Roy, Yang.

  20. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2))

  21. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2)) b1 sample get -&not(-) a sample b2

  22. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2)) Example: get() = uniform(0,1) sample(p) = bernoulli(p)

  23. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2)) Example: get() = uniform(0,1) Prob(return True) = sample(p) = bernoulli(p) 1 ∫ p (1 − p ) d p = 1 6 0

  24. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2)) Example: After get() = uniform(0,1) 10000 sample(p) = bernoulli(p) runs… 1632 8368 True False

  25. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2)) Example: get() = uniform(0,1) sample(p) = bernoulli(p)

  26. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- uniform(0,1) b1 <- bernoulli(a) get() : I 
 b2 <- bernoulli(a) sample(I) : bool return (b1 & not(b2)) Example: get() = uniform(0,1) sample(p) = bernoulli(p)

  27. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- uniform(0,1) b1 <- bernoulli(a) get() : I 
 b2 <- bernoulli(a) sample(I) : bool return (b1 & not(b2)) Probability density a

  28. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- uniform(0,1) b1 <- bernoulli(a) get() : I 
 b2 <- bernoulli(a) sample(I) : bool return (b1 & not(b2)) Probability density 1 b1 <- bernoulli( ) beta(1,2) beta(2,1) 2 a <- beta(1+b1,2-b1) b2 <- bernoulli(a) return (b1 & not(b2)) a

  29. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- uniform(0,1) b1 <- bernoulli(a) get() : I 
 b2 <- bernoulli(a) sample(I) : bool return (b1 & not(b2)) Probability density beta(1,3) beta(3,1) 1 b1 <- bernoulli( ) beta(1,2) beta(2,1) 2 beta(2,2) 1 + 𝚌𝟸 b2 <- bernoulli( ) 3 a <- beta( 1+b1+b2,3-b1-b2 ) a return (b1 & not(b2))

  30. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- uniform(0,1) b1 <- bernoulli(a) get() : I 
 b2 <- bernoulli(a) sample(I) : bool return (b1 & not(b2)) Probability density beta(1,3) beta(3,1) 1 b1 <- bernoulli( ) beta(1,2) beta(2,1) 2 beta(2,2) 1 + 𝚌𝟸 b2 <- bernoulli( ) 3 a <- beta( 1+b1+b2,3-b1-b2 ) a return (b1 & not(b2))

  31. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- uniform(0,1) b1 <- bernoulli(a) get() : I 
 b2 <- bernoulli(a) sample(I) : bool return (b1 & not(b2)) Prob(return True) = 1 b1 <- bernoulli( ) 1 2 ⋅ 1 3 = 1 2 1 + 𝚌𝟸 6 b2 <- bernoulli( ) 3 a <- beta( 1+b1+b2,3-b1-b2 ) No integration required! return (b1 & not(b2))

  32. Example 2: Beta / bernoulli Given an unknown coin, what is the probability of 
 heads then tails? Interface: 
 a <- get() b1 <- sample(a) get() : I 
 b2 <- sample(a) sample(I) : bool return (b1 & not(b2)) Another example: get() = new urn sample(p) = Pólya draw: one out, two in

Recommend


More recommend