Manuscript Offprint

arXiv:2610.42139

Counting on Dummies: Privacy Amplification with Observable Counts and Truncated Batches

Vitaly Feldman, Audra McMillan, Kunal Talwar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In many practical deployments of Differentially Private Stochastic Gradient Descent (DP-SGD), the server processes data in batches. Randomly sampling these batches allows for better privacy bounds via privacy amplification results. Most sampling schemes with provable privacy amplification, including Poisson sampling and random allocation, result in variable batch sizes. The privacy guarantee of these schemes requires that the batch sizes are not revealed. In distributed settings, the server performing the aggregation or any party observing the communication traffic may learn these batch sizes. Furthermore, in both centralized and distributed settings, memory and computation constraints may require each batch to be of some maximum size ss, necessitating truncation of the batch when it exceeds this limit. It is known that this truncation can result in a significant increase in privacy loss. In this work, we address both of these challenges via a simple mechanism that uses a random number of dummy points to privatize the batch size and maintain the privacy guarantee even under truncation. We demonstrate that our mechanism is easy to implement in a distributed setting, and provide a general analysis of this mechanism for both Poisson sampling and random allocation. Our analysis is designed to support efficient and relatively tight privacy accounting. It also effectively amplifies the privacy of the count releases by subsampling, making the expected number of dummy points asymptotically smaller than what is needed to directly privatize the (sensitivity-one) batch sizes with non-negative noise. For Poisson sampling with truncated batches, we demonstrate empirically that our mechanism achieves better privacy–efficiency tradeoffs than the direct accounting for truncation recently given by Ganesh [Gan25].

1 Introduction

Differentially private stochastic gradient descent (DP-SGD) is the standard algorithm for training machine-learning models under differential privacy [Aba+16; BST14]. Its privacy analysis rests on privacy amplification by subsampling: because each step operates on a small randomly chosen batch, the relatively weak privacy guarantee of a single noisy gradient step is amplified significantly. This enables the release of the numerous noisy gradients with reasonable privacy guarantees for the entire run. The strongest and most widely used amplification comes from schemes in which each batch is a genuinely random subset of the data: Poisson subsampling, which includes each example independently with probability γ\gamma [Aba+16; ZDW22], and, more recently, random allocation, a balls-in-bins scheme that spreads each example across a random subset of the steps [FS25]. Both schemes admit tight and efficient accounting, based on dominating pairs of distributions [ZDW22] and implemented via numerical computations on privacy loss distributions (PLDs).

An important feature of these schemes is that they produce batches of variable size, distributed as a binomial random variable. The size of a batch is thus a random quantity that depends on the internal randomization of the algorithm. The amplification guarantees of these schemes implicitly assume that the batch size is never revealed, that is, that the adversary observes only the per-step outputs. Under a trusted central curator this assumption is typically harmless. However, in federated and distributed deployments, where contributions from many devices are aggregated without a trusted central party, the server that performs the aggregation typically does observe each batch's size, for example, by counting the number of messages it combines. Once the size is observed, the amplification analysis no longer applies as stated, and the resulting leakage erodes the privacy guarantees. Related gaps between the idealized sampling assumed in analyses and the batching actually realized in implementations are by now a recognized source of privacy violations [Chu+24b; Ann+26; Leb+25]. Indeed, in federated settings the difficulty of realizing and hiding subsampling has led to the use of optimization methods that abandon sampling altogether [Kai+21].

Variable batch sizes present another, independent difficulty. Memory and compute budgets typically impose an a priori cap s on the batch size, so any batch exceeding s must be truncated to fit. In common training pipeline designs, the batch also needs to be padded to have the fixed size s. Similarly in distributed aggregation implementations, system constraints can force a maximum batch size. Truncation, however, breaks the privacy accounting under the add/remove and zero-out adjacency notions that are typically used in this context. When the batch size is fixed (or otherwise known), removing a data point from a full batch means that another data point takes its place, so the batch sum can shift by two gradients rather than one. This effectively doubles the sensitivity and thus requires doubling the noise scale. Recent work of Ganesh [Gan25] gives a tighter, dedicated analysis of truncated Poisson sampling, but the doubled sensitivity remains: it is charged whenever the batch overflows, which forces the expected batch size to be well below s. We provide a more detailed discussion in Section 1.3.

References (41)