Year: 2021

Abstract:
For many differentially private algorithms, such as the prominent noisy stochastic gradient descent (DP-SGD), the analysis needed to bound the privacy leakage of a single training run is well understood. However, few studies have reasoned about the privacy leakage resulting from the multiple training runs needed to fine tune the value of the training algorithm’s hyperparameters. In this work, we first illustrate how simply setting hyperparameters based on non-private training runs can leak private information. Motivated by this observation, we then provide privacy guarantees for hyperparameter search procedures within the framework of Renyi Differential Privacy. Our results improve and extend the work of Liu and Talwar (STOC 2019). Our analysis supports our previous observation that tuning hyperparameters does indeed leak private information, but we prove that, under certain assumptions, this leakage is modest, as long as each candidate training run needed to select hyperparameters is itself differentially private.

text: For many differentially private algorithms, such as the prominent noisy stochastic gradient descent (DP-SGD), the analysis needed to bound the privacy leakage of a single training run is well understood. However, few studies have reasoned about the privacy leakage resulting from the multiple training runs needed to fine tune the value of the training algorithm’s hyperparameters. In this work, we first illustrate how simply setting hyperparameters based on non-private training runs can leak private information. Motivated by this observation, we then provide privacy guarantees for hyperparameter search procedures within the framework of Renyi Differential Privacy. Our results improve and extend the work of Liu and Talwar (STOC 2019). Our analysis supports our previous observation that tuning hyperparameters does indeed leak private information, but we prove that, under certain assumptions, this leakage is modest, as long as each candidate training run needed to select hyperparameters is itself differentially private.

heading: 1 INTRODUCTION
text: Machine learning (ML) systems memorize training data and regurgitate excerpts from it when probed (Carlini et al., 2020). If the training data includes sensitive personal information, then this presents an unacceptable privacy risk (Shokri et al., 2017). It may however still be useful to apply machine learning to such data, e.g., in the case of healthcare (Kourou et al., 2015; Wiens et al., 2019). This has led to a significant body of research on the development of privacy-preserving machine learning methods. Differential privacy (DP) (Dwork et al., 2006b;a) provides a robust and quantitative privacy guarantee. It has been widely accepted as the best framework for formally reasoning about the privacy guarantees of a machine learning algorithm.
A popular method for ensuring DP is noisy (stochastic) gradient descent (a.k.a. DP-SGD) (Song et al., 2013; Bassily et al., 2014; Abadi et al., 2016). DP-SGD differs from standard (stochastic) gradient descent in three ways. First, gradients are computed on a per-example basis rather than directly averaged across a minibatch of training examples. Second, each of these individual gradients is clipped to ensure its 2-norm is bounded. Third, Gaussian noise is added to the gradients as they are averaged and applied to update model parameters. These modifications bound the sensitivity of each update so that the added noise ensures differential privacy. The composition (Dwork et al., 2010) and privacy amplification by subsampling (Balle et al., 2018) properties of differential privacy thus imply that the overall training procedure is differentially private. We can compute tight privacy loss bounds for DP-SGD using techniques like the Moments Accountant (Abadi et al., 2016) or the closely related framework of Rényi DP (Mironov, 2017; Mironov et al., 2019).
Machine learning systems have hyperparameters, such as the learning rate, minibatch size, or choice of a regularizer to prevent overfitting. Details of the model architecture can also be treated as hyperparameters of the optimization problem. Furthermore, learning within the constraints of differential privacy may introduce additional hyperparameters, as illustrated in the DP-SGD optimizer by the 2-norm bound value for clipping, the scale of the Gaussian noise, and the choice of stopping time. Typically the training procedure is repeated many times with different hyperparameter settings in order to select the best setting, an operation known as hyperparameter tuning. This methodology implies that even if each run of the training procedure is privacy-preserving, we need to take into account the fact that the training procedure is repeated (possibly many times) when reasoning about the privacy of the overall learning procedure.
Can the tuning of hyperparameters reveal private information? This question has received remarkably little attention and, in practice, it is often ignored entirely. We study this question and provide both positive and negative answers.

heading: 1.1 OUR CONTRIBUTIONS
text: • We show that, under certain circumstances, the setting of hyperparamters can leak private information. Hyperparameters are a narrow channel for private information to leak through, but they can still reveal information about individuals if we are careless. Specifically, if we tune the hyperparameters in an entirely non-private fashion, then individual outliers can noticeably skew the optimal hyperparameter settings. This is sufficient to reveal the presence or absence of these outliers à la membership inference (Shokri et al., 2017); it shows that we must exercise care when setting hyperparameters.
• We provide tools for ensuring that the selection of hyperparameters is differentially private. Specifically, if we repeat the training procedure multiple times (with different hyperparameters) and each repetition of the training procedure is differentially private on its own, then outputting the best repetition is differentially private. Of course, a basic version of such a result follows from the composition properties of differential privacy (that is the fact that one can “sum” the privacy loss bounds of multiple differentially private analyses performed on the same data to bound the overall privacy loss from analyzing this data). However, we provide quantitatively sharper bounds. Specifically, our privacy loss bounds are either independent of the number of repetitions or grow logarithmically in the number of repetitions, whereas composition would give linear bounds. Rather than repeating the training procedure a fixed number of times, our results require repeating the training procedure a random number of times. The privacy guarantees depend on the distribution of the number of runs; we consider several distributions and provide generic results. We discover a tradeoff between the privacy parameters and how heavy-tailed the distribution of the number of repetitions is.

heading: 1.2 BACKGROUND AND RELATED WORK
text: Differential privacy (DP) is a framework to reason about the privacy guarantees of randomized algorithms which analyze data (Dwork et al., 2006b;a). An algorithm is said to be DP if its outputs on any pair of datasets that only differ on one individual’s data are indistinguishable. A bound on this indistinguishability serves as the quantification for privacy. Formally, a randomized algorithm M : Xn → Y is (ε, δ)-DP if for any inputs x, x′ ∈ Xn differing only on the addition, removal, or replacement of one individual’s records and for any subset of outputs S ⊆ Y , we have
P [M(x) ∈ S] ≤ eεP [M(x′) ∈ S] + δ. (1)
Here, the parameter ε is known as the privacy loss bound – the smaller ε is, the stronger the privacy guarantee provided is, because it is hard for an adversary to distinguish the outputs of the algorithm on two adjacent inputs. The parameter δ is essentially the probability that the guarantee fails to hold. One of the key properties of DP is that it composes: running multiple independent DP algorithms is also DP and composition theorems allow us to bound the privacy parameters of such a sequence of mechanisms in terms of the individual mechanisms’ privacy parameters (Dwork & Roth, 2014).
There is a vast literature on differential privacy in machine learning. A popular tool is the DP-SGD optimizer (Abadi et al., 2016). Because the noise added is Gaussian and DP-SGD applies the same (differentially private) training step sequentially, it is easier to reason about its privacy guarantees in the framework of Rényi differential privacy (Mironov, 2017). Rényi differential privacy (RDP) generalizes pure differential privacy (with δ = 0) as follows. An algorithmM is said to be (λ, ε)-RDP with λ ≥ 1 and ε ≥ 0, if for any adjacent inputs x, x′
Dλ (M(x)‖M(x′)) := 1
λ− 1 log E Y←M(x) [( P [M(x) = Y ] P [M(x′) = Y ] )λ−1] ≤ ε, (2)
where Dλ (P‖Q) is the Rényi divergence of order λ between distributions P andQ. In the framework of RDP, one obtains sharp and simple composition: If each individual mechanism Mi is (λ, εi)-RDP, then the composition of running all of the mechanisms on the data satisfies (λ, ∑ i εi)-RDP. For instance, the privacy analysis of DP-SGD first analyzes the individual training steps then applies
composition. Note that it is common to keep track of multiple orders λ in the analysis. Thus ε should be thought of as a function ε(λ), rather than a single number. In many cases, such as Gaussian noise addition, this is a linear function – i.e., ε(λ) = ρ · λ for some ρ ∈ R – and such a linear bound yields the definition of zero-Concentrated DP with parameter ρ (ρ-zCDP) (Bun & Steinke, 2016).
One could naïvely extend this composition-based approach to analyze the privacy of a training algorithm which involves hyperparameter tuning. Indeed, if each training run performed to evaluate one candidate set of hyperparameter values is DP, the overall procedure is also DP by composition over all the hyperparameter values tried. However, this would lead to very loose guarantees of privacy. Chaudhuri & Vinterbo (2013) were the first to obtain improved DP bounds for hyperparameter tuning, but their results require a stability property of the learning algorithm. The only prior work that has attempted to obtain tighter guarantees for DP hyperparameter tuning in a black-box fashion is the work of Liu & Talwar (2019). Their work is the starting point for ours.
Liu & Talwar (2019) show that, if we start with a (ε, 0)-DP algorithm, repeatedly run it a random number of times following a geometric distribution, and finally return the best output produced by these runs, then this system satisfies (3ε, 0)-differential privacy.1 Liu & Talwar (2019) also consider algorithms satisfying (ε, δ)-DP for δ > 0. However, their analysis is restricted to the (ε, δ) formulation of DP and they do not give any results for Rényi DP. This makes it difficult to apply these results to modern DP machine learning systems, such as models trained with DP-SGD.
Our results directly improve on the results of Liu & Talwar (2019). We show that replacing the geometric distribution on the number of repetitions in their result with the logarithmic distribution yields (2ε, 0)-differential privacy as the final result. We also consider other distributions on the number of repetitions, which give a spectrum of results. We simultaneously extend these results to the Rényi DP framework, which yields sharper privacy analyses.
Independently Mohapatra et al. (2021) study adaptive hyperparameter tuning under DP with composition. In contrast, our results are for non-adaptive hyperparameter tuning – a.k.a. “grid search.”
A closely related line of work is on the problem of private selection. Well-known algorithms for private selection include the exponential mechanism (McSherry & Talwar, 2007) and the sparse vector technique (Dwork et al., 2009; Zhu & Wang, 2020). However, this line of work assumes that there is a low-sensitivity function determining the quality of each of the options. This is usually not the case for hyperparameters. Our results simply treat the ML algorithm as a black box; we only assume that its output is private and make no assumptions about how that output was generated. Our results also permit returning the entire trained model along with the selected hyperparameters.

heading: 2 MOTIVATION
text: A hyperparameter typically takes categorical values (e.g., the choice of activation function in a neural network layer), or is a single number (e.g., a real number for the learning rate or an integer for the number of epochs). Thus, it is intuitive that a hyperparameter provides little capacity as a channel to leak private information from the training data. Nevertheless, leakage can happen, in particular when training is done without preserving privacy. We illustrate how with the constructed example of hyperparameter tuning for a support vector machine learning (SVM) learned from a synthetic data distribution. We consider a SVM with a soft margin; we use stochastic gradient descent to minimize the corresponding objective involving the hinge loss and a weight penalty:
lw,b(x, y) = ‖w‖22 + αmax{0, 1− y(w · x+ b)}
where y ∈ {−1, 1} indicates the label of training example x ∈ R2. Because our purpose here is to illustrate how leakage of private information can arise from hyperparameter tuning, we work with a synthetic data distribution for simplicity of exposition: we draw 100 inputs from isotropic 2D Gaussians of standard deviation 0.5 for both the positive and negative classes to form the training set D. The negative class is centered at µ−1 = (−0.75,−0.75) and the positive at µ1 = (0.75, 0.75). Our learning procedure has a single hyperparameter α controlling how much importance is given to the hinge loss, i.e., how much the SVM is penalized for using slack variables to misclassify some of the training data. We first tune the value of α with the training set D and report training accuracy as
1Liu & Talwar (2019) prove several other results with slightly different formulations of the problem, but this result is representative and is most relevant to our discussion here.
a function of α in Figure 1, where accuracy is defined as correctly classifying the training sample outside the margin (e.g., w · x+ b ≥ 1 for x in the positive class). Next, we repeat this experiment on a dataset D′ to which we added 2 outliers xo = (−2, 0) to the positive class. The resulting hyperparameter tuning curve is added to Figure 1. By comparing both curves, it is clear that the choice of hyperparameter α which maximizes accuracy differs in the two settings: α = 40 suffices to reach the accuracy plateau with outliers whereas increasing α is beneficial without outliers.
This difference can be exploited to perform a variant of a membership inference attack (Shokri et al., 2017): Here, one could infer from the value of the hyperparameter α whether or not the outlier points xo were part of the training set or not. While the example is constructed, this shows how we must be careful when tuning hyperparameters: in corner cases such as the one presented here, it is possible for some information contained in the training data to leak in hyperparameter choices.
In particular, this implies that the common practice of tuning hyperparameters without differential privacy and then using the hyperparameter values selected to repeat training one last time with differential privacy is not ideal. In Section 3, we will in particular show how training with differential privacy when performing the
different runs necessary to tune the hyperparameter can bound such leakage effectively if one carefully chooses the number of runs hyperparameters are tuned for.

heading: 3 OUR POSITIVE RESULTS

heading: 3.1 PROBLEM FORMULATION
text: We begin by appropriately formalizing the problem of differentially private hyperparameter tuning, following the framework of Liu & Talwar (2019). Suppose we have m randomized base algorithms M1,M2, · · · ,Mm : Xn → Y . These correspond to m possible settings of the hyperparameters. Ideally we would simply run each of these algorithms once and return the best outcome. For simplicity, we consider a finite set of hyperparameter possibilities; if the hyperparameters of interest are continuous, then we must pick a finite subset to search over (which is in practice sufficient).
Here we make two simplifying assumptions: First, we assume that there is a total order on the range Y , which ensures that "best" is well-defined. In particular, we are implicitly assuming that the algorithm computes a quality score (e.g., accuracy on a test set) for the trained model it produces; this may require allocating some privacy budget to this evaluation.2 Second, we are assuming that the output includes both the trained model and the corresponding hyperparameter values (i.e., the output of Mj includes the index j).3 These assumptions can be made without loss of generality.

heading: 3.2 STRAWMAN APPROACH: REPEAT THE BASE ALGORITHM A FIXED NUMBER OF TIMES
text: The obvious approach to this problem would be to run each algorithm once and to return the best of the m outcomes. From composition, we know that the privacy cost grows at most linearly with m. It turns out that this is in fact tight. There exists a (ε, 0)-DP algorithm such that if we repeatedly run it m times and return the best output, the resultant procedure is not (mε− τ, 0)-DP for any τ > 0. This was observed by Liu & Talwar (2019, Appendix B) and we provide an analysis in Appendix D.1. This negative result also extends to Rényi DP. To avoid this problem, we will run the base algorithms a random number of times. The added uncertainty significantly enhances privacy. However, we must carefully choose this random distribution and analyze it.
2If the trained model’s quality is evaluated on the training set, then we must increase the privacy loss budget to account for this composition. However, if the model is evaluated on a held out set, then the privacy budget need not be split; these data points are “fresh” from a privacy perspective.
3Note that in the more well-studied problem of selection, usually we would only output the hyperparameter values (i.e., just the index j) and not the corresponding trained model nor its quality score.

heading: 3.3 OUR ALGORITHM FOR HYPERPARAMETER TUNING
text: To obtain good privacy bounds, we must run the base algorithms a random number of times. We remark that random search rather than grid search is often performed in practice (Bergstra & Bengio, 2012), so this is not a significant change in methodology. Specifically, we pick a total number of runs K from some distribution. Then, for each run k = 1, 2, · · · ,K, we pick an index jk ∈ [m] uniformly at random and run Mjk . Then, at the end, we return the best of the K outcomes.
The privacy guarantee of this overall system then depends on the privacy guarantees of each of the mechanisms Mj as well as the distribution of the number of runs K. Specifically, we assume that there exists a uniform (Rényi) DP bound for all of the mechanisms Mj . Note that DP is “convex” where “convexity” here means that if M1,M2, · · · ,Mm are each individually DP, then running Mjk for a random jk ∈ [m] is also DP with the same parameters. To simplify notation, we also assume that there is a single mechanism Q : Xn → Y that picks a random index j ∈ [m] and then runs Mj . In essence, our goal is to “boost” the success probability of Q by repeating it many times. The distribution of the number of runs K must be chosen to both ensure good privacy guarantees and to ensure that the system is likely to pick a good setting of hyperparameters. Also, the overall runtime of the system depends on K and we want the runtime to be efficient and predictable. Our results consider several distributions on the number of repetitions K and the ensuing tradeoff between these three considerations.

heading: 3.4 MAIN RESULTS
text: There are many possible distributions for the number of repetitions K. In this section, we first consider two – the truncated negative binomial and Poisson distributions – and state our main privacy results for these distributions. Later, in Section 3.5, we state a more general technical lemma which applies to any distribution on the number of repetitions K.
Definition 1 (Truncated Negative Binomial Distribution). Let γ ∈ (0, 1) and η ∈ (−1,∞). Define a distribution Dη,γ on N = {1, 2, · · · } as follows. If η 6= 0 and K is drawn from Dη,γ , then
∀k ∈ N P [K = k] = (1− γ) k γ−η − 1 · k−1∏ `=0 ( `+ η `+ 1 ) (3)
and E [K] = η·(1−γ)γ·(1−γη) . If K is drawn from D0,γ , then
P [K = k] = (1− γ)k
k · log(1/γ) (4)
and E [K] = 1/γ−1log(1/γ) . This is called the “negative binomial distribution,” since ∏k−1 `=0 ( `+η `+1 ) = ( k+η−1 k ) if we extend the definition of binomial coefficients to non-integer η. The distribution is called “truncated” because P [K = 0] = 0, whereas the standard negative binomial distribution includes 0 in its support. The η = 0 case D0,γ is known as the “logarithmic distribution”. The η = 1 case D1,γ is simply the geometric distribution. Next, we state our main privacy result for this distribution.
Theorem 2 (Main Privacy Result – Truncated Negative Binomial). LetQ : Xn → Y be a randomized algorithm satisfying (λ, ε)-RDP and (λ̂, ε̂)-RDP for some ε, ε̂ ≥ 0, λ ∈ (1,∞), and λ̂ ∈ [1,∞).4 Assume Y is totally ordered. Let η ∈ (−1,∞) and γ ∈ (0, 1). Define an algorithm A : Xn → Y as follows. Draw K from the truncated negative binomial distribution Dη,γ (Definition 1). Run Q(x) repeatedly K times. Then A(x) returns the best value from the K runs.

heading: Then A satisfies (λ, ε′)-RDP where
text: ε′ = ε+ (1 + η) · (
1− 1 λ̂
) ε̂+
(1 + η) · log(1/γ) λ̂ + logE [K] λ− 1 . (5)
4If λ̂ = 1, then ε̂ corresponds to the KL divergence; see Definition 9. However, ε̂ is multiplied by 1−1/λ̂ = 0 in this case, so is irrelevant.
Theorem 2 shows a tradeoff between privacy and utility for the distribution Dη,γ of the number of repetitions. Privacy improves as η decreases and γ increases. However, this corresponds to fewer repetitions and thus a lower chance of success. We will study this aspect in Section 3.6.
Theorem 2 assumes two RDP bounds, which makes it slightly hard to interpret. Thus we consider two illustrative special cases: We start with pure DP (a.k.a. pointwise DP) – i.e., (ε, δ)-DP with δ = 0, which is equivalent to (∞, ε)-RDP. This corresponds to Theorem 2 with λ→∞ and λ̂→∞. Corollary 3 (Theorem 2 for pure DP). Let Q : Xn → Y be a randomized algorithm satisfying (ε, 0)-DP. Let η ∈ (−1,∞) and γ ∈ (0, 1). Define A : Xn → Y as in Theorem 2. Then A satisfies ((2 + η)ε, 0)-DP.
Our result is a generalization of the result of Liu & Talwar (2019) – they show that, if K follows a geometric distribution and Q satisfies (ε, 0)-DP, then A satisfies (3ε, 0)-DP. Setting η = 1 in Corollary 3 recovers their result. If we set η < 1, then we obtain an improved privacy bound.
Another example is if Q satisfies concentrated DP (Dwork & Rothblum, 2016; Bun & Steinke, 2016). This is the type of guarantee that is obtained by adding Gaussian noise to a bounded sensitivity function. In particular, this is the type of guarantee we would obtain from noisy gradient descent.5
Corollary 4 (Theorem 2 for Concentrated DP). Let Q : Xn → Y be a randomized algorithm satisfying ρ-zCDP – i.e., (λ, ρ · λ)-Rényi DP for all λ > 1. Let η ∈ (−1,∞) and γ ∈ (0, 1). Define A : Xn → Y and K ← Dη,γ as in Theorem 2. Assume ρ ≤ log(1/γ). Then A satisfies (λ, ε′)-Rényi DP for all λ > 1 with
ε′ =  2 √ ρ · log (E [K]) + 2(1 + η) √ ρ log(1/γ)− ηρ if λ ≤ 1 + √ 1 ρ log (E [K]) ρ · (λ− 1) + 1λ−1 log (E [K]) + 2(1 + η) √ ρ log(1/γ)− ηρ if λ > 1 + √ 1 ρ log (E [K]) .
Figure 2 shows what the guarantee of Corollary 4 looks like. Here we start with 0.1-zCDP and perform repetition following the logarithmic distribution (η = 0) with varying scales (given by γ) and plot the Rényi DP guarantee attained by outputting the best of the repeated runs. The improvement over naive composition, which instead grows linearly, is clear. We also study other distributions on the number of repetitions, obtained by varying η, and Figure 3 gives a comparison. Figure 4 shows what these bounds look like if we convert to approximate (ε, δ)-DP with δ = 10−6. Remark 5. Corollary 4 uses the monotonicity property of Rényi divergences: If λ1 ≤ λ2, then Dλ1 (P‖Q) ≤ Dλ2 (P‖Q) (Van Erven & Harremos, 2014, Theorem 3). Thus (λ2, ε)-RDP implies (λ1, ε)-RDP for any λ1 ≤ λ2. In particular, the bound of Theorem 2 yields ε′ →∞ as λ→ 1, so we use monotonicity to bound ε′ for small λ.
5Note that the privacy of noisy stochastic gradient descent (DP-SGD) is not well characterized by concentrated DP (Bun et al., 2018), but, for our purposes, this is a close enough approximation.
Poisson Distribution. We next consider the Poisson distribution, which offers a different privacyutility tradeoff than the truncated negative binomial distribution. The Poisson distribution with mean µ ≥ 0 is given by P [K = k] = e−µ µ k
k! for all k ≥ 0. Note that P [K = 0] = e −µ > 0 here, whereas
the truncated negative binomial distribution does not include 0 in its support. We could condition on K ≥ 1 here too, but we prefer to stick with the standard definition. We remark that (modulo the issue around P [K = 0]) the Poisson distribution is closely related to the truncated negative binomial distribution. If we take the limit as η →∞ while the mean remains fixed, then the negative binomial distribution becomes a Poisson distribution. Conversely, the negative binomial distribution can be represented as a convex combination of Poisson distributions or as a compound of Poisson and logarithmic; see Appendix A.2 for more details. Theorem 6 (Main Privacy Result – Poisson Distribution). Let Q : Xn → Y be a randomized algorithm satisfying (λ, ε)-RDP and (ε̂, δ̂)-DP for some λ ∈ (1,∞) and ε, ε̂, δ̂ ≥ 0. Assume Y is totally ordered. Let µ > 0.
Define an algorithm A : Xn → Y as follows. Draw K from a Poisson distribution with mean µ – i.e., P [K = k] = e−µ · µ k
k! for all k ≥ 0. Run Q(x) repeatedly K times. Then A(x) returns the best value from the K runs. If K = 0, A(x) returns some arbitrary output independent from the input x.

heading: If eε̂ ≤ 1 + 1λ−1 , then A satisfies (λ, ε
text: ′)-RDP where
ε′ = ε+ µ · δ̂ + logµ λ− 1 .
The assumptions of Theorem 6 are different from Theorem 2: We assume a Rényi DP guarantee and an approximate DP guarantee on Q, rather than two Rényi DP guarantees. We remark that a Rényi DP guarantee can be converted into an approximate DP guarantee – (λ, ε)-RDP implies (ε̂, δ̂)-DP for all ε̂ ≥ ε and δ̂ = e(λ−1)(ε̂−ε) · 1λ · ( 1− 1λ )λ−1 (Mironov, 2017; Canonne et al., 2020). Thus this statement can be directly compared to our other result. We show such a comparison in Figure 3 and Figure 4. The proofs of Theorems 2 and 6 are included in Appendix B.2.

heading: 3.5 GENERIC RÉNYI DP BOUND FOR ANY DISTRIBUTION ON THE NUMBER OF REPETITIONS
text: We now present our main technical lemma, which applies to any distribution on the number of repetitions K. Theorems 2 and 6 are derived from this result. It gives a Rényi DP bound for the repeated algorithm in terms of the Rényi DP of the base algorithm and the probability generating function of the number of repetitions applied to probabilities derived from the base algorithm. Lemma 7 (Generic Bound). Fix λ > 1. Let K be a random variable supported on N ∪ {0}. Let f : [0, 1]→ R be the probability generating function of K – i.e., f(x) := ∑∞ k=0 P [K = k] · xk.
Let Q and Q′ be distributions on Y . Assume Y is totally ordered. Define a distribution A on Y as follows. First sample K. Then sample from Q independently K times and output the best of these samples.6 This output is a sample from A. We define A′ analogously with Q′ in place of Q. Then
Dλ (A‖A′) ≤ Dλ (Q‖Q′) + 1 λ− 1 log ( f ′(q)λ · f ′(q′)1−λ ) , (6)
where applying the same postprocessing to Q and Q′ gives probabilities q and q′ respectively – i.e., there exists an arbitrary function g : Y → [0, 1] such that q = E
X←Q [g(X)] and q′ = E X′←Q′ [g(X ′)].
The proof of this generic bound is found in Appendix B.1. To interpret the theorem, we should imagine adjacent inputs x, x′ ∈ Xn, and then the distributions correspond to the algorithms run on these inputs: A = A(x), A′ = A(x′), Q = Q(x), and Q′ = Q(x′). The bounds on Rényi divergence thus correspond to Rényi DP bounds. The derivative of the probability generating function – f ′(x) = E [ K · xK−1 ] – is somewhat mysterious. A first-order intuition is that, if q = q′, then f ′(q)λ · f ′(q′)1−λ = f ′(q) ≤ f ′(1) = E [K] and thus the last term in the bound (6) is simply log E[K] λ−1 . A second-order intuition is that q ≈ q
′ by DP and postprocessing and, if f ′ is smooth, then f ′(q) ≈ f ′(q′) and the first-order intuition holds up to these approximations. Vaguely, f ′ being smooth corresponds to the distribution of K being spread out (i.e., not a point mass) and not too
6If K = 0, the output can be arbitrary, as long as it is the same for both A and A′.
heavy-tailed (i.e. K is small most of the time). The exact quantification of this smoothness depends on the form of the DP guarantee q ≈ q′. In our work, we primarily compare three distributions on the number of repetitions: a point mass (corresponding to naïve repetition), the truncated negative binomial distribution, and the Poisson distribution. A point mass would have a polynomial as the probability generating function – i.e., if P [K = k] = 1, then f(x) = E [ xK ]
= xk. The probability generating function of the truncated negative binomial distribution (Definition 1) is
f(x) = E K←Dη,γ
[ xK ] =
{ (1−(1−γ)x)−η−1
γ−η−1 if η 6= 0 log(1−(1−γ)x)
log(γ) if η = 0 . (7)
The probability generating function of the Poisson distribution with mean µ is given by f(x) = eµ·(x−1). We discuss probability generating functions further in Appendix A.2.

heading: 3.6 UTILITY AND RUNTIME OF OUR HYPERPARAMETER TUNING ALGORITHM
text: Our analytical results thus far, Theorems 2 and 6 and Lemma 7, provide privacy guarantees for our hyperparameter tuning algorithm A when it is used with various distributions on the number of repetitions K. We now turn to the utility that this algorithm provides. The utility of a hyperparameter search is determined by how many times the base algorithm (denoted Q in the theorem statements) is run when we invoke the overall algorithm (A). The more often Q is run, the more likely we are to observe a good output and A is more likely to return the corresponding hyperparameter values. Note that the number of repetitions K also determines the algorithm’s runtime, so these are closely linked.
How does this distribution on the number of repetitions K map to utility? As a first-order approximation, the utility and runtime are proportional to E [K]. Hence several of our figures compare the different distributions on K based on a fixed expectation and Figure 4 plots E [K] on the vertical axis. However, this first-order approximation ignores the fact that some of the distributions we consider are more concentrated than others; even if the expectation is large, there might still be a significant probability that K is small. Indeed, for η ≤ 1, the mode of the truncated negative binomial distribution is K = 1. We found this to be an obstacle to using the (truncated) negative binomial distribution in practice in our experiments, and discuss this further in Appendix A.2.1.
We can formulate utility guarantees more precisely by looking at the expected quantile of the output to measure our algorithm’s utility. If we run the base algorithm Q once, then the quantile of the output is (by definition) uniform on [0, 1] and has mean 0.5. If we repeat the base algorithm a fixed number of times k, then the quantile of the best output follows a Beta(k, 1) distribution, as it is the maximum of k independent uniform random variables. The expectation in this case is kk+1 = 1− 1 k+1 . If we
repeat a random number of times K, the expected quantile of the best result is given by E [ K
K + 1
] = E [ 1− 1
K + 1
] = ∫ 1 0 x · f ′(x)dx = 1− ∫ 1 0 f(x)dx, (8)
where f(x) = E [ xK ]
is the probability generating function of K; see Appendix A.2.1 for further details. Figure 5 plots this quantity against privacy. We see that the Poisson distribution performs very well in an intermediate range, while the negative binomial distribution with η = 0.5 does well if we want a strong utility guarantee. This means that Poisson is best used when little privacy budget is available for the hyperparameter search. Instead, the negative binomial distribution with η = 0.5 allows us to improve the utility of the solution returned by the hyperparameter search, but this only holds when spending a larger privacy budget (in our example, the budget has to be at least ε = 4 otherwise Poisson is more advantageous). The negative binomial with η = −0.5 does very poorly. From a runtime perspective, the distribution of K should have light tails. All of the distributions we have considered have subexponential tails. However, larger η corresponds to better concentration in the negative binomial distribution with the Poisson distribution having the best concentration.
Experimental Evaluation. To confirm these findings, we apply our algorithm to a real hyperparameter search task. Specifically, we fine-tune the learning rate of a convolutional neural network trained on MNIST. We implement DP-SGD in JAX for an all-convolutional architecture with a stack of 32, 32, 64, 64, 64 feature maps generated by 3x3 kernels. We vary the learning rate between 0.025 and 1 on a logarithmic scale but fix all other hyperparameters: 60 epochs, minibatch size of 256, `2 clipping norm of 1, and noise multiplier of 1.1. In Figure 7, we plot the maximal accuracy achieved during the hyperparameter search for the different distributions considered previously as a function of the total privacy budget expended by the search. The experiment is repeated 500 times and the mean result reported. This experiment shows that the Poisson distribution achieves the best privacy-utility tradeoff for this relatively simple hyperparameter search. This agrees with the theoretical analysis we just presented above that shows that the Poisson distribution performs well in the intermediate range of utility, as this is a simple hyperparameter search.

heading: 4 CONCLUSION
text: Our positive results build on the work of Liu & Talwar (2019) and show that repeatedly running the base algorithm and only returning the best output can incur much lower privacy cost than naïve composition would suggest. This however requires that we randomize the number of repetitions, rather than repeating a fixed number of times. We analyze a variety of distributions for the number of repetitions, each of which gives a different privacy/utility tradeoff.
While our results focused on the privacy implications of tuning hyperparameters with, and without, differential privacy, our findings echo prior observations that tuning details of the model architecture without privacy to then repeat training with DP affords suboptimal utility-privacy tradeoffs (Papernot et al., 2020); in this work, the authors demonstrated that the optimal choice of activation function in a neural network can be different when learning with DP, and that tuning it with DP immediately can improve the model’s utility at no changes to the privacy guarantee. We envision that future work will be able to build on our algorithm for private tuning of hyperparameters to facilitate privacy-aware searches for model architectures and training algorithm configurations to effectively learn with them.
Limitations. We show that hyperparameter tuning is not free from privacy cost. Our theoretical and experimental results show that, in the setting of interest, the privacy parameter may double or even triple after accounting for hyperparameter tuning, which could be prohibitive. In this case, one compromise would be to state both privacy guarantees – that of the base algorithm that does not account for hyperparameter tuning, and that of the overall system that does account for this. The reader may wonder whether our positive results can be improved. In Appendix D, we explore give some intuition for why they cannot (easily) be improved. We also note that our results are only immediately applicable to the hyperparameter tuning algorithm from Section 3.3. Other algorithms, in particular those that adaptively choose hyperparameter candidates will require further analysis.
Finally, among the distributions on the number of repetitionsK that we have analyzed, the distribution that provides the best privacy-utility tradeoffs will depend on the setting. While it is good to have choices, this does leave some work to be done by those using our results. Fortunately, the differences between the distributions seem to be relatively small, so this choice is unlikely to be critical.

heading: REPRODUCIBILITY & ETHICS STATEMENTS
text: Reproducibility. We give precise theorem statements for our main results and we have provided complete proofs in the Appendix, as well as all the necessary calculations and formulas for plotting our figures. We have also fully specified the setup required to reproduce our experimental results, including hyperparameters. Our algorithm is simple, fully specified and can be easily implemented.
Ethics. Our work touches on privacy, which is an ethically sensitive topic. If differentially private algorithms – such as ours – are applied to real-world sensitive data, then potential harms to the people whose data is being used must be carefully considered. However, our work is not directly using real-world sensitive data. Our main results are theoretical and our experiments use either synthetic data or MNIST, which is a standard non-private dataset.

heading: A FURTHER BACKGROUND

heading: A.1 DIFFERENTIAL PRIVACY & RÉNYI DP
text: For completeness, we provide some basic background on differential privacy and, in particular, Rényi differential privacy. We start with the standard definition of differential privacy:
Definition 8 (Differential Privacy). A randomized algorithm M : Xn → Y is (ε, δ)-differentially private if, for all neighbouring pairs of inputs x, x′ ∈ Xn and all measurable S ⊂ Y ,
P [M(x) ∈ S] ≤ eε · P [M(x′) ∈ S] + δ.
When δ = 0, this is referred to as pure (or pointwise) differential privacy and we may abbreviate (ε, 0)-DP to ε-DP. When δ > 0, this is referred to as approximate differential privacy.
The definition of pure DP was introduced by Dwork et al. (2006b) and approximate DP was introduced by Dwork et al. (2006a). Note that the notion of neighbouring datasets is context-dependent, but this is often glossed over. Our results are general and can be applied regardless of the specifics of what is a neighbouring dataset. (However, we do require symmetry – i.e., if (x, x′) are a pair of neighbouring inputs, then so are (x′x).) Usually two datasets are said to be neighbouring if they differ only by the addition/removal or replacement of the data corresponding to a single individual. Some papers only consider addition or removal of a person’s records, rather than replacement. But these are equivalent up to a factor of two.
In order to define Rényi DP, we first define the Rényi divergences:
Definition 9 (Rényi Divergences). Let P and Q be probability distributions on a common space Ω. Assume that P is absolutely continuous with respect to Q – i.e., for all measurable S ⊂ Ω, if Q(S) = 0, then P (S) = 0. Let P (x) and Q(x) denote the densities of P and Q respectively.7 The KL divergence from P to Q is defined as
D1 (P‖Q) := E X←P
[ log ( P (X)
Q(X)
)] = ∫ Ω P (x) log ( P (x) Q(x) ) dx.

heading: The max divergence from P to Q is defined as
text: D∞ (P‖Q) := sup { log ( P (S)
Q(S)
) : P (S) > 0 } .
For λ ∈ (1,∞), the Rényi divergence from P to Q of order λ is defined as
Dλ (P‖Q) := 1
λ− 1 log
( E
X←P
[( P (X)
Q(X)
)λ−1])
= 1
λ− 1 log
( E
X←Q
[( P (X)
Q(X)
)λ])
= 1
λ− 1 log (∫ Ω P (x)λQ(x)1−λdx ) .
We state some basic properties of Rényi divergences; for further information see, e.g., Van Erven & Harremos (2014).
Lemma 10. Let P , Q, P ′, and Q′ be probability distributions. Let λ ∈ [1,∞]. The following hold.
• Non-negativity: Dλ (P‖Q) ≥ 0.
• Monotonicity & Continuity: Dλ (P‖Q) is a continuous and non-decreasing function of λ.
7In general, we can only define the ratio P (x)/Q(x) to be the Radon-Nikodym derivative of P with respect to Q. To talk about P (x) and Q(x) separately we must assume some base measure with respect to which these are defined. In most cases the base measure is either the counting measure in the case of discrete distributions or the Lesbesgue measure in the case of continuous distributions.
• Data processing inequality (a.k.a. Postprocessing): Let f(P ) denote the distribution obtained by applying some (possibly randomized) function to a sample from P and let f(Q) denote the distribution obtained by applying the same function to a sample from Q. Then Dλ (f(P )‖f(Q)) ≤ Dλ (P‖Q).
• Finite case suffices: We have Dλ (P‖Q) = supf Dλ (f(P )‖f(Q)) even when f is restricted to functions with a finite range.
• Chain rule (a.k.a. Composition): Dλ (P × P ′‖Q×Q′) = Dλ (P‖Q) + Dλ (P ′‖Q′), where P × P ′ and Q × Q′ denote the product distributions of the individual distributions.
• Convexity: The function (P,Q) 7→ e(λ−1)Dλ(P‖Q) is convex for all λ ∈ (1,∞). The function (P,Q) 7→ Dλ (P‖Q) convex if and only if λ = 1.
Now we can state the definition of Rényi DP (RDP), which is due to Mironov (2017). Definition 11 (Rényi Differential Privacy). A randomized algorithm M : Xn → Y is (λ, ε)-Rényi differentially private if, for all neighbouring pairs of inputs x, x′ ∈ Xn, Dλ (M(x)‖M(x′)) ≤ ε.
A closely related definition is that of zero-concentrated differential privacy (Bun & Steinke, 2016) (which is based on an earlier definition (Dwork & Rothblum, 2016) of concentrated differential privacy that does not refer to Rényi divergences). Definition 12 (Concentrated Differential Privacy). A randomized algorithmM : Xn → Y is ρ-zCDP if, for all neighbouring pairs of inputs x, x′ ∈ Xn and all λ ∈ (1,∞), Dλ (M(x)‖M(x′)) ≤ ρ · λ.
Usually, we consider a family of (λ, ε(λ))-RDP guarantees, where ε(λ) is a function, rather than a single function. Concentrated DP is one example of such a family, where the function is linear, and this captures the behaviour of many natural algorithms. In particular, adding Gaussian noise to a bounded sensitivity function: If f : Xn → Rd has sensitivity ∆ – i.e., ‖f(x)− f(x′)‖2 ≤ ∆ for all neighbouring x, x′ – and M : Xn → Rd is the algorithm that returns a sample from N (f(x), σ2I), then M satisfies ∆ 2
2σ2 -zCDP.
We can convert from pure DP to concentrated or Rényi DP as follows (Bun & Steinke, 2016). Lemma 13. If M satisfies (ε, 0)-differential privacy, then M satisfies 12ε 2-zCDP – i.e., (λ, 12ε 2λ)RDP for all λ ∈ (1,∞).
Conversely, we can convert from concentrated or Rényi DP to approximate DP as follows (Canonne et al., 2020). Lemma 14. If M satisfies (λ, ε̂)-RDP, then M satisfies (ε, δ)-DP where ε ≥ 0 is arbitrary and
δ = exp((λ− 1)(ε̂− ε)) λ · ( 1− 1 λ )λ−1 .

heading: A.2 PROBABILITY GENERATING FUNCTIONS
text: Let K be a random variable supported on N ∪ {0}. The probability generating function (PGF) of K is defined by
f(x) = E [ xK ] = ∞∑ k=0 P [K = k] · xk.
The PGF f(x) is always defined for x ∈ [0, 1], but may or may not be defined for x > 1. The PGF characterizes K. In particular, we can recover the probability mass function from the derivatives of the PGF (hence the name):
P [K = k] = f (k)(0)
k! ,
where f (k)(x) denotes the kth derivative of f(x) and, in particular, P [K = 0] = f(0). We remark that is is often easiest to specify the PGF and derive the probability distribution from it, rather than vice versa; indeed, we arrived at the truncated negative binomial distribution by starting with the PGF that we want and then differentiating.
We can also easily recover the moments of K from the PGF: We have f (k)(x) = ∑∞ `=k P [K = `] · x`−k · ` · (` − 1) · (` − 2) · · · (` − k + 1). In particular, f(1) = E [1] = 1 and f ′(1) = E [K] and f ′′(1) = E [K(K − 1)]. Note that the PGF is a rescaling of the moment generating function (MGF) g(t) := E [ etK ] = f(et).
The PGF can be related to the MGF in another way: Suppose Λ is a random variable on [0,∞). Now suppose we draw K ← Poisson(Λ). Then the PGF of K is the MGF of Λ – i.e., E [ xK ] =
E Λ
[ E
K←Poisson(Λ)
[ xK ]]
= E Λ
[ eΛ·(x−1) ] = g(x− 1), where g is the MGF of Λ. In particular, if Λ is
drawn from a Gamma distribution, then this would yield K from a negative binomial distribution which has a PGF of the form fNB(x) = ( 1−(1−γ)x γ )−η .8 Note that our results work with a truncated negative binomial distribution, which is a negative binomial conditioned on K 6= 0. This corresponds to an affine rescaling of the PGF, namely fTNB(x) =
fNB(x)−fNB(0) fNB(1)−fNB(0) .
We can also obtain a negative binomial distribution as a compound of a Poisson distribution and a logarithmic distribution. That is, if we draw T from a Poisson distribution and draw K1,K2, · · · ,KT independently from a logarithmic distribution, then K = ∑T t=1Kt follows a negative binomial
distribution. The PGF of the logarithmic distribution is given by fKt(x) = E [ xKt ] = log(1−(1−γ)x)log(γ)
and the PGF of Poisson is given by fT (x) = E [ xT ] = eµ·(x−1). Hence fK(x) = E [ xK ]
= E T [ T∏ t=1 E Kt [ xKt ]] = E T [ fKt(x) T ] = fT (fKt(x)) = exp ( µ · ( log(1− (1− γ)x) log(γ) − 1 )) ,
which is equivalent to fNB(x) = ( 1−(1−γ)x γ )−η with η = µlog(1/γ) .
Finally we remark that we can also use the PGF to show convergence in probability. In particular,
lim η→∞,γ= ηη+µ fNB(x) = lim η→∞,γ= ηη+µ
( 1− (1− γ)x
γ
)−η = lim η→∞,γ= ηη+µ ( 1− µ η (x− 1) )−η = eµ(x−1).
That is, if we take the limit of the negative binomial distribution as η →∞ but the mean µ = η 1−γγ remains fixed, then we obtain a Poisson distribution. If we take η → 0, then fNB(x)→ 1, which is to say that the negative binomial distribution converges to a point mass at 0 as η → 0. However, the truncated negative binomial distribution converges to a logarithmic distribution as η → 0.

heading: A.2.1 PROBABILITY GENERATING FUNCTIONS AND UTILITY
text: Recall that in Section 3.6, we analyzed the expected utility and runtime of different distributions on the number of repetitions K. Given our discussion of probability generating functions for these distributions, we can offer an alternative perspective on the expected utility and runtime.
Suppose each invocation of Q has a probability 1/m of producing a “good” output. This would be the case if we are considering m hyperparameter settings and only one is good—where here we consider the outcome to be binary (good or bad) for simplicity and what is a good or bad is determined only by the total order on the range Y and some threshold on the quality score (e.g., accuracy). Then A has a probability
β := 1− P [A(x) ∈ Bad] = 1− E K
[ P [Q(x) ∈ Bad]K ] = 1−E [ (1− 1/m)K ] = 1− f(1− 1/m)
of outputting a good output, where f(x) = E [ xK ]
is the probability generating function of the distribution. If we make the first-order approximation f(1 − 1/m) ≈ f(1) − f ′(1) · 1/m = 1− E [K]/m, then we have β ≈ E [K]/m. In other words, for small values of 1/m, the probability of success is amplified by a multiplicative factor of E [K].
However, the above first-order approximation only holds for large m and, hence, small overall success probabilities β. In practice, we want β ≈ 1. The different distributions (Poisson and
8The PGF of Binomial(n, p) is f(x) = (1− p+ px)n. This expression is similar to the PGF of the negative binomial, except the negative binomial has a negative exponent.
truncated negative binomial with different values of η) have very different behaviours even with the same expectation. In the regime where we want the overall success probability to be high (i.e., β ≈ 1), smaller η performs worse, because the distribution is more heavy-tailed. The best performing distribution is the Poisson distribution, which is almost as concentrated as naïve repetition. Figure 6 show the success probability β as a function of the final (ε, 10−6)-DP guarantee. This demonstrates that there is a tradeoff between distributions.
More generally, we can relate the PGF of K to the expected utility of our repeated algorithm. Let X ∈ R be random variable corresponding to the utility of one run of the base algorithm Q. E.g. X could represent the accuracy, loss, AUC/AUROC, or simply the quantile of output. Now let Y ∈ R be the utility of our repeated algorithm A which runs the base algorithm Q repeatedly K times for a random K. That is, Y = max{X1, · · · , XK} where X1, X2, · · · are independent copies of X . Let cdfX(x) = P [X ≤ x] and
cdfY (x) = P [Y ≤ x] = E K [ P X [X ≤ x]K ] = f(cdfX(x)),
where f(x) = E [ xK ]
is the PGF of the number of repetitions K. Assuming for the moment that X is a continuous random variable, we can derive the probability density function of Y from the cumulative distribution function:
pdfY (x) = d
dx cdfX(x) =
d
dx f(cdfX(x)) = f
′(cdfX(x)) · pdfX(x).
This allows us to compute the expected utility: E [Y ] = ∫ ∞ −∞ x · pdfY (x)dx = ∫ ∞ −∞ x · f ′(cdfX(x)) · pdfX(x)dx = E [X · f ′(cdfX(X))].
In particular, we can compute the expected quantile (8) in which case X is uniform on [0, 1] and, hence, cdfX(x) = x and pdfX(x) = 1 for x ∈ [0, 1]. Integration by parts gives
E [Y ] = ∫ 1
0
x·f ′(x)dx = ∫ 1
0
( d
dx xf(x)
) −f(x)dx = 1f(1)−0f(0)− ∫ 1 0 f(x)dx = 1− ∫ 1 0 f(x)dx.
Note that ∫ 1 0 f(x)dx = ∫ 1 0 E K [ xK ] dx = E K [∫ 1 0 xKdx ] = E K [ 1 K + 1 ] .
Finally, we also want to ensure that the runtime of our hyperparameter tuning algorithm is wellbehaved. In particular, we wish to avoid heavy-tailed runtimes. We can obtain tail bounds on the number of repetitions K from the PGF or MGF too: For all t > 0, we have
P [K ≥ k] = P [ et·(K−k) ≥ 1 ] ≤ E [ et·(K−k) ] = f(et) · e−t·k.
Thus, if the PGF f(x) = E [ xK ]
is finite for some x = et > 1, then we obtain a subexponential tail bound on K.

heading: B PROOFS FROM SECTION 3

heading: B.1 PROOF OF GENERIC BOUND
text: Proof of Lemma 7. We assume that Y is a finite set and that P [K = 0] = 0; this is, essentially, without loss of generality.9 Denote Q(≤ y) := ∑ y′∈Y I[y′ ≤ y] ·Q(y′) and similarly for Q(< y)
9Our proof can be extended to the general case. Alternatively, if Y is infinite, we can approximate the relevant quantities arbitrarily well with a finite partition; see Lemma 10 or Van Erven & Harremos (2014, Theorem 10).
and analogously for Q′ in place of Q. For each y ∈ Y , we have
A(y) = ∞∑ k=1 P [K = k] · (Q(≤ y)k −Q(< y)k)
= f(Q(≤ y))− f(Q(< y))
= ∫ Q(≤y) Q(<y) f ′(x)dx
= Q(y) · E X←[Q(<y),Q(≤y)]
uniform
[f ′(X)]
and, likewise, A′(y) = Q′(y) · E X′←[Q′(<y),Q′(≤y)]
uniform
[f ′(X ′)]. Thus
e(λ−1)Dλ(A‖A ′) = ∑ y∈Y A(y)λ ·A′(y)1−λ
= ∑ y∈Y Q(y)λ ·Q′(y)1−λ · E X←[Q(<y),Q(≤y)] [f ′(X)] λ · E X′←[Q′(<y),Q′(≤y)] [f ′(X ′)] 1−λ
≤ ∑ y∈Y Q(y)λ ·Q′(y)1−λ · E X←[Q(<y),Q(≤y)] X′←[Q′(<y),Q′(≤y)] [ f ′(X)λ · f ′(X ′)1−λ ] ≤ e(λ−1)Dλ(Q‖Q
′) ·max y∈Y
E X←[Q(<y),Q(≤y)] X′←[Q′(<y),Q′(≤y)]
[ f ′(X)λ · f ′(X ′)1−λ ] .
The second inequality follows from Hölder’s inequality. The first inequality follows from the fact that, for any λ ∈ R, the function h : (0,∞)2 → (0,∞) given by h(u, v) = uλ · v1−λ is convex and, hence, E [U ]λE [V ]1−λ = h(E [(U, V )]) ≤ E [h(U, V )] = E [ Uλ · V 1−λ ] for any pair of positive random variables (U, V ). Note that we require X to be uniform on [Q(< y), Q(≤ y)] and X ′ to be uniform on [Q′(< y), Q′(≤ y)], but their joint distribution can be arbitrary. We will couple them so that X−Q(<y)Q(y) = X′−Q′(<y) Q′(y) . In particular, this implies that, for each y ∈ Y , there exists some t ∈ [0, 1] such that
E X←[Q(<y),Q(≤y)] X′←[Q′(<y),Q′(≤y)]
[ f ′(X)λ · f ′(X ′)1−λ ] ≤ f ′(Q(< y) + t ·Q(y))λ · f ′(Q′(< y) + t ·Q′(y))1−λ.
Hence
Dλ (A‖A′) ≤ Dλ (Q‖Q′) + 1
λ− 1 log ( max y∈Y t∈[0,1] f ′(Q(< y) + t ·Q(y))λ · f ′(Q′(< y) + t ·Q′(y))1−λ ) .
To prove the result, we simply fix y∗ ∈ Y and t∗ ∈ [0, 1] achieving the maximum above and define
g(y) := { 1 if y < y∗ t∗ if y = y∗ 0 if y > y∗ .

heading: B.2 PROOFS OF DISTRIBUTION-SPECIFIC BOUNDS

heading: Truncated Negative Binomial Distribution
text: Proof of Theorem 2. The probability generating function of the truncated negative binomial distribution is
f(x) = E K←Dη,γ
[ xK ] =
{ (1−(1−γ)x)−η−1
γ−η−1 if η 6= 0 log(1−(1−γ)x)
log(γ) if η = 0 .
Thus
f ′(x) = (1− (1− γ)x)−η−1 ·
{ η·(1−γ) γ−η−1 if η 6= 0
1−γ log(1/γ) if η = 0
= (1− (1− γ)x)−η−1 · γη+1 · E [K].
Now we delve into the privacy analysis: Let Q = Q(x) and Q′ = Q(x′) denote the output distributions of Q on two neighbouring inputs. Similarly, let A = A(x) and A′ = A(x′) be the corresponding pair of output distributions of the repeated algorithm. By Lemma 7, for appropriate values q, q′ ∈ [0, 1] and for all λ > 1 and all λ̂ > 1,10 we have
Dλ (A‖A′)
≤ Dλ (Q‖Q′) + 1 λ− 1 log ( f ′(q)λ · f ′(q′)1−λ ) = Dλ (Q‖Q′) + 1 λ− 1 log ( γη+1 · E [K] · (1− (1− γ)q)−λ(η+1) · (1− (1− γ)q′)−(1−λ)(η+1)
) = Dλ (Q‖Q′) + 1 λ− 1 log ( γη+1 · E [K] · ( (γ + (1− γ)(1− q))1−λ̂ · (γ + (1− γ)(1− q′))λ̂ )ν · (γ + (1− γ)(1− q))u
) (λ̂ν = (λ− 1)(1 + η) and (1− λ̂)ν + u = −λ(η + 1))
≤ Dλ (Q‖Q′) + 1 λ− 1 log ( γη+1 · E [K] · ( γ + (1− γ) · e(λ̂−1)Dλ̂(Q ′‖Q) )ν · (γ + (1− γ)(1− q))u ) (1− q and 1− q′ are postprocessings of Q and Q′ respectively and e(λ̂−1)Dλ̂(·‖·) is convex and ν ≥ 0)
≤ Dλ (Q‖Q′) + 1 λ− 1 log ( γη+1 · E [K] · ( γ + (1− γ) · e(λ̂−1)Dλ̂(Q ′‖Q) )ν · γu ) (γ ≤ γ + (1− γ)(1− q) and u ≤ 0)
= Dλ (Q‖Q′) + ν λ− 1 log ( γ + (1− γ) · e(λ̂−1)Dλ̂(Q ′‖Q) ) + 1 λ− 1 log ( γη+1 · E [K] · γu ) = Dλ (Q‖Q′) + ν
λ− 1
( (λ̂− 1)Dλ̂ (Q ′‖Q) + log ( 1− γ · ( 1− e−(λ̂−1)Dλ̂(Q ′‖Q) ))) + 1
λ− 1 log ( γu+η+1 · E [K] ) = Dλ (Q‖Q′) + (1 + η) ( 1− 1
λ̂
) Dλ̂ (Q
′‖Q) + 1 + η λ̂
log ( 1− γ · ( 1− e−(λ̂−1)Dλ̂(Q ′‖Q) )) +
log (E [K]) λ− 1 + 1 + η λ̂ log(1/γ) (ν = (λ−1)(1+η) λ̂ and u = −(1 + η)(λ−1 λ̂ + 1))
= Dλ (Q‖Q′) + (1 + η) (
1− 1 λ̂
) Dλ̂ (Q
′‖Q) + 1 + η λ̂ log
( 1
γ − 1 + e−(λ̂−1)Dλ̂(Q
′‖Q) )
+ log (E [K]) λ− 1
≤ Dλ (Q‖Q′) + (1 + η) (
1− 1 λ̂
) Dλ̂ (Q
′‖Q) + 1 + η λ̂ log
( 1
γ
) +
log (E [K]) λ− 1 .
Proof of Corollary 4. We assume that Q : Xn → Y is a randomized algorithm satisfying ρ-zCDP – i.e., (λ, ρ · λ)-Rényi DP for all λ > 1. Substituting this guarantee into Theorem 2 (i.e., setting ε = ρ · λ and ε̂ = ρ · λ̂) gives that the repeated algorithm A satisfies (λ, ε′)-RDP for
ε′ ≤ ρ · λ+ (1 + η) · (
1− 1 λ̂
) ρ · λ̂+ (1 + η) · log(1/γ)
λ̂ + logE [K] λ− 1 .
This holds for all λ ∈ (1,∞) and all λ̂ ∈ [1,∞).
10Our proof here assumes λ̂ > 1, but the result holds for λ̂ = 1 too. This can be shown either by analyzing this case separately or simply by taking the limit λ̂→ 1 and using the continuity properties of Rényi divergence.
We set λ̂ = √
log(1/γ)/ρ to minimize this expression. Note that we assume ρ ≤ log(1/γ) and hence this is a valid setting of λ̂ ≥ 1. This reduces the expression to
ε′ ≤ ρ · λ− (1 + η) · ρ+ 2(1 + η) · √ ρ · log(1/γ) + logE [K]
λ− 1 . This bound is minimized when λ− 1 = √ log(E [K])/ρ. If λ− 1 < √
log(E [K])/ρ, then we can apply the monotonicity property of Renyi DP (Remark 5 and Lemma 10) and substitute in the bound with this optimal λ. That is, we obtain the bound
ε′ ≤
{ ρ · λ− (1 + η) · ρ+ 2(1 + η) · √ ρ · log(1/γ) + log E[K]λ−1 if λ > 1 + √ log(E [K])/ρ
2 √ ρ · logE [K] + 2(1 + η) √ ρ · log(1/γ)− ηρ if λ ≤ 1 + √ log(E [K])/ρ .

heading: Proof of the Poisson Distribution Bound
text: Proof of Theorem 6. The probability generating function for the Poisson distribution is f(x) = E [ xK ]
= eµ(x−1). Thus f ′(x) = µ ·eµ(x−1). As in the previous proofs, let x and x′ be neighbouring inputs. Denote Q = Q(x), Q′ = Q(x′), A = A(x), and A′ = A(x). By Lemma 7,
Dλ (A‖A′)
≤ Dλ (Q‖Q′) + 1 λ− 1 log ( f ′(q)λ · f ′(q′)1−λ ) = Dλ (Q‖Q′) + 1 λ− 1 log ( µ · eµλ(q−1)+µ(1−λ)(q ′−1) ) = Dλ (Q‖Q′) + µ(λq − (λ− 1)q′ − 1) + log µ
λ− 1
= Dλ (Q‖Q′) + µ((λ− 1)(1− q′)− λ(1− q)) + log µ
λ− 1
≤ Dλ (Q‖Q′) + µ((λ− 1)(eε̂(1− q) + δ̂)− λ(1− q)) + log µ
λ− 1 (by our (ε̂, δ̂)-DP assumption on Q and since 1− q and 1− q′ are postprocessings)
= Dλ (Q‖Q′) + µ · (1− q) · ( eε̂ − λ
λ− 1
) + µ · δ̂ + logµ
λ− 1
≤ Dλ (Q‖Q′) + µ · δ̂ + logµ
λ− 1 ,
where the final inequality follows from our assumption that eε̂ ≤ 1 + 1λ−1 .

heading: C CONDITIONAL SAMPLING APPROACH
text: In the main text, we analyzed the approach where we run the underlying algorithm Q a random number of times according to a carefully-chosen distribution and output the best result from these independent runs. An alternative approach – also studied by Liu & Talwar (2019) – is to start with a pre-defined threshold for a “good enough” output and to run Q repeatedly until it produces such a result and then output that. This approach has some advantages, namely being simpler and avoiding the heavy-tailed behaviour of the logarithmic distribution while attaining the same kind of privacy guarantee. However, the disadvantage of this approach is that we must specify the acceptance threshold a priori. If we set the threshold too high, then we may have to keep running Q for a long time.11 If we set the threshold too low, then we may end up with a suboptimal output.
11One solution to avoid an overly long runtime in the case that Q(S) is too small is to modify Q to output ⊥ with some small probability p and then have A halt if this occurs. This would represent a failure of the algorithm to produce a good output, but would avoid a privacy failure.
We analyze this approach under Rényi DP, thereby extending the results of Liu & Talwar (2019). Our algorithm A now works as follows. We start with a base algorithm Q and a set of good outputs S. Now A(x) computes y = Q(x) and, if y ∈ S, then it returns y and halts. Otherwise, A repeats the procedure. This is equivalent to sampling from a conditional distribution Q(x)|Q(x) ∈ S. The number of times Q is run will follow a geometric distribution with mean 1/Q(S). Proposition 15. Let λ ∈ (1,∞). Let Q and Q′ be probability distributions on Ω with Dλ (Q‖Q′) < ∞. Let S ⊂ Ω have nonzero measure under Q′ and also under Q. Let QS and Q′S denote the conditional distributions of Q and Q′ respectively conditioned on being in the set S. That is, QS(E) = Q(E ∩ S)/Q(S) and Q′S(E) = Q′(E ∩ S)/Q′(S) for all measurable E ⊂ Ω. Then, for all p, q, r ∈ [1,∞] satisfying 1/p+ 1/q + 1/r = 1, we have
Dλ (QS‖Q′S) ≤ λ− 1/p− 1/r
λ− 1 Dr·(λ−1/p) (Q‖Q′)+ λ+ 1/q − 2 λ− 1 Dλ+1/q−1 (Q ′‖Q)+1/r + 1 λ− 1 log
( 1
Q(S)
) .
Proof. For x ∈ Ω, denote the various distributional densities at x (relative to some base measure) by QS(x), Q′S(x), Q(x), and Q
′(x). We have QS(x) = Q(x)I[x ∈ S]/Q(S) and Q′S(x) = Q′(x)I[x ∈ S]/Q′(S). Now we have
e(λ−1)Dλ(QS‖Q ′ S) = ∫ Ω QS(x) λQ′S(x) 1−λdx
= Q(S)−λQ′(S)λ−1 ∫
Ω
I[x ∈ S]Q(x)λQ′(x)1−λdx
≤ Q(S)−λQ′(S)λ−1 (∫
S
Q(x)dx )1/p(∫ S Q′(x)dx )1/q (∫ S ( Q(x)λ−1/pQ′(x)1−λ−1/q )r dx )1/r (Hölder’s inequality)
= Q(S)1/p−λQ′(S)1/q+λ−1 (∫
S
Q(x)rλ−r/pQ′(x)r−rλ−r/qdx )1/r = Q′(S)λ0Q(S)1−λ0Q(S)−1/r−1
(∫ S Q(x)λ1Q′(x)1−λ1dx )1/r (λ0 := λ+ 1/q − 1, λ1 := rλ− r/p)
≤ e(λ0−1)Dλ0(Q ′‖Q) ·Q(S)−1/r−1 · ( e(λ1−1)Dλ1(Q‖Q ′) )1/r .
(Postprocessing & non-negativity)
The number of parameters in Proposition 15 is excessive. Thus we provide some corollaries that simplify the expression somewhat. Corollary 16. Let λ,Q,Q′, S,QS , Q′S be as in Proposition 15. The following inequalities all hold.
D∞ (QS‖Q′S) ≤ D∞ (Q‖Q′) + D∞ (Q′‖Q) .
Dλ (QS‖Q′S) ≤ Dλ (Q‖Q′) + λ− 2 λ− 1 Dλ−1 (Q ′‖Q) + 2 λ− 1 log
( 1
Q(S)
) .
Dλ (QS‖Q′S) ≤ D∞ (Q‖Q′) + λ− 2 λ− 1 Dλ−1 (Q ′‖Q) + 1 λ− 1 log
( 1
Q(S)
) .
Dλ (QS‖Q′S) ≤ λ
λ− 1 D∞ (Q‖Q′) + Dλ (Q′‖Q) +
1
λ− 1 log
( 1
Q(S)
) .
∀r ≥ 1 Dλ (QS‖Q′S) ≤ Dr(λ−1)+1 (Q‖Q′) + λ− 2 λ− 1 Dλ−1 (Q ′‖Q) + 1/r + 1 λ− 1 log
( 1
Q(S)
) .
The first inequality in Corollary 16 is essentially the result given by Liu & Talwar (2019): If Q satisfies ε-DP, then A satisfies 2ε-DP.
Figure 8 plots the guarantee of the second inequality in Corollary 16 when Dλ (Q‖Q′) = 0.1λ and Dλ−1 (Q ′‖Q) = 0.1(λ− 1).

heading: D NEGATIVE RESULTS ON IMPROVEMENTS TO OUR ANALYSIS
text: It is natural to wonder whether our results could be further improved. In this section, we give some examples that demonstrates that quantitatively there is little room for improvement.

heading: D.1 WHY A FIXED NUMBER OF REPETITIONS DOES NOT RESULT IN GOOD PRIVACY.
text: We first consider more closely the strawman approach discussed in Section 3.2: the base algorithm Q is repeated a fixed number of times k and we return the best output. This corresponds to picking k from a point mass distribution. To understand why it performs so poorly from a privacy standpoint, we first apply our main result from Section 3.5 to the resulting point mass distribution.
Point Mass: Suppose K is just a point mass – i.e., P [K = k] = 1. So A runs the algorithm Q a deterministic number of times. Then the probability generating function (PGF) is f(x) = xk and its derivative is f ′(x) = k ·xk−1. Let Q denote the base algorithm. We abuse notation and let Q = Q(x) and Q′ = Q(x′), where x and x′ are neighbouring inputs. Similarly, let A = A(x) and A′ = A(x′) be the final output distributions obtained by running Q and Q′ repeatedly k times and returning the best result. We follow the same pattern of analysis that we applied to the other distributions in Theorems 2 and 6: Lemma 7 gives the bound
Dλ (A‖A′) ≤ Dλ (Q‖Q′) + 1 λ− 1 log ( k · ( qλ · q′1−λ )k−1) ≤ Dλ (Q‖Q′) + 1
λ− 1 log
( k · ( e(λ−1)Dλ(Bern(q)‖Bern(q ′)) )k−1)
≤ Dλ (Q‖Q′) + 1
λ− 1 log
( k · ( e(λ−1)Dλ(Q‖Q ′) )k−1)
= k ·Dλ (Q‖Q′) + log k
λ− 1 ,
where the final inequality follows from the fact that Bern(q) and Bern(q′) are postprocessings of Q and Q′ respectively.
This bound is terrible. In fact, it is slightly worse than a naïve composition analysis which would give Dλ (A‖A′) ≤ Dλ ( Q⊗k ∥∥Q′⊗k) = k · Dλ (Q‖Q′). It shows that a deterministic number of repetitions does not yield good privacy parameters, at least with this analysis.
It is surprising that running the base algorithm Q a fixed number of times k and returning the best output performs so poorly from a privacy standpoint. We will now give a simple example that demonstrates that this is inherent and not just a limitation of our analysis. Liu & Talwar (2019, Appendix B) give a similar example.
Proposition 17. For all ε > 0, there exists a ε-DP algorithm Q : Xn → Y such that the following holds. Define an algorithm A : Xn → Y that runs Q a fixed number of times k and returns the best output from these runs. Then A is not ε̂-DP for any ε̂ < kε. Furthermore, for all λ > 1, A is not (λ, ε̂(λ))-Rényi DP for any ε̂(λ) < ε′(λ), where
ε′(λ) = kε− k · log(1 + e −ε)
λ− 1 .
Proof. The base algorithm is simply randomized response. We will let Y = {1, 2} with the total order preferring 1, then 2. We will define a pair of distributions Q and Q′ on {1, 2} and then the base algorithm is simply set so that these are its output distributions on a pair of neighbouring inputs.
We let
Q =
( 1
1 + eε ,
eε
1 + eε
) ,
Q′ =
( eε
1 + eε ,
1
1 + eε
) .
Then D∞ (Q‖Q′) = D∞ (Q′‖Q) = ε. Thus we can ensure that the base algorithm yielding this pair of distributions is ε-DP.
Now we look at the corresponding pair of distributions from repeating the base algorithm k times. We have
A = ( 1− ( eε
1 + eε
)k , ( eε
1 + eε
)k) ,
A′ = ( 1− ( 1
1 + eε
)k , ( 1
1 + eε
)k) .
The first part of the result follows:
D∞ (A‖A′) ≥ log  ( eε 1+eε )k (
1 1+eε
)k  = kε.
For all λ > 1,
e(λ−1)Dλ(A‖A ′) ≥
(( eε
1 + eε
)k)λ · (( 1
1 + eε )k)1−λ = eεkλ · (1 + eε)−k
Hence
Dλ (A‖A′) ≥ εkλ− k · log(1 + eε) λ− 1 = kε− k · log(1 + e −ε) λ− 1 .
The second part of Proposition 17 shows that this problem is not specific to pure DP. For λ ≥ 1 + 1/ε, we have ε′(λ) = Ω(kε), so we are paying linearly in k.
However, Proposition 17 is somewhat limited to pure ε-DP or at least (λ, ε(λ))-RDP with not-toosmall values of λ. This is because the “bad” event is relatively low-probability. Specifically, the high privacy loss event has probability (1 + e−ε)−k. This is small, unless ε ≥ Ω(log k). We can change the example to make the bad event happen with constant probability. However, the base algorithm will also not be pure ε-DP any more. Specifically, we can replace the two distributions in Proposition 17 with the following:
Q = (1− exp(−1/k), exp(−1/k)), Q′ = (1− exp(−ε0 − 1/k), exp(−ε0 − 1/k)).
If we repeat this base algorithm a fixed number of times k, then the corresponding pair of distributions is given by
A = (1− exp(−1), exp(−1)), A′ = (1− exp(−kε0 − 1), exp(−kε0 − 1)).
Now we have D∞ (A‖A′) = kε0 and the bad event happens with probability e−1 ≈ 0.36. On the other hand, D∞ (Q‖Q′) = ε0 like before, but D∞ (Q′‖Q) = log(1− exp(−ε0 − 1/k))− log(1− exp(−1/k)) ≈ log(kε0 + 1). But we still have a good guarantee in terms of Rényi divergences. In particular, D1 (Q′‖Q) ≤ (ε0 + 1/k) log(kε0 + 1), and we can set ε0 ≤ o(1/ log k) to ensure that we get reasonable (λ, ε(λ))-RDP guarantees for small λ.
At a higher level, it should not be a surprise that this negative example is relatively brittle. Our positive results show that it only takes a very minor adjustment to the number of repetitions to obtain significantly tighter privacy guarantees for hyperparameter tuning than what one would obtain from naive composition. In particular, running a fixed number of times k versus running Poisson(k) times is not that different, but our positive results show that it already circumvents this problem in general.
We also remark that composition behaves differently in the low-order RDP or approx DP regime relative to the pure-DP or high-order RDP regime covered by Proposition 17. Thus the naïve composition baseline we compare to is also shifting from basic composition (ε-DP becomes kε-DP under k-fold repetition (Dwork et al., 2006b)) to advanced composition (ε-DP becomes (O(ε ·√ k · log(1/δ)), δ)-DP (Dwork et al., 2010)). Proving tightness of basic composition is easy, but proving tightness for advanced composition is non-trivial (in general, it relies on the machinery of fingerprinting codes (Bun et al., 2014)). This means it is not straightforward to extend Proposition 17 to this regime.

heading: D.2 TIGHT EXAMPLE FOR CONDITIONAL SAMPLING.
text: We are also interested in the tightness of our generic results. We begin by studying the conditional sampling approach outlined in Appendix C. This approach is simpler and it is therefore easier to give a tight example. This also proves to be instructive for the random repetition approach in Section 3.
Our tight example for the conditional sampling approach consists of a pair of distributions Q and Q′. These should be thought of as the output distributions of the algorithm Q on two neighbouring inputs. The distributions are supported on only three points. Such a small output space seems contrived, but it should be thought of as representing a partition of a large output space into three sets. The first set is where the privacy loss is large and the second set is where the privacy loss is very negative, while the third set is everything in between.
Fix s, t > 0 and a ∈ [0, 1/4]. Note (1− 2a)−1 ≤ e3a. Let
Q = ( a · e−s, a · e−s, 1− 2a · e−s ) ,
Q′ = ( a · e−s−t, a, 1− a− a · e−s−t ) ,
S = {1, 2} ⊂ {1, 2, 3},
QS =
( 1
2 ,
1
2
) ,
Q′S =
( e−s−t
1 + e−s−t ,
1
1 + e−s−t
) .
Intuitively, the set S corresponds to the outputs that (1) have large privacy loss or (2) very negative privacy loss and we exclude (3) the outputs with middling privacy loss. Once we condition on S we still have the outputs (1) with large privacy loss, but that privacy loss is further increased because of the renormalization. Specifically, the negative privacy loss means the renormalization constants are very different – Q(S) = a · 2e−s Q′(S) = a · (1 + e−s−t) – if s is large. In effect, the negative privacy loss becomes a positive privacy loss that is added to the already large privacy loss.
We make the above intuition more precise by calculating the various quantities. For all λ > 1, we have
Q(S) = 2a · e−s,
e(λ−1)Dλ(Q‖Q ′) = a · e−sλ−(s+t)(1−λ) + a · e−sλ + (1− 2a · e−s)λ(1− a− a · e−s−t)1−λ
≤ a · e(λ−1)t−s + ae−sλ + e−2ae −sλ(1− 2a)1−λ
≤ a · e(λ−1)t−s + a+ e3a(λ−1)
≈ a · e(λ−1)t−s (assuming t is large)
= 1
2 Q(S) · e(λ−1)t,
=⇒ Dλ (Q‖Q′) . t− log(2/Q(S))
λ− 1 ,
e(λ−1)Dλ(Q ′‖Q) = a · e−s(1−λ)−(s+t)λ + a · e−s(1−λ) + (1− 2a · e−s)1−λ(1− a− a · e−s−t)λ
≤ a · e−tλ−s + a · es(λ−1) + e3a·e −s·(λ−1) · e−aλ
≈ a · es(λ−1) (assuming s is large)
= 1
2 Q(S) · esλ
=⇒ Dλ (Q′‖Q) . s+ s− log(2/Q(S))
λ− 1 ,
e(λ−1)Dλ(QS‖Q ′ S) = 2−λ(1 + e−s−t)λ−1(e(λ−1)(s+t) + 1)
≥ 2−λ · e(λ−1)(s+t),
=⇒ Dλ (QS‖Q′S) ≥ s+ t− λ log 2
λ− 1 .
We contrast this with our upper bound from the second part of Corollary 16:
Dλ (QS‖Q′S) ≤ Dλ (Q‖Q′) + λ− 2 λ− 1 Dλ−1 (Q ′‖Q) + 2 λ− 1 log
( 1
Q(S)
) .
. t− log(2/Q(S)) λ− 1 + λ− 2 λ− 1
( s+
s− log(2/Q(S)) λ− 2
) + 2 log(1/Q(S))
λ− 1
= s+ t− 2 log 2 λ− 1 .
This example shows that our upper bound is tight up to small factors, namely the lower order terms we ignore with ≈ and λ−2λ−1 log 2. Figure 8 illustrates how the upper and lower bounds compare.

heading: D.3 TIGHTNESS OF OUR GENERIC RESULT.
text: Now we consider the setting from Section 3 where our base algorithm is run repeatedly a random number of times and the best result is given as output.
Let Q : Xn → Y denote the base algorithm. Assume Y is totally ordered. Let K ∈ N be a random variable and let f(x) = E [ xK ]
be its probability generating function. Define A : Xn → Y to be the algorithm that runs Q repeatedly K times and returns the best output.
For a tight example, we again restrict our attention to distributions supported on three points:
Q = Q(x) = (1− b− c, b, c), Q′ = Q(x′) = (1− b′ − c′, b′, c′), A = A(x) = (1− f(b+ c), f(b+ c)− f(c), f(c)), A′ = A(x′) = (1− f(b′ + c′), f(b′ + c′)− f(c′), f(c′)).
Here the total ordering prefers the first option (corresponding to the first coordinate probability), then the second, and then the third, which implies the expressions for A and A′. Note that the probability values are not necessarily ordered the same way as the ordering on outcomes.
Now we must set these four values to show tightness of our results.
We make the first-order approximation
A ≈ (1− f(b+ c), f ′(c) · b, f(c)), A′ ≈ (1− f(b′ + c′), f ′(c′) · b′, f(c′)).
We take this approximation and get
e(λ−1)Dλ(A‖A ′) & (f ′(c) · b)λ · (f ′(c′) · b′)1−λ
= e(λ−1)Dλ(b‖b ′) · (f ′(c))λ · (f ′(c′))1−λ
≈ e(λ−1)Dλ(Q‖Q ′) · (f ′(c))λ · (f ′(c′))1−λ,
where the final approximation assumes that the second term is dominant in the equation
e(λ−1)Dλ(Q‖Q ′) = (1− b− c)λ · (1− b′ − c′)1−λ + bλ · (b′)1−λ + (c)λ · (c′)1−λ.
Contrast this with our upper bound (Lemma 7), which says
e(λ−1)Dλ(A‖A ′) ≤ e(λ−1)Dλ(Q‖Q ′) · (f ′(q))λ · (f ′(q′))1−λ, where q and q′ are arbitrary postprocessings of Q and Q′. In particular, we can set the values so that q = c and q′ = c′. This is not a formal proof, since we make imprecise approximations. But it illustrates that our main generic result (Lemma 7) is tight up to low order terms.

heading: D.4 SELECTION & LOWER BOUNDS
text: Private hyperparameter tuning is a generalization of the private selection problem. In the private selection problem we are given a utility function u : Xn × [m]→ R which has sensitivity 1 in its first argument – i.e., for all neighbouring x, x′ ∈ Xn and all j ∈ [m] = {1, 2, · · · ,m}, we have |u(x, j)− u(x′, j)| ≤ 1. The goal is to output and approximation to arg maxj∈[m] u(x, j) subject to differential privacy.
The standard algorithm for private selection is the exponential mechanism (McSherry & Talwar, 2007). The exponential mechanism is defined by
∀j ∈ [m] P [M(x) = j] = exp
( ε 2u(x, j) )∑ `∈[m] exp ( ε 2u(x, `)
) . It provides (ε, 0)-DP and, at the same time, 18ε
2-zCDP (Rogers & Steinke, 2021). On the utility side, we have the guarantees
E [u(x,M(x))] ≥ max j∈[m] u(x, j)− 2 ε logm,
P [ u(x,M(x)) ≥ max
j∈[m] u(x, j)− 2 ε log
( m
β
)] ≥ 1− β
for all inputs x and all β > 0 (Bassily et al., 2021, Lemma 7.1) (Dwork & Roth, 2014, Theorem 3.11).
It is also well-known that the exponential mechanism is optimal up to constants. That is, (ε, 0)-DP selection entails an additive error of Ω(log(m)/ε) (Steinke & Ullman, 2017).
Our results can be applied to the selection problem. The base algorithm Q(x) will simply pick an index j ∈ [m] uniformly at random and the privately estimate u(x, j) by adding Laplace or Gaussian noise ξ and output the pair (j, u(x, j) + ξ). The total order on the output space [m] × R simply selects for the highest estimated utility (breaking ties arbitrarily). If we take ξ to be Laplace noise with scale 1/ε, then Q is (ε, 0)-DP.
Applying Corollary 3 yields a ((2 + η)ε, 0)-DP algorithm A with the following utility guarantee. Let K be the number of repetitions and let (j1, u(x, j1) + ξ1), · · · , (jK , u(x, jK) + ξK) be the outputs from the runs of the base algorithm. The probability that the repeated algorithm A will consider j∗ := arg maxj∈[m] u(x, j) is P [j∗ ∈ {j1, · · · , jK}] = 1 − E
K
[∏ k∈[K] P [j∗ 6= jk] ] = 1 − f(1 − 1/m),
where f(x) = E [ xK ]
is the probability generating function of the number of repetitions K. For each noise sample, we have ∀k P [|ξk| ≤ t] ≥ 1−e−εt for all t > 0. Thus, for all t > 0, the probability that all noise samples are smaller than t is P [∀k ∈ [K] |ξk| ≤ t] = f(1− e−εt). By a union bound, we have P [u(x,M(x)) ≥ u(x, j∗)− 2t] ≥ f(1−e−εt)−f(1−1/m) for all t > 0. Setting η = 0, yields
f(x) = log(1−(1−γ)x)log γ , so P [u(x,M(x)) ≥ u(x, j∗)− 2t] ≥ 1 log(1/γ) log
( 1+ 1−γγ · 1 m
1+ 1−γγ ·e−εt
) . Now set
t = log(m10 − 1)/ε and γ = 1exp(εt)+1 = m −10 so that 1−γγ e −εt = 1 and 1−γγ 1 m = m 9 − 1m . Then P [ u(x,M(x)) ≥ u(x, j∗)− 20ε logm ] ≥ 110 logm log ( m9+1−1/m 2 ) ≥ 910 − 1 10 log2m
. That is, we can match the result of the exponential mechanism up to (large) constants. In particular, this means that the lower bounds for selection translate to our results – i.e., our results are tight up to constants.

heading: E EXTENDING OUR RESULTS TO APPROXIMATE DP
text: Our results are all in the framework of Rényi DP. A natural question is what can be said if the base algorithm instead only satisfies approximate DP – i.e., (ε, δ)-DP with δ > 0. Liu & Talwar (2019) considered these questions and gave several results. We now briefly show how to our results can be extended in a black-box fashion to this setting.
We begin by defining approximate Rényi divergences and approximate Rényi DP:
Definition 18 (Approximate Rényi Divergence). Let P and Q be probability distributions over Ω. Let λ ∈ [1,∞] and δ ∈ [0, 1]. We define
Dδλ (P‖Q) = inf {Dλ (P ′‖Q′) : P = (1− δ)P ′ + δP ′′, Q = (1− δ)Q′ + δQ′′} ,
where P = (1− δ)P ′ + δP ′′ denotes the fact that P can be expressed as a convex combination of two distributions P ′ and P ′′ with weights 1− δ and δ respectively. Definition 19 (Approximate Rényi Differential Privacy). A randomized algorithm M : Xn → Y is δ-approximately (λ, ε)-Rényi differentially private if, for all neighbouring pairs of inputs x, x′ ∈ Xn, Dδλ (M(x)‖M(x′)) ≤ ε.
Definition 19 is an extension of the definition of approximate zCDP (Bun & Steinke, 2016). Some remarks about the basic properties of approximate RDP are in order:
• (ε, δ)-DP is equivalent to δ-approximate (∞, ε)-RDP. • (ε, δ)-DP implies δ-approximate (λ, 12ε 2λ)-RDP for all λ ∈ (1,∞).
• δ-approximate (λ, ε)-RDP implies (ε̂, δ̂)-DP for
δ̂ = δ + exp((λ− 1)(ε̂− ε)) λ · ( 1− 1 λ )λ−1 .
• δ-approximate (λ, ε)-Rényi differential privacy is closed under postprocessing. • If M1 is δ1-approximately (λ, ε1)-Rényi differentially private and M2 is δ2-approximately
(λ, ε2)-Rényi differentially private, then their composition is (δ1+δ2)-approximately (λ, ε1+ ε2)-RDP.
Our results for Rényi DP can be extended to approximate Rényi DP by the following Lemma. Lemma 20. Assume Y is a totally ordered set. For a distribution Q on Y and a random variable K supported on N ∪ {0}, define AKQ as follows. First we sample K. Then we sample from Q independently K times and output the best of these samples. This output is a sample from A.
LetQ,Q′, Q1−δ0 , Qδ0 , Q ′ 1−δ0 , Q ′ δ0 be distributions on Y satisfyingQ = (1−δ0)Q1−δ0 +δ0Qδ0 and Q′ = (1− δ0)Q′1−δ0 + δ0Q ′ δ0 . Let K be a random variable on N ∪ {0} and let f(x) = E [ xK ]
be the probability generating function of K. Define a random variable K ′ on N ∪ {0} by P [K ′ = k] = P [K = k] · (1− δ0)k/f(1− δ0).12
Then, for all λ ≥ 1, we have Dδλ ( AKQ ∥∥AKQ′) ≤ Dλ (AK′Q1−δ0∥∥∥AK′Q′1−δ0)
where δ = 1− f(1− δ0).
How do we use this lemma? We should think of AKQ as representing the algorithm we want to analyze. The base algorithm Q satisfies δ0-approximate (λ, ε)-RDP. The above lemma says it suffices to analyze the algorithm AK ′
Q̃ where Q̃ satisfies (λ, ε)-RDP. We end up with a δ-approximate RDP
result, where the final δ depends on δ0 and the PGF of K.
As an example, we can combine Lemma 20 with Theorem 6 to obtain the following result for the approximate case. Corollary 21. Let Q : Xn → Y be a randomized algorithm satisfying (ε0, δ0)-DP. Assume Y is totally ordered. Let µ > 0.
Define an algorithm A : Xn → Y as follows. Draw K from a Poisson distribution with mean µ. Run Q(x) repeatedly K times. Then A(x) returns the best value from the K runs. (If K = 0, A(x) returns some arbitrary output independent from the input x.)
12Note that the PGF of K′ is given by E [ xK ′ ] = ∑∞ k=0 x
kP [K = k](1 − δ0)k/f(1 − δ0) = f(x(1 − δ0))/f(1− δ0).

heading: For all λ ≤ 1 + 1eε−1 , the algorithm A satisfies δ
text: ′-approximate (λ, ε′)-RDP where
ε′ = ε0 + (e ε0 − 1) · logµ,
δ′ = 1− e−µ·δ0 ≤ µ · δ0.
Proof of Lemma 20. For a distribution P on Y and an integer k ≥ 0, let maxP k denote the distribution on Y obtained by taking k independent samples from P and returning the maximum value per the total ordering on Y . (If k = 0, this is some arbitrary fixed distribution.) Using this notation, we can express AKQ as a convex combination:
AKQ = ∞∑ k=0 P [K = k] maxQk.
Suppose P = (1−δ)P ′+δP ′′ is a convex combination. We can view sampling from P as a two-step process: first we sample a Bernoulli random variable B ∈ {0, 1} with expectation δ; if B = 0, we return a sample from P ′ and, if B = 1, we return a sample from P ′′. Thus, if we draw k independent samples from P like this, then with probability (1− δ)k all of these Bernoullis are 0 and we generate k samples from P ′; otherwise, we generate some mix of samples from P ′ and P ′′. Hence we can write maxP k = (1− δ)k max(P ′)k + (1− (1− δ)k)P ′′′ for some distribution P ′′′. It follows that we can express
AKQ = ∞∑ k=0 P [K = k] maxQk
= ∞∑ k=0 P [K = k] ( (1− δ0)k maxQk1−δ0 + (1− (1− δ0) k)Pk ) = f(1− δ0)AK ′ Q + (1− f(1− δ0))P∗
for some distributions P0, P1, · · · and (1− f(1− δ0))P∗ = ∑∞ k=0 P [K = k](1− (1− δ0)k)Pk.
Similarly, we can express AKQ′ = f(1− δ0)AK ′ Q′1−δ0 + (1− f(1− δ0))P ′∗ for some distribution P ′∗.
Using these convex combinations we have, by the definition of approximate Rényi divergence, Dδλ ( AKQ ∥∥AKQ′) ≤ Dλ (AK′Q1−δ0∥∥∥AK′Q′1−δ0)
as δ = 1− f(1− δ0).
Proof of Corollary 21. Fix neighbouring inputs x, x′ and let Q = Q(x) and Q′ = Q(x′) be the corresponding pair of output distributions from the base algorithm. Then, in the notation of Lemma 20, A(x) = AKQ andA(x
′) = AKQ′ forK ∼ Poisson(µ). Setting δ′ = 1−f(1−δ0) = 1−e−µ·δ0 ≤ µ·δ0, we have
Dδ ′ λ (A(x)‖A(x′)) = Dδ ′ λ ( AKQ ∥∥AKQ′) ≤ Dλ (AK′Q1−δ0∥∥∥AK′Q′1−δ0)
where K ′ ∼ Poisson(µ · (1− δ0)).
Now we apply Theorem 6 to the algorithm corresponding to the pair of distributions AK ′
Q1−δ0 and
AK ′
Q′1−δ0 . The base algorithm, corresponding to the pair Q1−δ0 and Q ′ 1−δ0 satisfies (ε0, 0)-DP. This
yields
Dλ
( AK ′
Q1−δ0 ∥∥∥AK′Q′1−δ0) ≤ ε0 + log((1− δ0) · µ)λ− 1 if eε0 ≤ 1 + 1/(λ − 1). Setting λ = 1 + 1/(eε0 − 1) and applying monotonicity (Remark 5 and Lemma 10) and we obtain the result.

heading: E.1 TRUNCATING THE NUMBER OF REPETITIONS
text: Another natural question is what happens if we truncate the distribution of the number of repetitions K. For example, we may have an upper limit on the acceptable runtime. This does not require relaxing to approximate DP, as done by Liu & Talwar (2019).
LetK be the non-truncated number of repetitions and let f(x) = E [ xK ]
be the PGF. Letm ∈ N. Let K̃ be the truncated number of repetitions. That is, P [ K̃ = k ] = I[K ≤ m] · P [K = k]/P [K ≤ m].
Let f̃(x) = E [ xK̃ ] be the corresponding PGF. We have f ′(x) = ∑∞ k=1 k · xk−1 · P [K = k] and f̃ ′(x) = ∑m k=1 k · xk−1 · P[K=k] P[K≤m] . Hence, for x ∈ [0, 1], 0 ≤f ′(x)− f̃ ′(x) · P [K ≤ m]
= ∞∑ k=m+1 k · xk−1 · P [K = k]
≤ xm · ∞∑
k=m+1
k · P [K = k]
= xm · E [K · I[K > m]]. Now f̃ ′(x) · P [K ≤ m] = ∑m k=1 k · xk−1 · P [K = k] ≥ xm−1 · E [K · I[K ≤ m]]. Thus
1 ≤ f ′(x)
f̃ ′(x) · P [K ≤ m] ≤ 1 + x m · E [K · I[K > m]] xm−1 · E [K · I[K ≤ m]] = 1 + x · E [K · I[K > m]] E [K]− E [K · I[K > m]]
Now we can bound the quantity of interest in Lemma 7: For all q, q′ ∈ [0, 1], we have
f̃ ′(q)λ · f̃ ′(q′)1−λ ≤ ( f ′(q)
P [K ≤ m]
)λ ·  f ′(q′) P [K ≤ m] · ( 1 + E[K·I[K>m]]E[K]−E[K·I[K>m]] ) 1−λ
= f ′(q)λ · f ′(q′)1−λ · 1 P [K ≤ m]
· ( 1 + E [K · I[K > m]]
E [K]− E [K · I[K > m]] )λ−1 This gives us a generic result for truncated distributions: Lemma 22 (Generic Bound (Lemma 7) for Truncated distributions). Fix λ > 1 and m ∈ N. Let K be a random variable supported on N ∪ {0}. Let f : [0, 1] → R be the probability generating function of K – i.e., f(x) := ∑∞ k=0 P [K = k] · xk.
Let Q and Q′ be distributions on Y . Assume Y is totally ordered. Define a distribution A on Y as follows. First we sample K̃ which is K conditioned on K ≤ m – i.e. P [ K̃ = k ] = P [K = k|K ≤ m].
Then we sample from Q independently K̃ times and output the best of these samples.13 This output is a sample from A. We define A′ analogously with Q′ in place of Q.

heading: Then
text: Dλ (A‖A′) ≤ Dλ (Q‖Q′)+ 1 λ− 1 log ( f ′(q)λ · f ′(q′)1−λ ) +
log (
1 1−P[K>m] ) λ− 1 +log ( 1 + E [K · I[K > m]] E [K]− E [K · I[K > m]] ) ,
(9) where q and q′ are probabilities attained by applying the same arbitrary postprocessing to Q and Q′ respectively – i.e., there exists a function g : Y → [0, 1] such that q = E
X←Q [g(X)] and
q′ = E X′←Q′ [g(X ′)].
This will give almost identical bounds to the using the non-truncated distribution as long as P [K > m] 1 and E [K · I[K > m]] E [K], which should hold for large enough m.
13If K̃ = 0, the output can be arbitrary, as long as it is the same for both A and A′.

Review summaries:
The paper provides an considerable improvement to the DP analysis of hyperparameter tuning of DP algorithms (such as DP-SGD). The analysis is carried out using Rényi differential privacy (RDP), and the DP bounds are RDP bounds that contain the RDP parameters of the underlying mechanisms (that give the private candidates). Most importantly, the paper considerably improves the state-of-the-art of Liu and Talwar (2019). Also, a nice counterexample using SVMs is constructed, that shows the importance of this problem. 

The authors make the following contributions regarding differentially private hyperparameter tuning : * As an example, the authors train an SVM with a weight penalty and show that, in presence of an outlier, a membership inference attack can be employed to infer from the hyperparameter whether or not the outlier was a part of the training set. *The authors provide an algorithm for private hyperparameter tuning, which consists of running a learning algorithm that satisfies Rényi differential privacy (RDP) for a *random* number of times ($K$), each with a hyperparameter drawn uniformly at random from a finite candidate set. The authors first prove RDP guarantees of the algorithm when $K$ is sampled from a truncated negative binomial distribution and Poisson distribution. Then they proceed to prove RDP guarantees for any distribution of $K$ supported on $\mathbb{N}\cup \{0\}$ ¹. The authors propose a way to measure the utility of the algorithms by looking at the expected quantile of the output. The results of their utility analysis, coupled with an experiment on MNIST, show that the algorithm with Poisson distribution performs better than those proposed by Liu and Talwar (2019) in an intermediate range of privacy budget ($\varepsilon$).  ¹ From what I understand, we can obtain a tighter generic bound by going through the proof of Lemma 7. But the authors opt to use (7) since the postprocessing often leads to a bound that is independent of $q$ and $q'$ when plugging in a specific distribution. 

This paper studies the problem of hyper parameter tuning in the setting of differentially private training of machine learning models. The paper first shows that the hyper parameters used to train a model and the corresponding utility can leak information about training (through experimenting with outliers). They then go on to introduce and analyze ways that would help release DP models trained with the "best" set of hyper parameters, with small privacy leakage. If for hyper parameter tuning, $m$ models are trained with DP, then the leakage for releasing  the best model would be $m\epsilon$ with simple composition. The  method introduced by the paper, however, builds on prior work by Liu&Talwar and improves this to become $2\epsilon$, through randomly choosing and running hyper parameter settings. 

This paper has made the following contributions. Firstly, this paper illustrates how simply tuning hyperparameters based on non-private training runs can leak private information. Second, this paper provides privacy guarantees for hyperparameter search procedures within the framework of Renyi Differential Privacy. Their results improve and extend the work of Liu and Talwar (STOC 2019).