Private Selection from Private Candidates
Jingcheng Liu, Kunal Talwar
Introduction
Differential Privacy is the standard notion of privacy for statistical databases. It imposes a probabilistic constraint on the behavior of the algorithm on datasets that differ in one person’s input. Formally,
Let be a randomized algorithm mapping datasets to some range . We say that is -differentially private if for all pairs of adjacent datasets , and for all measurable subsets ,
Here, two datasets are adjacent if they differ in one person’s input. When , we will sometimes say that is -differentially private.
Differential privacy (DP) satisfies nice post-processing and composition properties, allowing for complex differentially private algorithms to be built out of simpler building blocks. In the last decade or so, differentially private algorithms have been designed and analyzed for numerous statistical and machine learning tasks, in most cases by carefully putting together these building blocks. This approach to the design and analysis of differentially private algorithms has proven surprisingly robust and useful.
One can only hope to approximately maximize when single individuals in the dataset cannot change any of the score functions too much. This stability of under small changes in is usually codified in an assumption that each score function is Lipschitz with respect to Hamming distance changes to . The Exponential mechanism is an algorithm for DP selection under this assumption and has found numerous applications to the design of DP mechanisms. Several other mechanisms for the private selection problem have been proposed, that improve the utility guarantee under stronger assumptions .
In many settings however, the Lipschitzness assumption is much too strong. In this work, we ask: Are there weaker versions of the stability assumption that allow for private selection? We show that one can codify the stability simply as differential privacy: the function , viewed as a randomized algorithm, satisfies differential privacy. Indeed, one can convert a Lipschitz function into an -DP random function by simply adding, say, a noise drawn from the Laplace distribution to . We assume oracle access to a randomized function that on input computes a sample from the -th candidate , where is the score and can be any additional output. Moreover, the output distributions of and are promised to be close whenever and are neighbors. Here closeness in distributions is taken to mean -DP or -DP. Motivated by applications, we assume that the scores are bounded, say .
Our first result is a simple algorithm that given as input a threshold , outputs a sample with score , under the assumption that at least one candidate has a median score of at least . This algorithm makes a near linear number of oracle calls, and improves on the quadratic bound that follows from a reinterpretation of a result in . We show that the loss in privacy, utility and efficiency for this algorithm are all close to optimal. Interestingly, this algorithm can be seen as, starting from a naive differentially private algorithm with a poor utility guarantee (e.g., pick a candidate uniformly at random), and then by repeating it in a private way to boost its utility guarantee. In doing so, we get simple algorithms that are both private and have good utility guarantees.
Fix any . Then given -DP algorithms , there is an algorithm that on any dataset , outputs a sample such that
is -DP.
Can we do this without knowing this target value ? We give two algorithms that compete with the best without knowing the target . The first can be seen as modifying the naive non-private algorithm by employing a random stopping strategy. In doing so, it guarantees that “outputting the highest scored sample seen so far” is already private. However it pays a small additional privacy penalty: the final privacy cost is instead of .
Fix any . Then given -DP algorithms , there is an algorithm that on any dataset , outputs a sample such that
is -DP.
is the highest scored sample among the samples seen so far.
Our second algorithm keeps the privacy cost to essentially , at the cost of a slightly higher runtime and a more complicated algorithm and analysis. This is valuable since in some settings, the utility of the base algorithm is quite sensitive with respect to the privacy parameter . In such settings, with a final target privacy parameter of , the second algorithm can allow us to give each a privacy budget of , which can lead to a better utility than the -DP ’s needed for the first simpler algorithm.
is -DP.
Except with probability , has quality at least .
The number of calls that the algorithm makes to any satisfies (deterministically)
Furthermore, \Pr\inb{\mathcal{M}\hbox{ outputs\bot}}\leq\beta+\delta.
In the process, we develop an online version of our algorithm, which can be seen as a generalization of the sparse vector technique to this privacy-instead-of-Lipschitzness setting. This algorithm takes as input a sequence of mechanisms and , and stops at the first such that has median score larger than .
There is an -DP mechanism such that, for any , and for any sequence of -DP mechanisms and any sequence of thresholds :
If there is an such that , then outputs with probability .
If outputs , then except with probability , .
We next outline some motivating applications of our work.
Hyperparameter/algorithm Selection: When designing practical machine learning algorithms, one often ends up choosing amongst different algorithms/models, or setting values for common hyperparameters such as the learning rate in an algorithm. This hyperparameter selection problem has attracted a lot of interest in recent years . Differentially private ML algorithms such as have many of these hyperparameters, and often add on a few hyperparameters of their own. A common approach in the non-private setting is to try out several (or all) values of the hyperparameters and select the best one based on the performance on a validation set. Doing this with privacy requires more care. Chaudhuri and Vinterbo studied this problem formally under strong assumptions on the algorithm. These assumptions, however, can be hard to enforce and one would like to design an algorithm that works without any additional assumptions. Note that given choices for the hyperparameters, and an -DP learner, one can publish models and select the best, say using the exponential mechanism. This approach only gives -DP, which allows for privacy budget of only (or if using advanced composition) for the learner, which often translates to significantly poorer utility guarantee. In this setting, note also that each oracle call is a run of the DP learner for some hyperparameter setting, that can involve a large computational cost.
Our work shows how to compete with the best choices of hyperparameters in the non-private setting while satisfying -DP, at a small computational overhead.
Generalizing the Exponential Mechanism: Beyond these applications, our result can be viewed as a generalization of the expoenential mechanism. Given a score fuction that has sensitivity , observe that adding Laplace noise of scale to the score gives us an -DP mechanism. Our algorithm can be then used to select amongst these. We can however relax the assumptions. If we allow the score functions to have different sensitivities, we can still use our framework and recover the generalized exponential mechanism of Raskhodnikova and Smith . If the score functions have small smoothed sensitivity , we get a smooth sensitivity version of the exponential mechanism. This last result does not seem to follow from known techniques.
Private amplification for private algorithms: Beyond these applications, our result can be viewed as an extension of the private amplification scheme introduced in . Given a private algorithm, which is usually a randomized algorithm, ideally one would like to run it multiple times, and then choose the best run so as to obtain an output with a higher quality. Here the quality measure can either be the success probability, or any other utility measure of the output. This is trivial in the non-private setting. Is it possible to compete with such a naive repetition strategy in a differentially private way? In this work, we present an algorithm that can be seen as modifying the naive repetition strategy with a random stopping time, which is arguably almost as competitive as the non-private naive repetition.
The Differentially Private Selection problem, often known as differentially private maximization, is a very general algorithmic problem that arises in many applications. Some examples include private PAC learning , private frequent itemset mining , private PCA and private multiple hypothesis testing . The Sparse Vector Technique can be viewed in hindsight as a novel solution to the online version of the selection problem, under the assumption that the target value is known in advance. This technique was introduced by Dwork et al. . We refer the reader to the book by Dwork and Roth for further applications of these techniques.
Several generalization of the exponential mechanims have been proposed. Smith and Thakurta and Beimel et al. showed that the utility guarantee can be improved using the propose-test-release framework of Dwork and Lei when there is a large margin between the maximum and the rest. Chaudhuri et al. gave an elegant algorithm that can exploit a large margin between the maximum and the th maximum for any . Raskhodnikova and Smith proposed the generalized exponential mechanism whose utility depends on the sensitivity of the maximizer, rather than the worst-case sensitivity. Minami et al. show that under certain assumptions on the base distribution, the sensitivity assumptions on the loss function can be significantly relaxed. Our algorithms can also be seen as a natural generalization of the Laplace mechanism. Given a Lipschitz score function , one can convert it into an -DP score function by adding a Laplace noise. Then the Laplace mechanism says that one can just output the max of the noise-added scores. However, the Laplace relies crucially on the fact that the noise is a Laplace noise. As we will discuss in Section B.1, under the mere assumption that the score function is -DP, outputting the max will inevitably incur a factor of loss in privacy.
The problem of algorithm selection has also been studied in where the best parameters are learnt from features of the problem. Ligett et al. study the problem of picking from a sequence of algorithms with increasing privacy costs, until one with good utility is found, for a special class of mechanisms.
The problem of private median finding, and more generally private percentile estimation has been studied in several works . While syntactically similar to the threshold estimation problem studied in Section 4, the assumptions on the data in those works are very different from ours and we do not believe that the techniques in those works apply to the setting of interest in this work.
2. Organization
The rest of the paper is organized as follows. In Section 3 we present our algorithm for the known threshold case. Section 4 describes our sparse vector and general selection algorithms. We sketch applications of our results in Section 5. The appendices contain some deferred proofs, show why simpler natural approaches do not work for our problem, and show a lower bound on the privacy overhead.
Preliminary and Notations
For a random variable and distribution , we write if is distributed according to the law of .
Given a function on dataset , we say that is -Lipschitz if for any two neighboring dataset , .
Private selection
Let be a set of differentially private mechanisms, that is, for every , is a differentially private mechanism with respect to the dataset . We will also refer to the set of as private candidates. For convenience, we will also treat a randomized mechanism as a distribution, and write if follows the output distribution of . Let be scoring functions over the output of these mechanisms, that is, for , is the score for . We assume that there is a total ordering of the candidates: when two candidates have the same score, we assume that there is an arbitrary tie-breaking rule (e.g., by alphabetical ordering). Given a total ordering of the candidates, without loss of generality we will further assume that each option has a different score.
The goal of private selection is to select that (approximately) maximizes the score of . Naively, a natural algorithm is to draw samples for every , and then output the pair with the highest score . Unfortunately this naive algorithm is not private. The detailed discussion and analysis is deferred to Section B.1. The next natural algorithm would be to output the -th percentile best, which unfortunately is also not private. Again we defer the analysis to Section B.3.
In this section, we will start with the following naive algorithm that is guaranteed to be private but not very useful (has poor utility guarantee): we choose a candidate uniformly at random and output . It is not hard to see that such a choice of candidate is at least as private as the individual candidates. However, the probability of getting a reasonably “good” candidate can be of the order . Nevertheless, we will show how to boost its usefulness (utility guarantee) by thresholding or random stopping. As a result, this leads to simple and practical algorithms that are also able to compete with the best candidates in a differentially private way.
We consider a thresholding algorithm, which for a given threshold, repeatedly samples from the candidates until we get one that is above the threshold. In addition, we have a small probability of stopping at each step. See LABEL:alg:thresholding for a more formal description.
We assume that the adversary can only observe the final output of the algorithm. We show that for any choice of parameters, the algorithm is private; and if the given threshold is a “good” threshold, the algorithm is unlikely to output .
Fix any . Let be any integer such that , Then LABEL:alg:thresholding with these parameters satisfies the following:
If is -DP, then the output is -DP.
If is -DP, then the output is -DP.
Let be the number of iterations of the algorithm, and let , then
Furthermore, \Pr\inb{\hbox{output\bot}}\leq\frac{(1-p_{1})(1+\varepsilon_{0}/2)}{p_{1}}\gamma.
Due to space considerations, we defer this proof to Section A.1. As a remark, it is clear that in the worst case, the number of iterations of LABEL:alg:thresholding is no more than ; this theorem provides a more average-case guarantee: the larger (or ) is, the more likely that the algorithm will terminate (much) sooner than . Moreover, it is worth noting that the larger the setting of is, the smaller we can set , providing more privacy and utility. In particular, the above theorem holds even if we set but , in other words, we run the algorithm till it stops by itself. However this would not be a very practical setting: if one started with a “bad” threshold, the algorithm may never stop. In that case, one may want to stop the algorithm and try a different threshold. Therefore, for practical purposes one may want to set and .
2. Random stopping without thresholding
In this subsection, we show that the idea of random stopping leads to a simple private algorithm, even without knowing the threshold. It is similar to LABEL:alg:thresholding but without the thresholding part: draw a random number of samples, and then output the best option.
Fix any . If is -DP, then the output of LABEL:alg:maxRand is -DP.
We first consider the event of getting the output from LABEL:alg:maxRand on neighboring datasets and . Without loss of generality, we assume that each option has a different score.Otherwise, whenever we write , we break ties using the same total ordering of the candidates. Then we denote
Notice that , , and .
We define the highest score for a set (or a multiset) of tuples as
Since is -DP, we have that are -close (in a DP sense) to , respectively. Then,
The following utility bound holds for this algorithm.
For , let . Then the output of LABEL:alg:maxRand has score at least except with probability .
Instead of random stopping, one can also design a hard stopping variant of this algorithm similar to that of LABEL:alg:thresholding, and allow for -DP input algorithms.
Fix any and let . Consider a variant of LABEL:alg:maxRand that outputs the highest scored candidate from if reaches . If is -DP, then the output of this algorithm is -DP for .
We simply reduce to Theorem 3.2 using simple properties of -DP. We give details next, using folklore results proven in Appendix E. Fix a pair of neighboring datasets and . Then we can define an event such that and that and are multiplicatively close. Let be the event in the th call to . Further, let be the event that the algorithm reaches step . Conditioned on , the run of this algorithm can be coupled with a run of LABEL:alg:maxRand for a pure DP . Further, the probability of the event is at most . The claim follows. ∎
Since is typically smaller than a polynomial, we have not attempted to optimize the term in this theorem. We conclude with a remark that, in the case when satisfies purely -DP, one can show that the hard stopping variant of LABEL:alg:maxRand preserves purely -DP.
Fix any and let . Consider a variant of LABEL:alg:maxRand that outputs the highest scored candidate from if reaches . If is -DP, then the output of this algorithm is -DP.
The proof of this theorem is quite involved and is deferred to Section A.2.
Searching for a percentile-threshold: privacy-preserving sparse vector
In this section we consider the problem of searching for a percentile-threshold for any given percentile in a differentially private way. We start by defining some notations. Given any sequence of randomized queries , we write to indicate that is obtained from running the randomized query on dataset . In other words, means that follows the output distribution of the randomized query on dataset . We will treat these as samplable distributions, where each is -DP. Then for any sequence of thresholds , and a target threshold , we would like to test if and output the first one that is above the threshold, and in a differentially private way.
It is worth noting that this can be seen as an extension of the standard sparse vector algorithm for Lipschitz queries: given -Lipschitz queries and a threshold , if we set , and , then it is not hard to check that the queries are now -DP, and the first query above the percentile-threshold is exactly the same as the first query above the query threshold (that is, the first with median score at least ). Answering such a percentile query exactly is not private (see Section B.3 for an example for ), so we will have to relax the goal of finding the first above percentile-threshold query. Similar to the standard setting, we would like that:
if a query is much below the threshold, that is, , then our algorithm should report “below threshold” (denoted by );
if a query is much above the threshold, that is, , then our algorithm should report “above threshold” (denoted by ).
In fact, our algorithm will be a natural extension of the standard sparse vector algorithm.
To illustrate ideas, we will start by assuming that we have access to an exact percentile oracle: . As a remark, such a percentile oracle is available in the standard sparse vector algorithm, which is just the cumulative distribution function of the Laplace distribution. We observe that if the randomized queries are -DP, then both and are -Lipschitz. In other words, although we no longer have Lipschitzness in the “answer of a query” space (that is, the quantile space), the fact that each query is -DP will ensure that we have Lipschitzness in the logarithm of the percentile space (that is, the log of the CDF). This allows us to adapt the sparse vector algorithm to the log of the percentile space.
Let . Note that is -Lipschitz: since both and are -Lipschitz, and is just the difference of two -Lipschitz functions. Also notice that is a strictly increasing function for . Given access to the oracle , we can then adapt the sparse vector algorithm as in LABEL:alg:gensparse0.
If for every , is -DP, then
LABEL:alg:gensparse0 is -DP.
Conditional on LABEL:alg:gensparse0 reporting the -th query is “above threshold”, we have that . In other words, the algorithm does not stop too early.
Conditional on LABEL:alg:gensparse0 reporting the -th query is “above threshold”, we have that . In other words, the algorithm does not stop too late.
, if for some , then . In other words, on a query that is way above the threshold the algorithm will likely halt.
(Sketch) Part (a), part (b) and part (c) all follow from the standard sparse vector analysis (see, e.g., ), and the fact that is -Lipschitz. Observe that the test is equivalent to . Therefore, if we view as the -th query (which is -Lipschitz) and as the threshold, then this is indeed the standard sparse vector setting. The details are omitted here as we will see proofs for stronger claims for the actual algorithm in Theorem 4.4.
For part (d), observe that the test will pass if and . By a union bound, with probability at least , both will happen at the same time. In other words, the probability of not halting after seeing a query way above the threshold is at most . ∎
We give some estimates in the special case of , which corresponds to the range of the standard sparse vector setting, as quick corollaries. In fact, if one apply this to the standard sparse vector setting, one can recover guarantees that match the standard setting up to constant factors.
If , and for every , is -DP, then
LABEL:alg:gensparse0 is -DP.
Conditional on LABEL:alg:gensparse0 reporting the -th query is “above threshold”, we have that . In other words, the algorithm does not stop too early.
Conditional on LABEL:alg:gensparse0 reporting the -th query is “above threshold”, we have that . In other words, the algorithm does not stop too late.
, if for some , then . In other words, the algorithm will likely halt on a query that is way above the threshold.
2. Sparse vector for online private queries
Next we show that one could replace the exact percentile oracles with unbiased estimators . Assuming that we have unlimited access to the randomized queries , we consider the following natural unbiased estimator for : given iid samples , where for each , , we define , where is the Iverson bracket defined by
Since is now a random function of the dataset, the usual Lipschitzness is not well-defined, unlike for the function . One approach of defining “Lipschitzness” for such a random function would be to consider the earth mover distance. This is what we will do next.
Let be the analogous unbiased estimator for on a neighboring dataset . By -DP of , we have that
In order to adapt LABEL:alg:gensparse0, ideally we would like a probabilistic version of to be true: if there is a coupling between and such that , then we can replace with in LABEL:alg:gensparse0. This turns out to be too much to ask for in such a general setting. We show in Lemma 4.3 that a slightly weaker statement in indeed true. This is the key lemma that leads us to LABEL:alg:gensparse1.
Let and be two sequences of independent random variables, and let , . For any fixed , , let .
Equivalently, if we let , then
We defer the proof of this lemma to Section A.3. Now we are ready to describe the extended version of the AboveThreshold algorithm. We now consider a potential function . As an intuition, we will see that thanks to Lemma 4.3, if is -DP, then for suitable choices of and , there exists a coupling in which, with high probability, is -Lipschitz.
For any fixed , , and an integer , let , , and . If for every , is -DP, then:
LABEL:alg:gensparse1 with the above parameters is -DP.
Conditional on LABEL:alg:gensparse1 reporting the -th query is “above threshold”, we have that . In other words, the algorithm does not stop too early. Moreover,
Conditional on LABEL:alg:gensparse1 reporting the -th query is “above threshold”, we have that . In other words, the algorithm does not stop too late. Moreover,
, if for some , then
In other words, on a query that is way above the threshold the algorithm will likely halt.
Before proving the theorem, we state the following sufficient condition for establishing -DP.
Let and be two random variables that share the same sample space and -algebra, If there exists constants , and for any event , there exists a joint event on and such that , and
Informally, in order to show -DP, it suffices to construct a coupling where, except with probability , the two neighboring distributions satisfy -DP. It is worth noting that and need not be independent. Thus one could optimize by constructing a coupling between and that maximizes . In addition, we note that the design of and the coupling between and can be dependent on the event .
Proof of Theorem 4.4. For part (a), we follow the standard analysis of sparse vector. Fix any two neighboring datasets and . By Lemma 4.5, in order to show -DP, it suffices to find a conditioning event , and a coupling between the output distribution of LABEL:alg:gensparse1 running on and , such that they are -close except with probability . Observe that in order to obtain the same output, it suffices if we can couple all the noisy tests of the form . These tests depend only on two types of randomness: the perturbations to the current percentile (in the form of ), and the perturbations to the desired percentile (in the form of ). We denote these randomness by and when running on dataset , and by and when running on .
We consider the event that and . Let , and
Now we are ready to specify the coupling. Given and , we let , and \xi_{i}^{\prime}=\begin{cases}\xi_{i},&\hbox{ ifi
In the following we will abuse notation, and write to denote the probability density function of the Laplace distribution. Then, let be the -th output of the algorithm running on dataset , and be that of .
Similarly if we let and , then under the trivial coupling,
We consider the following conditioning event:
By a union bound, we have . Conditional on , by triangle inequality we have:
In other words, conditional on ,
where the last inequality uses the probability density function of the two Laplace distributions.
Finally consider the event that and for all , by a similar argument we have
Since our choice of is arbitrary, this shows that conditioned on , we have -DP for the output of our algorithm. Since , by Lemma 4.5 this concludes -DP for the output unconditionally.
For part (b), we consider the events of non-concentration:
where the bounds for and follows directly from CDF of the Laplace distribution, and the bound for follows from a concentration bound (see Lemma A.4). Therefore, conditional on avoiding , if the algorithm stops at the -th iteration, we have that
Next, conditioning further on avoiding , we have that
Let , then we have
For part (c), it will be similar to part (b), except that we consider
Then, conditioning on avoiding , we have that
Let , then we have
3. A more efficient sparse vector for a one-sided guarantee
In this subsection we consider searching for the unknown “good” threshold for LABEL:alg:thresholding in a more efficient yet private way. The idea is that, instead of trying to tackle adversarily chosen randomized online queries, here we design better queries for our algorithm.
Specifically, let be a distribution dependent on dataset , and let . Let . Then, given , our goal is to find in a differentially private way.
Since can be very sensitive for neighboring datasets (see Section B.3 for an example for ), outputting directly would not be private. The relaxed goal is to find, with high probability, a private threshold so that:
is almost as large as , and is not much smaller than .
It is worth noting that, due to the one-sided nature of our goal (instead of asking to be close to , we only want to be not much smaller than ), we find it much more convenient to shift the target by a constant factor: from to a smaller target . Such a tradeoff enables us to find a that is closer to , at the cost of a potentially smaller . In the settings that we consider, a higher allows for better “quality” of the selected candidate, while a larger is usually only for smaller computational cost.
Let be a -DP distribution. For any fixed , , and an integer , let , , and . Then the following holds for the output of LABEL:alg:sparse1 with the above parameters:
is -DP.
. In other words, the algorithm does not stop too late.
(Sketch) For part (a), this basically follows from the same proof of Theorem 4.4 part (a), except the following changes:
We consider . It is not hard to see that the proof only relies on the fact that is monotone, and can be coupled with multiplicatively.
Here we can re-use randomness, due to the fact that we essentially have the same distribution, and only need to change . It is worth noting that we did not require independence of the since we only used union bound.
We have also shifted the target of multiplicatively. However it does not affect privacy, since one can view such a shift as considering a different to begin with.
For part (b), similarly we consider the events of non-concentration:
where the bounds for and follows directly from CDF of the Laplace distribution, and the bound for follows from a concentration bound (see Lemma A.4). Therefore, conditional on avoiding , if the algorithm stops at the -th iteration, we have that
Set , then we have
Next, conditioning further on avoiding , we have that
For part (c), as soon as , we have . Therefore the test will pass if , , and . Similar to part (b), we get that this will happen except with probability . In other words, the probability of not halting after the first iteration with is at most . ∎
Finally, by combining Theorem 4.6 and Theorem 3.1, we get the following:
Furthermore, \Pr\inb{\mathcal{M}\hbox{outputs\bot}}\leq\beta+\delta.
Here we set , and , .
Applications
Suppose that we are given choices of hyperparameters, and for each choice , there is a differentially private learning algorithm . Given a training dataset , is a randomized mechanism that returns a model, which we often denote as . Next, for a validation dataset , we let be the validation score of model and hyperparameter . Then the goal of hyperparameter selection is to find a pair , that approximately maximizes the validation score.
It is worth noting that the dependencies on the validation set are only through the scoring functions , which are usually counting queries and thus have small sensitivity. This is the setting we will consider. Therefore, we let , where is the size of the validation set. Then, we define to be the distribution of when . Finally we let be the distribution of when we draw uniformly from .
Then, in order to apply Theorem 4.7 or Theorem 3.2, it remains to verify that is differentially private with respect to both datasets.
The distribution defined as above is always -DP for the validation set . Moreover:
if are -DP learning algorithms, then is -DP for the training set ;
if are -DP learning algorithms, then is -DP for .
It is worth noting that this holds for every in the support. Then -DP for follows from the fact that and follow the same distribution and .
Then for , note that the dependency of on is only through , which is -DP. Thus for every , is -DP for , thus is also -DP for .
Similarly if is -DP, we have that for every , is -DP for , thus is also -DP for . ∎
2. Adaptive Data Analsis Beyond Low Sensitivity Queries
Our results immediately have applications to designing differentially private algorithms where interemediate steps select the best amongst various private options. Since DP allows us to prove generalization bounds, these results have implications for adaptive data analysis too.
As an example, consider a data analysis algorithm which as an intermediate step runs -means clustering (or rank- PCA). Often in practice, one tries several values of and picks the best one according to some criteria (see e.g. Garg and Kalai ). While there are differentially private variants of the base problem of -means, naively selecting the best would require us to account for the privacy cost of computing all the -means objectives, for different value of . Theorem 4.7 allows us to select the best of these without any asymptotic overhead in privacy cost.
3. Generalizations of the Exponential Mechanism
The exponential mechanism solves the selection problem when the score functions are Lipschitz. Several variants of the Exponential Mechanism have been proposed in previous work. We next show that several of these can be derived as corollaries of our main result, by defining appropriate private variants of the score function.
Let be a set of score functions mapping datasets to reals. Let and .
Suppose that each has sensitivity at most . Then there is an -DP mechanism that outputs an such that except with probability .
Suppose that has sensitivity at most . Then there is an -DP mechanism that outputs an such that except with probability .
Suppose that each has sensitivity at most . There is an -DP mechanism that outputs except with probability whenever for all .
Suppose that has -smoothed sensitivity at most . Then there is an -DP mechanism that outputs an such that except with probability .
The second part is similar, except that we set . This shift ensures the realized score is no larger than for all calls to . Now the median of is at least , which implies the claim.
The fourth part is similar to the Generalized exponential mechanism, except that we add noise from smooth-sensitivity-scaled Laplacian distribution using the Smoothed Sensitivity framework of [29, Cor. 2.4]. As long as (which is ensured when we set with ), it can be verified that the is a smooth upper bound on the sensitivity of . The claim follows by a simple computation. ∎
4. Private Amplification
Gupta et al. study the question of private amplification: given a DP algorithm that gets a certain utility in expectation, can we convert it into one that gets close to that utility with high probabilty? Their motivation came from combinatorial optimization problems, where they showed appoximation algorithms with certain guarantees in expectation. Using Markov’s inequality, one can convert the expectation guarantee to one that ensures a utility bound with some probability . Applying our results, one gets an algorithm that ensures that utility with high probability. This improves on the private amplification theorem proven in .
Conclusions
We have presented new differentially private algorithms for selecting the best amongst several differentially private algorithms. Our algorithm is near-optimal in terms of privacy overhead, computational cost and utility loss. We have shown how it applies to hyperparameter search and adaptive data analysis. We leave open the question of improving the constants in the run time of our threshold finding algorithm.
While random search is a surprisingly effective way to do hyperparameter optimization in machine learning , there are more complex adaptive algorithms that often do better. Our work says that random search- or grid search-based hyperparameter tuning can be made differentially private essentially for free. It is natural to ask if we can make the various adaptive algorithms differentially private.
References
Appendix A Deferred Proofs
We restate Theorem 3.1 here for convenience.
Fix any . Let be any integer such that , Then LABEL:alg:thresholding with these parameters satisfies the following:
If is -DP, then the output is -DP.
If is -DP, then the output is -DP.
Let be the number of iterations of the algorithm, and let , then
Furthermore, \Pr\inb{\hbox{output\bot}}\leq\frac{(1-p_{1})(1+\varepsilon_{0}/2)}{p_{1}}\gamma.
For part (a), let . Given a threshold , we let , and . Then we have
For part (b), since is -DP, we have that is -close to , and is also -close to . Let , then we also have is -close to .
Next we consider the event of outputting on dataset .
where follows from AM-GM inequality: recall that is an integer, and , then
This concludes part (b). For part (c), it is worth noting that the privacy does not degrade as we increase (the number of iterations).
If is -DP, then we know that , and , or equivalently that . Also notice that and . Then, by calculations in part (a), we have the following upperbound:
Furthermore we have the following lowerbound:
Then for an event (that is, does not contain ), we have
Next, notice that we also have , then for the output we can upperbound
Finally, for an event that contains , we let , and then
For part (d), notice that in each iteration, in order to not halt, has to be below , and the -biased coin test did not pass. In other words, for each iteration, . Therefore this can be stochastically dominated by a geometric distribution (which corresponds to setting ), with expected number of trials being at most .
A.2. Proof of Theorem 3.5
Fix any and let . Consider a variant of LABEL:alg:maxRand that outputs the highest scored candidate from if reaches . If is -DP, then the output of this algorithm is -DP.
We denote , , then
Observe that , and we have
Using the upper bound on , this also implies that
Now, if , then we have . Therefore we can upperbound
The first inequality above is a consequence of upper bounding the sum of the first terms in eq. 2 by the sum to infinity. Then we lowerbound
A.3. Proof of Lemma 4.3
We re-state Lemma 4.3 below for convenience.
Let and be two sequences of independent random variables, and let , . For any fixed , , let .
Equivalently, if we let , then
Before proving this lemma, it will be useful to show the following concentration bounds.
Let be a sum of independent random variables: as defined in Lemma 4.3, then ,
Let , then we apply the standard Chernoff bound to :
Let be a sum of independent random variables: as defined in Lemma 4.3, then ,
Note that by a direct application of Chernoff bound, it holds that ,
Finally, we are ready to prove Lemma 4.3.
Proof of Lemma 4.3. For any given , we set , and . Then we consider the following events, and on the probability space of and respectively:
As discussed in Lemmas A.4 and A.5, we have
On the other hand, conditional on and , we must have
Therefore, let , then
Appendix B Naive algorithms: tight examples and analysis
In this subsection we consider a naive algorithm where, one simply chooses the best candidate (with the highest score, e.g., in the hyperparameter selection setting, among the trained models one outputs the best performing model and its corresponding hyperparameter).
What is the best -DP bound, or -DP bound that we can hope for? Basic composition theorem says that if there are candidates, and each candidate is -DP, then, outputting the best of the candidates is -DP. This is actually tight, thanks to the following example.
Here the probability are with respect to the randomness in the -DP candidate . Then for neighboring datasets and , we get samples of the candidates (e.g. for each of the candidates, we draw a sample), and then we compare the event of choosing as the best hyperparameter. It is easy to see that and , therefore,
What about -DP bound? We show that outputting the maximum cannot do better than -DP. Fix an integer , and .
Again for neighboring datasets and , we get samples of the candidates (e.g. for each of the candidates, we draw a sample), and then we compare the event of choosing as the best hyperparameter. It is easy to see that and , therefore,
B.2. Thresholding with decreasing thresholds
In this subsection we consider a natural variant of LABEL:alg:thresholding: in each iteration, instead of halting (and output ) with probability , what if we decrease the threshold? In particular, we will try a lower threshold with probability at least in each step. Is this good enough, so that we can avoid paying the privacy cost for the different thresholds that we tried along the way? See LABEL:alg:decremental-thresholding for formal description. For simplicity, we consider the special case where we do not stop the algorithm after some finite number of steps. The algorithm could run forever in the worst case. Note that in LABEL:alg:thresholding, running the algorithm longer only helps in privacy (recall that in Theorem 3.1, the larger is, the smaller we can choose).
Note that as soon as , the algorithm will output whichever samples of candidate that it gets, as is trivially true.
Here is an example which shows that trying many thresholds are not free for privacy: if we plan to try thresholds, then we do have to pay a factor of in the privacy cost.
Notice that is monotone in , if changes to , then the factor will be amplified times.
B.3. Outputting the p𝑝p-th percentile
Without loss of generality, we consider , that is, we output the median candidate. Also without loss of generality, let us say there are only two models, and , and , . Consider the following two distributions of and .
Clearly, the two distributions are -close, yet in one distribution, the median is , while in the other the median is . Therefore, the median of the distribution is not private. This is also the case if one takes the median of samples, assuming large enough (where we have concentration with high probability). This also applies if one pick an index from uniformly at random, and then output the -th highest.
Appendix C Improved analysis of the private amplification algorithm in [19]
Let be a sequence of independent distributions, let be the random variables where .
Utility: The mechanism outputs a dummy class with probability , and
where the randomness is over both the internal randomness of exponential mechanism and the randomness of .
Privacy: is -DP.
It is worth noting that the privacy on the training set does not depend on . In other words, one can even set , which corresponds to sampling uniformly from the classes with a score exceeding some threshold and with one extra dummy class. The theorem says that doing so does not compromise the privacy of the training set at all.
Before we prove the theorem, we introduce a useful lemma similar to that of [25, Lemma C.1]. The key changes will be from a Binomial distribution to one that takes value from $$.
Let be a sequence of independent random variables over $$, then
The first inequality follows by Jensen’s inequality, since the function is convex for .
Next we use a formula for negative moments . Note that for every ,
Setting and taking expectations over ,
Next we show that for .
For any given , consider the following two points: t^{x}=\begin{cases}1,\hbox{ ifx=0}\\ t,\hbox{ ifx=1}\end{cases}. Thus is the line joining these two points. Since is convex as long as , and meets at the two points, we get that for .
Proof of Theorem C.1. The probability of outputting a dummy is
where the inequality follows from the definition of and Lemma C.2. Then,
For the privacy part, consider any two neighboring datasets and . Let , and for , and for . Let , be the random variables of the two outcomes.
On the other hand, by Jensen’s inequality,
By symmetry we have the same bound for and . Therefore,
Appendix D Lower Bounds
When each of the input mechanisms is -DP, our final algorithm has privacy guarantee where can be made arbitrarily small. Recall that in this factor of two loss occurs already in the case when is for some score functions with sensitivity : in this case the NoisyMax mechanism has -DP, and the exponential mechanism with similar utility has the same factor of two loss. We next argue that this factor of two loss is necessary under weak utility assumptions. We start with a definition.
Suppose that is an algorithm that takes as input a set of -DP mechanisms and outputs an index . We say that is -dominant in on if . We say that is -weakly useful if whenever is -dominant in on .
The next theorem says that a fairly mild weak usefulness condition already implies that this factor of loss is unavoidable.
Suppose that is an algorithm that takes as input a set of -DP mechanisms , and outputs an index . If is -weakly useful for for a small enough , then cannot by -DP for any .
The proof is a simple packing argument. Our mechanisms all have range and output with probability on dataset . We define a set of datasets such that:
It is easy to check that if and are distance , then the ’s can be extended to satisfy -DP. Moreover, any -weakly useful algorithm on dataset should output with probability at least . Suppose that is -DP. Then,
Since , it follows that for some , this probability . It follows that
For large enough , this implies that . ∎
Appendix E Useful Properties of Differential Privacy
In this section, we prove some folklore properties of the distance implicit in the definition of differential privacy that are useful. We start with a definition of closeness.
For distributions and , we say that is -far from , if for all events ,
We say that if is -far from and is -far from .
Suppose that for . Then for any , there is an event such that (a) , and (b) . In particular, setting , we get .
Without loss of generalityThis can be ensured by having the mechanism outputting a uniform $B=\{x:\frac{\Pr_{P}[x]}{\Pr_{Q}[x]}\geq\exp(\varepsilon^{\prime})\}$. Now note that
so that . Setting , and noting that for , the claim follows.
Suppose that there is an event such that , and that . Then .