jax_privacy.experimental.monte_carlo.delta_calculation.get_overall_delta

jax_privacy.experimental.monte_carlo.delta_calculation.get_overall_delta#

jax_privacy.experimental.monte_carlo.delta_calculation.get_overall_delta(num_samples, base_delta, support_bound=1.0)[source]#

The delta we can formally report using Monte Carlo verification.

In more detail, if we use num_samples samples to verify that a mechanism satisfies (epsilon, base_delta)-DP, then we can formally report that the mechanism satisfies (epsilon, overall_delta)-DP.

This method assumes we are doing many Monte Carlo verifications of different ordered mechanisms, and then picking the highest-utility mechanism that meets our target privacy guarantee, as in Appendix A of https://arxiv.org/abs/2602.09338. If we are only verifying one mechanism (which is undesirable in practice), a tighter bound is possible.

The verifications may use different numbers of samples and support bounds, passed as arrays with one entry per verification. Each verification is then wrong with a probability computed from its own number of samples and support bound, while the privacy loss after a wrong verification is bounded by the largest support bound.

Parameters:
  • num_samples (Union[_Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], complex, bytes, str, _NestedSequence[complex | bytes | str]]) – The number of samples used in each Monte Carlo verification.

  • base_delta (float) – The base_delta such that we use the samples to verify that each mechanism satisfies (epsilon, base_delta)-DP.

  • support_bound (Union[_Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], complex, bytes, str, _NestedSequence[complex | bytes | str]]) – An upper bound on each (weighted) sample of the hockey-stick divergence, in (base_delta, 1], for each verification. This is 1 for standard Monte Carlo estimation, and can be much smaller with importance sampling, in which case fewer samples are needed. Since the true delta is the mean of the samples, it is also at most support_bound, so for a single support bound the result equals support_bound * get_overall_delta(num_samples, base_delta / support_bound).

Return type:

float

Returns:

overall_delta such that we can report the end-to-end pipeline of Monte Carlo verification and then running the best verified mechanism is (epsilon, overall_delta)-DP.