Functional programming for modular Bayesian inference

We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-art inference algorithms. Our design relies on three inherently functional features:...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Proceedings of ACM on programming languages 2018-09, Vol.2 (ICFP), p.1-29
Hauptverfasser: Ścibior, Adam, Kammar, Ohad, Ghahramani, Zoubin
Format: Artikel
Sprache:eng
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 29
container_issue ICFP
container_start_page 1
container_title Proceedings of ACM on programming languages
container_volume 2
creator Ścibior, Adam
Kammar, Ohad
Ghahramani, Zoubin
description We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-art inference algorithms. Our design relies on three inherently functional features: higher-order functions, inductive data-types, and support for either type-classes or an expressive module system. We provide a performant Haskell implementation of this architecture, demonstrating that high-level and modular probabilistic programming can be added as a library in sufficiently expressive languages. We review the core abstractions in this architecture: inference representations, inference transformations, and inference representation transformers. We then implement concrete instances of these abstractions, counterparts to particle filters and Metropolis-Hastings samplers, which form the basic building blocks of our library. By composing these building blocks we obtain state-of-the-art inference algorithms: Resample-Move Sequential Monte Carlo, Particle Marginal Metropolis-Hastings, and Sequential Monte Carlo Squared. We evaluate our implementation against existing probabilistic programming systems and find it is already competitively performant, although we conjecture that existing functional programming optimisation techniques could reduce the overhead associated with the abstractions we use. We show that our modular design enables deterministic testing of inherently stochastic Monte Carlo algorithms. Finally, we demonstrate using OCaml that an expressive module system can also implement our design.
doi_str_mv 10.1145/3236778
format Article
fullrecord <record><control><sourceid>crossref</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3236778</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>10_1145_3236778</sourcerecordid><originalsourceid>FETCH-LOGICAL-c258t-707362a4e933857d95385387c48ad0cad76647e9985b0f72bfb60ba32d4ceb9f3</originalsourceid><addsrcrecordid>eNpNj81KAzEYAIMoWGrxFXLztJrky-9Ri1Wh4EXPy7fZpER2k5K0h769ij14mjkNDCG3nN1zLtUDCNDG2AuyENKojkvBL__5NVm19sUY4w6kBbcganPM_pBKxonua9lVnOeUdzSWSucyHies9AlPoSXMNOUYasg-3JCriFMLqzOX5HPz_LF-7bbvL2_rx23nhbKHzjADWqAMDsAqMzr1A7DGS4sj8zgaraUJzlk1sGjEEAfNBgQxSh8GF2FJ7v66vpbWaoj9vqYZ66nnrP8d7s_D8A0Mhka6</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Functional programming for modular Bayesian inference</title><source>Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals</source><source>ACM Digital Library Complete</source><creator>Ścibior, Adam ; Kammar, Ohad ; Ghahramani, Zoubin</creator><creatorcontrib>Ścibior, Adam ; Kammar, Ohad ; Ghahramani, Zoubin</creatorcontrib><description>We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-art inference algorithms. Our design relies on three inherently functional features: higher-order functions, inductive data-types, and support for either type-classes or an expressive module system. We provide a performant Haskell implementation of this architecture, demonstrating that high-level and modular probabilistic programming can be added as a library in sufficiently expressive languages. We review the core abstractions in this architecture: inference representations, inference transformations, and inference representation transformers. We then implement concrete instances of these abstractions, counterparts to particle filters and Metropolis-Hastings samplers, which form the basic building blocks of our library. By composing these building blocks we obtain state-of-the-art inference algorithms: Resample-Move Sequential Monte Carlo, Particle Marginal Metropolis-Hastings, and Sequential Monte Carlo Squared. We evaluate our implementation against existing probabilistic programming systems and find it is already competitively performant, although we conjecture that existing functional programming optimisation techniques could reduce the overhead associated with the abstractions we use. We show that our modular design enables deterministic testing of inherently stochastic Monte Carlo algorithms. Finally, we demonstrate using OCaml that an expressive module system can also implement our design.</description><identifier>ISSN: 2475-1421</identifier><identifier>EISSN: 2475-1421</identifier><identifier>DOI: 10.1145/3236778</identifier><language>eng</language><ispartof>Proceedings of ACM on programming languages, 2018-09, Vol.2 (ICFP), p.1-29</ispartof><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-c258t-707362a4e933857d95385387c48ad0cad76647e9985b0f72bfb60ba32d4ceb9f3</citedby><cites>FETCH-LOGICAL-c258t-707362a4e933857d95385387c48ad0cad76647e9985b0f72bfb60ba32d4ceb9f3</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>314,777,781,27905,27906</link.rule.ids></links><search><creatorcontrib>Ścibior, Adam</creatorcontrib><creatorcontrib>Kammar, Ohad</creatorcontrib><creatorcontrib>Ghahramani, Zoubin</creatorcontrib><title>Functional programming for modular Bayesian inference</title><title>Proceedings of ACM on programming languages</title><description>We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-art inference algorithms. Our design relies on three inherently functional features: higher-order functions, inductive data-types, and support for either type-classes or an expressive module system. We provide a performant Haskell implementation of this architecture, demonstrating that high-level and modular probabilistic programming can be added as a library in sufficiently expressive languages. We review the core abstractions in this architecture: inference representations, inference transformations, and inference representation transformers. We then implement concrete instances of these abstractions, counterparts to particle filters and Metropolis-Hastings samplers, which form the basic building blocks of our library. By composing these building blocks we obtain state-of-the-art inference algorithms: Resample-Move Sequential Monte Carlo, Particle Marginal Metropolis-Hastings, and Sequential Monte Carlo Squared. We evaluate our implementation against existing probabilistic programming systems and find it is already competitively performant, although we conjecture that existing functional programming optimisation techniques could reduce the overhead associated with the abstractions we use. We show that our modular design enables deterministic testing of inherently stochastic Monte Carlo algorithms. Finally, we demonstrate using OCaml that an expressive module system can also implement our design.</description><issn>2475-1421</issn><issn>2475-1421</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2018</creationdate><recordtype>article</recordtype><recordid>eNpNj81KAzEYAIMoWGrxFXLztJrky-9Ri1Wh4EXPy7fZpER2k5K0h769ij14mjkNDCG3nN1zLtUDCNDG2AuyENKojkvBL__5NVm19sUY4w6kBbcganPM_pBKxonua9lVnOeUdzSWSucyHies9AlPoSXMNOUYasg-3JCriFMLqzOX5HPz_LF-7bbvL2_rx23nhbKHzjADWqAMDsAqMzr1A7DGS4sj8zgaraUJzlk1sGjEEAfNBgQxSh8GF2FJ7v66vpbWaoj9vqYZ66nnrP8d7s_D8A0Mhka6</recordid><startdate>20180901</startdate><enddate>20180901</enddate><creator>Ścibior, Adam</creator><creator>Kammar, Ohad</creator><creator>Ghahramani, Zoubin</creator><scope>AAYXX</scope><scope>CITATION</scope></search><sort><creationdate>20180901</creationdate><title>Functional programming for modular Bayesian inference</title><author>Ścibior, Adam ; Kammar, Ohad ; Ghahramani, Zoubin</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c258t-707362a4e933857d95385387c48ad0cad76647e9985b0f72bfb60ba32d4ceb9f3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2018</creationdate><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Ścibior, Adam</creatorcontrib><creatorcontrib>Kammar, Ohad</creatorcontrib><creatorcontrib>Ghahramani, Zoubin</creatorcontrib><collection>CrossRef</collection><jtitle>Proceedings of ACM on programming languages</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Ścibior, Adam</au><au>Kammar, Ohad</au><au>Ghahramani, Zoubin</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Functional programming for modular Bayesian inference</atitle><jtitle>Proceedings of ACM on programming languages</jtitle><date>2018-09-01</date><risdate>2018</risdate><volume>2</volume><issue>ICFP</issue><spage>1</spage><epage>29</epage><pages>1-29</pages><issn>2475-1421</issn><eissn>2475-1421</eissn><abstract>We present an architectural design of a library for Bayesian modelling and inference in modern functional programming languages. The novel aspect of our approach are modular implementations of existing state-of-the-art inference algorithms. Our design relies on three inherently functional features: higher-order functions, inductive data-types, and support for either type-classes or an expressive module system. We provide a performant Haskell implementation of this architecture, demonstrating that high-level and modular probabilistic programming can be added as a library in sufficiently expressive languages. We review the core abstractions in this architecture: inference representations, inference transformations, and inference representation transformers. We then implement concrete instances of these abstractions, counterparts to particle filters and Metropolis-Hastings samplers, which form the basic building blocks of our library. By composing these building blocks we obtain state-of-the-art inference algorithms: Resample-Move Sequential Monte Carlo, Particle Marginal Metropolis-Hastings, and Sequential Monte Carlo Squared. We evaluate our implementation against existing probabilistic programming systems and find it is already competitively performant, although we conjecture that existing functional programming optimisation techniques could reduce the overhead associated with the abstractions we use. We show that our modular design enables deterministic testing of inherently stochastic Monte Carlo algorithms. Finally, we demonstrate using OCaml that an expressive module system can also implement our design.</abstract><doi>10.1145/3236778</doi><tpages>29</tpages><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier ISSN: 2475-1421
ispartof Proceedings of ACM on programming languages, 2018-09, Vol.2 (ICFP), p.1-29
issn 2475-1421
2475-1421
language eng
recordid cdi_crossref_primary_10_1145_3236778
source Elektronische Zeitschriftenbibliothek - Frei zugängliche E-Journals; ACM Digital Library Complete
title Functional programming for modular Bayesian inference
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-19T02%3A53%3A00IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-crossref&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Functional%20programming%20for%20modular%20Bayesian%20inference&rft.jtitle=Proceedings%20of%20ACM%20on%20programming%20languages&rft.au=%C5%9Acibior,%20Adam&rft.date=2018-09-01&rft.volume=2&rft.issue=ICFP&rft.spage=1&rft.epage=29&rft.pages=1-29&rft.issn=2475-1421&rft.eissn=2475-1421&rft_id=info:doi/10.1145/3236778&rft_dat=%3Ccrossref%3E10_1145_3236778%3C/crossref%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true