arXiv:2610.09651cs.LGOct 2026

Manuscript Offprint

arXiv:2610.09651

Closed-Form Noise Calibration Against Membership Inference for Random-Allocation DP-SGD

Murat Bilgehan Ertan, Marten van Dijk

Abstract

DP-SGD protects training data by adding Gaussian noise to clipped gradients. The amount of noise is usually chosen by running a numerical privacy accountant inside a search. We study DP-SGD with random allocation, where each epoch uses every record once, at a randomly chosen step. For this setting we give a one-line formula that bounds the accuracy of every membership inference attack (MIA) on the trained model. With M steps per epoch, E epochs and noise multiplier σ\sigma, and with membership and non-membership equally likely a priori, the attack accuracy is at most 12+14(1+(e1/σ2−1)/M)E−1\frac{1}{2} + \frac{1}{4}\sqrt{(1 + (e^{1/\sigma^2} - 1)/M)^E - 1}. The formula comes from the chi-square divergence between a Gaussian distribution and a Gaussian mixture that dominates random allocation. It is interpretable and gives σ\sigma in about a microsecond. Where applicable, our formula needs at most about half the noise of the state-of-the-art closed-form bound. To measure how close the bound is, we also derive an exact expression for the attack accuracy of these two distributions and evaluate it numerically. Calibrating to this exact expression requires 13.0% to 20.2% less noise than the formula in our main experiments, and since it is exact, no accountant that knows only M, E and σ\sigma can certify a smaller σ\sigma. In training, the resulting σ\sigma outperforms the formula and matches a published accountant in test accuracy. It is found in seconds and certified in minutes, whereas every search we ran with that accountant took longer or returned at least 0.62% more noise. We show that MIAs on the trained models stay below the bound. 1^{1}

Marten van Dijk ∗^{*}

CWI Amsterdam

1 INTRODUCTION

DP-SGD trains a model on private data by clipping each record's gradient and adding Gaussian noise to every update (Abadi et al., 2016). Its privacy analysis depends on how records are grouped into minibatches. Most analyses assume Poisson subsampling, where each record joins each minibatch independently. Training loops commonly use every record once per epoch instead (Chua et al., 2024a,b). Random allocation, also called balls-and-bins sampling, keeps this property. In every epoch each record is sent to one of the M steps, uniformly and independently, so the minibatch sizes vary (Chua et al., 2025; Shenfeld and Feldman, 2025; Dong et al., 2025). Algorithm 1 states the algorithm.

For random allocation, Chua et al. (2025) and Shenfeld and Feldman (2025) reduce one epoch to two distributions built from Gaussian noise. In this reduced form, an epoch without the record is M independent standard Gaussian values, one for each step. With the record, the value of one step, chosen uniformly at random, is also shifted by 1/σ1/\sigma, the clipping norm divided by the noise scale. We write PMP_M and QMQ_M for these two distributions and call them the Gaussian pair. Detecting the record from one epoch of training is never easier than telling QMQ_M from PMP_M.

A privacy accountant for random allocation turns this pair into a privacy guarantee for the whole training run. Given M, E and σ\sigma, it computes how the privacy loss of the pair adds up over the E epochs and reports a guarantee such as (ε,δ)(\varepsilon, \delta)-differential privacy (Dwork et al., 2006b,a). Accountants based on Rényi differential privacy (Mironov, 2017) use the Rényi divergences of QMQ_M from PMP_M, which are known in closed form at integer orders two and higher (Shenfeld and Feldman, 2025; Dong et al., 2025). Accountants based on the privacy loss distribution (Koskela et al., 2020) compute the whole distribution of the privacy loss numerically, and Feldman and Shenfeld (2026) give a numerical accountant for random allocation. An accountant tells how private a given σ\sigma is, but choosing σ\sigma needs the reverse, the smallest σ\sigma that meets a privacy target. The

∗^{*}Affiliated with Vrije Universiteit Amsterdam.

1^{1}Code is available at https://github.com/bilgehanertan/closed-form-noise-calibration.

usual approach therefore runs the accountant inside a search over σ\sigma. In our experiments, one run of the accountant of Feldman and Shenfeld (2026) with its default route in one direction at the σ\sigma it certified for our training took 6.5 minutes to 7.1 hours on one CPU core (Table 5 in Appendix E), and a search repeats such runs. Such a run is slow because its running time grows as the square of the number of grid points (Feldman and Shenfeld, 2026, Theorem 4.3), and certifying a σ\sigma close to the smallest one that meets the target needs a fine grid. A search with the accountant's fast Fourier route (Feldman and Shenfeld, 2026, Appendix F) took only 4.9 to 10.9 minutes, but it certified up to 4.07% more noise than the exact σ\sigma, more as M grew. For a detailed comparison and discussion of both routes, see Appendix E. We ask whether this search can be replaced by a formula. It can. We give a formula that bounds the accuracy of every membership inference attack on the trained model, at every M, E and σ\sigma, and that gives σ\sigma in about a microsecond. We also compute the exact value that the formula bounds. Calibrating to it takes seconds and needs slightly less noise than the σ\sigma that accountant certifies. No accountant that knows only M, E and σ\sigma can certify a σ\sigma below the exact one (Section 2). A finite computation in ball arithmetic certifies in minutes that the exact σ\sigma meets the target (Appendix C.5).

We measure privacy by membership inference. An attacker sees the final model of a training run and must decide whether a given record was in the training data. Let P and Q be the probability distributions of the final model without and with the record. Their total variation (TV) distance is

dTV(P,Q)=sup⁡A∣P(A)−Q(A)∣,(1)d_{\mathrm{TV}}(P,Q)=\sup_{A}|P(A)-Q(A)|, \tag{1}

where A ranges over all events. When both answers are equally likely a priori, the optimal test is correct with probability (Chatzikokolakis et al., 2023; Mahloujifar et al., 2022)

Acc∗(P,Q)=12+12dTV(P,Q).(2)\mathrm{A c c}^{*}(P,Q)=\frac{1}{2}+\frac{1}{2}d_{\mathrm{T V}}(P,Q). \tag{2}

For any two distributions we call Acc∗(P,Q)\text{Acc}^{*}(P,Q) their attack accuracy. We write Acc∗\text{Acc}^{*} alone for the distributions of the final model.

Total variation also has a meaning in f-differential privacy (Dong et al., 2019). The trade-off function T(P,Q)(α)T(P, Q)(\alpha) is the smallest type-II error of a test of P against Q with type-I error at most α\alpha. Random guessing gives 1−α1 - \alpha, and

dTV(P,Q)=sup⁡0≤α≤1{1−α−T(P,Q)(α)}(3)d_{\mathrm{TV}}(P,Q)=\sup_{0\leq\alpha\leq1}\left\{1-\alpha-T(P,Q)(\alpha)\right\} \tag{3}

is the largest gap between the two curves (Appendix A). So dTV≤λd_{\mathrm{TV}} \leq \lambda means T(P,Q)(α)≥1−λ−αT(P, Q)(\alpha) \geq 1 - \lambda - \alpha for every

Figure

Figure 1: The record is in one of the M steps of each epoch, chosen uniformly at random, so averaging over the step divides the chi-square divergence by M, and 1+χ21 + \chi^{2} multiplies over the independent epochs.

α\alpha. Ertan and van Dijk (2026) call the largest distance of the curve from the random-guessing line its separation, which is dTV/2d_{\mathrm{TV}}/\sqrt{2}. Theorem 3.3 bounds the total variation of the Gaussian pair from above at every σ\sigma, and Theorem 4.1 gives it exactly.

Our starting point is the chi-square divergence

χ2(Q∥P)=EP(dQdP−1)2,(4)\chi^{2}(Q\|P)=\mathbb{E}_{P}\Big(\frac{\mathrm{d}Q}{\mathrm{d}P}-1\Big)^{2}, \tag{4}

which bounds total variation by dTV(P,Q)≤12χ2(Q∥P)d_{\mathrm{TV}}(P,Q) \leq \frac{1}{2} \sqrt{\chi^2(Q \| P)} (Sason and Verdú, 2016). For the Gaussian pair it is exactly (e1/σ2−1)/M(e^{1/\sigma^2} - 1)/M (Proposition 3.1). Since the allocation is redrawn every epoch, the reference pair for EE epochs is the product pair (PM⊗E,QM⊗E)(P_M^{\otimes E}, Q_M^{\otimes E}), and 1+χ21 + \chi^2 multiplies over epochs (Figure 1). By a known reduction, DP-SGD with random allocation is never easier to attack than this product pair (Section 2). We show that for every MM, EE and σ\sigma, the final model of DP-SGD with random allocation satisfies

Acc∗≤12+14(1+e1/σ2−1M)E−1.(5)\mathrm{A c c}^{*}\leq\frac{1}{2}+\frac{1}{4}\sqrt{\left(1+\frac{e^{1/\sigma^{2}}-1}{M}\right)^{E}-1}. \tag{5}

Every quantity on the right is set before training, so the inequality can be solved for σ\sigma. Figure 1 shows where the division by M and the power E come from.

Contributions.

  1. A closed-form bound and noise multiplier (Theorem 3.3). We derive the bound (5) from the known chi-square divergence of one epoch and solve the bound for σ\sigma in closed form (Corollary 3.4). Both hold at every finite M and E, and the noise multiplier takes about a microsecond to compute, while a search over σ\sigma takes seconds to hours.

  2. The exact total variation at every E (Theorem 4.1). The bound (5) uses only the second moment of the likelihood ratio, which multiplies over the epochs. We derive the exact total variation as an integral of the moments of complex order 12+iu\frac{1}{2} + iu of the likelihood ratio, which multiply over the epochs in the same way, and we reduce the moment of one epoch to a one-dimensional integral (Theorem 4.1).

We find the smallest σ\sigma that meets a target by a root search on this total variation and call it the exact σ\sigma, the least noise that any accountant that knows only M, E and σ\sigma can certify. We prove that at fixed σ\sigma the total-variation bound of Theorem 3.3 divided by the exact value tends to π/2\sqrt{\pi/2} as M grows with E/M→0E/M \to 0. On nine single-epoch targets the closed-form σ\sigma of Corollary 3.4 needs 7.4% to 16.7% more noise than the exact σ\sigma.

  1. The limit at fixed noise (Theorem 3.5). We prove that, as M→∞M \to \infty with E/M→r<∞E/M \to r < \infty and σ\sigma fixed, the trade-off curve of the pair converges to Gaussian differential privacy with μ=r(e1/σ2−1)\mu = \sqrt{r(e^{1/\sigma^2} - 1)}. van Dijk and Ertan (2026, Theorem 4.2) show that in this limit the curve is asymptotically at least that of Gaussian differential privacy with the same μ\mu, so that E=o(M)E = o(M) suffices for the curve to approach random guessing, and we show that E=o(M)E = o(M) is also necessary.

  2. Training and membership inference attacks (Section 5). We train ResNet-18 on CIFAR-10, a linear classifier on CIFAR-100 and RoBERTa-base on SST-2 and AG News. We show that the exact σ\sigma gives the mean test or validation accuracy of the σ\sigma of the accountant of Feldman and Shenfeld (2026) to within 0.06 points, and that it is found in about ten seconds on one CPU core and certified to meet the target in minutes. Over the closed-form σ\sigma of Corollary 3.4, the exact σ\sigma raises the mean test or validation accuracy of every model, by 0.43 to 2.38 points. We also show empirically that none of our membership inference attacks has an attack accuracy above our bound (5). On a linear model the optimal attack almost reaches the exact attack accuracy of the Gaussian pair, while attacks on ResNet-18 stay close to random guessing.

Organization. Section 2 sets up the training algorithm, the membership test and the Gaussian pair. Section 3 derives the closed-form bound and its noise multiplier, and Section 4 computes the exact total variation. Section 5 reports the experiments, and Section 6 discusses related work and limitations.

References (71)