Verified Foundations for Differential Privacy
Authors:
- Markus de MedeirosMMMarkus de Medeiros
- Muhammad NaveedMNMuhammad Naveed
- Tancrède LepointTLTancrède Lepoint
- Temesghen KahsaiTKTemesghen Kahsai
- Tristan RavitchTRTristan Ravitch
- Stefan ZetzscheSZStefan Zetzsche
- Anjali JoshiAJAnjali Joshi
- Joseph TassarottiJTJoseph Tassarotti
- Aws AlbarghouthiAAAws Albarghouthi
- Jean-Baptiste TristanJTJean-Baptiste Tristan
Open Access
- 10 June 2025
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 9 (PLDI) , 1094-1118
Abstract
Differential privacy (DP) has become the gold standard for privacy-preserving data analysis, but implementing it correctly has proven challenging. Prior work has focused on verifying DP at a high level, assuming either that the foundations are correct or that a perfect source of random noise is available. However, the underlying theory of differential privacy can be very complex and subtle. Flaws in basic mechanisms and random number generation have been a critical source of vulnerabilities in real-world DP systems. In this paper, we present SampCert, the first comprehensive, mechanized foundation for executable implementations of differential privacy. SampCert is written in Lean with over 12,000 lines of proof. It offers a generic and extensible notion of DP, a framework for constructing and composing DP mechanisms, and formally verified implementations of Laplace and Gaussian sampling algorithms. SampCert provides (1) a mechanized foundation for developing the next generation of differentially private algorithms, and (2) mechanically verified primitives that can be deployed in production systems. Indeed, SampCert's verified algorithms power the DP offerings of Amazon Web Services, demonstrating its real-world impact. SampCert's key innovations include: (1) A generic DP foundation that can be instantiated for various DP definitions (e.g., pure, concentrated, Rényi DP); (2) formally verified discrete Laplace and Gaussian sampling algorithms that avoid the pitfalls of floating-point implementations; and (3) a simple probability monad and novel proof techniques that streamline the formalization. To enable proving complex correctness properties of DP and random number generation, SampCert makes heavy use of Lean's extensive Mathlib library, leveraging theorems in Fourier analysis, measure and probability theory, number theory, and topology.Keywords
All Related Versions
Funding Information
- National Science Foundation (2338317)
This publication has 36 references indexed in Scilit:
- DDUO: General-Purpose Dynamic Analysis for Differential Privacy2021
- Learning Differentially Private Mechanisms2021
- Coupled Relational Symbolic Execution for Differential Privacy2021
- Concentrated Differential Privacy: Simplifications, Extensions, and Lower Bounds2016
- PSI: Exact Symbolic Inference for Probabilistic Programs2016
- A Verified Compiler for Probability Density Functions2015
- A Categorical Approach to Probability TheoryStudia Logica, 2010
- A Machine-Checked Proof of the Average-Case Complexity of Quicksort in CoqLecture Notes in Computer Science, 2009
- Calibrating Noise to Sensitivity in Private Data Analysis2006
- Proofs of Randomized Algorithms in CoqLecture Notes in Computer Science, 2006