[Paper Review] Debugging Differential Privacy: A Case Study for Privacy Auditing
This paper demonstrates that privacy auditing can detect implementation bugs in differentially private machine learning systems by empirically measuring a lower bound on the privacy parameter ε. In a case study, the authors audit an open-source implementation of Backpropagation Clipping and find, with 99.99999999% confidence, that the actual ε exceeds 2.79—over 10× higher than the claimed 0.21—due to a critical error in gradient sensitivity calculation related to batch size.
Differential Privacy can provide provable privacy guarantees for training data in machine learning. However, the presence of proofs does not preclude the presence of errors. Inspired by recent advances in auditing which have been used for estimating lower bounds on differentially private algorithms, here we show that auditing can also be used to find flaws in (purportedly) differentially private schemes. In this case study, we audit a recent open source implementation of a differentially private deep learning algorithm and find, with 99.99999999% confidence, that the implementation does not satisfy the claimed differential privacy guarantee.
Motivation & Objective
- To demonstrate that privacy auditing can detect implementation flaws in differentially private machine learning systems, even when formal proofs appear correct.
- To identify and diagnose a specific implementation error in the Backpropagation Clipping algorithm that undermines its claimed differential privacy guarantee.
- To advocate for routine use of privacy auditing as a debugging tool in DP machine learning development.
- To provide practical recommendations for detecting and preventing similar bugs in future implementations.
- To emphasize the importance of releasing code alongside theoretical contributions to enable reproducibility and auditability.
Proposed method
- Perform a membership inference attack by training 100,000 models on two datasets differing by one example (MNIST with and without a single added image).
- Use the TPR/FPR ratio of the attack to empirically estimate a lower bound on the privacy parameter ε using Clopper-Pearson confidence intervals.
- Systematically sweep over threshold values τ to maximize the TPR/FPR ratio and identify the optimal distinguishing boundary.
- Analyze the implementation to trace the root cause of the privacy leak, focusing on gradient clipping and noise calibration.
- Apply a sanity check using the triangle inequality: the norm of the batch gradient should not exceed |B| × claimed sensitivity.
- Compare theoretical sensitivity (based on per-example gradients) with the implementation’s incorrect sensitivity that divides by |B| twice.
Experimental results
Research questions
- RQ1Can privacy auditing detect implementation bugs in differentially private machine learning systems even when formal proofs are correct?
- RQ2What specific implementation error in Backpropagation Clipping leads to a significant deviation from its claimed differential privacy guarantee?
- RQ3How does the batch size affect the sensitivity of gradients in differentially private training, and where do implementations commonly go wrong?
- RQ4What practical checks can be used to detect such bugs early in the development lifecycle?
- RQ5To what extent does the availability of open-source code enable effective privacy auditing and validation?
Key findings
- The audit reveals that the actual privacy parameter ε is greater than 2.79 with 99.99999999% confidence, far exceeding the claimed (0.21, 10⁻⁵) guarantee.
- The implementation incorrectly reduces gradient sensitivity by a factor of the batch size |B|, leading to insufficient noise addition.
- The error arises from clipping the per-example gradient divided by |B|, while the sensitivity calculation incorrectly applies another division by |B|.
- A simple sanity check based on the triangle inequality fails in the original implementation but passes when the sensitivity is corrected to C₁·C₂ instead of C₁·C₂/|B|.
- The bug is a known class of error, previously observed in other DP implementations, highlighting the need for systematic validation.
- The authors of Backpropagation Clipping acknowledged the flaw and are patching the implementation to increase noise by a factor of |B| to match theoretical guarantees.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.