skip to main content
research-article
Open Access

A pre-expectation calculus for probabilistic sensitivity

Published:04 January 2021Publication History
Skip Abstract Section

Abstract

Sensitivity properties describe how changes to the input of a program affect the output, typically by upper bounding the distance between the outputs of two runs by a monotone function of the distance between the corresponding inputs. When programs are probabilistic, the distance between outputs is a distance between distributions. The Kantorovich lifting provides a general way of defining a distance between distributions by lifting the distance of the underlying sample space; by choosing an appropriate distance on the base space, one can recover other usual probabilistic distances, such as the Total Variation distance. We develop a relational pre-expectation calculus to upper bound the Kantorovich distance between two executions of a probabilistic program. We illustrate our methods by proving algorithmic stability of a machine learning algorithm, convergence of a reinforcement learning algorithm, and fast mixing for card shuffling algorithms. We also consider some extensions: using our calculus to show convergence of Markov chains to the uniform distribution over states and an asynchronous extension to reason about pairs of program executions with different control flow.

References

  1. David Aldous. 1983. Random Walks on Finite Groups and Rapidly Mixing Markov Chains. In Séminaire de Probabilités XVII 1981/82 (Lecture Notes in Mathematics, Vol. 986 ). Springer-Verlag, 243-297. https://eudml.org/doc/113445Google ScholarGoogle Scholar
  2. Philip Amortila, Doina Precup, Prakash Panangaden, and Marc G. Bellemare. 2020. A Distributional Analysis of SamplingBased Reinforcement Learning Algorithms. In The 23rd International Conference on Artificial Intelligence and Statistics, AISTATS 2020, 26-28 August 2020, Online [Palermo, Sicily, Italy] (Proceedings of Machine Learning Research, Vol. 108 ), Silvia Chiappa and Roberto Calandra (Eds.). PMLR, 4357-4366. http://proceedings.mlr.press/v108/amortila20a.htmlGoogle ScholarGoogle Scholar
  3. Robert B. Ash and Catherine A. Doleans-Dade. 2000. Probability and Measure Theory. Academic Press.Google ScholarGoogle Scholar
  4. Arthur Azevedo de Amorim, Marco Gaboardi, Emilio Jesús Gallego Arias, and Justin Hsu. 2014. Really natural linear indexed type-checking. In Symposium on Implementation and Application of Functional Programming Languages (IFL), Boston, Massachusetts. ACM Press, 5 : 1-5 : 12. https://doi.org/10.1145/2746325.2746335 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, and Ikram Cherigui. 2017. A semantic account of metric preservation. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Paris, France. 545-556. https://doi.org/10.1145/3009837.3009890 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. 2018. An Algebraic Theory of Markov Processes. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, Anuj Dawar and Erich Grädel (Eds.). ACM, 679-688. https://doi.org/10.1145/3209108.3209177 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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. https://doi.org/10.1145/3158145 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Thomas Noll. 2019. Quantitative Separation Logic: A Logic for Reasoning About Probabilistic Pointer Programs. PACMPL 3, POPL ( 2019 ), 34 : 1-34 : 29. https://doi.org/10.1145/3290347 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2021. Relatively Complete Verification of Probabilistic Programs-An Expressive Language for Expectation-based Reasoning. Proc. ACM Program. Lang. 5, POPL ( 2021 ).Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Nick Benton. 2004. Simple Relational Correctness Proofs for Static Analyses and Program Transformations. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Venice, Italy. 14-25. https://doi.org/10. 1145/964001.964003 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Olivier Bousquet and André Elisseef. 2002. Stability and Generalization. Journal of Machine Learning Research 2 ( 2002 ), 499-526. http://www.jmlr.org/papers/v2/bousquet02a.htmlGoogle ScholarGoogle Scholar
  12. Swarat Chaudhuri, Sumit Gulwani, and Roberto Lublinerman. 2010. Continuity analysis of programs. In ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL), Madrid, Spain. 57-70. https://doi.org/10.1145/ 1706299.1706308 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Swarat Chaudhuri, Sumit Gulwani, and Roberto Lublinerman. 2012. Continuity and robustness of programs. Commun. ACM 55, 8 ( 2012 ), 107-115. https://doi.org/10.1145/2240236.2240262 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Marco Gaboardi, Andreas Haeberlen, Justin Hsu, Arjun Narayan, and Benjamin C. Pierce. 2013. Linear dependent types for diferential privacy. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Rome, Italy. 357-370. https://doi.org/10.1145/2429069.2429113 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Daniel Gebler, Kim G. Larsen, and Simone Tini. 2016. Compositional bisimulation metric reasoning with probabilistic process calculi. Logical Methods in Computer Science 12, 4 ( 2016 ). https://doi.org/10.2168/LMCS-12 ( 4 :12) 2016 Google ScholarGoogle ScholarCross RefCross Ref
  16. Daniel Gebler and Simone Tini. 2018. SOS specifications for uniformly continuous operators. J. Comput. Syst. Sci. 92 ( 2018 ), 113-151. https://doi.org/10.1016/j.jcss. 2017. 09.011 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Friedrich Gretz, Joost-Pieter Katoen, and Annabelle McIver. 2014. Operational versus weakest pre-expectation semantics for the probabilistic guarded command language. Perform. Evaluation 73 ( 2014 ), 110-132. https://doi.org/10.1016/j.peva. 2013. 11.004 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Moritz Hardt, Ben Recht, and Yoram Singer. 2016. Train faster, generalize better: Stability of stochastic gradient descent. In International Conference on Machine Learning (ICML), New York, NY (Journal of Machine Learning Research, Vol. 48 ). JMLR.org, 1225-1234. http://jmlr.org/proceedings/papers/v48/hardt16.htmlGoogle ScholarGoogle Scholar
  19. Zixin Huang, Zhenbang Wang, and Sasa Misailovic. 2018. 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 (LNCS, Vol. 11138 ), Shuvendu K. Lahiri and Chao Wang (Eds.). Springer, 387-403. https://doi.org/10.1007/978-3-030-01090-4_23 Google ScholarGoogle ScholarCross RefCross Ref
  20. Benjamin Lucien Kaminski and Joost-Pieter Katoen. 2017. A weakest pre-expectation semantics for mixed-sign expectations. In LICS. IEEE Computer Society, 1-12. https://doi.org/10.1109/LICS. 2017.8005153 Google ScholarGoogle ScholarCross RefCross Ref
  21. Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Federico Olmedo. 2016. Weakest Precondition Reasoning for Expected Run-Times of Probabilistic Programs. In European Symposium on Programming (ESOP), Eindhoven, The Netherlands (Lecture Notes in Computer Science, Vol. 9632 ). Springer-Verlag, 364-389. https://doi.org/10.1007/978-3-662-49498-1_15 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Dexter Kozen. 1985. A Probabilistic PDL. J. Comput. System Sci. 30, 2 ( 1985 ), 162-178. https://doi.org/10.1016/ 0022-0000 ( 85 ) 90012-1 Google ScholarGoogle ScholarCross RefCross Ref
  23. Annabelle McIver and Carroll Morgan. 2005. Abstraction, Refinement and Proof for Probabilistic Systems. Springer.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Carroll Morgan, Annabelle McIver, and Karen Seidel. 1996. Probabilistic Predicate Transformers. ACM Transactions on Programming Languages and Systems 18, 3 ( 1996 ), 325-353.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Federico Olmedo, Friedrich Gretz, Nils Jansen, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Annabelle McIver. 2018. Conditioning in Probabilistic Programming. ACM Trans. Program. Lang. Syst. 40, 1 ( 2018 ), 4 : 1-4 : 50. https: //doi.org/10.1145/3156018 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Federico Olmedo, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2016. Reasoning about Recursive Probabilistic Programs. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ' 16, New York, NY, USA, July 5-8, 2016, Martin Grohe, Eric Koskinen, and Natarajan Shankar (Eds.). ACM, 672-681. https://doi.org/10.1145/2933575.2935317 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. David Park. 1969. Fixpoint Induction and Proofs of Program Properties. Machine Intelligence 5 ( 1969 ).Google ScholarGoogle Scholar
  28. Benedetto Piccoli and Francesco Rossi. 2016. On Properties of the Generalized Wasserstein Distance. Archive for Rational Mechanics and Analysis 222, 3 ( 01 Dec 2016 ), 1339-1365. https://doi.org/10.1007/s00205-016-1026-7 Google ScholarGoogle ScholarCross RefCross Ref
  29. Jason Reed and Benjamin C Pierce. 2010. Distance Makes the Types Grow Stronger: A Calculus for Diferential Privacy. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Baltimore, Maryland. https://doi.org/10.1145/ 1863543.1863568 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Richard S. Sutton. 1988. Learning to Predict by the Methods of Temporal Diferences. Mach. Learn. 3 ( 1988 ), 9-44. https://doi.org/10.1007/BF00115009 Google ScholarGoogle ScholarCross RefCross Ref
  31. Cédric Villani. 2008. Optimal Transport: Old and New. Springer-Verlag.Google ScholarGoogle Scholar
  32. Peixin Wang, Hongfei Fu, Krishnendu Chatterjee, Yuxin Deng, and Ming Xu. 2020. Proving expected sensitivity of probabilistic programs with randomized variable-dependent termination time. Proc. ACM Program. Lang. 4, POPL ( 2020 ), 25 : 1-25 : 30. https://doi.org/10.1145/3371093 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Daniel Winograd-Cort, Andreas Haeberlen, Aaron Roth, and Benjamin C. Pierce. 2017. A framework for adaptive diferential privacy. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Oxford, England. 10 : 1-10 : 29. https://doi.org/10.1145/3110254 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A pre-expectation calculus for probabilistic sensitivity

        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

        • Published in

          cover image Proceedings of the ACM on Programming Languages
          Proceedings of the ACM on Programming Languages  Volume 5, Issue POPL
          January 2021
          1789 pages
          EISSN:2475-1421
          DOI:10.1145/3445980
          Issue’s Table of Contents

          Copyright © 2021 Owner/Author

          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: 4 January 2021
          Published in pacmpl Volume 5, Issue POPL

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader