Near-Exact Privacy Amplification for Matrix Mechanisms

## Abstract

Abstract We study the problem of computing the privacy parameters for DP machine learning when using privacy amplification via random batching and noise correlated across rounds via a correlation matrix 𝐂 𝐂 \mathbf{C} bold_C (i.e., the matrix mechanism). Past work on this problem either only applied to banded 𝐂 𝐂 \mathbf{C} bold_C , or gave loose privacy parameters. In this work, we give a framework for computing near-exact privacy parameters for any lower-triangular, non-negative 𝐂 𝐂 \mathbf{C} bold_C . Our framework allows us to optimize the correlation matrix 𝐂 𝐂 \mathbf{C} bold_C while accounting for amplification, whereas past work could not. Empirically, we show this lets us achieve smaller RMSE on prefix sums than the previous state-of-the-art (SOTA).
We also show that we can improve on the SOTA performance on deep learning tasks. Our two main technical tools are (i) using Monte Carlo accounting to bypass composition, which was the main technical challenge for past work, and (ii) a “balls-in-bins” batching scheme that enables easy privacy analysis and is closer to practical random batching than Poisson sampling.

## 1 Introduction

Many recent works have improved the privacy-utility tradeoff of differentially private machine learning via improvements in either privacy amplification or how noise is correlated across rounds. Privacy amplification (Kasiviswanathan et al., ; Balle & Wang, ; Erlingsson et al., ; Balle et al., ) uses randomness in data processing to improve the existing privacy guarantees. Correlated noise (Kairouz et al., ; Denisov et al., ; Choquette-Choo et al., ), or DP-FTRL, uses the matrix mechanism to add noise in DP training such that the noise added in one round is cancelled out in subsequent rounds. Specifically, if $\mathbf{z}$ is an i.i.d. Gaussian matrix, independent noise approaches, i.e., differentially private stochastic gradient descent (DP-SGD) clip gradients and add noise $\mathbf{z}[i,:]$ in the $i$th round of DP training; instead, DP-FTRL $(\mathbf{C}^{-1}\mathbf{z})[i,:]$ as the noise in the $i$th round, where $\mathbf{C}$ is a carefully chosen “correlation matrix”.

Choquette-Choo et al. () showed that one could simultaneously obtain the benefits of privacy amplification and noise correlation, leading to a class of “banded”(^1^11A square lower-triangular matrix is $b$-banded, if at most $b$ of the principal diagonals are non-zero.) $\mathbf{C}$ correlation matrices that Pareto dominated either alone.
However, their amplification analysis only applied to these specific banded matrices, whereas we may want to work with non-banded $\mathbf{C}$ due to utility or efficiency concerns (Dvijotham et al., ; McMahan et al., ). Choquette-Choo et al. () gives an amplification analysis that works with general (i.e., non-banded) $\mathbf{C}$ and is tight in the limit as $\varepsilon\rightarrow 0$, but for larger $\varepsilon$ values used commonly in DP machine learning, their analysis inherently introduces slack, and can greatly overestimate the true privacy parameter. Both of these works’ limitations are due to a reliance on composition theorems. We propose an approach which bypasses composition and in turn avoids both of these limitations simultaneously:

In this work, we use Monte Carlo accounting to enable nearly-exact privacy analysis and optimization of these amplified correlated noise mechanisms without any constraint on the structure of the correlation matrices. In turn, we are able to achieve smaller error for prefix sums than past work in various settings, and improve the state-of-the-art utility on deep learning tasks, even while using memory-efficient correlation matrices.

This allows us to obtain significant amplification benefits for generic $\mathbf{C}$ matrices, which were shown to be better than constrained versions in both utility (Choquette-Choo et al., ) and memory (Dvijotham et al., ) but cannot yet be combined with privacy amplification in the practical regimes of interest for $\varepsilon$ in DP machine learning. In particular, we first consider the standard objective for correlated noise mechanisms, RMSE of prefix sums (as defined in e.g., Kairouz et al. (); Denisov et al. (); see Section 1.2), and find that our techniques lead to $\mathbf{C}$ with significant reduction in RMSE over the prior SOTA around $10\%$. When used to train models on the standard CIFAR-10 benchmark(^2^22It is worth mentioning that accuracy of training on the CIFAR-10 benchmark with correlated noise has been highly optimized for over a long series of papers (e.g. (Choquette-Choo et al., , )). So, any tangible and unconditional improvement is significant.), the RMSE improvements translate to up to 1% absolute accuracy improvements compared to the prior SOTA (Choquette-Choo et al., ).

### 1.1 Our Contributions

#### 1.1.1 Algorithmic Contributions

Balls-in-bins minibatching: We propose a more practical sampling scheme that (i) does not require random access to the entire dataset, (ii) achieves much better privacy amplification than the next-best alternative, shuffling, and (iii) enables efficient amplification analysis via Monte Carlo sampling which would otherwise be NP-hard to compute. We are able to implement a practical variant of this sampling scheme that enforces fixed batch sizes (which are required for compatability with modern ML techniques like XLA compilation) for our deep learning experiments.

Near-exact analysis via Monte Carlo: We recognize a common issue with prior amplification analysis of correlated noise mechanisms, which is their reliance on composition which led to slack for various reasons (see Section 1.2). We thus show how to use Monte Carlo accounting (Wang et al., ) which instead observes that approximate DP guarantees can be written as the expected value of some function of the privacy loss and $\varepsilon$ (see Section 2 for more details). Because it is easy to do Monte Carlo accounting for the whole matrix $\mathbf{C}\mathbf{x}+\mathbf{z}$, we can bypass the need for composition. In turn, we are able to obtain near-exact privacy analysis (only paying for the sampling error of Monte Carlo approximation) while supporting general $\mathbf{C}$, improving upon the weaknesses of both the past works.

Optimizing $\mathbf{C}$ under amplification: We, for the first time, show how to optimize $\mathbf{C}$ to minimize the RMSE under privacy amplification. This remediates a significant issue with prior work which required an expensive grid-search to check the amplified RMSE under all possible configurations (as this required post-hoc analysis after optimization of $\mathbf{C}$, where the optimization did not account for amplification). A crucial aspect of Monte Carlo accounting is that it allows one to calibrate the quality of the privacy guarantee based on the computation available, i.e., one can obtain a quick (and less rigorous) $\varepsilon$ parameter by using a small number of MC samples, which can be made rigorous (with appropriate failure probability $\delta$) by increasing the number of samples. So, while optimizing for the $\mathbf{C}$ matrices we use fewer MC samples, and when providing the final privacy guarantee with the optimized $\mathbf{C}$ matrix, we run it with a large number of samples to achieve appropriate convergence of the sampler.

#### 1.1.2 Empirical Evaluation

RMSE analysis: We first look at the standard objective for evaluating correlated noise mechanisms, RMSE on prefix sums (formally defined in Section 1.2). We compare the RMSE achieved by matrices amplified using our analysis, and by the previous SOTA of banded matrices and Poisson sampling of Choquette-Choo et al. (). We demonstrate that because we can directly optimize the correlation matrix for the RMSE under amplification, we can achieve up to a 10% reduction in RMSE compared to the SOTA.

Empirical evaluation on CIFAR-10: We next use correlation matrices and $\sigma$ computed using our privacy analysis to train a VGG model on CIFAR-10. We again compare to the SOTA of Choquette-Choo et al. (). We show that despite using a weaker sampling assumption, matrices amplified by balls-in-bins batching Pareto dominate the approach of (Choquette-Choo et al., ), getting equal accuracy at smaller $\varepsilon$ and giving up to 1% absolute accuracy improvements at larger $\varepsilon$.

### 1.2 Background and Prior Work

Here, we summarize prior work and highlight why our contributions above are significant.

Privacy amplification: Though randomness in data processing reduces the variance of noise required, the main challenge with privacy amplification is giving tight privacy analysis of the amplified mechanism, which for DP-SGD usually requires computing a divergence between two mixtures of Gaussians. There are several forms of privacy amplification, but the two most popular are sampling (Abadi et al., ; Balle et al., ) and shuffling (Balle & Wang, ; Erlingsson et al., , ; Feldman et al., ).

Privacy amplification by (Poisson) sampling assumes the batches are formed by including each element independently with some probability $p$. Because the sampling randomness is independent across rounds, tight privacy analyses of DP training with independent noise (DP-SGD) are well-known (Koskela et al., ), and supported by open-source libraries (DP Team, ). However, Poisson sampling is often impractical to implement, especially when working with larger datasets (Ponomareva et al., ).

Privacy amplification by shuffling in the context of DP-SGD usually assumes the batches are formed by shuffling the dataset (a single time) and then forming fixed-size batches using the shuffled order. In some limited settings its privacy analysis is well-understood (Feldman et al., ), but in the setting of DP-SGD, for example, tight privacy analyses remain elusive. Technically, the difficulty is that the participations of different examples are dependent, unlike with Poisson sampling. In addition to being challenging to analyze, Chua et al. () demonstrated that shuffling often gives much smaller improvements in privacy compared to sampling. Despite these difficulties, as Chua et al. () note, shuffling is used much more widely in practice since it can be implemented, e.g., in a single pre-processing pass over the dataset, whereas sampling requires random access to potentially very large datasets which is often infeasible.

Correlated noise:
Kairouz et al. () proposed DP-FTRL, the first DP training algorithm with correlated noise, where the update at each step are the rows of $\mathbf{x}+\mathbf{z}_{tree}$ where $\mathbf{z}_{tree}$ is sampled using the binary tree mechanism of (Dwork et al., ). Denisov et al. () showed this was a special case of the updates being rows of $\mathbf{x}+\mathbf{C}^{-1}\mathbf{z}$, giving a more expressive definition for $\mathbf{C}^{-1}$ called the “correlation matrix”. They showed these matrices could be optimized via a convex optimization program to maximize noise cancellation (i.e., minimize total noise variance). Choquette-Choo et al. () proposed a “multi-participation” generalization, leading to the first correlated noise DP training algorithm to (substantially) outperform DP-SGD with practical $\varepsilon$’s. Choquette-Choo et al. () showed that correlated noise algorithms Pareto-dominated DP-SGD in privacy-utility tradeoffs; Choquette-Choo et al. () showed that these algorithms provably outperformed DP-SGD.

For simplicity, these works assume $\mathbf{C}$ is non-negative and lower-triangular. The privacy guarantee of correlated noise is the same as that of the matrix mechanism $\mathbf{C}\mathbf{x}+\mathbf{z}$ by post-processing, hence based on how batches are formed we can usually give privacy guarantees in terms of an appropriate norm of $\mathbf{C}$. To optimize the matrix $\mathbf{C}$, the convex program usually minimizes the root-mean-squared-error (RMSE) of the prefix sums of $\mathbf{x}$, given by $\left\|\mathbf{A}\mathbf{C}^{-1}\right\|_{2}\cdot\sigma$ where $\mathbf{A}$ is the lower-triangular all-ones matrix and $\sigma$ is the noise multiplier needed for $\mathbf{C}\mathbf{x}+\mathbf{z}$ to satisfy the target privacy guarantee.

Challenges of combining privacy amplification and correlated noise: The main hurdle is that privacy amplification analysis usually relies heavily on composition: instead of analyzing the entire training run directly, we compute a privacy guarantee for each round of training separately, and then combine these in a straightforward way to analyze the entire run. However, composition requires that both sampling and noise randomness be independent across rounds and of course noise correlations violates this. Thus, the only two prior works  (Choquette-Choo et al., , ) combining privacy amplification and noise correlation leveraged reductions which significantly reduce the privacy amplification benefits.

Amplified banded matrix factorization (Choquette-Choo et al., ): The matrix $\mathbf{C}$ is $b$-banded if only the first $b$ diagonals of $\mathbf{C}$ are non-zero. For $b$-banded $\mathbf{C}$, they observe that rows $i$ and $j$ of $\mathbf{C}\mathbf{x}+\mathbf{z}$ are independent if $|i-j|\geq b$. If each example is assigned an index $k\in\{0,1,\ldots b-1\}$ and then can only be sampled in rounds $i$ where $i\pmod{b}\equiv k$, the resulting privacy guarantee can be reduced to standard DP-SGD but for $n/b$ rounds and batch size scaled up by $b$. However, there are two key limitations: (i) it constrains $\mathbf{C}$ limiting its expressivity, and (ii) its analysis does not exploit the fact that the assignment of batches to indices can be randomized. This latter issue becomes apparent when $b$ is sufficiently large, where the result collapses to one without any amplification despite this randomness.

Conditional composition (Choquette-Choo et al., ): They instead show that these mechanisms have privacy guarantees upper bounded by a different independent noise mechanism, allowing the use of composition.
Specifically, consider Poisson sampling with probability $p$. Effectively what they show is that we can compute a separate privacy guarantee for each row of $\mathbf{C}\mathbf{x}+\mathbf{z}$ using an inflated sampling probability $\widetilde{p}>p$ and compose these guarantees as if they were independent. This approach is more general than (Choquette-Choo et al., ) because it applies to generic $\mathbf{C}$. However, $\widetilde{p}$ introduces slack in the analysis that gets worse as the noise multiplier decreases, such that the $\varepsilon$ computed in low-privacy regimes can be much worse than even the unamplified $\varepsilon$. This manifests practically in DP machine learning: most mechanisms obtain no benefits.

### 1.3 Future Directions

There are several interesting directions for extending the practicality of our work. One reason for our choice of balls-in-bins sampling is that it is more amenable to Monte Carlo accounting than Poisson sampling. Poisson sampling provides much stronger amplification than shuffling in most settings (Chua et al., ), so ignoring the practicality of Poisson sampling, enabling Monte Carlo accounting for correlated noise with Poisson sampling could thus enable even higher utility for private training. However, the fact that the corresponding mixture of Gaussians has $2^{n}$ modes is a challenging technical barrier to such a result.

To be able to use Monte Carlo sampling to analyze the privacy amplification of the balls-in-bins sampling scheme, we need to first provide a PLD-dominating pair of distributions. In Lemma 3.2, we obtain this pair by taking the modes of $P$ to be sums of certain columns of $|\mathbf{C}|$. This is potentially too loose, and we may hope to instead use sums of columns of $\mathbf{C}$, thereby reducing the norm of each mode. In the unamplified setting, this loosening of the assumption is possible whenever $\mathbf{C}[:,i]\cdot\mathbf{C}[:,j]$ for any pair of rounds $i,j$ a user can participate in. However, amplification through sampling complicates this, and standard techniques for reducing dimensionality and adaptivity don’t work anymore, see Appendix A for an example.

The number of samples we need to verify a DP guarantee using Monte Carlo accounting and e.g. Bernstein’s inequality scales as $1/\delta$, which may be prohibitive for small $\delta$. It is an interesting but challenging question to determine if a more careful sampler and concentration analysis can give substantially improved sample complexity for analyzing correlated noise mechanisms.

While we were able to implement a practical variant of balls-in-bins batching that was compatible with XLA compilation, we only used our variant to train a small-scale model. We leave it to future work to implement balls-in-bins batching at larger scales, and in particular compare the scalability of balls-in-bins to that of unamplified training and Poisson sampling.

## 2 Privacy Loss Distributions and Monte Carlo Accounting

We can define $(\varepsilon,\delta)$-DP in terms of the hockey-stick divergence. For any two distributions $P,Q$, their $\alpha$-hockey stick divergence for $\alpha\geq 0$ is given by:

$$ $H_{\alpha}(P,Q)=\int_{x}\max\{P(x)-\alpha Q(x),0\}.$ $$

A mechanism $\mathcal{M}$ is $(\varepsilon,\delta)$-DP if for any adjacent databases $D\sim D^{\prime}$, we have $H_{e^{\varepsilon}}(\mathcal{M}(D),\mathcal{M}(D^{\prime}))\leq\delta$. Suppose $P,Q$ are a dominating pair (Zhu et al., ) for $\mathcal{M}$ of interest; that is, for any $D\sim D^{\prime},\alpha\geq 0$ we have $H_{\alpha}(\mathcal{M}(D),\mathcal{M}(D^{\prime}))\leq H_{\alpha}(P,Q)$.
Then, by sampling $X\sim P$ and computing $Y=\log P(X)/Q(X)$, we then say that the privacy-loss distribution (PLD) (Balle et al., ) of $P$ and $Q$ is the law of $Y$.

Now to prove $(\varepsilon,\delta)$-DP for $\mathcal{M}$, it suffices to show $H_{e^{\varepsilon}}(P,Q)\leq\delta$.
The main observation in Monte Carlo accounting is that we can write $H_{\alpha}$ as an expectation over $Y$,

$$ $H_{\alpha}(P,Q)=\mathbb{E}_{Y}[\max\{1-\alpha e^{-Y},0\}].$ $$

Then, if exactly computing $H_{\alpha}(P,Q)$ is hard but sampling $Y$ is easy, we can estimate $\delta$ for some $\varepsilon$ by taking the average of sufficiently many samples of $\max\{1-e^{\varepsilon-Y},0\}$. Namely, let $\hat{\delta}$ be the estimated $\delta$ value, i.e. the average over some samples of $\max\{1-e^{\varepsilon-Y},0\}$. As a starting point, we can already claim $(\varepsilon,\hat{\delta})$-DP as an informal privacy statement. To make it formal, we can use
the Estimate-Verify-Release framework of (Wang et al., ) (Algorithm 1): we fix a target $(\varepsilon,\delta)$-DP privacy guarantee ahead of time, and use Monte Carlo accounting to verify that $\mathcal{M}$ satisfies with $(\varepsilon,\delta)$-DP, and only run $\mathcal{M}$ if the verification succeeds.

Figure: Algorithm 1 Estimate-Verify-Release of (Wang et al., )

The below theorem shows that Algorithm 1 can be made to incur only a constant blowup in $\delta$:

###### Theorem 2.1 (Theorem 9 of Wang et al. ( 2023 ) ) .

Suppose in Algorithm 1 that for any $P,Q$ such that $H_{\varepsilon}(P,Q)>\tau\delta$, $\hat{\delta}>\delta$ w.p. at least $1-\tau\delta$. Then Algorithm 1 is $(\varepsilon,\tau\delta)$-DP.

###### Theorem 2.1 (Theorem 9 of Wang et al. ( 2023 ) ) .

## 3 Balls-in-bins batching

As we will see in the next section, applying Monte Carlo accounting to correlated noise mechanisms requires time linear in the number of possible participation patterns. For $n$-round DP-SGD with Poisson sampling, this is $2^{n}$. Shuffling reduces the number of possible participation patterns, and is generally considered a more practical variant, but is hard to do privacy analysis for because the participations of different examples are not independent like in Poisson sampling.

To alleviate the issues with both Poisson sampling and shuffling, we propose balls-in-bins batching. Informally, balls-in-bins batching forms batches using the balls-in-bins process, where examples are balls and batches are bins:

###### Definition 3.1 .

In balls-in-bins batching, we form batches as follows. Let $b$ be the number of batches per epoch we wish to use and let $E$ be the number of epochs that we train.
Also denote by $n=b\cdot E$ the total number of training iterations.
For each example $d$, we independently include it in exactly one of $B_{1},B_{2},\ldots,B_{b}$ uniformly at random. We then iterate through the batches in round robin fashion, i.e. in iteration $i$ of our learning algorithm we use batch $B_{i\pmod{b}}$ (abusing notation to let e.g. $2b\pmod{b}=b$).

Figure: Figure 1: A comparison of the how different amplification methods might form batches. Here, we use $n=6$ rounds, and form $b=3$ batches per epoch for $E=2$ epochs. Note that shuffling uses fixed batch sizes, and all methods but Poisson sampling use the same batching across epochs and enforce exactly one participation per example per epoch.
Refer to caption: extracted/5911406/other_figures/amplificationmethods.png

In Figure 1 we give a visualization of balls-in-bins batching and other standard methods for forming batches. The following lemma shows that the following pair of distributions is a dominating pair for the correlated noise mechanism $\mathbf{x}+\mathbf{C}^{-1}\mathbf{z}$ with balls-in-bins batching:

$$ $\displaystyle P$ $\displaystyle=\frac{1}{b}\sum_{i=1}^{b}N(\mathbf{m}_{i},\sigma^{2}I),\text{ where }\mathbf{m}_{i}=\sum_{j=0}^{E-1}|\mathbf{C}|_{1:n,b\cdot j+i}$ $\displaystyle Q$ $\displaystyle=N(0,\sigma^{2}I),$ $$

where $|\mathbf{C}|$ is the matrix whose entries are the absolute values of corresponding entry in $\mathbf{C}$.

###### Lemma 3.2 (Dimension-reduction for balls-in-bins batching) .

Suppose $\mathbf{C}\in\mathbb{R}^{n\times n}$ is a lower-triangular matrix with non-negative entries.
Then $P,Q$ as defined above is a dominating pair for the correlated noise mechanism with balls-in-bins batching.

###### Proof.

Because each user is assigned to their batch independently, we can assume without loss of generality that contributions from all users other than the differing user is always 0 0 (for a justification of this reduction, see e.g. the first part of proof of Theorem 4.8 in Choquette-Choo et al. ()).
Then, for the input matrix $\mathbf{x}\in\mathbb{R}^{n\times p}$, the rows have at most unit norm in the entries where the differing user participates and 0 everywhere else.
If the differing user is assigned to the $i$th batch, it is immediate by triangle inequality that
${\left\|{(\mathbf{C}\mathbf{x})_{k,:}}\right\|}\leq\sum_{j=0}^{E-1}|\mathbf{C}
|_{k,b\cdot j+i}$.
Because every user participates in each batch with probability $\frac{1}{b}$,
we can apply Lemma 4.5 of Choquette-Choo et al. () to get that
the correlated noise mechanism with balls-with-bins batching is dominated by the MoG mechanism (using their notation) $\mathcal{M}_{MoG}(\{\frac{1}{b},\dots,\frac{1}{b}\},\{\sum_{j=0}^{E-1}|\mathbf
{C}|_{1:n,b\cdot j+i}\}_{1\leq i\leq b})$.
This MoG is exactly $P$, so we have the desired result.
∎

Advantages of balls-in-bins batching: In addition to being more amenable for Monte Carlo analysis than shuffling or Poisson sampling, we believe balls-in-bins batching may be more practical than Poisson sampling for various reasons. First, one way to implement balls-in-bins batching to form $b$ batches is as follows: We sample $(c_{1},c_{2},\ldots,c_{b})$ from the multinomial random variable with $|D|$ trials and $b$ equally likely outcomes. We shuffle the dataset once, and then we operate in multiple streaming passes over the shuffled dataset. In iteration $i$, we take the next $c_{i\pmod{b}}$ examples from the dataset stream.

Hence, up to the choice of variable batch size (which we will discuss how to make practical in Section 5.2.1), balls-in-bins batching is no harder to implement than shuffling, which is generally considered to be a practical batch sampling method. As a function of requiring little overhead compared to shuffling, balls-in-bins batching avoids some of the practical issues with Poisson sampling. For example, shuffling and balls-in-bins are both memory-efficient if implemented in an offline manner as the shuffled dataset is the same size as the original dataset. In contrast, if we implement Poisson sampling in an offline manner, to store all batches formed by Poisson sampling we need to write each example $Bn/|D|$ times in expectation, which can be much larger than 1.

Shuffling and balls-in-bins are also guaranteed to give strict privacy improvements over deterministic multi-epoch training because they are sampling from a set of multi-epoch participation patterns. In contrast, as Chua et al. () demonstrated, in some settings the privacy guarantees of Poisson sampling can actually be worse than deterministic batching, since Poisson sampling risks over-sampling some examples. For the same reasons, shuffling and balls-in-bins batching are more secure in that they remain no less private than deterministic multi-epoch batching even if the randomness in the batches were somehow leaked (e.g. through a PRNG attack, or through monitoring communications during distributed training) whereas Poisson sampling can make the privacy much worse than deterministic multi-pass batching if the batches are leaked.

###### Definition 3.1 .

###### Lemma 3.2 (Dimension-reduction for balls-in-bins batching) .

###### Proof.

## 4 Monte Carlo Accounting for Correlated Noise Mechanisms

### 4.1 Calibrating σ 𝜎 \sigma italic_σ

Now, suppose we are given a lower triangular matrix $\mathbf{C}\in\mathbb{R}^{n\times n}$ with non-negative entries and we aim to find the minimum noise-multiplier $\sigma$ so that the balls-in-bins mechanism is $(\varepsilon,\delta^{\prime})$-DP.
This $\delta^{\prime}$ will be slightly smaller than $\delta$ so that Algorithm 1 is $(\varepsilon,\delta)$-DP and outputs $\bot$ with very small probability.
We approach this by drawing a sample of the dominating PLD and employing a bisection root-finding algorithm on $\sigma$.

To do this, we first recall the dominating distributions,

$$ $P_{\mathbf{C},\sigma}=\frac{1}{b}\sum_{i=1}^{b}N(\mathbf{m}_{i},\sigma^{2}I), \text{ where }\mathbf{m}_{i}=\sum_{j=0}^{E-1}|\mathbf{C}|_{1:n,b\cdot j+i}, \qquad Q_{\sigma}=N(0,\sigma^{2}I).$ $$

Hence we can sample $Y\sim PLD(P_{\mathbf{C},\sigma},Q_{\sigma})$ by first sampling $X\sim P_{\mathbf{C},\sigma}$ and computing $Y=\log\left(\frac{P_{\mathbf{C},\sigma}}{Q_{\sigma}}(X)\right)$. Note that computing $Y$ is efficient since $P_{\mathbf{C},\sigma}$ has only $b$ modes.
To make the sampling independent of $\sigma$, we can instead sample $i\sim Uni([b])$ and $Z\sim N(0,I)$ then for any $\sigma$ compute $Y=\log\left(\frac{P_{\mathbf{C},\sigma}}{Q_{\sigma}}(\mathbf{m}_{i}+\sigma
\cdot Z)\right)$.
This process is summarized in Algorithm 2, which uses the function $\hat{\delta}$ to estimate the $\delta$ at a fixed $\sigma$.
The inner computation of $\hat{\delta}$ is easily parallelizable, as it is a simple average over a given sample size.
On top of this, a bisection algorithm is run, which only requires $O(\log(1/\delta))$ many iterations typically because $\sigma$ is a scalar.

Figure: Algorithm 2 Finding $\sigma$

### 4.2 Optimizing over matrices

In the previous section, we outlined the procedure Algorithm 2 for estimating the noise multiplier $\sigma$ for a given matrix $\mathbf{C}$.
We now show that we can optimize $\mathbf{C}$ for a given utility metric that is a function of $\mathbf{C},\sigma$. We will choose the utility metric to be the RMSE (root mean squared error) of prefix sums of $\mathbf{x}$ achieved by $\mathbf{x}+\mathbf{C}^{-1}\mathbf{z}$, which was also the metric optimized by Choquette-Choo et al. (, ). The RMSE is given by $\sigma\cdot{\left\|{\mathbf{A}^{-1}\mathbf{C}}\right\|}$, where ${\left\|{\cdot}\right\|}$ is the Frobenius norm and $\mathbf{A}$ is the all-ones lower-triangular matrix. While we focus on RMSE in this paper, our optimization framework is easily extended to any differentiable function of $\mathbf{C}$ and $\sigma$.

Algorithm 2 computes $\sigma$ (as a function of $\mathbf{C}$) using bisection, hence we cannot e.g. apply automatic differentiation to find partial derivatives of $\sigma$. However, via implicit differentiation we can still obtain gradients of the RMSE with respect to $\mathbf{C}$ using only quantities computable via automatic differentiation. By chain rule:

$$ $\frac{\partial(\sigma\cdot{\left\|{\mathbf{A}^{-1}\mathbf{C}}\right\|})}{ \partial\mathbf{C}}=\sigma\cdot\frac{\partial{\left\|{\mathbf{A}^{-1}\mathbf{C }}\right\|}}{\partial\mathbf{C}}+{\left\|{\mathbf{A}^{-1}\mathbf{C}}\right\|} \cdot\frac{\partial\sigma}{\partial\mathbf{C}}.$ $$

Let $\hat{\delta}$ denote the function as defined in Algorithm 2, i.e. the function that takes a given $\varepsilon,\sigma,\mathbf{C}$ and set of Monte Carlo samples, and outputs the corresponding estimated $\delta$ value. Given a set of Monte Carlo samples, we want to take a gradient step while preserving $\hat{\delta}=\delta$. Taking derivative of both sides of this constraint with respect to $\mathbf{C}$:

$$ $\displaystyle\frac{\partial\hat{\delta}}{\partial\mathbf{C}}+\frac{d\hat{ \delta}}{d\sigma}\cdot\frac{\partial\sigma}{\partial\mathbf{C}}$ $\displaystyle=0\Longrightarrow\frac{\partial\sigma}{\partial\mathbf{C}}=-\left (\frac{\partial\hat{\delta}}{\partial\mathbf{C}}\right)/\left(\frac{d\hat{ \delta}}{d\sigma}\right)$ $$

So to optimize the RMSE w.r.t. $\mathbf{C}$ we can now use Algorithm 2 to find $\sigma$ for a given $\mathbf{C}$, and then apply gradient descent using the gradient

$$ $\frac{\partial(\sigma\cdot{\left\|{\mathbf{A}^{-1}\mathbf{C}}\right\|})}{ \partial\mathbf{C}}=\sigma\cdot\frac{\partial{\left\|{\mathbf{A}^{-1}\mathbf{C }}\right\|}}{\partial\mathbf{C}}-{\left\|{\mathbf{A}^{-1}\mathbf{C}}\right\|} \left(\frac{\partial\hat{\delta}}{\partial\mathbf{C}}\right)/\left(\frac{d\hat {\delta}}{d\sigma}\right).$ $$

Since $\hat{\delta}$ is computed using only differentiable functions of $\mathbf{C}$ and $\sigma$ (i.e., not via bisection), all partial derivatives in the above expression can be evaluated at the given $\mathbf{C},\sigma$ pair using automatic differentiation. We then simply plug these gradients into an optimization algorithm; for simplicity, we use gradient descent. Finally, for efficiency, we choose to restrict to Toeplitz $\mathbf{C}$ to optimize over a lower dimensional space.

## 5 Experiments

We implement Algorithm 2 for calibrating a noise multiplier for a given mechanism under balls-in-bins batching. In this section, we look at both the problem of minimizing RMSE and a deep learning setting, and compare results enabled by our accounting and optimization routines to past work.

### 5.1 RMSE Results

#### 5.1.1 Analysis of the amplification schemes

We first focus on the RMSE metric $\sigma\cdot\|\mathbf{A}^{-1}\mathbf{C}\|$. We compare our balls-in-bins batching analysis, Poisson sampling (using the analysis of (Choquette-Choo et al., ) for $b$-banded matrices where $b>1$, and standard PLD accounting for DP-SGD), and no amplification (i.e., we do multiple passes using a fixed batch size over a dataset given in arbitrary order). To simplify presentation in this section we will restrict to the setting with 2048 total iterations and 16 epochs, i.e. 128 iterations per epoch or $B=|D|/128$. In Appendix B, we provide analogous results for other settings of the number of epochs and number of iterations per epoch; while the exact numbers differ in other settings, the high-level conclusions hold in all settings we tested.

Amplification of DP-SGD: In Fig. 2(a), we plot the percentage improvement in RMSE due to balls-in-bins and Poisson sampling over the unamplified RMSE of DP-SGD, i.e. $\mathbf{C}=\mathbf{I}$.

Figure: (a) Improvement in RMSE over unamplified DP-SGD due to different amplification schemes.
Refer to caption: extracted/5911406/other_figures/improvement-on-dp-sgd.png

We observe that the improvement from the two sampling schemes is similar for smaller $\varepsilon$ and Poisson performs substantially better than balls-in-bins for larger $\varepsilon$. Taking balls-in-bins as an analog for shuffling, this is in line with the results of Chua et al. ().

Amplification of banded matrix factorization:
We next consider non-identity choices of $\mathbf{C}$. In particular, we look at $b$-banded matrices where $b>1$. Recall that a weakness of the sampling scheme of Choquette-Choo et al. () is that the amount of randomness in the sampling scheme, i.e. the degree of benefit from amplification, decreases as the number of bands $b$ in the matrix increases. In contrast, the randomness in sampling from balls-in-bins is independent of the matrix structure. We then may expect that balls-in-bins amplification outperforms the amplification of Choquette-Choo et al. ().

We verify this in Fig. 2(b): We again plot the percentage reduction in RMSE due to amplification but for a 64-banded matrix instead of $\mathbf{C}=\mathbf{I}$. As predicted, due to using a higher-randomness sampling scheme, balls-in-bins consistently outperforms Poisson sampling until $\varepsilon=16$.

While the previous experiment shows that balls-in-bins is preferable when using a fixed large number of bands, a better strategy is to choose the number of bands $b$ to minimize the RMSE rather than fix $b$ in advance. In Fig. 3(a), we reproduce Figure 2(b) but instead of fixing the number of bands $b$ in advance, we sweep $b\in\{1,2,4,8,16,32,64,128,256\}$ and for balls-in-bins batching pick the value of $b$ which minimizes the RMSE. For banded matrices and Poisson sampling, we do the same but restrict to $b\leq 64$, i.e. the regime where Choquette-Choo et al. ()’s result gives a non-zero amount of amplification. For the unamplified baseline, there is no benefit to reducing the number of bands $b$ so we pick $b=256$.

Figure: (a) Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/other_figures/improvement-on-best-band-mf.png

For $\varepsilon\leq 4$, the best RMSE under Poisson sampling slightly outperforms balls-in-bins batching and for $\varepsilon\geq 8$, we see a deterioration in the RMSE improvements from Poisson. At $\varepsilon=16$, we see that it is better to forgo the amplification scheme of (Choquette-Choo et al., ) and use the unamplified baseline. In contrast, because the distinguishing problem for balls-in-bins for a fixed $\mathbf{C}$ is always strictly harder than the unamplified baseline, the best $\mathbf{C}$ combined with balls-in-bins batching always strictly improves over the unamplified baseline.

#### 5.1.2 Improvements due to optimization

We now look at the benefits of using our optimization procedure to choose $\mathbf{C}$. We compare two variants of our optimization scheme, one which optimizes over general Toeplitz matrices, and another which optimizes over the BLT matrix family defined by Dvijotham et al. (). We use the 3-buffer variant of BLTs, i.e. they can be specified using 6 parameters and only require an overhead of 3 times the model size to store the state required for correlated noise generation. In Figure 3(b) we plot the improvement in RMSE for both these variants relative to the best $b$-banded $\mathbf{C}$ amplified using the sampling scheme and analysis of Choquette-Choo et al. ().

We observe that for most $\varepsilon$ values, our optimization procedure for $\mathbf{C}$ can give a reduction in RMSE compared to the previous state-of-the-art of Choquette-Choo et al. (). For extreme values of $\varepsilon$, the banded baseline still outperforms our optimized matrices. We note that despite BLT matrices being a subset of Toeplitz matrices, our optimized BLTs matrices sometimes outperform our optimized Toeplitz matrices. We believe this is because BLTs lie in a lower-dimensional space which may make it easier to optimize over them, i.e. the suboptimality of our solution to the optimization problem over BLTs may be smaller than the suboptimality of our solution to the problem over Toeplitz matrices.

#### 5.1.3 Timing Analysis

In this section, to understand the scalability of our optimization procedure, we analyze how long it takes to optimize for the matrix $\mathbf{C}$ as well and how it depends on the various parameters.

In Figure 4, we give the time, in seconds, for completing 300 iterations of gradient descent while varying the number of epochs, iterations per epoch, and number of samples per gradient descent iteration. We use a v100 GPU to perform the gradient steps. Here we fix $\delta=10^{-5}$ and $\varepsilon=1$. We make the following observations:

- •
Increasing the number of samples multiplicatively by 8 does not cause the runtime to increase by the same amount.
- •
On average, the runtime seems to have a sublinear dependence in the number of epochs.
- •
In contrast, in most settings for a large enough number of iterations per epoch the runtime seems to grow linearly or worse in the iterations per epoch.

For the largest number of samples, epochs, and iterations per epoch we ran into memory issues. In the next section, we show that using a very small number of samples in the optimization loop still yields good RMSE, i.e. these memory issues can generally be avoided. Combined with these observations, we believe this is evidence the optimization procedure is scalable in the number of epochs, although it may be infeasible to run the procedure for a large number of iterations per epoch.

Figure: Figure 4: Time (in seconds) to optimize $\mathbf{C}$ for different values of Monte Carlo samples used per gradient descent iteration, number of epochs, and iterations per epoch.

#### 5.1.4 Effect of the number of samples

When optimizing over the matrix $\mathbf{C}$, we use a Monte Carlo sampler to estimate $\sigma$. However, for privacy purposes we only need the estimate of $\sigma$ to be accurate for the final $\mathbf{C}$ output by the optimization procedure, since that is the only correlation matrix we will actually use during model training. For intermediate values of $\mathbf{C}$ in the gradient descent procedure, it is not a privacy violation to compute inaccurate $\sigma$ values for these matrices.

In turn, to make the optimization procedure more efficient, we can use a smaller number of samples per iteration. A natural question is then if the number of samples needed for the Monte Carlo estimator to concentrate is comparable to the number of samples needed for the optimization to achieve reasonable RMSE.

We run our optimization procedure for a varying number of samples per iteration, and in Fig. 5 for each of these numbers we plot the suboptimality of the final $\mathbf{C}$ value in terms of RMSE achieved compared to using the maximum number of samples. We vary $\varepsilon$ and fix $\delta=10^{-5}$. For this choice of $\delta$, we need at least $1/\delta\approx 2^{17}$ samples are needed for the Monte Carlo estimator of $\delta$ to guarantee an error smaller than $\delta$ with, say, constant probability. However, in Figure 5, we see that for $\varepsilon=0.5,1,2$ using e.g. $\approx 2^{9}$ samples per iteration suffices for achieving similar RMSE as $2^{20}$ samples per iteration, and at $\varepsilon=4$ this number of samples only leads to a $\approx 10\%$ increase in RMSE. In other words, our optimization procedure can use a much smaller number of samples (compared to the final verification of $\mathbf{C}$ and $\sigma$) at little to no cost in utility.

Figure: Figure 5: Percentage increase in RMSE due to using a smaller number of samples per iteration in the optimization procedure, when compared to the RMSE achieved by using $2^{20}$ samples per iteration.
Refer to caption: extracted/5911406/num-samples-plots/rmse_vs_numsamples.png

### 5.2 CIFAR Results

We next compare different choices of the correlation matrix $\mathbf{C}$ and amplification schemes in a deep learning setting. We replicate the CIFAR10 image recognition setting considered by (Choquette-Choo et al., ): we also use the same VGG model, 20 epochs of 100 iterations with batch size 500, and momentum of 0.95 and a learning rate cooldown from $\eta$ to $\eta/20$ across iterations 500 to 2000. We vary $\varepsilon\in\{0.5,1.0,2.0,4.0,8.0\}$ and fix $\delta=10^{-5}<1/|D|$. We fix the clip norm to 1.0 and tune the learning rate separately for each combination of $\varepsilon$ and correlation matrix/amplification method, and then report the average of 100 training runs for each combination. The different correlation matrix choices and amplification methods we consider are:

- •
Our baseline is the SOTA of banded matrices of Choquette-Choo et al. () using their Poisson sampling-based amplification scheme. We also consider banded matrices and balls-in-bins batching. Following Choquette-Choo et al. (), for each choice of the number of bands $b$, we optimize $\mathbf{C}$ without accounting for amplification. Then for each amplification method, we use the choice of $b$ in each setting of $\varepsilon$ that gives the lowest RMSE under amplification.
–
We do not separately consider multi-epoch MEMF of Choquette-Choo et al. () or DP-SGD with Poisson sampling as they are subsumed by this approach.
- •
BLT matrices of Dvijotham et al. (). We restrict to 4 buffers and use our optimization framework to optimize $\mathbf{C}$ for the RMSE under balls-in-bins batching for each value of $\varepsilon$.
- •
General Toeplitz lower-triangular matrices. Again we use our optimization framework to optimize $\mathbf{C}$ for the RMSE under balls-in-bins batching for each value of $\varepsilon$.

For all methods, in the implementation we shuffle the dataset and use a fixed batch size, but calculate the noise multiplier assuming the corresponding amplification method was properly implemented.
This is a standard practice for simplifying implementations in the literature (e.g., Choquette-Choo et al. ()). In the next section we discuss the pitfalls of this practice, and do a training run where we actually implement a practical variant of balls-in-bins batching that also uses fixed batch sizes for gradient computations.

For balls-in-bins batching, we conservatively set the target $\delta$ in accounting to be $8\cdot 10^{-6}$, and use sufficiently many samples in Monte Carlo estimation such that the wrapper of Wang et al. () gives the desired $(\varepsilon,10^{-5})$-DP guarantee and has a small failure probability.

Figure: Figure 6: Comparison of accuracy on CIFAR of different correlated noise strategies and amplification methods, absolute and relative to the baseline of banded $\mathbf{C}$ + Poisson sampling, with 95% confidence intervals over 100 trials.
Refer to caption: extracted/5911406/cifarplots/cifar_amplification_unnormalized.png

In Fig. 6, we plot the test accuracy achieved by each combination of correlation matrix and amplification analysis. We can conclude the following:

- •
*Banded matrix factorization + balls-in-bins* is always at least as good as the baseline, and sometimes gives up to 1% accuracy improvements. As argued earlier, the baseline assumes Poisson sampling which is a stronger/less practical assumption.
- •
Our ability to optimize BLT matrices makes them also always at least as good as the baseline, but with smaller improvements than the previous bullet. The baseline uses up to $16$ bands depending on $\varepsilon$, so *BLTs are also up to 4x more memory efficient than the baseline*.
- •
Optimized Toeplitz matrices are incomparable to the baseline; we believe their weak performance relative to the other methods is due to the difficulty of the optimization problem.

#### 5.2.1 Practical Implementation of Balls-in-Bins Batching

In Section 5.2, and in most empirical research on DP model training, an amplification method like Poisson sampling is assumed when computing the noise multiplier, but for simplicity a simpler sampling scheme is not actually implemented. The most common case of this is assuming Poisson sampling when instead doing shuffling, even though shuffling can produce much larger $\varepsilon$ values than sampling (Chua et al., ). A notable exception is research built on Opacus (Yousefpour et al., ) which implements Poisson sampling.

The main issue with implementing such sampling schemes properly is that they usually lead to unequal batch sizes (as schemes like shuffling which enforce equal batch sizes are usually hard to analyze tightly), which can lead to several inefficiencies:

- •
Modern model training pipelines are optimized for a fixed batch size. For example, XLA, which is used to e.g. compile gradient computations implemented in libraries like TensorFlow and JAX, requires a static input shape. To use variable batch sizes, one would naively need to forgo the use of XLA which could heavily slow down training in large-scale settings.
–
For example, consider Opacus which correctly implements Poisson sampling and supports variable batch sizes. In the benchmarking experiments of (Yousefpour et al., ), Opacus was shown to have runtime competitive with JAX for small-scale DP training. However, they observed that e.g. JAX pays a large up-front cost for compilation but after compilation achieves better runtime per iteration than Opacus. We expect that for larger scale the training the time spent on compilation is a smaller fraction of training time, hence variable batch size training with Opacus would be less scalable than XLA-based training using fixed batch sizes.
- •
Sampling a slightly larger batch can lead to disproportionately longer gradient computation times. As an extreme case, suppose we use an expected batch size of $B$, and we have $B$ accelerators that can each process a single gradient in parallel in time $T$. Hence computing a batch gradient on $B$ examples takes time $T$. However, if we have $B+1$ samples instead, we will need time $2T$ instead.
- •
Sampling a smaller batch leads to wasted computational resources. For example, in the above setting, if we sampled $9B/10$ examples, then we would have $B/10$ accelerators being unused, which may be undesirable.

To this end we propose and implement a practical variant of balls-in-bins batching. We do balls-in-bins batching, but:

- •
If a batch has size less than $B$, we pad it with some examples that have gradient 0 so its batch size becomes $B$.
- •
If a batch has size greater than $B$, we truncate it to have size exactly $B$.
- •
We compute the average gradient over the padded/truncated batch (i.e. our normalization in the average is always $1/B$).

Recall that balls-in-bins (without padding and truncating) can be implemented by shuffling the dataset, sampling a batch size schedule, and then taking batches according to this schedule. Hence even with padding and truncating balls-in-bins requires minimal overhead on top of shuffling, and indeed we were easily able to implement it in our CIFAR training code using only a single shuffle on the dataset and numpy’s multinomial sampler and pad operations, and use XLA to compile gradient computations in the resulting code. Furthermore, none of these changes affects the privacy analysis. This is because (i) the fixed normalization is compatible with the privacy analysis which is implicitly analyzing at the sum rather than the average, (ii) truncating a batch is equivalent to some of the examples in that batch having gradient 0, and DP-SGD’s privacy analysis allows arbitrary clipped gradient.

We next demonstrate that the loss in utility due to truncating examples or not saturating the batch size in every iteration is acceptable. We rerun the training procedure from the previous section using BLT matrices (we focus on BLT matrices as they are the most scalable choice of correlated noise (McMahan et al., )), but implement our practical variant of balls-in-bins batching. We pad/truncate to the same batch size of 500, i.e. in terms of gradient computations our practical variant of balls-in-bins is no more costly than shuffling the dataset and using fixed batch sizes instead.

In Figure 7 we compare this implementation to (i) the same implementation but using shuffling instead of balls-in-bins batching, and (ii) the state-of-the-art unamplified baseline of MEMF.
We see that the improvements from amplification over the unamplified baseline are far larger than the loss in utility due to the suboptimal batching introduced by the sampling scheme. To the best of our knowledge, this is the first DP model training result that simultaneously (i) implements the sampling scheme assumed when computing the noise multiplier, (ii) does so at a negligible cost in efficiency and in a manner compatible with modern machine learning frameworks, and (iii) still demonstrates improvements over the unamplified baseline.

Figure: Figure 7: Comparison of implementing balls-in-bins batching to shuffling and assuming balls-in-bins in the analysis, and the unamplified baseline.
Refer to caption: extracted/5911406/cifarplots/implementation.png

## Appendix A Dimensionality reduction and adaptivity

To find a dominating pair for a matrix $\mathbf{C}$, we typically wish to argue that the worst case PLD is generated by a user that only ever inputs the same entry every iteration.
This simultaneously handles dimension reduction and adaptivity and is the strategy for unamplified privacy analyses (see, e.g., Choquette-Choo et al. ()).
In the MEMF case, for it to be the case that the worst-case PLD is achieved by a user always outputting the same vector, it suffices to require $\mathbf{C}_{:,i}\cdot\mathbf{C}_{:,j}\geq 0$ for all indices $i,j$ for which a user can simultaneously appear in.
However, this is no longer the case for balls-in-bins sampling, even in a very simple case.
Consider the matrix

$$ $\displaystyle\mathbf{C}=\begin{pmatrix}1&0\\ -1&1\end{pmatrix}$ $$

with 1 epoch.
Then, the user only participates in exactly one of the first column or the second.
Say the user’s inputs are $x=(a,b)$, where $a,b\in\{-1,1\}$, which means that the MoG representing it

$$ $\displaystyle\frac{1}{2}\mathcal{N}((a,-a),\sigma^{2}I)+\frac{1}{2}\mathcal{N} ((0,b),\sigma^{2}I).$ $$

Then, maximizing the inner product between $(a,-a)$ and $(0,b)$ will dominate the PLD w.r.t. $N(0,\sigma^{2}I)$.
This is then maximized at $b=-a$, rather than $b=a$.
Thus, for balls-in-bins sampling, the inner products across columns that a user cannot simultaneously participate in matters.
Noting that this example hinged on the inner product between the two columns being negative, it is possible that $\mathbf{C}^{T}\mathbf{C}\geq 0$ entry-wise is sufficient to show that a user may as well only input the same vector.

## Appendix B RMSE plots for other settings

Here we plot the RMSE improvements through amplification and optimization for number of epochs in $\{8,16,32\}$ and iterations per epoch in $\{32,64,128\}$.

### B.1 Number of epochs = 8 absent 8 =8 = 8 and iterations per epoch = 32 absent 32 =32 = 32

Figure: Figure 8: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=32--num-epochs=8/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 9: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=32--num-epochs=8/RMSE-improvement-over-Best-BandMF.png

### B.2 Number of epochs = 8 absent 8 =8 = 8 and iterations per epoch = 64 absent 64 =64 = 64

Figure: Figure 10: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=64--num-epochs=8/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 11: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=64--num-epochs=8/RMSE-improvement-over-Best-BandMF.png

### B.3 Number of epochs = 8 absent 8 =8 = 8 and iterations per epoch = 128 absent 128 =128 = 128

Figure: Figure 12: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=128--num-epochs=8/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 13: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=128--num-epochs=8/RMSE-improvement-over-Best-BandMF.png

### B.4 Number of epochs = 16 absent 16 =16 = 16 and iterations per epoch = 32 absent 32 =32 = 32

Figure: Figure 14: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=32--num-epochs=16/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 15: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=32--num-epochs=16/RMSE-improvement-over-Best-BandMF.png

### B.5 Number of epochs = 16 absent 16 =16 = 16 and iterations per epoch = 64 absent 64 =64 = 64

Figure: Figure 16: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=64--num-epochs=16/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 17: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=64--num-epochs=16/RMSE-improvement-over-Best-BandMF.png

### B.6 Number of epochs = 16 absent 16 =16 = 16 and iterations per epoch = 128 absent 128 =128 = 128

Figure: Figure 18: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=128--num_epochs=16/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 19: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=128--num_epochs=16/RMSE-improvement-over-Best-BandMF.png

### B.7 Number of epochs = 32 absent 32 =32 = 32 and iterations per epoch = 32 absent 32 =32 = 32

Figure: Figure 20: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=32--num-epochs=32/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 21: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=32--num-epochs=32/RMSE-improvement-over-Best-BandMF.png

### B.8 Number of epochs = 32 absent 32 =32 = 32 and iterations per epoch = 64 absent 64 =64 = 64

Figure: Figure 22: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=64--num-epochs=32/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 23: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=64--num-epochs=32/RMSE-improvement-over-Best-BandMF.png

### B.9 Number of epochs = 32 absent 32 =32 = 32 and iterations per epoch = 128 absent 128 =128 = 128

Figure: Figure 24: Improvement in RMSE over unamplified $b$-banded matrix factorization due to different amplification schemes. All curves optimize the choice of $b$ at each point.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=128--num-epochs=32/RMSE-improvement-on-BandMF-through-amplification.png

Figure: Figure 25: Improvement from optimizing $\mathbf{C}$ using objective accounting for amplification.
Refer to caption: extracted/5911406/rmse-plots/iters-per-epoch=128--num-epochs=32/RMSE-improvement-over-Best-BandMF.png

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: - Could the authors interpret "near-exact" privacy analysis by:
  - Provide a more precise definition or explanation of what it means by "near-exact".
  - Discuss the potential impact of the looseness in $P$ on the overall privacy guarantees, given that the construction of $P$ in the dominating pair is potentially too loose.

- In lines 358-364, the authors discuss the choice of $b$ in experiments, which is chosen from the set {$ 1, 2, 4, 8, 16, 32, 64, 128, 256 $}. How does the (sub)optimal choice of $b$ vary with the other key parameters (e.g., $\varepsilon$)? Could the authors briefly discuss the intuition behind these variations, or include an ablation study showing the impact of suboptimal b choices on performance? 

- The authors note that the "balls-in-bins” batching scheme enables easy privacy analysis. However, will the practical variant of balls-in-bins batching in Appendix H complicate the privacy analysis? Would it encounter the same difficulties in privacy analysis as Poisson sampling?

- In line 280, the authors mention that the bisection requires $O(\log(1/\delta))$ iterations, where $\delta$ is supposed to be the privacy parameter in $(\varepsilon, \delta)$-DP. However, should it be $O(\log(1/\text{err}))$, where $\text{err}$ is the error tolerance of $\sigma^*$?

Minor:
- Figure 1 explains the amplification methods quite well. However, I would suggest additional notes indicating that the first row corresponds to the batches in the first epoch (e.g., $E = 1$), and that the second row is the second epoch (e.g., $E = 2$).

- In the introduction, the authors mention that one of the limitations of previous work is the banded $C$ issue. Could the authors provide the key intuition as to why the banded $C$ may restrict utility and efficiency, or discuss any specific scenarios or applications where non-banded C matrices are particularly beneficial?

- In Appendix H, for the practical variant of balls-in-bins batching, the authors pad the small batch with some zero-gradient examples to avoid wasted computational resources. Could the authors further explain why wasted computational resources would be a problem?
soundness: 3
strengths: - Propose a more practical minibatch sampling method, the Balls-in-Bins, that achieves better privacy amplification.

- Use Monte Carlo accounting to bypass composition. The limitations of the current work are well-discussed, especially the limitation of the construction of P.
summary: This paper investigates the computation of privacy parameters for differentially private (DP) machine learning, specifically when using privacy amplification through random batching and noise correlated across rounds via a correlation matrix C. Previous work either restricted C to banded matrices or provided loose privacy parameters. The authors introduce a framework for computing near-exact privacy parameters for any lower-triangular, non-negative C, optimizing C while considering amplification. They show empirical improvements over the state-of-the-art in root mean squared error (RMSE) for prefix sums and performance on deep learning tasks. The key techniques include Monte Carlo accounting to avoid composition and a balls-in-bins batching scheme for practical random batching.
weaknesses: See questions.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: - What is the ``practical random batching'', and why is the balls-and-bins scheme approximates it better than Poisson sampling?
- Can the authors provide a proof for the monotonicity between $\sigma$ and $\delta$?
soundness: 3
strengths: The paper is well-written, and the theoretical results seem to be correct (I didn't check the full proof carefully, but I believe it makes sense at a high level).
summary: In this paper, the authors propose a ``balls-and-bins'' batching scheme, for which the privacy analysis is quite straightforward (by analyzing hockey-stick divergence of the `dominating pairs'). Based on their novel batching scheme, the authors use Monte Carlo accounting to estimate the privacy parameter and avoid the estimation errors introduced by DP composition theorems. The experimental results indicate that their scheme performs better than existing works.
weaknesses: - In the abstract, the authors claim that the ``ball-and-bins'' scheme is closer to practical random batching than Poisson sampling. But there is no theoretical explanation in the paper. Not sure if I miss anything here.
- The Algorithm 2 applies bisection method to compute the $\sigma$. But the proof of monotonicity is missing.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: - In Lemma 3.2: What exactly guarantees that $(P,Q)$ dominates the pair $(Q,P)$ (for those stated $P$ and $Q$) ? I think the proof of Lemma 3.2 could be elaborated to make it more readable. Perhaps you could add the required results from the reference paper (Choquette-Choo et al., 2024b) to the appendix instead of shortly referring to the lemmas and theorems (example: "see e.g. the first part of proof of Theorem 4.8").

- What would be required to for providing convergence guarantees for the estimates? Could you use the results by Wang et al. for that?

- As I said I assume the analysis is for the add/remove neighborhood relation of datasets. In addition to adding it somewhere (e.g., Section 2), you could briefly discuss in Section 3 how the results might change (or not) for the substitution neighborhood relation.
soundness: 3
strengths: - The paper provides a novel and practical mini-batch sampling scheme applicable to matrix mechanisms. 

- Seems like a novel way for using the randomized accounting framework proposed by Wang et al. (2023). To the best of my knowledge, this is the most "non-trivial" use of that framework and sets an example that the Monte Carlo sampling is viable tool for differential privacy accounting and designing DP mechanisms.

- Although the convergence analysis is missing, and there are many future questions (e.g., the tightness of the dominating pair and the efficiency of the sampling), the paper gives convincing experimental results indicating this is a viable way of carrying out privacy accounting for the proposed mini-batch sampling scheme.
summary: The paper provides a differential privacy accountant for the "ball-in-bins batching", where the disjoint mini-batches for DP-SGD are formed via multinomial sampling. A particularly nice property of the accounting method is that it can be combined with so-called matrix mechanisms, where correlated noise is added to the DP-SGD iterations. The accounting is based on the randomized differential privacy accounting framework provided by [Wang et al., 2023](https://proceedings.neurips.cc/paper_files/paper/2023/file/6ae7df1f40f5faeda474b36b61197822-Paper-Conference.pdf), where Monte Carle sampling of the hockey-stick integral (when expressed using the privacy loss distribution) is carried out. This is enabled by Lemma 3.2 which gives a dominating pair of distributions $(P,Q)$, where $P$ can be sampled efficiently and $Q$ has a tractable density function. This way, the PLD can be sampled and the hockey-stick integral estimated.
weaknesses: - The theory is a weak side of the paper. There are really no theoretical guarantees given for the accuracy of the estimates. Theorem 2.1 is stated (Theorem 9 by Wang et al., 2023) however there are no results that would materialize this result. Also, I think it would be good to elaborate on that result, especially since it is stated so differently than Theorem 9 by Wang et al.

- The paper is not fully polished: I don't see the neighborhood relation of datasets stated anywhere. Due to the form of the dominating pair $(P,Q)$ given in Section 3, I assume you consider the add/remove relation. Perhaps the definition you use could be added somewhere in Section 2?

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. How to derive high-confidence bound for the monte-carlo simulation results?

2. Can the authors provide the noise parameter or the noise variance in Figure 4 to help readers understand the amplification? The accuracy itself does not tell too much meaningful information as the performance of SGD may be influenced by many other factors. 

3. Can the authors comment more on why in large eps, the proposed method performs much worse compared to subsampling amplification?
soundness: 2
strengths: This paper studies a very important problem, balls-in-bins batching with correlated noise, an alternative privacy amplification method in DP-SGD different from the classic subsampling amplification. Existing methods for analyzing privacy in this setting have drawbacks, especially with specific types of correlation matrices (banded matrices). The simulation method proposed shows an interesting and simple way to estimate the security parameter for arbitrary correlation matrix, which can be further used to optimize the noise form.
summary: This paper presents an algorithm for calculating privacy parameters in differentially private SGD when using privacy amplification through random batching and noise correlated across rounds via a correlation matrix, known as the matrix mechanism.
weaknesses: 1. A significant limitation of the results is that, while a concrete simulation algorithm is presented, the paper lacks formal high-probability or confidence bounds for the computed DP security parameter. This absence leaves ambiguity about the paper's contribution: whether it offers merely a heuristic estimation or an approach with provable guarantees. My evaluation could improve if high-confidence bounds were provided.

2. The paper does not provide a closed-form or asymptotic bound for the amplification rate produced by the methods, or, equivalently, an indication of the amount of noise required or potentially saved. This lack of theoretical clarity makes it difficult to determine the extent of improvement the method could yield beyond empirical optimization of the noise form.

Meta-review: Reviewers agreed that the paper provides a novel and practical sampling scheme for DP-SGD, and appreciated the good empirical performance. Some technical concerns were addressed during the rebuttal phase. A common concern is that the paper lacks theoretical analysis/guarantee, though some reviewers are excited about the novel idea behind the proposed balls-in-bins mechanism and believed that this is the way to go for DP-SGD with disjoint batches. Overall, the sentiment appears to be positive.

Decision: Accept (Poster)