One long-term goal for research on probabilistic programming languages (PPLs) is efficient inference using a single, generic inference engine. Many current inference engines are, however, interpreters for the given PP, leading to substantial overhead and poor performance. This paper describes a PPL compiler, SWIFT, that generates model-specific and inference-algorithm-specific target code from a given PP in the BLOG language, in much the same way that a Prolog compiler generates code that performs backward-chaining logical inference for a specific Prolog program. This approach eliminates a great deal of interpretation overhead. We evaluate the performance of SWIFT and existing systems such as BLOG, BUGS, Church, Stan, and infer.net on several benchmark problems. In our experiments, SWIFT's compiled code runs 100x faster than the original BLOG engine, and much faster than other systems on the same models.
Title
SWIFT: Compiled Inference for Probabilistic Programs
Published
2015-03-15
Full Collection Name
Electrical Engineering & Computer Sciences Technical Reports
Other Identifiers
EECS-2015-12
Type
Text
Extent
16 p
Archive
The Engineering Library
Usage Statement
Researchers may make free and open use of the UC Berkeley Library’s digitized public domain materials. However, some materials in our online collections may be protected by U.S. copyright law (Title 17, U.S.C.). Use or reproduction of materials protected by copyright beyond that allowed by fair use (Title 17, U.S.C. § 107) requires permission from the copyright owners. The use or reproduction of some materials may also be restricted by terms of University of California gift or purchase agreements, privacy and publicity rights, or trademark law. Responsibility for determining rights status and permissibility of any use or reproduction rests exclusively with the researcher. To learn more or make inquiries, please see our permissions policies (https://www.lib.berkeley.edu/about/permissions-policies).