A General Framework for Auditing Differentially Private Machine Learning

Fred Lu, Joseph Munoz, Maya Fuchs, Tyler LeBlond, Elliott Zaresky-Williams, Edward Raff, Francis Ferraro, Brian Testa

TL;DR

This paper introduces ML-Audit, a general framework for empirically verifying the privacy guarantees of differentially private (DP) machine learning models. By combining influence-based poisoning attacks with a high-efficiency statistical testing suite, the authors can detect implementation errors and measure actual privacy leakage across various model types, often outperforming previous auditing methods by orders of magnitude.

What Problem Does This Paper Address?

Differential Privacy (DP) is the gold standard for protecting data privacy in machine learning. It provides a mathematical guarantee—defined by parameters $\epsilon$ and $\delta$—that a model doesn't "leak" too much information about any single individual in the training set.

However, there is a massive gap between theory and practice. A mathematical proof doesn't prevent implementation bugs, such as using a flawed random number generator or incorrectly calculating sensitivity. Furthermore, theoretical bounds are often "worst-case" and may be much looser than the actual privacy risk on a specific dataset. Previous attempts to audit these models were either restricted to specific architectures (like neural networks) or required so many samples that they were computationally impractical. The authors aim to provide a practical "unit test" for privacy that works for any ML model.

Methods

Auditing Framework Overview

The authors propose a three-step "recipe" for auditing any DP learner:

  1. Influence-Based Poisoning: To audit privacy, one must find the "worst-case" scenario: two datasets ($D$ and $D'$) that differ by only one point but produce the most different models possible. The authors use influence functions to mathematically estimate which data point, if perturbed, would cause the greatest shift in the model's parameters.
  2. Summary Functions ($\tau$): Since models can be complex (e.g., a forest of trees), the framework maps the model into a vector space using a summary function. For logistic regression, this is the coefficient vector; for random forests, it’s the per-tree predictions.
  3. Statistical Verification: To turn these observations into a rigorous lower bound for $\epsilon$, they use a likelihood ratio-based optimization. They train the model thousands of times on both $D$ and $D'$ to build a distribution of outcomes. They improve on prior work by using Katz-log confidence intervals, which provide much tighter and more accurate bounds for the ratio of probabilities than standard methods.

Datasets Evaluated

The framework was rigorously evaluated on a wide variety of standard tabular and image datasets to ensure broad applicability:

  • Tabular: adult, credit, iris, breast-cancer, banknote, and thoracic.
  • Image: FMNIST (Fashion MNIST) and CIFAR10 (used specifically for auditing DP-SGD in neural networks).

Key Insights and Ideas

  • Implementation Bugs are Real: The authors used ML-Audit to find a genuine privacy leak in the popular diffprivlib library. The library’s Naive Bayes implementation exposed class counts that weren't properly privatized, effectively breaking the privacy guarantee.
  • Dataset Geometry Matters: The "sphericity" of a dataset (how spread out it is in different dimensions) significantly impacts how effective certain attacks are. They found that previous baseline attacks (like ClipBKD) fail when datasets are more spherical, whereas their influence-based approach remains robust.
  • The "Neighboring" Definition Trap: The paper highlights a subtle but critical point: different DP implementations define "neighboring datasets" differently (e.g., swapping one point vs. adding/removing one point). If the auditor uses the wrong definition, the model might appear to violate its privacy budget when it’s actually just following a different convention.
  • Group Privacy as a Lever: By inserting $k$ copies of a poisoned point (leveraging the "group privacy" property of DP), the authors can amplify the signal of a privacy violation, making it easier to detect even with fewer model retrains.

Key Results

Comparison of Auditing Methods
  • Superior Auditing Power: As shown in the evaluations across multiple datasets, ML-Audit consistently found much higher (tighter) lower bounds for $\epsilon$ compared to existing baselines like ClipBKD or simple row-swapping.
  • Efficiency: While previous general-purpose auditors required upwards of $10^8$ samples (model retrains), ML-Audit achieves high-confidence results with only $10^4$ samples for most models, and as few as 500 for neural networks.
  • Universality: The method proved effective across vastly different model types, including Logistic Regression, Naive Bayes, Random Forests, and Deep Neural Networks (DP-SGD).

Limitations and Future Work

  • Computational Cost: Even with the improvements, auditing still requires retraining a model thousands of times. This is feasible for many models but remains a significant hurdle for massive, state-of-the-art deep learning models.
  • Manual Design: While the framework is "general," a human still needs to choose an appropriate "summary function" $\tau$ for new model types to ensure the auditor is looking at the most informative parts of the model.
  • Worst-Case vs. Average-Case: The audit finds a lower bound on the worst-case privacy loss. If the audit doesn't find a violation, it doesn't strictly prove the model is 100% bug-free; it just means no violation was found using the current set of attacks. Future work could involve developing even more aggressive, automated poisoning strategies.

Summary updated

BibTeX
@inproceedings{lu2022general,
  author = {Fred Lu and Joseph Munoz and Maya Fuchs and Tyler LeBlond and Elliott Zaresky-Williams and Edward Raff and Francis Ferraro and Brian Testa},
  title = {{A General Framework for Auditing Differentially Private Machine Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=h8xR2CdldL},
}
Figure