Questions or feedback?

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

L1Distance<QI>

make_laplace()

L2Distance<QI>

make_gaussian()

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

AtomDomain<T>

AbsoluteDistance<QI>

MaxDivergence

VectorDomain<AtomDomain<T>>

L1Distance<QI>

MaxDivergence

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

AtomDomain<T>

AbsoluteDistance<QI>

ZeroConcentratedDivergence

VectorDomain<AtomDomain<T>>

L2Distance<QI>

ZeroConcentratedDivergence

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

L01InfDistance<AbsoluteDistance<T>>

make_laplace_threshold()

L02InfDistance<AbsoluteDistance<T>>

make_gaussian_threshold()

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

MapDomain<AtomDomain<TK>, AtomDomain<TV>>

L01InfDistance<AbsoluteDistance<QI>>

Approximate<MaxDivergence>

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

MapDomain<AtomDomain<TK>, AtomDomain<TV>>

L02InfDistance<AbsoluteDistance<QI>>

Approximate<ZeroConcentratedDivergence>

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

MapDomain<AtomDomain<TK>, AtomDomain<TV>>

L01InfDistance<AbsoluteDistance<QI>>

MaxDivergence

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

VectorDomain<AtomDomain<T>>

LInfDistance<T>

MaxDivergence or ZeroConcentratedDivergence

VectorDomain<AtomDomain<T>>

LInfDistance<T>

MaxDivergence or ZeroConcentratedDivergence

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

make_randomized_response_bool()

AtomDomain<bool>

DiscreteDistance

MaxDivergence

make_randomized_response()

AtomDomain<T>

DiscreteDistance

MaxDivergence

make_randomized_response_bitvec()

AtomDomain<T>

DiscreteDistance

MaxDivergence

More details on randomized response here.