Insomnia: Types and Modules for Probabilistic Programming
In probabilistic programming languages, model construction and inference are separate tasks. The former is done by the language users and the latter by the language developers. Unfettered by concerns about inference, modelers will want to create big, complex probabilistic programs, which will present familiar problems: Models may become too big to comprehend, debug or validate as wholes. Users building large applications will need to divide and coordinate work among several people and will need to reuse common elements of models without rebuilding them. We hypothesize that model creation will benefit from two linguistic tools that have proven helpful in deterministic programming: types and modules.
With Insomnia, we hope to provide the best of two worlds: to help with the “democratization of machine learning,” we provide a language with abstractions for modular development of complex probabilistic programs. To help with analysis and understanding of models’ properties, we define the meaning of modular models by elaborating them into a small (module-free) core calculus whose semantics may be studied further.