Monolingual Probabilistic Programming Using Generalized Coroutines

Oleg Kiselyov, Chung-chieh Shan
Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence, PMLR R7:285-292, 2009.

Abstract

Probabilistic programming languages and modeling toolkits are two modular ways to build and reuse stochastic models and inference procedures. Combining strengths of both, we express models and inference as generalized coroutines in the same general-purpose language. We use existing facilities of the language, such as rich libraries, optimizing compilers, and types, to develop concise, declarative, and realistic models with competitive performance on exact and approximate inference. In particular, a wide range of models can be expressed using memoization. Because deterministic parts of models run at full speed, custom inference procedures are trivial to incorporate, and inference procedures can reason about themselves without interpretive overhead. Within this framework, we introduce a new, general algorithm for importance sampling with look-ahead.

Cite this Paper


BibTeX
@InProceedings{pmlr-vR7-kiselyov09a, title = {Monolingual Probabilistic Programming Using Generalized Coroutines}, author = {Kiselyov, Oleg and Shan, Chung-chieh}, booktitle = {Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence}, pages = {285--292}, year = {2009}, editor = {Bilmes, Jeff and Ng, Andrew Y.}, volume = {R7}, series = {Proceedings of Machine Learning Research}, month = {18--21 Jun}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/r7/main/assets/kiselyov09a/kiselyov09a.pdf}, url = {https://proceedings.mlr.press/r7/kiselyov09a.html}, abstract = {Probabilistic programming languages and modeling toolkits are two modular ways to build and reuse stochastic models and inference procedures. Combining strengths of both, we express models and inference as generalized coroutines in the same general-purpose language. We use existing facilities of the language, such as rich libraries, optimizing compilers, and types, to develop concise, declarative, and realistic models with competitive performance on exact and approximate inference. In particular, a wide range of models can be expressed using memoization. Because deterministic parts of models run at full speed, custom inference procedures are trivial to incorporate, and inference procedures can reason about themselves without interpretive overhead. Within this framework, we introduce a new, general algorithm for importance sampling with look-ahead.}, note = {Reissued by PMLR on 04 October 2026.} }
Endnote
%0 Conference Paper %T Monolingual Probabilistic Programming Using Generalized Coroutines %A Oleg Kiselyov %A Chung-chieh Shan %B Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence %C Proceedings of Machine Learning Research %D 2009 %E Jeff Bilmes %E Andrew Y. Ng %F pmlr-vR7-kiselyov09a %I PMLR %P 285--292 %U https://proceedings.mlr.press/r7/kiselyov09a.html %V R7 %X Probabilistic programming languages and modeling toolkits are two modular ways to build and reuse stochastic models and inference procedures. Combining strengths of both, we express models and inference as generalized coroutines in the same general-purpose language. We use existing facilities of the language, such as rich libraries, optimizing compilers, and types, to develop concise, declarative, and realistic models with competitive performance on exact and approximate inference. In particular, a wide range of models can be expressed using memoization. Because deterministic parts of models run at full speed, custom inference procedures are trivial to incorporate, and inference procedures can reason about themselves without interpretive overhead. Within this framework, we introduce a new, general algorithm for importance sampling with look-ahead. %Z Reissued by PMLR on 04 October 2026.
APA
Kiselyov, O. & Shan, C.. (2009). Monolingual Probabilistic Programming Using Generalized Coroutines. Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence, in Proceedings of Machine Learning Research R7:285-292 Available from https://proceedings.mlr.press/r7/kiselyov09a.html. Reissued by PMLR on 04 October 2026.

Related Material