jax_privacy.execution_plan#
Module for defining DP Execution Plans.
# Writing General-Purpose DP Training Loops via DPExecutionPlan
This module introduces the DPExecutionPlan,
an object designed to encapsulate the core components of a differentially
private (DP) mechanism.
The primary aim is to simplify the process of constructing and applying DP
mechanisms by packaging these components cohesively. A key benefit is the
assurance that, when used correctly, the combination of these components will
achieve the stated DP properties.
The design is framework-agnostic, specifying the essential pillars of a DP mechanism—such as batch selection and noise addition—without tightly coupling them to a specific training loop. Each component is exposed through a simple, well-documented API, allowing for flexible integration into various frameworks or direct use with JAX.
By programming against our DPExecutionPlan interface, it is easy to swap out
different components or entire mechanisms without changing the core training
loop logic. While the components are designed to work together, they can also be
used selectively. For instance, a researcher might choose to use only the noise
addition component if their dataset doesn’t support the efficient random access
required by the batch selection strategy. Though this might invalidate the
formal DP guarantee, it can still be valuable for research or when a heuristic
quantification of privacy is acceptable. Ultimately, DPExecutionPlan aims to
free users to concentrate on their training pipeline setup, rather than on the
intricacies of correctly assembling DP components to achieve a desired privacy
guarantee.
# Selecting and using a DPExecutionPlan
Constructors for these plans are highly configurable, offering access to the
full capabilities of the underlying components while also providing sensible
defaults. Our primary entry point is currently
BandMFConfig, although more will become
available in the future.
Classes
|
Configuration for an Amplified BandMF-based DPExecutionPlan. |
|
Specifies the "inner" sampling strategy for cyclic sampling strategies. |
|
Class for defining a DP execution plan. |
|
Protocol for configs that build a |
|
Configuration for a non-private execution plan (no clipping, no noise). |
|
Performance-only flags that do not affect mechanism behavior or privacy. |