jax_privacy.accounting.truncated_dpsgd_event
- jax_privacy.accounting.truncated_dpsgd_event(noise_multiplier, iterations, *, sampling_prob, num_examples, truncated_batch_size)[source]
Returns the DpEvent for truncated DP-SGD with the given training params.
This mechanism is like DP-SGD, but batches larger than truncated_batch_size are truncated to size truncated_batch_size. See these references for more information about this mechanism:
[Scalable DP-SGD: Shuffling vs. Poisson Subsampling](https://arxiv.org/abs/2411.04205)
[Tighter Privacy Analysis for Truncated Poisson Sampling](https://arxiv.org/abs/2508.15089)
- Parameters:
noise_multiplier (
float) – The noise multiplier of the mechanism.iterations (
int) – The number of iterations to run the mechanism for.sampling_prob (
float) – The Poisson sampling probability of the mechanism, i.e., the probability an example will be included in each batch before truncation.num_examples (
int) – The number of examples in the dataset.truncated_batch_size (
int) – The maximum batch size.
- Return type:
DpEvent- Returns:
A DpEvent object.