skip to main content

This is the moment for probabilistic loops

Published:31 October 2022Publication History
Skip Abstract Section

Abstract

We present a novel static analysis technique to derive higher moments for program variables for a large class of probabilistic loops with potentially uncountable state spaces. Our approach is fully automatic, meaning it does not rely on externally provided invariants or templates. We employ algebraic techniques based on linear recurrences and introduce program transformations to simplify probabilistic programs while preserving their statistical properties. We develop power reduction techniques to further simplify the polynomial arithmetic of probabilistic programs and define the theory of moment-computable probabilistic loops for which higher moments can precisely be computed. Our work has applications towards recovering probability distributions of random variables and computing tail probabilities. The empirical evaluation of our results demonstrates the applicability of our work on many challenging examples.

References

  1. Christel Baier and Joost-Pieter Katoen. 2008. Principles of model checking. MIT Press. ISBN 978-0-262-02649-9 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Jialu Bao, Nitesh Trivedi, Drashti Pathak, Justin Hsu, and Subhajit Roy. 2022. Data-Driven Invariant Learning for Probabilistic Programs. In Proc. of CAV. https://doi.org/10.1007/978-3-031-13185-1_3 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Gilles Barthe, Thomas Espitau, Luis María Ferrer Fioriti, and Justin Hsu. 2016. Synthesizing Probabilistic Invariants via Doob’s Decomposition. In Proc. of CAV. https://doi.org/10.1007/978-3-319-41528-4_3 Google ScholarGoogle ScholarCross RefCross Ref
  4. Gilles Barthe, Benjamin Grégoire, and Santiago Zanella Béguelin. 2012. Probabilistic Relational Hoare Logics for Computer-Aided Security Proofs. In Proc. of MPC. https://doi.org/10.1007/978-3-642-31113-0 Google ScholarGoogle ScholarCross RefCross Ref
  5. Gilles Barthe, Joost-Pieter Katoen, and Alexandra Silva. 2020. Foundations of Probabilistic Programming. Cambridge University Press. https://doi.org/10.1017/9781108770750 Google ScholarGoogle ScholarCross RefCross Ref
  6. Gilles Barthe, Boris Köpf, Federico Olmedo, and Santiago Zanella Béguelin. 2012. Probabilistic Relational Reasoning for Differential Privacy. In Proc. of POPL. https://doi.org/10.1145/2103656.2103670 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ezio Bartocci, Laura Kovács, and Miroslav Stankovic. 2019. Automatic Generation of Moment-Based Invariants for Prob-Solvable Loops. In Proc. of ATVA. https://doi.org/10.1007/978-3-030-31784-3_15 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Ezio Bartocci, Laura Kovács, and Miroslav Stankovic. 2020. Analysis of Bayesian Networks via Prob-Solvable Loops. In Proc. of ICTAC. https://doi.org/10.1007/978-3-030-64276-1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ezio Bartocci, Laura Kovács, and Miroslav Stankovic. 2020. Mora - Automatic Generation of Moment-Based Invariants. In Proc. of TACAS. https://doi.org/10.1007/978-3-030-45190-5_28 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Kevin Batz, Mingshuai Chen, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Philipp Schröer. 2021. Latticed k-Induction with an Application to Probabilistic Programs. In Proc. of CAV. https://doi.org/10.1007/978-3-030-81688-9_25 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Stéphane Boucheron, Gábor Lugosi, and Pascal Massart. 2013. Concentration Inequalities - A Nonasymptotic Theory of Independence. Oxford University Press. https://doi.org/10.1093/acprof:oso/9780199535255.001.0001 Google ScholarGoogle ScholarCross RefCross Ref
  12. Olivier Bouissou, Eric Goubault, Sylvie Putot, Aleksandar Chakarov, and Sriram Sankaranarayanan. 2016. Uncertainty Propagation Using Probabilistic Affine Forms and Concentration of Measure Inequalities. In Proc. of TACAS. https://doi.org/10.1007/978-3-662-49674-9_13 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jason Breck, John Cyphert, Zachary Kincaid, and Thomas W. Reps. 2020. Templates and Recurrences: Better Together. In Proc. of PLDI. https://doi.org/10.1145/3385412.3386035 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Aleksandar Chakarov and Sriram Sankaranarayanan. 2014. Expectation Invariants for Probabilistic Program Loops as Fixed Points. In Proc. of SAS. https://doi.org/10.1007/978-3-319-10936-7_6 Google ScholarGoogle ScholarCross RefCross Ref
  15. Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady, and Ehsan Kafshdar Goharshady. 2020. Polynomial Invariant Generation for Non-deterministic Recursive Programs. In Proc. of PLDI. https://doi.org/10.1145/3385412 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Yu-Fang Chen, Chih-Duo Hong, Bow-Yaw Wang, and Lijun Zhang. 2015. Counterexample-Guided Polynomial Loop Invariant Generation by Lagrange Interpolation. In Proc. of CAV. https://doi.org/10.1007/978-3-319-21690-4 Google ScholarGoogle ScholarCross RefCross Ref
  17. Yi Chou, Hansol Yoon, and Sriram Sankaranarayanan. 2020. Predictive Runtime Monitoring of Vehicle Models Using Bayesian Estimation and Reachability Analysis. In Proc. of IROS. https://doi.org/10.1109/IROS45743.2020.9340755 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Guillaume Claret, Sriram K. Rajamani, Aditya V. Nori, Andrew D. Gordon, and Johannes Borgström. 2013. Bayesian Inference Using Data Flow Analysis. In Proc. of ESEC/FSE. https://doi.org/10.1145/2491411.2491423 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Steven de Oliveira, Saddek Bensalem, and Virgile Prevosto. 2016. Polynomial Invariants by Linear Algebra. In Proc. of ATVA. https://doi.org/10.1007/978-3-319-46520-3_30 Google ScholarGoogle ScholarCross RefCross Ref
  20. Christian Dehnert, Sebastian Junges, Joost-Pieter Katoen, and Matthias Volk. 2017. A Storm is Coming: A Modern Probabilistic Model Checker. In Proc. of CAV. https://doi.org/10.1007/978-3-319-63390-9 Google ScholarGoogle ScholarCross RefCross Ref
  21. Rick Durrett. 2019. Probability: Theory and Examples. Cambridge University Press. https://doi.org/10.1017/9781108591034 Google ScholarGoogle ScholarCross RefCross Ref
  22. Azadeh Farzan and Zachary Kincaid. 2015. Compositional Recurrence Analysis. In Proc. of FMCAD. https://doi.org/10.1109/FMCAD.2015.7542253 Google ScholarGoogle ScholarCross RefCross Ref
  23. Yijun Feng, Lijun Zhang, David N. Jansen, Naijun Zhan, and Bican Xia. 2017. Finding Polynomial Loop Invariants for Probabilistic Programs. In Proc. of ATVA. https://doi.org/10.1007/978-3-319-68167-2_26 Google ScholarGoogle ScholarCross RefCross Ref
  24. Timon Gehr, Sasa Misailovic, and Martin T. Vechev. 2016. PSI: Exact Symbolic Inference for Probabilistic Programs. In Proc. of CAV. https://doi.org/10.1007/978-3-319-41528-4_4 Google ScholarGoogle ScholarCross RefCross Ref
  25. Zoubin Ghahramani. 2015. Probabilistic Machine Learning and Artificial Intelligence. Nature, https://doi.org/10.1038/nature14541 Google ScholarGoogle ScholarCross RefCross Ref
  26. Friedrich Gretz, Joost-Pieter Katoen, and Annabelle McIver. 2013. Prinsys - On a Quest for Probabilistic Loop Invariants. In Proc. of QEST. https://doi.org/10.1007/978-3-642-40196-1_17 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Dominik Gruntz. 1996. On Computing Limits in a Symbolic Manipulation System. Ph. D. Dissertation. ETH Zürich. https://doi.org/10.3929/ETHZ-A-001631582 Google ScholarGoogle ScholarCross RefCross Ref
  28. Wilfred K. Hastings. 1970. Monte Carlo Sampling Methods Using Markov Chains and Their Applications. Biometrika, https://doi.org/10.2307/2334940 Google ScholarGoogle ScholarCross RefCross Ref
  29. Ted Herman. 1990. Probabilistic Self-Stabilization. Inform. Process. Lett., https://doi.org/10.1016/0020-0190(90)90107-9 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Steven Holtzen, Guy Van den Broeck, and Todd D. Millstein. 2020. Scaling Exact Inference for Discrete Probabilistic Programs. In Proc. of OOPSLA. https://doi.org/10.1145/3428208 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Steven Holtzen, Sebastian Junges, Marcell Vazquez-Chanlatte, Todd D. Millstein, Sanjit A. Seshia, and Guy Van den Broeck. 2021. Model Checking Finite-Horizon Markov Chains with Probabilistic Inference. In Proc. of CAV. https://doi.org/10.1007/978-3-030-81688-9_27 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Andreas Humenberger, Maximilian Jaroschek, and Laura Kovács. 2017. Automated Generation of Non-Linear Loop Invariants Utilizing Hypergeometric Sequences. In Proc. of ISSAC. https://doi.org/10.1145/3087604.3087623 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Andreas Humenberger, Maximilian Jaroschek, and Laura Kovács. 2018. Invariant Generation for Multi-Path Loops with Polynomial Assignments. In Proc. of VMCAI. https://doi.org/10.1007/978-3-319-73721-8_11 Google ScholarGoogle ScholarCross RefCross Ref
  34. Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2019. On the Hardness of Analyzing Probabilistic Programs. Acta Informatica, https://doi.org/10.1007/s00236-018-0321-1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Federico Olmedo. 2016. Weakest Precondition Reasoning for Expected Run-Times of Probabilistic Programs. In Proc. of ESOP. https://doi.org/10.1007/978-3-662-49498-1 Google ScholarGoogle ScholarCross RefCross Ref
  36. Richard M. Karp. 1994. Probabilistic Recurrence Relations. J. ACM, https://doi.org/10.1145/195613.195632 Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Joost-Pieter Katoen, Annabelle McIver, Larissa Meinicke, and Carroll C. Morgan. 2010. Linear-Invariant Generation for Probabilistic Programs: Automated Support for Proof-Based Methods. In Proc. of SAS. https://doi.org/10.1007/978-3-642-15769-1_24 Google ScholarGoogle ScholarCross RefCross Ref
  38. Joost-Pieter Katoen, Ivan S. Zapreev, Ernst Moritz Hahn, Holger Hermanns, and David N. Jansen. 2011. The Ins and Outs of the Probabilistic Model Checker MRMC. Perform. Eval., https://doi.org/10.1016/j.peva.2010.04.001 Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Manuel Kauers and Peter Paule. 2011. The Concrete Tetrahedron - Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates. Springer. https://doi.org/10.1007/978-3-7091-0445-3 Google ScholarGoogle ScholarCross RefCross Ref
  40. Zachary Kincaid, Jason Breck, John Cyphert, and T. Reps. 2019. Closed Forms for Numerical Loops. In Proc. of POPL. https://doi.org/10.1145/3290368 Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Zachary Kincaid, John Cyphert, Jason Breck, and T. Reps. 2018. Non-Linear Reasoning for Invariant Synthesis. In Proc. of POPL. https://doi.org/10.1145/3158142 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. John E. Kolassa. 2006. Series Approximation Methods in Statistics. Springer. https://doi.org/10.1007/0-387-32227-2 Google ScholarGoogle ScholarCross RefCross Ref
  43. Laura Kovács. 2008. Reasoning Algebraically About P-Solvable Loops. In Proc. of TACAS. https://doi.org/10.1007/978-3-540-78800-3_18 Google ScholarGoogle ScholarCross RefCross Ref
  44. Dexter Kozen. 1985. A Probabilistic PDL. J. Comput. System Sci., https://doi.org/10.1016/0022-0000(85)90012-1 Google ScholarGoogle ScholarCross RefCross Ref
  45. Satoshi Kura, Natsuki Urabe, and Ichiro Hasuo. 2019. Tail Probabilities for Randomized Program Runtimes via Martingales for Higher Moments. In Proc. of TACAS. https://doi.org/10.1007/978-3-030-17465-1_8 Google ScholarGoogle ScholarCross RefCross Ref
  46. Marta Z. Kwiatkowska, Gethin Norman, and David Parker. 2011. PRISM 4.0: Verification of Probabilistic Real-Time Systems. In Proc. of CAV. https://doi.org/10.1007/978-3-642-22110-1 Google ScholarGoogle ScholarCross RefCross Ref
  47. Marta Z. Kwiatkowska, Gethin Norman, and David Parker. 2012. Probabilistic Verification of Herman’s Self-Stabilisation Algorithm. Formal Aspects of Computing, https://doi.org/10.1007/s00165-012-0227-6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Milton F. Maritz. 2020. A Note on Exact Solutions of the Logistic Map. Chaos: An Interdisciplinary Journal of Nonlinear Science, https://doi.org/10.1063/1.5125097 Google ScholarGoogle ScholarCross RefCross Ref
  49. Robert M. May. 1976. Simple Mathematical Models With Very Complicated Dynamics. Nature, https://doi.org/10.1038/261459a0 Google ScholarGoogle ScholarCross RefCross Ref
  50. Annabelle McIver and Carroll Morgan. 2005. Abstraction, Refinement and Proof for Probabilistic Systems. Springer. https://doi.org/10.1007/b138392 Google ScholarGoogle ScholarCross RefCross Ref
  51. Marcel Moosbrugger, Miroslav Stankovič, Ezio Bartocci, and Laura Kovács. 2022. This is the Moment for Probabilistic Loops - Artifact (Polar). https://doi.org/10.5281/zenodo.7055030 Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Rajeev Motwani and Prabhakar Raghavan. 1995. Randomized Algorithms. Cambridge University Press. https://doi.org/10.1017/cbo9780511814075 Google ScholarGoogle ScholarCross RefCross Ref
  53. Praveena Narayanan, Jacques Carette, Wren Romano, Chung chieh Shan, and Robert Zinkov. 2016. Probabilistic Inference by Program Transformation in Hakaru (System Description). In Proc. of FLOPS. https://doi.org/10.1007/978-3-319-29604-3_5 Google ScholarGoogle ScholarCross RefCross Ref
  54. Enric Rodríguez-carbonell and Deepak Kapur. 2004. Automatic Generation of Polynomial Loop Invariants: Algebraic Foundations. In Proc. of ISSAC. https://doi.org/10.1145/1005285.1005324 Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Feras A. Saad, Martin C. Rinard, and Vikash K. Mansinghka. 2021. SPPL: Probabilistic Programming With Fast Exact Symbolic Inference. In Proc. of PLDI. https://doi.org/10.1145/3453483.3454078 Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Konstantin Selyunin, Denise Ratasich, Ezio Bartocci, Md. Ariful Islam, Scott A. Smolka, and Radu Grosu. 2015. Neural Programming: Towards Adaptive Control in Cyber-Physical Systems. In Proc. of CDC. https://doi.org/10.1109/CDC.2015.7403319 Google ScholarGoogle ScholarCross RefCross Ref
  57. Miroslav Stankovic, Ezio Bartocci, and Laura Kovács. 2022. Moment-Based Analysis of Bayesian Network Properties. Theor. Comput. Sci., https://doi.org/10.1016/j.tcs.2021.12.021 Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Di Wang, Jan Hoffmann, and Thomas Reps. 2021. Central Moment Analysis for Cost Accumulators in Probabilistic Programs. In Proc. of PLDI. https://doi.org/10.1145/3453483.3454062 Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Stanley L. Warner. 1965. Randomized Response: A Survey Technique for Eliminating Evasive Answer Bias. J. Am. Stat. Assoc., https://doi.org/10.1080/01621459.1965.10480775 Google ScholarGoogle ScholarCross RefCross Ref
  60. Håkan L. S. Younes and Reid G. Simmons. 2006. Statistical probabilistic model checking with a focus on time-bounded properties. Inf. Comput., https://doi.org/10.1016/j.ic.2006.05.002 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. This is the moment for probabilistic loops

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!