Skip to main content
QUICK REVIEW

[Paper Review] D3p -- A Python Package for Differentially-Private Probabilistic Programming

Lukas Prediger, Niki Loppi|arXiv (Cornell University)|Mar 22, 2021
Privacy-Preserving Technologies in DataComputer Science41 references3 citations
TL;DR

d3p is a high-performance Python package that enables differentially private probabilistic programming by integrating differentially private variational inference (DP-VI) with the NumPyro framework. It achieves ~10x speedup over TensorFlow Privacy on GPU-accelerated models while supporting flexible, user-defined probabilistic models under strict privacy guarantees via tight privacy accounting and GPU-optimized sampling.

ABSTRACT

We present d3p, a software package designed to help fielding runtime efficient widely-applicable Bayesian inference under differential privacy guarantees. d3p achieves general applicability to a wide range of probabilistic modelling problems by implementing the differentially private variational inference algorithm, allowing users to fit any parametric probabilistic model with a differentiable density function. d3p adopts the probabilistic programming paradigm as a powerful way for the user to flexibly define such models. We demonstrate the use of our software on a hierarchical logistic regression example, showing the expressiveness of the modelling approach as well as the ease of running the parameter inference. We also perform an empirical evaluation of the runtime of the private inference on a complex model and find a $\sim$10 fold speed-up compared to an implementation using TensorFlow Privacy.

Motivation & Objective

  • To address the lack of efficient, integrated tools for differentially private probabilistic inference in popular frameworks.
  • To lower the barrier for practitioners to adopt privacy-preserving modeling by providing a user-friendly, high-performance implementation.
  • To enable fast prototyping and iterative development of privacy-preserving models on tabular data with end-to-end differential privacy guarantees.
  • To optimize performance through GPU acceleration and efficient minibatch sampling using a modified CUDA-Shuffle algorithm.
  • To support general-purpose parametric models with differentiable densities via variational inference under differential privacy.

Proposed method

  • Implements differentially private doubly stochastic variational inference (DP-VI) as the core inference engine.
  • Integrates with the NumPyro probabilistic programming framework to allow flexible model specification using Python syntax.
  • Leverages the JAX framework for automatic differentiation and GPU acceleration to achieve high runtime performance.
  • Employs a state-of-the-art privacy accountant to compute tight bounds on privacy parameters (ε, δ), maximizing utility.
  • Optimizes minibatch sampling using a modified version of the CUDA-Shuffle algorithm for efficient GPU-based shuffling.
  • Provides a probabilistic runtime analysis for the GPU-optimized shuffling routine to ensure reliability in performance-critical settings.

Experimental results

Research questions

  • RQ1Can a general-purpose, high-performance software package be built to enable differentially private probabilistic inference with minimal user effort?
  • RQ2How does the performance of a JAX- and GPU-optimized DP-VI implementation compare to existing TensorFlow-based solutions?
  • RQ3To what extent can the expressiveness of probabilistic programming be preserved while enforcing end-to-end differential privacy?
  • RQ4How effective is the integration of tight privacy accounting with a differentiable probabilistic model framework in practice?
  • RQ5What performance gains can be achieved through GPU-optimized, privacy-preserving minibatch sampling in real-world models?

Key findings

  • d3p achieves approximately a 10-fold speedup in training time compared to a TensorFlow Privacy-based implementation of the same DP-VI model on modern GPUs.
  • The d3p implementation achieves log-likelihood performance on test data that is consistent with or slightly better than the original DP-VI code, with significantly reduced variance across runs.
  • The framework enables users to define complex models, such as hierarchical logistic regression and variational autoencoders, using standard NumPyro syntax with minimal changes for privacy.
  • The use of a modified CUDA-Shuffle algorithm enables efficient GPU-based minibatch sampling, contributing to the overall performance gains.
  • The integration of tight privacy accounting allows for higher utility compared to less precise accounting methods, even with the same privacy budget.
  • The software reduces the implementation burden by eliminating the need for users to manually wrap models with DP-SGD or implement custom DP layers.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.