skip to main content
research-article
Open Access

A separation logic for negative dependence

Published:12 January 2022Publication History
Skip Abstract Section

Abstract

Formal reasoning about hashing-based probabilistic data structures often requires reasoning about random variables where when one variable gets larger (such as the number of elements hashed into one bucket), the others tend to be smaller (like the number of elements hashed into the other buckets). This is an example of negative dependence, a generalization of probabilistic independence that has recently found interesting applications in algorithm design and machine learning. Despite the usefulness of negative dependence for the analyses of probabilistic data structures, existing verification methods cannot establish this property for randomized programs.

To fill this gap, we design LINA, a probabilistic separation logic for reasoning about negative dependence. Following recent works on probabilistic separation logic using separating conjunction to reason about the probabilistic independence of random variables, we use separating conjunction to reason about negative dependence. Our assertion logic features two separating conjunctions, one for independence and one for negative dependence. We generalize the logic of bunched implications (BI) to support multiple separating conjunctions, and provide a sound and complete proof system. Notably, the semantics for separating conjunction relies on a non-deterministic, rather than partial, operation for combining resources. By drawing on closure properties for negative dependence, our program logic supports a Frame-like rule for negative dependence and monotone operations. We demonstrate how LINA can verify probabilistic properties of hash-based data structures and balls-into-bins processes.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This is a 5 min talk on the paper "A Separation Logic for Negative Dependence" at POPL 2022.

References

  1. Nima Anari, Shayan Oveis Gharan, and Alireza Rezaei. 2016. Monte Carlo Markov chain algorithms for sampling Strongly Rayleigh distributions and determinantal point processes. In Conference on Computational Learning Theory (COLT). 49, Proceedings of Machine Learning Research, New York, New York. 103–115. http://proceedings.mlr.press/v49/anari16.htmlGoogle ScholarGoogle Scholar
  2. Jialu Bao, Simon Docherty, Justin Hsu, and Alexandra Silva. 2021. A Bunched logic for conditional independence. In IEEE Symposium on Logic in Computer Science (LICS). IEEE, Rome, Italy. 1–14. https://doi.org/10.1109/LICS52264.2021.9470712 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Jialu Bao, Marco Gaboardi, Justin Hsu, and Joseph Tassarotti. 2022. A Separation Logic for Negative Dependence. Proceedings of the ACM on Programming Languages, 6, POPL (2022), arxiv:2111.14917Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Gilles Barthe, Benjamin Grégoire, and Santiago Zanella Béguelin. 2012. Probabilistic relational Hoare logics for computer-aided security Proofs. In Mathematics of Program Construction (MPC). Springer, Madrid, Spain. 1–6. https://doi.org/10.1007/978-3-642-31113-0_1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Gilles Barthe, Justin Hsu, and Kevin Liao. 2020. A probabilistic separation logic. Proceedings of the ACM on Programming Languages, 4, POPL (2020), 55:1–55:30. https://doi.org/10.1145/3371123 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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. Proceedings of the ACM on Programming Languages, 3, POPL (2019), 34:1–34:29. https://doi.org/10.1145/3290347 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Luca Becchetti, Andrea Clementi, Emanuele Natale, Francesco Pasquale, and Gustavo Posta. 2019. Self-stabilizing repeated balls-into-bins. Distributed Computing, 32, 1 (2019), 59–68. https://doi.org/10.1007/s00446-017-0320-4 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Ioana O. Bercea and Guy Even. 2019. Fully-dynamic space-efficient dictionaries and filters with constant number of memory accesses. CoRR, abs/1911.05060 (2019), arxiv:1911.05060Google ScholarGoogle Scholar
  9. Burton H. Bloom. 1970. Space/time trade-offs in hash coding with allowable errors. Commun. ACM, 13, 7 (1970), 422–426. https://doi.org/10.1145/362686.362692 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Julius Borcea, Petter Brändén, and Thomas M. Liggett. 2009. Negative dependence and the geometry of polynomials. Journal of the American Mathematical Society, 22, 2 (2009), 521–567. https://www.ams.org/journals/jams/2009-22-02/S0894-0347-08-00618-8/Google ScholarGoogle ScholarCross RefCross Ref
  11. Prosenjit Bose, Hua Guo, Evangelos Kranakis, Anil Maheshwari, Pat Morin, Jason Morrison, Michiel Smid, and Yihui Tang. 2008. On the false-positive rate of Bloom filters. Inform. Process. Lett., 108, 4 (2008), 210–213. https://doi.org/10.1016/j.ipl.2008.05.018 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Petter Brändén and Johan Jonasson. 2012. Negative dependence in sampling. Scandinavian Journal of Statistics, 39, 4 (2012), 830–838. https://doi.org/10.1111/j.1467-9469.2011.00766.x Google ScholarGoogle ScholarCross RefCross Ref
  13. Stephen Brookes. 2007. A semantics for concurrent separation logic. Theoretical Computer Science, 375, 1–3 (2007), 227–270. https://doi.org/10.1016/j.tcs.2006.12.034 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Aleksandar Chakarov and Sriram Sankaranarayanan. 2013. Probabilistic program analysis with martingales. In International Conference on Computer Aided Verification (CAV). Springer, Saint Petersburg, Russia. 511–526. https://doi.org/10.1007/978-3-642-39799-8_34 Google ScholarGoogle ScholarCross RefCross Ref
  15. Bolin Ding and Arnd Christian König. 2011. Fast set intersection in memory. Proceedings of the VLDB Endowment, 4, 4 (2011), 255–266. https://doi.org/10.14778/1938545.1938550 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Simon Docherty. 2019. Bunched logics: a uniform approach. Ph. D. Dissertation. UCL (University College London).Google ScholarGoogle Scholar
  17. Devdatt P. Dubhashi, Johan Jonasson, and Desh Ranjan. 2007. Positive influence and negative dependence. Combinatorics, Probability and Computing, 16, 1 (2007), 29–41. https://doi.org/10.1017/S0963548306007772 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Devdatt P. Dubhashi and Desh Ranjan. 1998. Balls and bins: A study in negative dependence. Random Structures and Algorithms, 13, 2 (1998), 99–124. https://doi.org/10.5555/299633.299634Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Kiran Gopinathan and Ilya Sergey. 2020. Certifying certainty and uncertainty in approximate membership query structures. In International Conference on Computer Aided Verification (CAV) (Lecture Notes in Computer Science, Vol. 12225). Springer, Los Angeles, California. 279–303. https://doi.org/10.1007/978-3-030-53291-8_16 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Andrew D. Gordon, Thomas A. Henzinger, Aditya V. Nori, and Sriram K. Rajamani. 2014. Probabilistic programming. In Future of Software Engineering Proceedings (FOSE). Hyderabad, India. 167–181. https://doi.org/10.1145/2593882.2593900 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Samin Ishtiaq and Peter W. O’Hearn. 2001. BI as an assertion language for mutable data structures. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL). London, England. 14–26. https://doi.org/10.1145/360204.375719 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Kumar Joag-Dev and Frank Proschan. 1983. Negative association of random variables with applications. The Annals of Statistics, 11, 1 (1983), 286–295. https://doi.org/10.1214/aos/1176346079 Google ScholarGoogle ScholarCross RefCross Ref
  23. Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Ales Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. Journal of Functional Programming, 28 (2018), e20. https://doi.org/10.1017/S0956796818000151 Google ScholarGoogle ScholarCross RefCross Ref
  24. Dexter Kozen. 1981. Semantics of probabilistic programs. J. Comput. System Sci., 22, 3 (1981), 328–350. https://doi.org/10.1016/0022-0000(81)90036-2 Google ScholarGoogle ScholarCross RefCross Ref
  25. Alex Kulesza and Ben Taskar. 2012. Determinantal point processes for machine learning. Foundations and Trends in Machine Learning, 5, 2-3 (2012), 123–286. https://doi.org/10.1561/2200000044 Google ScholarGoogle ScholarCross RefCross Ref
  26. Michael Mitzenmacher and Eli Upfal. 2005. Probability and computing - randomized algorithms and probabilistic analysis. Cambridge University Press.Google ScholarGoogle Scholar
  27. Peter W. O’Hearn. 2007. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375, 1–3 (2007), 271–307. https://doi.org/10.1016/j.tcs.2006.12.035 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Peter W. O’Hearn and David J. Pym. 1999. The logic of bunched implications. Bulletin of Symbolic Logic, 215–244. https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.27.4742&rep=rep1&type=pdfGoogle ScholarGoogle Scholar
  29. Peter W. O’Hearn, John C. Reynolds, and Hongseok Yang. 2001. Local reasoning about programs that alter data structures. In International Conference on Computer Science Logic (CSL) (Lecture Notes in Computer Science, Vol. 2142). Springer, Paris, France. 1–19. https://doi.org/10.1007/3-540-44802-0_1 Google ScholarGoogle ScholarCross RefCross Ref
  30. Jens Pagel and Florian Zuleger. 2021. Strong-Separation Logic. In European Symposium on Programming (ESOP), Luxembourg City, Luxembourg (Lecture Notes in Computer Science, Vol. 12648). Springer, 664–692. https://doi.org/10.1007/978-3-030-72019-3_24 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Robin Pemantle. 2000. Towards a theory of negative dependence. J. Math. Phys., 41, 3 (2000), 1371–1390. https://doi.org/10.1063/1.533200 Google ScholarGoogle ScholarCross RefCross Ref
  32. David J. Pym. 2002. The semantics and proof theory of the logic of Bunched implications (Applied Logic Series, Vol. 26). Kluwer Academic Publishers. Errata and Remarks maintained at: http://www.cantab.net/users/david.pym/BI-monograph-errata.pdfGoogle ScholarGoogle Scholar
  33. David J. Pym, Peter W. O’Hearn, and Hongseok Yang. 2004. Possible worlds and resources: The semantics of BI. Theoretical Computer Science, 315, 1 (2004), 257–305. https://www.sciencedirect.com/science/article/pii/S0304397503006248Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. John C. Reynolds. 2001. Intuitionistic reasoning about shared mutable data structure. Millennial Perspectives in Computer Science, 2, 1 (2001), 303–321. https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.11.5999&rep=rep1&type=pdfGoogle ScholarGoogle Scholar
  35. Ilya Sergey, Aleksandar Nanevski, and Anindya Banerjee. 2015. Mechanized verification of fine-grained concurrent programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, Portland, Oregon. 77–87. https://doi.org/10.1145/2737924.2737964 Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Aravind Srinivasan. 2001. Distributions on level-sets with applications to approximation algorithms. In IEEE Symposium on Foundations of Computer Science (FOCS). IEEE, Las Vegas, Nevada. 588–597. https://doi.org/10.1109/SFCS.2001.959935 Google ScholarGoogle ScholarCross RefCross Ref
  37. Joseph Tassarotti and Robert Harper. 2019. A separation logic for concurrent randomized programs. Proceedings of the ACM on Programming Languages, 3, POPL (2019), 64:1–64:30. https://doi.org/10.1145/3290377 Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Jinyi Wang, Yican Sun, Hongfei Fu, Krishnendu Chatterjee, and Amir Kafshdar Goharshady. 2021. Quantitative analysis of assertion violations in probabilistic programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, Virtual. 1171–1186. https://doi.org/10.1145/3453483.3454102 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A separation logic for negative dependence

    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 6, Issue POPL
      January 2022
      1886 pages
      EISSN:2475-1421
      DOI:10.1145/3511309
      Issue’s Table of Contents

      Copyright © 2022 Owner/Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 January 2022
      Published in pacmpl Volume 6, 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
    About Cookies On This Site

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

    Learn more

    Got it!