Monolingual probabilistic programming using generalized coroutines
Oleg Kiselyov
FNMOC
- leg@pobox.com
Chung-chieh Shan
Rutgers University ccshan@cs.rutgers.edu
Monolingual probabilistic programming using generalized coroutines - - PowerPoint PPT Presentation
Monolingual probabilistic programming using generalized coroutines Oleg Kiselyov Chung-chieh Shan FNMOC Rutgers University oleg@pobox.com ccshan@cs.rutgers.edu 19 June 2009 This session . . . programming formalism 2/14 This talk . . .
FNMOC
Rutgers University ccshan@cs.rutgers.edu
2/14
2/14
2/14
2/14
3/14
3/14
(BNT, PFP)
(BLOG, IBAL,
3/14
(BNT, PFP)
(BLOG, IBAL,
3/14
(BNT, PFP)
(BLOG, IBAL,
3/14
(BNT, PFP)
(BLOG, IBAL,
4/14
5/14
5/14
5/14
5/14
5/14
5/14
6/14
◮ Rich libraries: lists, arrays, database access, I/O, . . . ◮ Type inference ◮ Functions as first-class values ◮ Compiler ◮ Debugger ◮ Memoization
6/14
◮ Rich libraries: lists, arrays, database access, I/O, . . . ◮ Type inference ◮ Functions as first-class values ◮ Compiler ◮ Debugger ◮ Memoization
6/14
◮ Rich libraries: lists, arrays, database access, I/O, . . . ◮ Type inference ◮ Functions as first-class values ◮ Compiler ◮ Debugger ◮ Memoization
7/14
7/14
7/14
7/14
7/14
7/14
8/14
9/14
✳✽ ✳✷ ✳✸
✳✷ . . . ✳✻ . . . ✳✸ ✳✺ Exact inference by depth-first brute-force enumeration. Rejection sampling by top-down random traversal.
9/14
✳✽
✳✷ ✳✸
✳✷
✳✻
✳✸ ✳✺ Exact inference by depth-first brute-force enumeration. Rejection sampling by top-down random traversal.
9/14
✳✽
✳✷ ✳✸
✳✷
✳✻
✳✸ ✳✺ Exact inference by depth-first brute-force enumeration. Rejection sampling by top-down random traversal.
9/14
✳✽
✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺ Exact inference by depth-first brute-force enumeration. Rejection sampling by top-down random traversal.
9/14
✳✽ closed ✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺ Exact inference by depth-first brute-force enumeration. Rejection sampling by top-down random traversal.
9/14
✳✽ closed ✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺
◮ Brute-force enumeration becomes bucket elimination ◮ Sampling becomes particle filtering
9/14
✳✽ closed ✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺
(Giry 1982, Moggi 1990, Filinski 1994)
(Strachey & Wadsworth 1974, Felleisen et al. 1987, Danvy & Filinski 1989)
◮ Model runs inside a thread. ◮ dist clones the thread. ◮ fail kills the thread. ◮ Memoization mutates thread-local storage.
10/14
✳✽
✳✷ ✳✸
✳✷
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✶
10/14
✳✽
✳✷ ✳✸
✳✷
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✶
10/14
✳✽
✳✷ ✳✸
✳✷
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✶
10/14
✳✽
✳✷ ✳✸
✳✷
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✿✼✺
10/14
✳✽
✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✿✼✺
10/14
✳✽
✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✿✼✺
10/14
✳✽
✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✵
10/14
✳✽ closed ✳✷ ✳✸
✳✷ closed
✳✻
✳✸ ✳✺ Probability mass ♣❝ ❂ ✵
11/14
12/14
(Pfeffer 2007)
12/14
(Pfeffer 2007)
12/14
(Pfeffer 2007)
12/14
(Pfeffer 2007)
12/14
(Pfeffer 2007)
12/14
(Pfeffer 2007)
12/14
(Pfeffer 2007)
5 10 15 20 25 30 35 40
Frequency in 100 trials ln Pr(D = 1 | S = 1) IBAL 90 seconds 30 seconds
13/14
(Milch et al. 2007)
13/14
(Milch et al. 2007)
13/14
(Milch et al. 2007)
13/14
(Milch et al. 2007)
14/14