Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Proving expected sensitivity of probabilistic programs with randomized variable-dependent termination time

Published: 20 December 2019 Publication History

Abstract

The notion of program sensitivity (aka Lipschitz continuity) specifies that changes in the program input result in proportional changes to the program output. For probabilistic programs the notion is naturally extended to expected sensitivity. A previous approach develops a relational program logic framework for proving expected sensitivity of probabilistic while loops, where the number of iterations is fixed and bounded. In this work, we consider probabilistic while loops where the number of iterations is not fixed, but randomized and depends on the initial input values. We present a sound approach for proving expected sensitivity of such programs. Our sound approach is martingale-based and can be automated through existing martingale-synthesis algorithms. Furthermore, our approach is compositional for sequential composition of while loops under a mild side condition. We demonstrate the effectiveness of our approach on several classical examples from Gambler's Ruin, stochastic hybrid systems and stochastic gradient descent. We also present experimental results showing that our automated approach can handle various probabilistic programs in the literature.

Supplementary Material

WEBM File (a25-wang.webm)

References

[1]
Alessandro Abate, Joost-Pieter Katoen, John Lygeros, and Maria Prandini. 2010. Approximate Model Checking of Stochastic Hybrid Systems. Eur. J. Control 16, 6 (2010), 624–641.
[2]
Sheshansh Agrawal, Krishnendu Chatterjee, and Petr Novotný. 2018. Lexicographic ranking supermartingales: an efficient approach to termination of probabilistic programs. PACMPL 2, POPL (2018), 34:1–34:32.
[3]
Alejandro Aguirre, Gilles Barthe, Justin Hsu, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2019. Kantorovich Continuity of Probabilistic Programs. CoRR abs/1901.06540 (2019). arXiv: 1901.06540 http://arxiv.org/abs/ 1901.06540
[4]
David J. Aldous. 1983. Random walks on finite groups and rapidly mixing Markov chains. Séminaire de probabilités de Strasbourg 17 (1983), 243–297. http://www.numdam.org/item/SPS_1983__17__243_0
[5]
Gilles Barthe, François Dupressoir, Sebastian Faust, Benjamin Grégoire, François-Xavier Standaert, and Pierre-Yves Strub. 2016. Parallel Implementations of Masking Schemes and the Bounded Moment Leakage Model. IACR Cryptology ePrint Archive 2016 (2016), 912. http://eprint.iacr.org/2016/912
[6]
Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2018. Proving expected sensitivity of probabilistic programs. PACMPL 2, POPL (2018), 57:1–57:29.
[7]
Gilles Barthe, Benjamin Grégoire, and Santiago Zanella Béguelin. 2009. Formal certification of code-based cryptographic proofs. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, Savannah, GA, USA, January 21-23, 2009. 90–101.
[8]
Gilles Barthe, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2017. Coupling proofs are probabilistic product programs. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017. 161–174. http://dl.acm.org/citation.cfm?id=3009896
[9]
Gilles Barthe, Boris Köpf, Federico Olmedo, and Santiago Zanella Béguelin. 2012. Probabilistic relational reasoning for differential privacy. In Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, Philadelphia, Pennsylvania, USA, January 22-28, 2012. 97–110.
[10]
Patrick Billingsley. 1995. Probability and Measure. JOHN WILEY & SONS.
[11]
Olivier Bousquet and André Elisseeff. 2002. Stability and Generalization. Journal of Machine Learning Research 2 (2002), 499–526. http://www.jmlr.org/papers/v2/bousquet02a.html
[12]
Aleksandar Chakarov and Sriram Sankaranarayanan. 2013. Probabilistic Program Analysis with Martingales. In CAV 2013. 511–526.
[13]
Krishnendu Chatterjee. 2012. Robustness of Structurally Equivalent Concurrent Parity Games. In Foundations of Software Science and Computational Structures - 15th International Conference, FOSSACS 2012, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2012, Tallinn, Estonia, March 24 - April 1, 2012. Proceedings. 270–285.
[14]
Krishnendu Chatterjee, Hongfei Fu, and Amir Kafshdar Goharshady. 2016. Termination Analysis of Probabilistic Programs Through Positivstellensatz’s. In Computer Aided Verification - 28th International Conference, CAV 2016, Toronto, ON, Canada, July 17-23, 2016, Proceedings, Part I (Lecture Notes in Computer Science), Swarat Chaudhuri and Azadeh Farzan (Eds.), Vol. 9779. Springer, 3–22.
[15]
Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady, and Nastaran Okati. 2018a. Computational Approaches for Stochastic Shortest Path on Succinct MDPs. In IJCAI 2018. 4700–4707.
[16]
Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady, and Nastaran Okati. 2018b. Computational Approaches for Stochastic Shortest Path on Succinct MDPs. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden. 4700–4707.
[17]
Krishnendu Chatterjee, Hongfei Fu, Petr Novotný, and Rouzbeh Hasheminezhad. 2018c. Algorithmic Analysis of Qualitative and Quantitative Termination Problems for Affine Probabilistic Programs. ACM Trans. Program. Lang. Syst. 40, 2 (2018), 7:1–7:45.
[18]
Krishnendu Chatterjee, Petr Novotný, and Ðorđe Žikelić. 2017. Stochastic invariants for probabilistic termination. In POPL 2017. 145–160.
[19]
Swarat Chaudhuri, Sumit Gulwani, and Roberto Lublinerman. 2010. Continuity analysis of programs. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2010, Madrid, Spain, January 17-23, 2010. 57–70.
[20]
Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, and Ikram Cherigui. 2017. A semantic account of metric preservation. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017. 545–556. http://dl.acm.org/citation.cfm?id=3009890
[21]
Josee Desharnais, Vineet Gupta, Radha Jagadeesan, and Prakash Panangaden. 2004. Metrics for labelled Markov processes. Theor. Comput. Sci. 318, 3 (2004), 323–354.
[22]
Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. 2006. Calibrating Noise to Sensitivity in Private Data Analysis. In Proceedings of the Third Conference on Theory of Cryptography (TCC’06). Springer-Verlag, Berlin, Heidelberg, 265–284.
[23]
Cynthia Dwork and Aaron Roth. 2014. The Algorithmic Foundations of Differential Privacy. Foundations and Trends in Theoretical Computer Science 9, 3-4 (2014), 211–407.
[24]
Hassan Eldib, Chao Wang, Mostafa M. I. Taha, and Patrick Schaumont. 2015. Quantitative Masking Strength: Quantifying the Power Side-Channel Resistance of Software Code. IEEE Trans. on CAD of Integrated Circuits and Systems 34, 10 (2015), 1558–1568.
[25]
J. Farkas. 1894. A Fourier-féle mechanikai elv alkalmazásai (Hungarian). Mathematikaiés Természettudományi Értesitö 12 (1894), 457–472.
[26]
Yijun Feng, Lijun Zhang, David N. Jansen, Naijun Zhan, and Bican Xia. 2017. Finding Polynomial Loop Invariants for Probabilistic Programs. In Automated Technology for Verification and Analysis - 15th International Symposium, ATVA 2017, Pune, India, October 3-6, 2017, Proceedings (Lecture Notes in Computer Science), Deepak D’Souza and K. Narayan Kumar (Eds.), Vol. 10482. Springer, 400–416.
[27]
Hongfei Fu. 2012. Computing Game Metrics on Markov Decision Processes. In Automata, Languages, and Programming -39th International Colloquium, ICALP 2012, Warwick, UK, July 9-13, 2012, Proceedings, Part II (Lecture Notes in Computer Science), Artur Czumaj, Kurt Mehlhorn, Andrew M. Pitts, and Roger Wattenhofer (Eds.), Vol. 7392. Springer, 227–238.
[28]
Hongfei Fu and Krishnendu Chatterjee. 2019. Termination of Nondeterministic Probabilistic Programs. In Verification, Model Checking, and Abstract Interpretation - 20th International Conference, VMCAI 2019, Cascais, Portugal, January 13-15, 2019, Proceedings (Lecture Notes in Computer Science), Constantin Enea and Ruzica Piskac (Eds.), Vol. 11388. Springer, 468–490.
[29]
Marco Gaboardi, Andreas Haeberlen, Justin Hsu, Arjun Narayan, and Benjamin C. Pierce. 2013. Linear dependent types for differential privacy. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’13, Rome, Italy - January 23 - 25, 2013. 357–370.
[30]
Moritz Hardt, Ben Recht, and Yoram Singer. 2016. Train faster, generalize better: Stability of stochastic gradient descent. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016. 1225–1234. http://jmlr.org/proceedings/papers/v48/hardt16.html
[31]
Mingzhang Huang, Hongfei Fu, and Krishnendu Chatterjee. 2018a. New Approaches for Almost-Sure Termination of Probabilistic Programs. In Programming Languages and Systems - 16th Asian Symposium, APLAS 2018, Wellington, New Zealand, December 2-6, 2018, Proceedings (Lecture Notes in Computer Science), Sukyoung Ryu (Ed.), Vol. 11275. Springer, 181–201.
[32]
Zixin Huang, Zhenbang Wang, and Sasa Misailovic. 2018b. PSense: Automatic Sensitivity Analysis for Probabilistic Programs. In Automated Technology for Verification and Analysis - 16th International Symposium, ATVA 2018, Los Angeles, CA, USA, October 7-10, 2018, Proceedings. 387–403.
[33]
Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Federico Olmedo. 2016. Weakest Precondition Reasoning for Expected Run-Times of Probabilistic Programs. In Programming Languages and Systems - 25th European Symposium on Programming, ESOP 2016, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, April 2-8, 2016, Proceedings. 364–389.
[34]
Dexter Kozen. 1985. A Probabilistic PDL. J. Comput. Syst. Sci. 30, 2 (1985), 162–178.
[35]
Orna Kupferman and Moshe Y. Vardi. 1997. Modular Model Checking. In Compositionality: The Significant Difference, International Symposium, COMPOS’97, Bad Malente, Germany, September 8-12, 1997. Revised Lectures (Lecture Notes in Computer Science), Willem P. de Roever, Hans Langmaack, and Amir Pnueli (Eds.), Vol. 1536. Springer, 381–401.
[36]
Annabelle McIver, Carroll Morgan, Benjamin Lucien Kaminski, and Joost-Pieter Katoen. 2017. A new proof rule for almost-sure termination. Proceedings of the ACM on Programming Languages 2, POPL (2017), 33.
[37]
S.P. Meyn and R.L. Tweedie. 1993. Markov Chains and Stochastic Stability. Springer-Verlag, London. available at: probability.ca/MT.
[38]
Carroll Morgan, Annabelle McIver, and Karen Seidel. 1996. Probabilistic Predicate Transformers. ACM Trans. Program. Lang. Syst. 18, 3 (1996), 325–353.
[39]
Yurii Nesterov. 2004. Introductory Lectures on Convex Optimization. Applied Optimization, Vol. 87. Springer-Verlag US.
[40]
Van Chan Ngo, Quentin Carbonneaux, and Jan Hoffmann. 2018. Bounded expectations: resource analysis for probabilistic programs. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2018, Philadelphia, PA, USA, June 18-22, 2018. 496–512.
[41]
Jason Reed and Benjamin C. Pierce. 2010. Distance makes the types grow stronger: a calculus for differential privacy. In Proceeding of the 15th ACM SIGPLAN international conference on Functional programming, ICFP 2010, Baltimore, Maryland, USA, September 27-29, 2010. 157–168.
[42]
Franck van Breugel and James Worrell. 2006. Approximating and computing behavioural distances in probabilistic transition systems. Theor. Comput. Sci. 360, 1-3 (2006), 373–385.
[43]
Peixin Wang, Hongfei Fu, Krishnendu Chatterjee, Yuxin Deng, and Ming Xu. 2019a. Proving Expected Sensitivity of Probabilistic Programs with Randomized Variable-Dependent Termination Time. CoRR abs/1902.04744 (2019). arXiv: 1902.04744 http://arxiv.org/abs/1902.04744
[44]
Peixin Wang, Hongfei Fu, Amir Kafshdar Goharshady, Krishnendu Chatterjee, Xudong Qin, and Wenjun Shi. 2019b. Cost analysis of nondeterministic probabilistic programs. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2019, Phoenix, AZ, USA, June 22-26, 2019., Kathryn S. McKinley and Kathleen Fisher (Eds.). ACM, 204–220.
[45]
David Williams. 1991. Probability with Martingales. Cambridge University Press.
[46]
Daniel Winograd-Cort, Andreas Haeberlen, Aaron Roth, and Benjamin C. Pierce. 2017. A framework for adaptive differential privacy. PACMPL 1, ICFP (2017), 10:1–10:29.

Cited By

View all
  • (2024)Equivalence and Similarity Refutation for Probabilistic ProgramsProceedings of the ACM on Programming Languages10.1145/36564628:PLDI(2098-2122)Online publication date: 20-Jun-2024
  • (2024)Static Posterior Inference of Bayesian Probabilistic Programming via Polynomial SolvingProceedings of the ACM on Programming Languages10.1145/36564328:PLDI(1361-1386)Online publication date: 20-Jun-2024
  • (2024)Quantitative Bounds on Resource Usage of Probabilistic ProgramsProceedings of the ACM on Programming Languages10.1145/36498248:OOPSLA1(362-391)Online publication date: 29-Apr-2024
  • Show More Cited By

Index Terms

  1. Proving expected sensitivity of probabilistic programs with randomized variable-dependent termination time

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 4, Issue POPL
        January 2020
        1984 pages
        EISSN:2475-1421
        DOI:10.1145/3377388
        Issue’s Table of Contents
        This work is licensed under a Creative Commons Attribution International 4.0 License.

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 20 December 2019
        Published in PACMPL Volume 4, Issue POPL

        Permissions

        Request permissions for this article.

        Check for updates

        Badges

        Author Tags

        1. Expected Sensitivity
        2. Martingales
        3. Probabilistic Programs

        Qualifiers

        • Research-article

        Funding Sources

        • National Natural Science Foundation of China (NSFC)
        • Austrian Science Fund (FWF) NFN

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)134
        • Downloads (Last 6 weeks)18
        Reflects downloads up to 15 Oct 2024

        Other Metrics

        Citations

        Cited By

        View all
        • (2024)Equivalence and Similarity Refutation for Probabilistic ProgramsProceedings of the ACM on Programming Languages10.1145/36564628:PLDI(2098-2122)Online publication date: 20-Jun-2024
        • (2024)Static Posterior Inference of Bayesian Probabilistic Programming via Polynomial SolvingProceedings of the ACM on Programming Languages10.1145/36564328:PLDI(1361-1386)Online publication date: 20-Jun-2024
        • (2024)Quantitative Bounds on Resource Usage of Probabilistic ProgramsProceedings of the ACM on Programming Languages10.1145/36498248:OOPSLA1(362-391)Online publication date: 29-Apr-2024
        • (2023)Judging Adam: Studying the Performance of Optimization Methods on ML4SE TasksProceedings of the 45th International Conference on Software Engineering: New Ideas and Emerging Results10.1109/ICSE-NIER58687.2023.00027(117-122)Online publication date: 17-May-2023
        • (2023)Automated Sensitivity Analysis for Probabilistic LoopsiFM 202310.1007/978-3-031-47705-8_2(21-39)Online publication date: 6-Nov-2023
        • (2023)AquaSense: Automated Sensitivity Analysis of Probabilistic Programs via Quantized InferenceAutomated Technology for Verification and Analysis10.1007/978-3-031-45332-8_16(288-301)Online publication date: 19-Oct-2023
        • (2022)Safe couplings: coupled refinement typesProceedings of the ACM on Programming Languages10.1145/35476436:ICFP(596-624)Online publication date: 31-Aug-2022
        • (2022)Tail-Bound Cost Analysis over Nondeterministic Probabilistic Programs关于非确定性概率程序消耗的尾部界限分析Journal of Shanghai Jiaotong University (Science)10.1007/s12204-022-2456-z28:6(772-782)Online publication date: 25-Jun-2022
        • (2021)Quantitative analysis of assertion violations in probabilistic programsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454102(1171-1186)Online publication date: 19-Jun-2021
        • (2021)A pre-expectation calculus for probabilistic sensitivityProceedings of the ACM on Programming Languages10.1145/34343335:POPL(1-28)Online publication date: 4-Jan-2021
        • Show More Cited By

        View Options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Get Access

        Login options

        Full Access

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media