Measurements#
In OpenDP, measurements are randomized mappings from datasets to outputs; Measurements are used to create differentially private releases.
The intermediate domains and metrics need to match when chaining. This means you will need to choose a measurement that chains with your aggregator.
Additive Noise Mechanisms#
There is a symmetric structure to the additive noise measurements:
Vector Input Metric |
Constructor |
|---|---|
|
|
|
QI can be any numeric type (the data type of the sensitivity can vary independently from the data type of the input).
By passing the appropriate input space, you can construct either scalar or vector-valued mechanisms.
More details on laplacian and gaussian noise mechanisms here.
Laplacian Noise#
make_laplace() accepts sensitivities in terms of the absolute or L2 metrics and measure privacy in terms of epsilon.
Use laplacian_scale_to_accuracy()
and accuracy_to_laplacian_scale() to convert to/from accuracy estimates.
(make_geometric()
is equivalent to make_laplace but restricted to an integer support.
If you need constant-time execution to protect against timing side-channels, specify bounds.)
Input Domain |
Input Metric |
Output Measure |
|---|---|---|
|
|
|
|
|
|
Gaussian Noise#
make_gaussian() accepts sensitivities in terms of the absolute or L2 metrics and measure privacy in terms of rho (zero-concentrated differential privacy).
Use gaussian_scale_to_accuracy() and
accuracy_to_gaussian_scale() to convert to/from accuracy estimates.
(Refer to Measure Casting to convert to approximate DP.)
Input Domain |
Input Metric |
Output Measure |
|---|---|---|
|
|
|
|
|
|
Canonical Noise#
The canonical noise mechanism (make_canonical_noise())
can privatize any float-valued statistic with finite sensitivity.
Under \((\epsilon, \delta)\)-DP,
the canonical noise distribution follows the Tulap distribution,
which is a combination of discrete laplace noise and continuous uniform noise.
More details on the canonical noise mechanism here.
Thresholded Noise Mechanisms#
Thresholded noise mechanisms are generalizations of the additive noise mechanisms
that also release a set of keys, whose values are greater than the threshold parameter.
Just like the additive noise mechanisms, the thresholded noise mechanisms have a symmetric structure:
Vector Input Metric |
Constructor |
|---|---|
|
|
|
More details on thresholded noise mechanisms here.
Thresholded Laplacian Noise#
make_laplace_threshold() accepts L0, L1 and L∞ sensitivities and measures privacy in terms of epsilon and delta.
Use the laplacian_scale_to_accuracy() and accuracy_to_laplacian_scale()
functions to convert to/from accuracy estimates.
Input Domain |
Input Metric |
Output Measure |
|---|---|---|
|
|
|
Thresholded Gaussian Noise#
make_gaussian_threshold() accepts L0, L2 and L∞ sensitivities and measures privacy in terms of rho and delta.
Use the gaussian_scale_to_accuracy() and accuracy_to_gaussian_scale()
functions to convert to/from accuracy estimates.
Refer to Measure Casting to convert to approximate DP.
Input Domain |
Input Metric |
Output Measure |
|---|---|---|
|
|
|
Approximate Laplace Projection#
make_alp_queryable(): In a similar regime as the thresholded noise mechanism, where keys themselves need to be protected,
another approach is to release a differentially private low-dimensional projection of the key-space.
Input Domain |
Input Metric |
Output Measure |
|---|---|---|
|
|
|
More details on approximate laplace projection here.
Noisy Max and Noisy Top K#
make_noisy_top_k() and make_noisy_max():
The report noisy top-k mechanism is used to privately release the indices of the maximum k values in a vector.
This is useful for private selection, and overlaps with the exponential mechanism.
Exponential noise is added to scores when the output measure is MaxDivergence,
and Gumbel noise is added when the output measure is ZeroConcentratedDivergence.
Input Domain |
Input Metric |
Output Measure |
|---|---|---|
|
|
|
|
|
|
Report noisy max is a special case of noisy top k when k equals one.
More details on noisy max mechanisms here.
Randomized Response#
These measurements are used to randomize an individual’s response to a query in the local-DP model.
Measurement |
Input Domain |
Input Metric |
Output Measure |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
More details on randomized response here.