Calibrating Noise to Variance in Adaptive Data Analysis
Vitaly Feldman, Thomas Steinke
Introduction
The central challenge in statistical data analysis is to infer the properties of some unknown population given only a small number of samples from that population. While a plethora of techniques for guaranteeing statistical validity are available, few techniques can account for the effects of adaptivity. Namely, if a single dataset is used multiple times, then the choice of which subsequent analyses to perform may depend on the outcomes of previous analyses. This adaptive dependence increases the risk of overfitting — that is, inferring a conclusion that does not generalize to the underlying population.
To formalize this problem, \AtNextCite\AtEachCitekey\@nocounterrmaxnames [DFHPRR14] and subsequent works [[]etc.]HardtU14,SteinkeU15,BassilyNSSSU16,FeldmanS17 study the following question: How many data samples are necessary to accurately answer a sequence of queries about the data distribution when the queries are chosen adaptively – that is, each query can depend on answers to previous queries? Each query corresponds to a procedure that the analyst wishes to execute on the data. The goal is to design an algorithm that provides answers to these adaptive queries that are close to answers that would have been obtained had each corresponding analysis been run on independent samples freshly drawn from the data distribution.
A common and relatively simple class of queries are statistical queries [Kea98]. A statistical query is specified by a function and corresponds to analyst wishing to compute the true mean of on the data distribution . (This is usually done by using the empirical mean on a dataset consisting of i.i.d. draws from the distribution .) For example, such queries can be used to to estimate the true loss (or error) of a predictor, the gradient of the loss function, or the moments of the data distribution. Standard concentration results imply that, given independent samples from , fixed (i.e. not adaptively-chosen) statistical queries can be answered with an additive error of at most with high probability by simply using the empirical mean of each query. At the same time it is not hard to show that, for a variety of simple adaptive sequences of queries, using the empirical mean to estimate the expectation leads to an error of [DFHPRR14]. Equivalently, in the adaptive setting, the number of samples required to ensure fixed error scales linearly (rather than logarithmically in the non-adaptive setting) with the number of queries and, in particular, in the worst case, using empirical estimates gives the same guarantees as using fresh samples for every query (by splitting the dataset into parts).
This quadratic relationship between and was also shown to be optimal in the worst case [HU14, SU15].
The approach of [DFHPRR14] relies on properties of differential privacy [DMNS06, DKMMN06] and known differentially private algorithms. Differential privacy is a stability property of an algorithm, namely it requires that replacing any element in the input dataset results in a small change in the output distribution of the algorithm. Specifically, a randomized algorithm is -differentially private if, for all datasets that differ on a single element and all events ,
This stability notion implies that a function output by a differentially private algorithm on a given dataset generalizes to the underlying distribution [DFHPRR14, BNSSSU16]. Specifically, if a differentially private algorithm is run on a dataset drawn i.i.d from any distribution and the algorithm outputs a function, then the empirical mean of that function on the input dataset is close to the expectation of that function on sample from the same distribution.
The second crucial property of differential privacy is that it composes adaptively: running several differentially private algorithms on the same dataset still is differentially private (with somewhat worse parameters) even if each algorithm depends on the output of all the previous algorithms. This property makes it possible to answer adaptively-chosen queries with differential privacy and a number of algorithms have been developed for answering different types of queries. The generalization property of differential privacy then implies that such algorithms can be used to provide answers to adaptively-chosen queries while ensuring generalization [DFHPRR14]. Specifically, the algorithm for answering statistical queries mentioned above is based on the most basic differentially private algorithm: perturbation by adding Laplace or Gaussian noise [DMNS06].
Differential privacy requires that the output distribution of an algorithm does not change much when any element of a dataset is replaced with an arbitrary other element in the domain . As a result, the amount of noise that needs to be added to ensure differential privacy scales linearly with the range of the function whose expectation needs to be estimated. If the range of is comparable to the standard deviation of on drawn from (such as when has range and mean ) then the error resulting from addition of noise is comparable to the standard deviation of . However, for queries whose standard deviation is much lower than the range, the error introduced by noise is much worse than the sampling error. Variance is much smaller than the range for a variety of common settings, for example, difference between candidate predictors for the same problem or individual input features when the input is usually sparse.
Achieving error guarantees in the adaptive setting that scale with the standard deviation instead of range is a natural problem. Recently, [FS17] gave a different algorithm that achieves such a guarantee. Specifically, their algorithm ensures that with probability at least ,
In this work, we ask: does the natural algorithm that perturbs the empirical answers with noise scaled to the standard deviation suffice to answer adaptive queries with accuracy scaling to sampling error? To answer this seemingly simple question, we address a more fundamental problem: does there exist a notion of stability that has the advantages of differential privacy (namely, allows adaptive composition and implies generalization) but avoids the poor dependence on the worst-case sensitivity of the query. This algorithm was analyzed by [BF16] via a notion of typical stability they introduced. Their analysis shows that the algorithm will ensure the correct scaling of the error with standard deviation but it does not improve on the naive mechanisms in terms of scaling with . Several works have considered relaxations of differential privacy in this context. For example, \AtNextCite\AtEachCitekey\@nocounterrmaxnames [BNSSSU16] considered a notion of stability based on using KL divergence or total variation distance in place of differential privacy (which can be defined in terms of approximate max divergence). \AtNextCite\AtEachCitekey\@nocounterrmaxnames [WLF16] considered the expected KL divergence between the output of the algorithm when run on a random i.i.d dataset versus the same dataset with one element replaced by a fresh sample; unfortunately, their stability definition does not compose adaptively. Notions based on the mutual information between the dataset and the output of the algorithm and their relationship to differential privacy have also been studied [DFHPRR15, RZ16, RRST16, RRTWX16, XR17]. However, to the best of our knowledge, these approaches do not give a way to analyze the calibrated noise addition that ensures correct dependence on .
We introduce new stability-based and information-theoretic tools for analysis of the generalization of algorithms in the adaptive setting. The stability notion we introduce is easier to satisfy than differential privacy, yet has the properties crucial for application in adaptive data analysis. These tools allow us to demonstrate that calibrating the variance of the perturbation to the empirical variance of the query suffices to ensure generalization, as long as the noise rate does not become too small. To ensure this lower bound on the noise rate we simply add a second order term to the variance of the perturbation. Specifically, our algorithm is described in Figure 1. The only difference between our algorithm and previous work [DFHPRR14, BNSSSU16] is that in prior work the variance of the Gaussian perturbation is fixed.
We prove that this algorithm has the following accuracy guarantee.
More precisely, applying Markov’s inequality to the conclusion of Theorem 1.1, shows that, with probability at least ,
This guarantee is directly comparable to the earlier bound (2) of [FS17] – though it is weaker in two ways: First, Theorem 1.1 is a bound on the expectation and does not readily yield high probability bounds (other than via Markov’s inequality). Second, the second term in the maximum (which we think of as a low-order term) still depends linearly on the sensitivity and is potentially larger. The advantage of this algorithm is that it is substantially simpler than the earlier work.
The key to our analysis is the following stability notion.
An algorithm is -ALKL stable if, for all ,
Our notion differs from differential privacy in three significant ways.These relaxations mean that ALKL stability is not a good privacy definition, in contrast to differential privacy. In particular, because of the averaging, ALKL stability cannot distinguish between an algorithm that offers good privacy to all individuals and one that offers great privacy for individuals but terrible privacy for the last individual. Compromising a single data point is, however, not an issue for generalization. First, we use stability to leaving one out (LOO) rather than replacing one element. Second, we average the stability parameter across the dataset elements. Third, we use KL divergence instead of (approximate) max divergence. This is necessary to obtain stronger bounds for our calibrated noise addition as our algorithm does not satisfy differential privacy with parameters that would be suitable to ensure generalization. We note that average LOO stability is a well-studied way to define algorithmic stability for the loss function (e.g. , [BE02, PRMN04]). The use of KL divergence appears to be necessary to ensure adaptive composition of our averaged notion. Specifically, the following composition result is easy to prove.
Suppose is -ALKL stable and is such that is -ALKL stable for all . Then the composition is -ALKL stable.
Using composition, we can show that our algorithm (Figure 1, with the parameters set as in Theorem 1.1) is -ALKL stable. In particular, we show that each one of the answers is computed in a way that is -ALKL stable. This follows from the properties of the KL divergence between Gaussian distributions and the way we calibrate the noise. (Alternatively, we could use Laplace noise to obtain similar results.)
We note that -differential privacy [DMNS06], notions based on Renyi differential privacy [BS16, Mir17], and -KL-stability [BNSSSU16] all imply -ALKL stabilityIt may be necessary to extend an algorithm satisfying one of these definitions to inputs of size to satisfy ALKL stability. This can be done by simply padding such an input with one arbitrary item. Thus we can also compose any ALKL stable algorithm with any of the many algorithms satisfying one of the aforementioned definitions.
Crucially, average KL-divergence is strong enough to provide a generalization guarantee that scales with the standard deviation of the queries, as we require. Our proof is based on the high-level approach introduced by [DFHPRR15] who first convert a stability guarantee to an upper bound on information between the input dataset and the output of the algorithm and then derive generalization bounds from the bound on information. Here, we demonstrate that ALKL stability implies a bound on the mutual information between the input and output of the algorithm when run on independent samples and then derive generalization guarantees from the bound on mutual information We thank Adam Smith for suggesting that we try this approach to proving generalization for ALKL stable algorithms.
Let be -ALKL stable. Let consist of independent samples from some distribution . Then
To prove Proposition 1.4, we introduce an intermediate notion of stability:
A randomized algorithm is -MI stable if, for any random variable distributed over (including non-product distributions),
This notion is based on the notion of stability studied in [RRTWX16] that considers only product distributions over the datasets and, as a result, does not compose adaptively.
We prove Proposition 1.4 by combining the following two facts.
-ALKL stability implies -MI stability. (Lemma 3.6) To show this, we express as the expectation over of the KL divergence of the distribution (over the randomness of ) of from an appropriately weighted convex combination of distributions . (Specifically, is with “resampled.”) The “mean-as-minimizer” property of KL divergence (Lemma 2.9) means we can simply replace this convex combination with to complete the proof.
-MI stability implies the mutual information bound (4). (Lemma 3.7) To prove this, we invoke the chain rule for mutual information along with the fact that is independent from (which helps resolve the conditioning).
Further, we point out that mutual information stability composes adaptively in the same way as ALKL stability and hence could be useful for understanding adaptive data analysis for more general queries (e.g. unlike ALKL stability it does not require to be defined).
As first shown in the context of PAC-Bayes bounds [McA13] and more recently in [RZ16], a bound on mutual information implies generalization results. Using a similar technique, we show that, if the mutual information is small (with consisting of i.i.d. draws from ), we have . Moreover, the quality of the approximation scales with the standard deviation. (Specifically, the approximation bound depends on the moment generating function of , which we bound using both the variance and the range of .) We can similarly relate the empirical variance to the true variance. Thus a bound on mutual information suffices to bound generalization error and, thus, prove Theorem 1.1.
Another known implication of bounded mutual information is that any event that would happen with sufficiently low probability on fresh data will still happen with low probability [RZ16, RRST16]. In particular, if is some “bad” event – such as overfitting the data or making a false discovery – and we know that we are exponentially unlikely to overfit fresh data , then the probability of overfitting its input data is also small, provided the mutual information is small. (See Section 3.3 for additional details.)
One downside of using mutual information is that does not allow us to prove high probability bounds, as can be done with differential privacy and the notion of approximate max-information [DFHPRR15]. We note, however, that our analysis still upper bounds the expectation of the largest error among all the queries that were asked. In other words, a union bound over queries is built into the guarantees of the algorithm. Using known techniques, the confidence can be amplified at the expense of a somewhat more complicated algorithm. In addition, our algorithm yields stronger stability guarantees than just ALKL stability. For example, the minimum noise level of ensures differential privacy (albeit with relatively large parametersSpecifically, with the parameter setting from Theorem 1.1, our algorithm satisfies -differential privacy for all .). The parameters can be improved using the averaging over the indices that we use in ALKL stability but that leads to a notion that does not appear to compose adaptively. Using a different analysis technique it might be possible to exploit the stronger stability properties of our algorithm to prove high probability generalization bounds. We leave this as an open problem. On the other hand, stability with KL divergence is easier to analyze and allows a potentially wider range of algorithms to be used.
2 Related work
Our use of mutual information to derive generalization bounds is closely related to PAC-Bayes bounds first introduced by [McA99] and extended in a number of subsequent works (see [McA13] for an overview). In this line of work, the expected generalization error of a predictive model (such as classifier) randomly chosen from some data-dependent distribution is upper-bounded by the KL divergence between and an arbitrary data-independent prior distribution . One natural choice of is the output distribution of a randomized learning algorithm on . By choosing the prior to be the distribution of the output of on a dataset drawn from one obtains that the expected generalization error is upper-bounded by the expected KL divergence between an [McA13]. While this has not been pointed out in [McA13], this is exactly the mutual information between and .
Recently, interest in using information-based generalization bounds was revived by applications in adaptive data analysis [DFHPRR15]. Specifically, [DFHPRR15] demonstrate that approximate max-information between the input dataset and the output of the algorithm (a notion based on the infinity divergence between the joint distribution and the product of marginals) implies generalization bounds with high probability. They also showed that -differential privacy implies an upper bound on approximate max-information (and this later extended to -differential privacy by \AtNextCite\AtEachCitekey\@nocounterrmaxnames [RRST16]). [RZ16] show that mutual information can also be used to derive bounds on expected generalization error and discuss several applications of these bounds. [XR17] show how to derive “low-probability” bounds on the generalization error in this context. (We note that [RZ16, XR17] use the same technique as that used in PAC-Bayes bounds and appear to have overlooked the direct connection between their results and the PAC-Bayes line of work.)
Recent work [BMNSY18] studies learning algorithms in the PAC model whose output has low mutual information with the input dataset. They also discuss generalization bounds based on mutual information and (independently) derive results similar to those we give in Section 3.3.
Notation, Definitions, & Key Properties
Before continuing, we first establish some relevant properties of the KL divergence. See the textbook by [CT12] for an introduction to the properties of KL divergence (a.k.a. relative entropy).
First we state the definition of KL divergence for completeness.
Let and be probability distributions on a space . Suppose is absolutely continuous with respect to . Then the KL divergence from to is
where and denote the probability mass or density functions of and respectively evaluated at the point . (More generally, denotes the Radon-Nikodym derivative of with respect to evaluated at .)
Let and be two distributions over some domain . Then
Here (or ) denotes the marginal distributions of (or ) over and denotes the marginal distribution of on conditioned on .
We begin by looking at the KL divergence between two Gaussian distributions, as this is what our mechanism uses. Recall that the Gaussian (or normal) distribution with mean and variance — denoted — has a probability density at given by .
This follows from Lemma 2.3 and the inequalities and for all .
An analogous result holds for the Laplace distribution. Although we do not work this out, it implies that our results can be extended to work for the Laplace distribution (with slightly different constants and a higher power of , since the Laplace distribution has heavier tails). Recall that the Laplace distribution with mean and variance — denoted — has a probability density at given by .
Next we have a technical lemma relating expectations to KL divergence.
Let and be probability distributions on . Then
Setting and rearranging gives the bound we will use:
Let and be real-valued random variables and . Then
Next we note that KL divergence is a convex function.
Let , , , be probability distributions on the same space . For , let and be the convex combinations interpolating between these distributions. Then, for all ,
This lemma immediately extends to convex combinations of more than two distributions.
Next we have a geometric statement about KL divergence:
Let be a family of distributions indexed by and let be a distribution on . Let denote the convex combination of the distributions weighted by . Then
Lemma 2.9 shows that the “center” of a collection of probability distributions — as measured my minimizing average KL divergence to one distribution — is none other than the mean of those distributions.
2 Mutual Information
A key quantity that we use is mutual information:
For two random variables and jointly distributed according to a distribution over , the mutual information between and is
where denotes the product of the marginal distributions of .
Note that mutual information is symmetric – .
For three random variables , , and . The mutual information between and conditioned on is given by
where is the marginal distribution of .
For random variables , , and , we have
Average KL Stability & Generalization
In this section, we cover our theoretical tools, which center around our definition of average leave-one-out KL stability, which we restate here. For a randomized algorithm and input we use denote the random variable obtained by running on on and the distribution of this random variable (according to the context).
An algorithm is -ALKL stable if, for all ,
where denotes with the element removed.
More generally, an algorithm is -ALKL stable if for every there exists an algorithm such that under the same conditions
If an algorithm is -KL stable then it is -ALKL stable.
The key property of our definition is composition. This lemma allows us to account for the accumulation of information through multiple adaptive queries. The following lemma only considers the composition of two algorithms. Induction allows this to be extended to algorithms.
Suppose is -ALKL stable and is such that is -ALKL stable for all . Then the composition is -ALKL stable.
Let and be the algorithms whose existence is assumed by Definition 3.1. Fix . By the chain rule for KL divergence (Lemma 2.2),
Another key property of our definition of average leave-one-out KL stability is postprocessing. That is, if is -ALKL stable, then applying an arbitrary function to the output of continues to be -ALKL stable. This can be seen by taking in the above composition lemma or by using the data processing inequality for KL divergence [VEH14, Theorem 1].
In order to show that our notion of average leave-one-out KL stability implies generalization, we first show that it implies a bound on mutual information:
Let be -ALKL stable. Let be a product distribution. Then .
To prove Proposition 3.4, we introduce an intermediate notion of stability that is based on that of \AtNextCite\AtEachCitekey\@nocounterrmaxnames [RRTWX16]. Specifically, mutual information stability is defined as follows.
A randomized algorithm is -MI stable if, for any random variable distributed over (including non-product distributions),
We show that mutual information stability has the following properties.
Average leave-one-out KL stability implies mutual information stability.
Mutual information stability implies a mutual information bound.
Mutual information stability composes adaptively.
Combining properties (1) and (2) yields Proposition 3.4. The adaptive composition property of mutual information stability implies that it might be useful for analysis of adaptive procedures which are not ALKL stable (although we do not use this property since ALKL stability itself composes adaptively).
If is -ALKL stable, then it also is -MI stable.
Let be a random variable distributed according to some distribution on . Let and denote the marginal distribution of and , respectively. For we use to denote the distribution of conditioned on . Now, by the definition of (conditional) mutual information,
Here refers to the vector such that and . Here the inner expectation is over drawn from the distribution of conditioned on — of the KL divergence from the distribution of to the distribution of conditioned on . The latter distribution is exactly the convex combination of the distribution of weighted by the distribution of .
Now the key observation: the convex combination — — is the distribution that minimizes the inner expectation. Hence, we can replace it by and only increase the expression. Formally, by Lemma 2.9, for all ,
Note that refers either to execution of itself or (if is not defined over inputs of length ) to the algorithms whose existence is promised by the second half of Definition 3.1. The result now follows, as we have established that
Suppose is -MI stable. Let be a distribution over and be distributed according to . Then .
Denote , and . By the chain rule for mutual information (Lemma 2.12 and induction),
By the definition of (conditional) mutual information,
Here denotes the concatenation of with . Now, by the convexity of KL divergence (Lemma 2.8), we can move the randomness of from the divergence and into the expectation. Namely,
Here we use the fact that and are convex combinations of the distribution of weighted by (note that independence is crucial here). Plugging this into eq. (5) and using the definition of (conditional) mutual information we get
Combining these (in)equalities yields the result:
Suppose is -MI stable and is such that is -MI stable for all . Then the composition is -MI stable.
Let be a random variable on and let denote the probability distribution of . By the chain rule,
The key is that the stability property holds for all distributions, which means it holds for the distribution of conditioned on . Note that if we defined mutual information stability only to quantify over product distributions, then this proof would not carry through, as conditioned on is not necessarily a product distribution anymore. ∎
A natural question to ask is whether instead of using stability notions we can directly use mutual information for our analysis. Specifically, one could prove a bound on the mutual information of adding calibrated noise and then use composition properties of mutual information to bound the error of the entire algorithm for answering adaptive queries. For this approach to work one needs to prove a bound on the mutual information of adding calibrated noise for arbitrary input distributions (or at least for all distributions that might result from conditioning on the previous answers to queries). However, it is not hard to see that for non-product distributions over mutual information can be much larger than the bounds we will get via stability. (For example if the distribution on is such that the answer to the query is with probability and with probability then adding noise with variance will reveal some positive constant amount of information. At the same time this algorithm is -KL stable so in our approach will contribute only to the final bound on mutual information.) As a result, this simpler approach is unlikely to lead to useful generalization bounds.
2 Generalization in expectation
In this section we translate an upper bound on into an upper bound on the expectation of the generalization error. As in earlier work [RZ16], our main technical tool is Corollary 2.7. However we deal with more general random variables (not just subgaussian) and also prove bounds that are scaled to standard deviation of the random variable as opposed to the subgaussian constant. In Section. 3.3 we describe an alternative approach to generalization which is based on bounding the probability of any “bad” event.
The following proposition bounds the expected generalization error.
Let be a randomized algorithm with input from and output in , where is the set of functions . Let be a distribution on and . Let . Suppose . Then
Thus it only remains to bound . We have
Let be a random variable supported on . Suppose and . Then for , .
This lemma is similar to the proof of Bernstein’s inequality [Ber24].
Since , we have for all . Thus, for all , we have
If , then , which yields the result. ∎
Proposition 3.10 gives a bound in terms of variance. Using the PAC-Bayes framework, we can also attain an additive-multiplicative bound:
Let be a randomized algorithm that takes an input from and outputs a function . Let be a distribution on and let consist of i.i.d. samples therefrom. Fix . Then
To analyse our algorithm, we also need to bound the empirical error in terms of the standard deviation. Note that the empirical error – the noise we add – scales with the empirical standard deviation. Thus we must bound the empirical variance in terms of the true variance:
Let be a randomized algorithm with input from and output in , where is the set of functions . Let be a distribution on and . Let . Suppose . Then
To prove Proposition 3.13 we make use of the following two standard facts.
Let be a random variable supported on ${\mathop{\mathbf{E}}\left[X\right]}=\sigmas\in$,
To bound we note that is determined by and . Since these are independent, we may consider an arbitrary fixed . We let denote conditioned on being equal to a fixed . We can write as a sum of independent terms , and hence . For each , we have and . Thus, by (8) (with , , and ), for .
This implies that for for every and hence under the same condition. Substituting this into eq. (9) yields
3 Preservation of low-probability events
Propositions 3.10 and 3.13 bound the expected generalization error given a bound on mutual information. An alternative approach to analysis of generalization is to use a bound on mutual information to upper bound the increase in probability of any “bad” event that results from the dependence between the dataset and algorithm’s output. Specifically, we prove the following simple lemma:
Let consist of independent samples from some distribution . Let be an independent copy of . Let and let be an event on satisfying
Intuitively, Lemma 3.14 says that if an event happens with very low probability on fresh data, then it happens with somewhat low probability on non-fresh data, as long as the mutual information between the event and the data is low. Note however, that the probability grows from to . In particular, the inverse of the probability decreases exponentially. For example, Lemma 3.14 can be used to correct a -value obtained under the assumption that the data is independent from the choice of the test (since -value is the probability that a test statistic satisfies a chosen condition) [RZ16, RRST16].
The same approach to generalization is used in [DFHPRR14, DFHPRR15, RRST16] for differential privacy and max-information and in [RZ16, RRST16] for mutual information. The bound implicit in [RZ16] is which is asymptotically worse than our bound. The bound in [RRST16] is derived by first using mutual information to bound approximate max-information [DFHPRR15]. Their approach yields the following bound
which is comparable to the bound in Lemma 3.14.
As a more concrete application, we demonstrate how Lemma 3.14 can be used to derive a bound on the probability of generalization error being large (or, equivalently, to construct a valid confidence interval for the true expectation of a real-valued function).
Recall the setting of Proposition 3.10. Here consists of independent samples from and outputs a function and has . By Bernstein’s inequality, for fresh samples (independent from ), we have
for all . Thus, by Lemma 3.14, for all ,
In our application of Proposition 3.10, we have ; setting and simplifying yields
Note that this bound appears to correspond to an application of Markov’s inequality to the conclusion Proposition 3.10. However, since the random variable in question may take both positive and negative values, Markov’s inequality cannot be applied. Namely, Lemma 3.14 corresponds to a strengthening of Proposition 3.10 that bounds the expectation of the absolute value of the random variable. This approach can also be easily used to get a bound (based on Markov’s inequality) on the tail of the largest error we state in Theorem 1.1. This follows from the fact that a high probability bound on this tail is easy to prove when the dataset is independent from the algorithm’s answers.
To prove Lemma 3.14, we observe that for any random variable and any randomized algorithm ,
Let denote the Bernoulli random variable with bias . Then for any ,
where is the binary entropy function. Rearranging yields the result. ∎
Analysis of our Algorithm
Now we assemble the tools developed in the previous section to analyse our algorithm (Figure 1). To do this we must introduce some formalisms for dealing with adaptive algorithms.
Our algorithm answers adaptively-chosen queries. We call the entity choosing these queries the analyst (or adversary to connote worst-case behaviour). The interaction between and defines a function mapping inputs (the sample) to a transcript of queries and answers. Figure 2 defines how this function is computed.
With this formalism in hand, we can extend our definition of average leave-one-out KL stability from non-interactive algorithms (Definition 1.2) to interactive algorithms:
An interactive algorithm is -ALKL stable if (as defined in Figure 2) is -ALKL stable for all interactive algorithms .
We now show that our algorithm is (interactive) average leave-one-out KL stable:
Our algorithm (Figure 1) is -ALKL stable for any and .
To establish that our algorithm is average leave-one-out KL stable, we first only consider one query . We show that, for each query , the answer given by our algorithm is -ALKL stable. Using composition (Lemma 1.3), we can extend this to queries . That is, we prove that our algorithm is -ALKL stable.
First we recall how our algorithm answers a query : The algorithm is given as input a sample and, for each statistical query the algorithm outputs a sample from where
Here are parameters controlling the accuracy-stability tradeoff.
We also consider the following quantities in the analysis so that outputs a sample from .
Before giving the full proof we give a simplified sketch.
We make three simplifications for our sketch of the analysis:
Ignore constant factors. (Take and to be sufficiently large.)
Consider instead of .
Assume and for all .
The last assumption is not really an assumption, since we perforce ensure this by using in place of and likewise for . This assumption is only to simplify notation here in this sketch.
Begin by considering a fixed index . By standard properties of the KL divergence between Gaussians (Corollary 2.4) and assuming , we have
Since we assumed (for simplicity) that takes only values and , the distribution of (for a random ) is characterized by its mean . In particular, we can express the variance as and, likewise, . Thus, we have and
where the final inequality follows from the assumptions and . Also
and, hence, (now we make critical use of the averaging ALKL stability affords us)
Combining the above equations (10,11,12) yields
as desired to show -ALKL stability. ∎
The key facts that drive this simplified proof (and which hold without the simplifying assumptions) are the KL divergence between Gaussians (10),
Indeed, we can redefine and (e.g., to answer different types of queries, rather than statistical queries) and still retain ALKL stability, as long as the above two inequalities hold.
Now we prove the general result with sharp constants. Theorem 4.2 is implied by the following result.
Let , , , and . For , define
where .
In particular, and, if and , then .
Combining (20), (15), (18), and (19), we have
2 Accuracy guarantees
Note that, by the postprocessing property of average leave-one-out KL stability, applying any function to the transcript of an average leave-one-out KL stable algorithm still is average leave-one-out KL stable. More precisely, for a -ALKL stable interactive algorithm and any interactive algorithm , the composed algorithm mapping input to output is -ALKL stable. We now invoke the generalization properties of average leave-one-out KL stability:
This follows from our generalization results (Propositions 3.10 and 3.13), postprocessing, and the connection between average leave-one-out KL stability and mutual information (Proposition 3.4). ∎
A natural choice of function is to simply pick out one of the queries — that is, for some fixed . However, can also pick out the “worst” query. For example, the monitor technique of [BNSSSU16] takes
The monitor technique allows us to reason about a single query and derive bounds that apply to all queries simultaneously as this query is the worst query. Since we have a more refined notion of error, we must use a slightly different argument.
Note that we flip the sign to ensure that the error is always positive.
Now we give a bound on the expected scaled error of our algorithm. We use the following simple technical lemma bounding the maximum of standard Gaussians.
Let be independent samples from . Then
Let and . Since is a convex function of , Jensen’s inequality gives
as and, hence, . Setting completes the proof. ∎
Fix . Let be our algorithm from Figure 1 with and that answers statistical queries given samples.
Let be a distribution on and let be an interactive algorithm that asks statistical queries. Then
where .
Set . Since and , is -ALKL stable by Theorem 4.2. Let and . Define
Let be the empirical standard deviation corresponding to the query and the sample . By Lemma 4.4,
Let be the independent standard Gaussians sampled by (Figure 1). Let if and if . By the definition of our algorithm,
Combining with (25) completes the proof. ∎
Acknowledgements
We thank Adam Smith for his suggestion to analyze the generalization of ALKL stable algorithms via mutual information. This insight greatly simplified our initial analysis and allowed us to derive additional corollaries presented in Section 3.3. We also thank Nati Srebro for pointing out the connection between our results and the PAC-Bayes generalization bounds.