Introduction
In the field of private machine learning, Differentially Private Stochastic Gradient Descent (DP-SGD) has become the standard for training models with formal privacy guarantees. A critical component of this process is privacy amplification through sampling. Typically, researchers rely on Poisson sampling, where each data point in a dataset is independently included in a batch with a fixed probability $p$. While mathematically elegant, Poisson sampling presents a practical challenge: it results in variable batch sizes.
Modern machine learning hardware and compilers, such as XLA, are optimized for fixed-size tensors. To accommodate these constraints, practitioners often employ truncation—capping the batch at a maximum size $B$ and discarding any excess items. Historically, the privacy analysis for this truncation was pessimistic, treating the probability of exceeding $B$ as a "failure" and adding it directly to the $\delta$ (delta) parameter of $(\epsilon, \delta)$-DP. This "lossy" analysis forced researchers to use smaller expected batch sizes to keep the failure rate low, leading to inefficient use of hardware. This paper introduces a tighter mathematical framework to account for truncation directly, enabling more efficient DP training.
The Truncated Poisson Mechanism
The author formalizes the truncation process through a mechanism denoted as $M_{B,p,\sigma}$. This mechanism performs standard Poisson sampling followed by a random truncation step: if the number of sampled items exceeds the limit $B$, a subset of size $B$ is selected uniformly at random.
The core contribution of the paper is the derivation of Dominating Pairs for this mechanism. In differential privacy theory, if the output distributions of a mechanism on two neighboring datasets can be bounded by a specific pair of distributions $(P, Q)$, the overall privacy loss can be calculated precisely. The paper provides these dominating pairs for three standard types of dataset adjacency:
- Add-or-remove-1: The addition or deletion of a single user.
- Zero-out: Replacing a user's data with a vector of zeros.
- Replace-one: Replacing one user's data point with another arbitrary point.
Methodology and Insights
The analysis treats the truncated mechanism as a "mixture of mechanisms." By splitting the probability space into cases where truncation occurs and cases where it does not, the author can bridge the gap between standard Poisson sampling and fixed-size batch sampling.
Several key insights emerge from this theoretical treatment:
- The Role of Randomness: The paper demonstrates that performing truncation randomly is essential for a clean, tight privacy proof. Arbitrary truncation does not yield the same analytical benefits.
- Asymptotic Consistency: The new bounds pass "extreme" sanity checks. As the limit $B$ approaches infinity, the bounds recover standard Poisson sampling results. Conversely, if the sampling probability $p$ is set to 1 and $B < n$, the bounds align with known results for fixed-size batch sampling.
- Computational Efficiency: While the initial privacy loss formulas involve complex summations that scale with dataset size $O(n)$, the author provides a simplified version using Binomial survival functions. This allows the privacy budget to be evaluated in constant time using standard libraries like
scipy.stats.binom.sf. - Dataset Size Dependency: Unlike standard Poisson sampling, the privacy guarantee for truncated sampling depends on the total dataset size $n$. This is an inherent trade-off when enforcing a hard batch limit.
Results and Practical Impact
The primary theoretical results are encapsulated in Theorems 3.1, 3.3, and 3.4, which provide the exact distributions required to compute privacy loss. These results have immediate practical utility, as they have been integrated into Google's dp_accounting Python library. Practitioners can now input their specific parameters ($n, p, B, \sigma$) to obtain a precise privacy budget, avoiding the over-estimation of privacy loss inherent in older methods.
Limitations and Future Directions
While the "Add-or-remove" bound is proven to be very tight, the author notes some remaining "slack" in the "Zero-out" and "Replace-one" analyses. This is attributed to the limitations of the mathematical tools used (specifically Lemma 2.4), which do not fully exploit the bounded nature of the difference between vectors. The paper concludes with a conjecture on further tightening the "Replace-one" analysis, though the expected improvements are likely marginal. Finally, the author cautions that because the guarantee depends on $n$, researchers must be rigorous when composing this mechanism with other DP processes.
Summary updated