jax_privacy.accounting.random_allocation_bandmf_event

jax_privacy.accounting.random_allocation_bandmf_event#

jax_privacy.accounting.random_allocation_bandmf_event(noise_multiplier, iterations, *, num_bands, total_participations)[source]#

Returns the DpEvent for DP-BandMF with cyclic random allocation.

The examples are partitioned into num_bands groups, and each group only participates in iterations matching its index modulo num_bands. Within the iterations it is eligible for, each example participates in exactly total_participations (\(k\)) of them, chosen uniformly at random. This guarantees a minimum separation of num_bands between two consecutive participations, so with a num_bands-banded strategy matrix the mechanism reduces to random allocation of a single Gaussian mechanism over the iterations of one group. See RandomAllocationSampling with cycle_length = num_bands for the corresponding batch selection strategy.

If iterations is not a multiple of num_bands, the batch selection strategy runs as if for ceil(iterations / num_bands) * num_bands iterations and truncates to iterations (which is post-processing). Every group therefore has ceil(iterations / num_bands) eligible iterations and the exact same privacy guarantee (prior to post-processing).

References

Parameters:
  • noise_multiplier (float) – The noise multiplier to use, assuming the strategy matrix has maximum L2 column norm of one.

  • iterations (int) – The number of iterations to run the mechanism for.

  • num_bands (int) – The number of bands to use.

  • total_participations (int) – The number of iterations each example participates in (k). Must be at most ceil(iterations / num_bands).

Return type:

DpEvent

Returns:

A DpEvent object.