jax_privacy.accounting.truncated_amplified_bandmf_event#
- jax_privacy.accounting.truncated_amplified_bandmf_event(noise_multiplier, iterations, *, num_bands, sampling_prob, largest_group_size, truncated_batch_size)[source]#
Returns the DpEvent for truncated DP-BandMF with the given parameters.
This mechanism is like BandMF, but batches larger than
truncated_batch_sizeare truncated to sizetruncated_batch_size. This mechanism is compatible with thezero-outadjacency notion, and requires knowledge of the total number of examples.- 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.sampling_prob (
float) – The Poisson sampling probability of the mechanism, i.e., the probability an example will be included in each batch before truncation. Note that because the examples are partitioned intonum_bandsgroups, the expected batch size (before truncation) is actuallydataset_size * sampling_prob / num_bands(i.e., a factor ofnum_bandssmaller than DP-SGD).largest_group_size (
int) – The number of examples in the largest partition group. For EQUAL_SPLIT this isnum_examples // num_bands(floor). Usemath.ceil(num_examples / num_bands)when groups may be uneven.truncated_batch_size (
int) – The maximum batch size.
- Return type:
DpEvent- Returns:
A DpEvent object.