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

被引:15
|
作者
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
关键词
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
相关论文
共 50 条
  • [1] Denotational Cost Semantics for Functional Languages with Inductive Types
    Danner, Norman
    Licata, Daniel R.
    Ramyaa, Ramyaa
    PROCEEDINGS OF THE 20TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING (ICFP'15), 2015, : 140 - 151
  • [2] Denotational Cost Semantics for Functional Languages with Inductive Types
    Danner, Norman
    Licata, Daniel R.
    Ramyaa, Ramyaa
    ACM SIGPLAN NOTICES, 2015, 50 (09) : 140 - 151
  • [3] Denotational and operational semantics for interaction languages: Application to trace analysis
    Mahe, Erwan
    Gaston, Christophe
    Le Gall, Pascale
    SCIENCE OF COMPUTER PROGRAMMING, 2024, 232
  • [4] DENOTATIONAL SEMANTICS OF QUERY LANGUAGES
    SUBIETA, K
    INFORMATION SYSTEMS, 1987, 12 (01) : 69 - 82
  • [5] DENOTATIONAL SEMANTICS OF PROGRAMMING LANGUAGES
    TENNENT, RD
    COMMUNICATIONS OF THE ACM, 1976, 19 (08) : 437 - 453
  • [6] Equivalence of Denotational and Operational Semantics for Interaction Languages
    Mahe, Erwan
    Gaston, Christophe
    Le Gall, Pascale
    THEORETICAL ASPECTS OF SOFTWARE ENGINEERING, TASE 2022, 2022, 13299 : 113 - 130
  • [7] 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
  • [8] Sound and Complete Axiomatization of Trace Semantics for Probabilistic Systems
    Silva, Alexandra
    Sokolova, Ana
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2011, 276 : 291 - 311
  • [9] DENOTATIONAL SEMANTICS OF PARALLEL PROGRAMMING-LANGUAGES
    BREZANY, P
    KYBERNETIKA, 1983, 19 (03) : 248 - 262
  • [10] Probabilistic Denotational Semantics for an Interrupt Modelling Language
    Huang, Yanhong
    Zhao, Yongxin
    Qin, Shengchao
    He, Jifeng
    2015 20TH INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS (ICECCS), 2015, : 160 - 169