Trace Types and Denotational Semantics for Sound Programmable Inference in Probabilistic Languages

被引:18
|
作者
Lew, Alexander K. [1 ]
Cusumano-Towner, Marco F. [1 ]
Sherman, Benjamin [1 ]
Carbin, Michael [1 ]
Mansinghka, Vikash K. [2 ]
机构
[1] MIT, Comp Sci & Artificial Intelligence Lab, Cambridge, MA 02139 USA
[2] MIT, Dept Brain & Cognit Sci, Cambridge, MA 02139 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2020年 / 4卷 / POPL期
关键词
Probabilistic programming; type systems; programmable inference;
D O I
10.1145/3371087
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Modern probabilistic programming languages aim to formalize and automate key aspects of probabilistic modeling arid inference. Many languages provide constructs for programmable inference that enable developers to improve inference speed and accuracy by tailoring an algorithm for use with a particular model or dataset. Unfortunately, it is easy to use these constructs to write unsound programs that appear to run correctly but produce incorrect results. To address this problem, we present a denotational semantics for programmable inference in higher-order probabilistic programming languages, along with a type system that ensures that well-typed inference programs are sound by construction. A central insight is that the type of a probabilistic expression can track the space of its possible execution traces, not just the type of value that it returns. as these traces are often the objects that inference algorithms manipulate. We use our semantics and type system to establish soundness properties of custom inference programs that use constructs for variational, sequential Monte Carlo, importance sampling, and Markov chain Monte Carlo inference.
引用
收藏
页数:32
相关论文
共 13 条
  • [1] Sound Probabilistic Inference via Guide Types
    Wang, Di
    Hoffmann, Jan
    Reps, Thomas
    PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 788 - 803
  • [2] Probabilistic programming with programmable inference
    Mansinghka V.K.
    Schaechtle U.
    Handa S.
    Radul A.
    Chen Y.
    Rinard M.
    ACM SIGPLAN Notices, 2018, 53 (04): : 603 - 616
  • [3] Probabilistic Programming with Programmable Inference
    Mansinghka, Vikash K.
    Schaechtle, Ulrich
    Handa, Shivam
    Radul, Alexey
    Chen, Yutian
    Rinard, Martin
    PROCEEDINGS OF THE 39TH ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, PLDI 2018, 2018, : 603 - 616
  • [4] A Denotational Semantics for Low-Level Probabilistic Programs with Nondeterminism
    Wang, Di
    Hoffmann, Jan
    Reps, Thomas
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2019, 347 : 303 - 324
  • [5] Probabilistic Programming with Programmable Inference
    Mansinghka, Vikash K.
    Schaechtle, Ulrich
    Handa, Shivam
    Radul, Alexey
    Chen, Yutian
    Rinard, Martin
    ACM SIGPLAN NOTICES, 2018, 53 (04) : 603 - 616
  • [6] Probabilistic Programming with Programmable Variational Inference
    Becker, Mccoy R.
    Lew, Alexander K.
    Wang, Xiaoyan
    Ghavami, Matin
    Huot, Mathieu
    Rinard, Martin C.
    Mansinghka, Vikash K.
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2024, 8 (PLDI):
  • [7] Probabilistic Programming Inference via Intensional Semantics
    Castellan, Simon
    Paquet, Hugo
    PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2019: 28TH EUROPEAN SYMPOSIUM ON PROGRAMMING, 2019, 11423 : 322 - 349
  • [8] Bean Machine: A Declarative Probabilistic Programming Language For Efficient Programmable Inference
    Tehrani, Nazanin
    Arora, Nimar S.
    Li, Yucen Lily
    Shah, Kinjal Divesh
    Noursi, David
    Tingley, Michael
    Torabi, Narjes
    Masouleh, Sepehr
    Lippert, Eric
    Meijer, Erik
    INTERNATIONAL CONFERENCE ON PROBABILISTIC GRAPHICAL MODELS, VOL 138, 2020, 138 : 485 - 496
  • [9] Correctness of Sequential Monte Carlo Inference for Probabilistic Programming Languages
    Lunden, Daniel
    Borgstrom, Johannes
    Broman, David
    PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2021, 2021, 12648 : 404 - 431
  • [10] Genetic Programming on Program Traces as an Inference Engine for Probabilistic Languages
    Batishcheva, Vita
    Potapov, Alexey
    ARTIFICIAL GENERAL INTELLIGENCE (AGI 2015), 2015, 9205 : 14 - 24