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_size are truncated to size truncated_batch_size. This mechanism is compatible with the zero-out adjacency 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 into num_bands groups, the expected batch size (before truncation) is actually dataset_size * sampling_prob / num_bands (i.e., a factor of num_bands smaller than DP-SGD).largest_group_size (
int) – The number of examples in the largest group, usually math.ceil(num_examples / num_bands).truncated_batch_size (
int) – The maximum batch size.
- Return type:
DpEvent- Returns:
A DpEvent object.