Data-Driven Invariant Learning for Probabilistic Programs

被引:14
作者
Bao, Jialu [1 ]
Trivedi, Nitesh [2 ]
Pathak, Drashti [3 ]
Hsu, Justin [1 ]
Roy, Subhajit [2 ]
机构
[1] Cornell Univ, Ithaca, NY 14853 USA
[2] Indian Inst Technol IIT Kanpur, Kanpur, Uttar Pradesh, India
[3] Amazon, Bengaluru, India
来源
COMPUTER AIDED VERIFICATION (CAV 2022), PT I | 2022年 / 13371卷
基金
美国国家科学基金会;
关键词
Probabilistic programs; Data-driven invariant learning; Weakest pre-expectations;
D O I
10.1007/978-3-031-13185-1_3
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Morgan and McIver's weakest pre-expectation framework is one of the most well-established methods for deductive verification of probabilistic programs. Roughly, the idea is to generalize binary state assertions to real-valued expectations, which can measure expected values of probabilistic program quantities. While loop-free programs can be analyzed by mechanically transforming expectations, verifying loops usually requires finding an invariant expectation, a difficult task. We propose a new view of invariant expectation synthesis as a regression problem: given an input state, predict the average value of the post-expectation in the output distribution. Guided by this perspective, we develop the first data-driven invariant synthesis method for probabilistic programs. Unlike prior work on probabilistic invariant inference, our approach can learn piecewise continuous invariants without relying on template expectations. We also develop a data-driven approach to learn sub-invariants from data, which can be used to upper- or lower-bound expected values. We implement our approaches and demonstrate their effectiveness on a variety of benchmarks from the probabilistic programming literature.
引用
收藏
页码:33 / 54
页数:22
相关论文
共 41 条
[31]   A New Proof Rule for Almost-Sure Termination [J].
McIver, Annabelle ;
Morgan, Carroll ;
Kaminski, Benjamin Lucien ;
Katoen, Joost-Pieter .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
[32]   Data-Driven Inference of Representation Invariants [J].
Miltner, Anders ;
Padhi, Saswat ;
Millstein, Todd ;
Walker, David .
PROCEEDINGS OF THE 41ST ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '20), 2020, :1-15
[33]   Probabilistic predicate transformers [J].
Morgan, C ;
McIver, A ;
Seidel, K .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1996, 18 (03) :325-353
[34]  
Quinlan J. R., 1992, Proceedings of the 5th Australian Joint Conference on Artificial Intelligence. AI '92, P343
[35]  
Roy Subhajit, 2021, 2021 IEEE Symposium on Security and Privacy (SP), P852, DOI 10.1109/SP40001.2021.00060
[36]  
Si XJ, 2018, ADV NEUR IN, V31
[37]   Trace Abstraction Modulo Probability [J].
Smith, Calvin ;
Hsu, Justin ;
Albarghouthi, Aws .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL)
[38]   Program sketching [J].
Solar-Lezama A. .
International Journal on Software Tools for Technology Transfer, 2013, 15 (5-6) :475-495
[39]  
Wang D, 2018, PLDI, DOI [10.1145/3192366.3192408, DOI 10.1145/3192366.3192408]
[40]   Central Moment Analysis for Cost Accumulators in Probabilistic Programs [J].
Wang, Di ;
Hoffmann, Jan ;
Reps, Thomas .
PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, :559-573