What Can We Learn Privately?
Shiva Prasad Kasiviswanathan, Homin K. Lee, Kobbi Nissim, Sofya Raskhodnikova, Adam Smith
Introduction
The data privacy problem in modern databases is similar to that faced by statistical agencies and medical researchers: to learn and publish global analyses of a population while maintaining the confidentiality of the participants in a survey. There is a vast body of work on this problem in statistics and computer science. However, until recently, most schemes proposed in the literature lacked rigorous analysis of privacy and utility.
A recent line of work , initiated by Dinur and Nissim and called private data analysis, seeks to place data privacy on firmer theoretical foundations and has been successful at formulating a strong, yet attainable privacy definition. The notion of differential privacy that emerged from this line of work provides rigorous guarantees even in the presence of a malicious adversary with access to arbitrary auxiliary information. It requires that whether an individual supplies her actual or fake information has almost no effect on the outcome of the analysis.
Learning problems form an important category of computational tasks that generalizes many of the computations researchers apply to large real-life data sets. In this work, we ask what can be learned privately, namely, by an algorithm whose output does not depend too heavily on any one input or specific training example. Our goal is a broad understanding of the resources required for private learning in terms of samples, computation time, and interaction. We examine two basic notions from computational learning theory: Valiant’s probabilistically approximately correct (PAC) learning model and Kearns’ statistical query (SQ) model .
Informally, a concept is a function from examples to labels, and a class of concepts is learnable if for any distribution on examples, one can, given limited access to examples sampled from labeled according to some target concept , find a small circuit (hypothesis) which predicts ’s labels with high probability over future examples taken from the same distribution. In the PAC model, a learning algorithm can access a polynomial number of labeled examples. In the SQ model, instead of accessing examples directly, the learner can specify some properties (i.e., predicates) on the examples, for which he is given an estimate, up to an additive polynomially small error, of the probability that a random example chosen from satisfies the property. PAC learning is strictly stronger than the SQ learning .
We require a private algorithm to keep entire examples (not only the labels) confidential. In the scenario above, it translates to not revealing each participant’s gender, age, blood pressure history, and heart attack incidence. More precisely, the output of a private learner should not be significantly affected if a particular example is replaced with arbitrary , for all and . In contrast to correctness or utility, which is analyzed with respect to distribution , differential privacy is a worst-case notion. Hence, when we analyze the privacy of our learners we do not make any assumptions on the underlying distribution. Such assumptions are fragile and, in particular, would fall apart in the presence of auxiliary knowledge (also called background knowledge or side information) that the adversary might have: conditioned on the adversary’s auxiliary knowledge, the distribution over examples might look very different from .
1 Our Contributions
We introduce and formulate private learning problems, as discussed above, and develop novel algorithmic tools and bounds on the sample size required by private learning algorithms. Our results paint a picture of the classes of learning problems that are solvable subject to privacy constraints. Specifically, we provide:
A Private Version of Occam’s Razor. We present a generic private learning algorithm. For any concept class , we give a distribution-free differentially-private agnostic PAC learner for that uses a number of samples proportional to . This is a private analogue of the “cardinality version” of Occam’s razor, a basic sample complexity bound from (non-private) learning theory. The sample complexity of our version is similar to that of the original, although the private algorithm is very different. As in Occam’s razor, the learning algorithm is not necessarily computationally efficient.
An Efficient Private Learner for Parity. We give a computationally efficient, distribution-free differentially private PAC learner for the class of parity functionsWhile the generic learning result (1) extends easily to “agnostic” learning (defined below), the learner for parity does not. The limitation is not surprising, since even non-private agnostic learning of parity is at least as hard as learning parity with random noise. over . The sample and time complexity are comparable to that of the best non-private learner.
Equivalence of Local (“Randomized Response”) and SQ Learning. We precisely characterize the power of local, or randomized response, private learning algorithms. Local algorithms are a special (practical) class of private algorithms and are popular in the data mining and statistics literature . They add randomness to each individual’s data independently before processing the input. We show that a concept class is learnable by a local differentially private algorithm if and only if it is learnable in the statistical query (SQ) model. This equivalence relates notions that were conceived in very different contexts.
Separation of Interactive and Noninteractive Local Learning. Local algorithms can be noninteractive, that is, using one round of interaction with individuals holding the data, or interactive, that is, using more than one round (and in each receiving randomized responses from individuals). We construct a concept class, called masked-parity, that is efficiently learnable by interactive local algorithms under the uniform distribution on examples, but requires an exponential (in the dimension) number of samples to be learned by a noninteractive local algorithm. The equivalence (3) of local and SQ learning shows that interaction in local algorithms corresponds to adaptivity in SQ algorithms. The masked-parity class thus also separates adaptive and nonadaptive SQ learning.
The generic agnostic learner (1) has an important consequence: if some concept class is learnable by any algorithm, not necessarily a private one, whose output length in bits is polynomially bounded, then is learnable privately using a polynomial number of samples (possibly in exponential time). This result establishes the basic feasibility of private learning: it was not clear a priori how severely privacy affects sample complexity, even ignoring computation time.
There is an intuitively appealing similarity between learning from noisy examples and private learning: algorithms for both problems must be robust to small variations in the data. This apparent similarity is strengthened by a result of Blum, Dwork, McSherry and Nissim showing that any algorithm in Kearns’ statistical query (SQ) model can be implemented in a differentially private manner. SQ was introduced to capture a class of noise-resistant learning algorithms. These algorithms access their input only through a sequence of approximate averaging queries. One can privately approximate the average of a function with values in $nO(1/n)$ (Dwork and Nissim ). Thus, one can simulate the behavior of an SQ algorithm privately, query by query.
Our efficient private learner for parity (2) dispels the similarity between learning with noise and private learning. First, SQ algorithms provably require exponentially many (in the dimension) queries to learn parity . More compellingly, learning parity with noise is thought to be computationally hard, and has been used as the basis of several cryptographic primitives (e.g., ).
Local algorithms (also referred to as randomized response, input perturbation, Post Randomization Method (PRAM), and Framework for High-Accuracy Strict-Privacy Preserving Mining (FRAPP)) have been studied extensively in the context of privacy-preserving data mining, both in statistics and computer science (e.g., ). Roughly, a local algorithm accesses each individual’s data via independent randomization operators. See Figure 1, p. 1.
Local algorithms were introduced to encourage truthfulness in surveys: respondents who know that their data will be randomized are more likely to answer honestly. For example, Warner famously considered a survey technique in which respondents are asked to give the correct answer to a sensitive (true/false) question with probability and the incorrect answer with probability , in the hopes that the added uncertainty would encourage them to answer honestly. The proportion of “true” answers in the population is then estimated using a standard, non-private deconvolution. The accepted privacy requirement for local algorithms is equivalent to imposing differential privacy on each randomization operator . Local algorithms are popular because they are easy to understand and implement. In the extreme case, users can retain their data and apply the randomization operator themselves, using a physical device or a cryptographic protocol .
The equivalence between local and SQ algorithms (3) is a powerful tool that allows us to apply results from learning theory. In particular, since parity is not learnable with a small number of SQ queries but is PAC learnable privately (2), we get that local algorithms require exponentially more data for some learning tasks than do general private algorithms. Our results also imply that local algorithms are strictly less powerful than (non-private) algorithms for learning with classification noise because subexponential (non-private) algorithms can learn parity with noise .
Just as local algorithms can be interactive, SQ algorithms can be adaptive, that is, the averaging queries they make may depend on answers to previous queries. The equivalence of SQ and local algorithms (3) preserves interaction/adaptivity: a concept class is nonadaptively SQ learnable if and only if it is noninteractively locally learnable. The masked parity class (4) shows that interaction (resp., adaptivity) adds considerable power to local (resp., SQ) algorithms.
Most of the reasons that local algorithms are so attractive in practice, and have received such attention, apply only to noninteractive algorithms (interaction can be costly, complicated, or even impossible—for instance, when statistical information is collected by an interviewer, or at a polling booth).
This suggests that further investigating the power of nonadaptive SQ learners is an important problem. For example, the SQ algorithm for learning conjunctions is nonadaptive, but SQ formulations of the perceptron and -means algorithms seem to rely heavily on adaptivity.
The SQ result of Blum et al. and our learner for parity (2) provide efficient (i.e., polynomial time) private learners for essentially all the concept classes known (by us) to have efficient non-private distribution-free learners. Finding a concept class that can be learned efficiently, but not privately and efficiently, remains an interesting and important question.
Our results also lead to questions of optimal sample complexity for learning problems of practical importance. The private simulation of SQ algorithms due to Blum et al. uses a factor of approximately more data points than the naïve non-private implementation, where is the number of SQ queries and is the parameter of differential privacy (typically a small constant). In contrast, the generic agnostic learner (1) uses a factor of at most more samples than the corresponding non-private learner. For parity, our private learner uses a factor of roughly more samples than, and about the same computation time as, the non-private learner. What, then, is the additional cost of privacy when learning practical concept classes (half-planes, low-dimensional curves, etc)? Can the theoretical sample bounds of (1) be matched by (more) efficient learners?
1.2 Techniques
Our generic private learner (1) adapts the exponential sampling technique of McSherry and Talwar , developed in the context of auction design. Our use of the exponential mechanism inspired an elegant subsequent result of Blum, Liggett, and Roth (BLR) on simultaneously approximating many different functions.
The efficient private learner for parity (2) uses a very different technique, based on sampling, running a non-private learner, and occasionally refusing to answer based on delicately calibrated probabilities. Running a non-private learner on a random subset of examples is a very intuitive approach to building private algorithms, but it is not private in general. The private learner for parity illustrates both why this technique can leak private information and how it can sometimes be repaired based on special (in this case, algebraic) structure.
The interesting direction of the equivalence between SQ and local learners (3) is proved via a simulation of any local algorithm by a corresponding SQ algorithm. We found this simulation surprising since local protocols can, in general, have very complex structure (see, e.g., ). The SQ algorithm proceeds by a direct simulation of the output of the randomization operators. For a given input distribution and any operator , one can sample from the corresponding output distribution via rejection sampling. We show that if is differentially private, the rejection probabilities can be approximated via low-accuracy SQ queries to .
Finally, the separation between adaptive and nonadaptive SQ (4) uses a Fourier analytic argument inspired by Kearns’ SQ lower bound for parity .
1.3 Classes of Private Learning Algorithms
We can summarize our results via a complexity-theoretic picture of learnable and privately learnable concept classes (more precisely, the members of the classes are pairs of concept classes and example distributions). In order to make asymptotic statements, we measure complexity in terms of the length of the binary description of examples.
We first consider learners that use a polynomial (in ) number of samples and output a hypothesis that is described using a polynomial number of bits, but have unlimited computation time. Let denote the set of concept classes that are learnable by such algorithms ignoring privacy, and let denote the subset of learnable by differentially privateDifferential privacy is quantified by a real parameter . To make qualitative statements, we look at algorithms where as . Taking for any constant would yield the same class. algorithms.
Since we restrict the learner’s output to a polynomial number of bits, the hypothesis classes of the algorithms are de facto limited to have size at most . Thus, the generic private learner (point (1) in the introduction) will use a polynomial number of samples, and .
We can similarly interpret the other results above. Within , we can consider subsets of concepts learnable by SQ algorithms (), nonadaptive SQ algorithms (), local interactive algorithms () and local noninteractive algorithms (). We obtain the following picture (see page 2):
The equality of and , and of and , follow from the SQ simulation of local algorithms (Theorem 5.14). The parity and masked-parity concept classes separate from and from , respectively (Corollaries 5.15 and 5.17). (Note: The separation of from holds even for distribution-free learning; in contrast, the separation of from holds for learnability under a specific distribution on examples, since the adaptive SQ learner for MASKED-PARITY requires a uniform distribution on examples.)
When we take computational efficiency into account, the picture changes. The relation between local and SQ classes remain the same modulo a technical restriction on the randomization operators (Definition 5.13). SQ remains distinct from PPAC since parity is efficiently learnable privately. However, it is an open question whether concept classes which can be efficiently learned can also be efficiently learned privately.
2 Related Work
Prior to this work, the literature on differential privacy studied function approximation tasks (e.g. ), with the exception of the work of McSherry and Talwar on mechanism design . Nevertheless, several of these prior results have direct implications to machine learning-related problems. Blum et al. considered a particular class of learning algorithms (SQ), and showed that algorithms in the class could be simulated using noisy function evaluations. In an independent, unpublished work, Chaudhuri, Dwork, and Talwar considered a version of private learning in which privacy is afforded only to input labels, but not to examples. Other works considered specific machine learning problems such as mining frequent itemsets , -means clustering , learning decision trees , and learning mixtures of Gaussians .
As mentioned above, a subsequent result of Blum, Ligett and Roth on approximating classes of low-VC-dimension functions was inspired by our generic agnostic learner. We discuss their result further in Section 3.1. Since the original version of our work, there have also been several results connecting differential privacy to more “statistical” notions of utility, such as consistency of point estimation and density estimation .
Our separation of interactive and noninteractive protocols in the local model (3) also has a precedent: Dwork et al. separated interactive and noninteractive private protocols in the centralized model, where the user accesses the data via a server that runs differentially private algorithms on the database and sends back the answers. That separation has a very different flavor from the one in this work: any example of a computation that cannot be performed noninteractively in the centralized model must rely on the fact that the computational task is not defined until after the first answer from the server is received. (Otherwise, the user can send an algorithm for that task to the server holding the data, thus obviating the need for interaction.) In contrast, we present a computational task that is hard for noninteractive local algorithms – learning masked parity – yet is defined in advance.
In the machine learning literature, several notions similar to differential privacy have been explored under the rubric of “algorithmic stability” . The most closely related notion is change-one error stability, which measures how much the generalization error changes when an input is changed (see the survey ). In contrast, differential privacy measures how the distribution over the entire output changes—a more complex measure of stability (in particular, differential privacy implies change-one error stability). A different notion, stability under resampling of the data from a given distribution , is connected to the sample-and-aggregate method of but is not directly relevant to the techniques considered here. Finally, in a different vein, Freund, Mansour and Schapire used a weighted averaging technique with the same weights as the sampler in our generic learner to reduce generalization error (see Section 3.1).
Preliminaries
A (randomized) algorithm (in our context, this will usually be a learning algorithm) is private if neighboring databases induce nearby distributions on its outcomes:
The probability is taken over the random coins of .
In , the notion above was called “indistinguishability”. The name “differential privacy” was suggested by Mike Schroeder, and first appeared in Dwork .
Differential privacy composes well (see, e.g., ):
One method for obtaining efficient differentially private algorithms for approximating real-valued functions is based on adding Laplacian noise to the true answer. Let denote the Laplace probability distribution with mean , standard deviation , and p.d.f. .
2 Preliminaries from Learning Theory
Let be a distribution over labeled examples in . A learning algorithm is given access to (the method for accessing depends on the type of learning algorithm). It outputs a hypothesis from a hypothesis class . The goal is to minimize the misclassification error of on , defined as
The success of a learning algorithm is quantified by parameters and , where is the desired error and bounds the probability of failure to output a hypothesis with this error. Error measures other than misclassification are considered in supervised learning (e.g., ). We study only misclassification error here, since for binary labels it is equivalent to the other common error measures.
PAC learning algorithms are frequently designed assuming a promise that the examples are labeled consistently with some target concept from a class : namely, and for all in the support of . In that case, we can think of as a distribution only over examples . To avoid ambiguity, we use to denote a distribution over . In the PAC setting,
Class is (inefficiently) PAC learnable if there exists some hypothesis class and a PAC learner such that PAC learns using . Class is efficiently PAC learnable if runs it time polynomial in , and
Remark: Our definition deviates slightly from the standard one (see, e.g., ) in that we do not take into consideration the size of the concept . This choice allows us to treat PAC learners and agnostic learners identically. One can change Definition 2.4 so that the number of samples depends polynomially also on the size of without affecting any of our results significantly.
Agnostic learning is an extension of PAC learning that removes assumptions about the target concept. Roughly speaking, the goal of an agnostic learner for a concept class is to output a hypothesis whose error with respect to the distribution is close to the optimal possible by a function from . In the agnostic setting, .
(Efficiently) agnostically learnable is defined identically to (efficiently) PAC learnable with two exceptions: (i) the data are drawn from an arbitrary distribution on ; (ii) instead of Equation 1, the output of has to satisfy:
Definitions 2.4 and 2.5 capture distribution-free learning, in that they do not assume a particular form for the distributions or . In Section 5.3, we also consider learning algorithms that assume a specific distribution on examples (but make no assumption on which concept in labels the examples). When we discuss such algorithms, we specify explicitly; without qualification, “learning” refers to distribution-free learning.
The definitions above are sufficiently detailed to allow for exact complexity statements (e.g., “ learns using examples and time ”), and the upper and lower bounds in this paper are all stated in this language. However, we also focus on two broader measures to allow for qualitative statements: (a) polynomial sample complexity is the default notion in our definitions. With the novel restriction of privacy, it is not a priori clear which concept classes can be learned using few examples even if we ignore computation time. (b) We use the term efficient private learning to impose the additional restriction of polynomial computation time (which implies polynomial sample complexity).
Private PAC and Agnostic Learning
We define private PAC learners as algorithms that satisfy definitions of both differential privacy and PAC learning. We emphasize that these are qualitatively different requirements. Learning must succeed on average over a set of examples drawn i.i.d. from (often under the additional promise that is consistent with a concept from a target class). Differential privacy, in contrast, must hold in the worst case, with no assumptions on consistency.
For all , algorithm is -differentially private (Definition 2.1);
Algorithm PAC learns using (Definition 2.4).
is efficiently privately PAC learnable if runs in time polynomial in , and
(Efficient) private agnostic learning is defined analogously to (efficient) private PAC learning with Definition 2.5 replacing Definition 2.4 in the utility condition.
Evaluating the quality of a particular hypothesis is easy: one can privately compute the fraction of the data it classifies correctly (enabling cross-validation) using the sum query framework of . The difficulty of constructing private learners lies in finding a good hypothesis in what is typically an exponentially large space.
In this section, we present a private analogue of a basic consistent learning result, often called the cardinality version of Occam’s razorWe discuss the relationship to the “compression version” of Occam’s razor at the end of this section.. This classical result shows that a PAC learner can weed out all bad hypotheses given a number of labeled examples that is logarithmic in the size of the hypothesis class (see [42, p. 35]). Our generic private learner is based on the exponential mechanism of McSherry and Talwar .
Since the score ranges from to 0, hypotheses with low empirical error are exponentially more likely to be selected than ones with high error.
The algorithm is -differentially private.
For all , any concept class whose cardinality is at most is privately agnostically learnable using . More precisely, the learner uses labeled examples from , where , and are parameters of the private learner. (The learner might not be efficient.)
Let be as defined above. The privacy condition in Definition 3.1 is satisfied by Lemma 3.3.
By Chernoff-Hoeffding bounds (see Theorem A.2 in Appendix A),
for all hypotheses . Hence,
Now set . If then or . Thus where the last inequality holds for . ∎
Remark: In the non-private agnostic case, the standard Occam’s razor bound guarantees that labeled examples suffice to agnostically learn a concept class . The bound of Theorem 3.4 differs by a factor of if , and does not differ at all otherwise. For (non-agnostic) PAC learning, the dependence on in the sample size for both the private and non-private versions improves to . In that case the upper bounds for private and non-private learners differ by a factor of . Finally, the theorem can be extended to settings where , but in this case using the same sample complexity the learner outputs a hypothesis whose error is close to the best error attainable by a function in .
The private agnostic learner has the following important consequence: If some concept class is learnable by any algorithm , not necessarily a private one, and ’s output length in bits is polynomially bounded, then there is a (possibly exponential time) private algorithm that learns using a polynomial number of samples. Since ’s output is polynomially long, ’s hypothesis class must have size at most . Since learns using , class must contain a good hypothesis. Thus, our private learner will learn using with sample complexity linear in .
It is most natural to state our result as an analogue of the cardinality version of Occam’s razor, which bounds generalization error in terms of the size of the hypothesis class. However, our result can be extended to the compression version, which captures the general relationship between compression and learning (we borrow the “cardinality version” terminology from ). This latter version states that any algorithm which “compresses” the data set, in the sense that it finds a consistent hypothesis which has a short description relative to the number of samples seen so far, is a good learner (see and [42, p. 34]).
Compression by itself does not imply privacy, because the compression algorithm’s output might encode a few examples in the clear (for example, the hyperplane output by a support vector machine is defined via a small number of actual data points). However, Theorem 3.4 can be extended to provide a private analogue of the compression version of Occam’s razor. If there exists an algorithm that compresses, in the sense above, then there also exists a private PAC learner which does not have fixed sample complexity, but uses an expected number of samples similar to that of the compression algorithm. The private learner proceeds in rounds: at each round it requests twice as many examples as in the previous round, and uses a restricted hypothesis class consisting of sufficiently concise hypotheses from the original class . We omit the straightforward details.
2 Private Learning with VC dimension Sample Bounds
In the non-private case one can also bound the sample size of a PAC learner in terms of the Vapnik-Chervonenkis (VC) dimension of the concept class.
A set is shattered by a concept class if restricted to contains all possible functions from to . The VC dimension of , denoted , is the cardinality of a largest set shattered by .
We can extend Theorem 3.4 to classes with finite VC dimension, but the resulting sample complexity also depends logarithmically on the size of the domain from which examples are drawn. Recent results of Beimel et al. show that for “proper” learning, the dependency is in fact necessary; that is, the VC dimension alone is not sufficient to bound the sample complexity of proper private learning. It is unclear if the dependency is necessary in general.
Every concept class is privately agnostically learnable using hypothesis class with labeled examples from . Here, , and are parameters of the private agnostic learner, and is the VC dimension of . (The learner is not necessarily efficient.)
Sauer’s lemma (see, e.g., ) implies that there are different labelings of by functions in . We can thus run the generic learner of the previous section with a hypothesis class of size . The statement follows directly. ∎
Our original proof of the corollary used a result of Blum, Ligget and Roth (which was inspired, in turn, by our generic learning algorithm) on generating synthetic data. The simpler proof above was pointed out to us by an anonymous reviewer.
In their full generality, the generic learning results of the previous sections (Theorems 3.4 and 3.6) produce well-defined randomized maps, but not necessarily “algorithms” in the sense of “functions uniformly computable by Turing machines”. This is because the concept class and example domain may themselves not be computable (nor even recognizable) uniformly (imagine, for example, a concept class indexed by elements of the halting problem). It is commonly assumed in the learning literature that elements of the concept class and domain can be computed/recognized by a Turing machine and some bound on the length of their binary representations is known. In this case, the generic learners can be implemented by randomized Turing machines with finite expected running time.
An Efficient Private Learner for PARITY
Let PARITY be the class of parity functions indexed by , where denotes the inner product modulo . In this section, we present an efficient private PAC learning algorithm for PARITY. The main result is stated in Theorem 4.4.
The proof of ’s utility follows by considering all the possible situations in which the algorithm fails to satisfy the error bound, and by bounding the probabilities with which these situations occur.
By standard arguments in learning theory , labeled examples are sufficient for learning PARITY with error and failure probability . Since adds each element of to independently with probability , the expected size of is . By the Chernoff bound (Theorem A.1), with probability at least . We set and pick such that .
Algorithm is -differentially private.
As mentioned above, the key observation in the following proof is that including of any single point in the sample set increases the probability of a hypothesis being output by at most 2.
This claim is proved below. For now, we can plug it into Eqn. (4) to get
The first inequality holds since and . This establishes Eqn. (2). The proof of Eqn. (3) is similar:
In the last line, the first inequality follows from the fact that on any input, outputs with probability at least . This completes the proof of the lemma. ∎
The last inequality holds because in 2 (the finite field with 2 elements where arithmetic is performed modulo 2), adding a consistent linear constraint either reduces the space of solutions by a factor of 2 (if the constraint is linearly independent from ) or does not change the solutions space (if it is linearly dependent on the previous constraints). The constraint indexed by has to be consistent with constraints indexed by , since both probabilities are not . ∎
It remains to amplify the success probability of . To do so, we construct a private version of the standard (non-private) algorithm for amplifying a learner’s success probability. The standard amplification algorithm generates a set of hypotheses by invoking multiple times on independent examples, and then outputs a hypothesis from the set with the least training error as evaluated on a fresh test set (see for details). Our private amplification algorithm differs from the standard algorithm only in the last step: it adds Laplacian noise to the training error to obtain a private version of the error, and then uses the perturbed training error instead of the true training error to select the best hypothesis from the set. Alternatively, we could use the generic learner from Theorem 3.4 to select among the candidate hypotheses; the resulting algorithm has the same asymptotic behavior as the algorithm we discuss here. We chose the algorithm that we felt was simplest. Recall that denotes the Laplace probability distribution with mean , standard deviation , and p.d.f. .
Algorithm efficiently and privately PAC learns PARITY (according to Definition 3.1) with samples.
The theorem follows from Lemmas 4.5 and 4.6 that, respectively, prove privacy and utility of .
Algorithm is -differentially private.
We prove that even if released all hypotheses , computed in Step 5, together with the corresponding perturbed error estimates , it would still be -differentially private. Since the output of can be computed solely from this information, Claim 2.2 implies that is -differentially private.
PAC learns PARITY with sample complexity .
Consider the set of candidate hypotheses output by the invocations of inside of . We call a hypothesis good if . We call a hypothesis bad if . Note that good and bad refer to a hypothesis’ true error rate on the underlying distribution.
With probability at least , one of the invocations of outputs a good hypothesis.
Conditioned on any particular outcome of the invocations of , with probability at least , both:
Every good hypothesis in has training error .
Every bad hypothesis in has training error .
Conditioned on any particular hypotheses and training errors , with probability at least , for all simultaneously, .
Suppose the events described in the three claims above all occur. Then some good hypothesis has perturbed training error less than , yet all bad hypotheses have perturbed training error greater than . Thus, the hypothesis with minimal perturbed error is not bad, that is, has true error at most . By the claims above, the probability that all three events occur is at least , and so the lemma holds. We now prove the claims.
Second, fix a particular sequence of candidate hypotheses . For each , the training error is the average of Bernouilli trials, each with success probability . (Crucially, the training set is independent of the data used to find the candidate hypotheses). To bound the training error, we apply the multiplicative Chernoff bound (Theorem A.1) with and . Here, if is good, and if is bad.
By the multiplicative Chernoff bound (Theorem A.1) if (for appropriate constant ), then
By a union bound, all the training errors are (simultaneously) approximately correct, with probability at least .
Finally, we prove the third claim. Consider a particular candidate hypothesis . If (for appropriate constant ), then (by using the c.d.f.The cumulative distribution function of the Laplacian distribution is if and if . of the Laplacian distribution)
By a union bound, all perturbed estimates are within of their correct value with probability at least . This probability is taken over the choice of Laplacian noise, and so the bound holds independently of the particular hypotheses or their training error estimates. ∎
Remark: In the non-private case labels are sufficient for learning PARITY. Theorem 4.4 shows that the upper bounds on the sample size of private and non-private learners differ only by a factor of .
Local Protocols and SQ learning
In this section, we relate private learning in the local model to the SQ model of Kearns . We first define the two models precisely. We then prove their equivalence (Section 5.1), and discuss the implications for learning (Section 5.2). Finally, we define the concept class MASKED-PARITY and prove that it separates interactive from noninteractive local learning (Section 5.3).
An -local randomizer is an -differentially private algorithm that takes a database of size . That is, for all and all . The probability is taken over the coins of (but not over the choice of the input).
Note that since a local randomizer works on a data set of size , and are neighbors for all . Thus, this definition is consistent with our previous definition of differential privacy.
By Claim 2.2, -local algorithms are -differentially private.
In the statistical query (SQ) model, algorithms access statistical properties of a distribution rather than individual examples.
Let be a distribution over a domain . An SQ oracle takes as input a function and a tolerance parameter ; it outputs such that:
An SQ algorithm accesses the distribution via the SQ oracle . SQ algorithms that prepare all their queries to before receiving any answers are called nonadaptive; otherwise, they are called adaptive.
Note that we do not restrict to be efficiently computable. We will distinguish later those algorithms that only make queries to efficiently computable functions .
1 Equivalence of Local and SQ Models
Blum et al. used the fact that sum queries can be answered privately with little noise to show that any efficient SQ algorithm can be simulated privately and efficiently. We show that it can be simulated efficiently even by a local algorithm, albeit with slightly worse parameters.
Furthermore, the simulation is noninteractive if the original SQ algorithm is nonadaptive. The simulation is efficient if is efficient.
1.2 Simulation of Local Algorithms by SQ Algorithms
The idea behind the simulation is to sample from a distribution that is within small statistical distance of . We start by applying to an arbitrary input (say, 0) in the domain and obtaining a sample . Let (where the probability is taken only over randomness in ). Since is -differentially private, approximates within a multiplicative factor of . To sample from we use the following rejection sampling algorithm: (i) sample according to ; (ii) with probability , output ; (iii) with the remaining probability, repeat from (i).
To carry out this strategy, we must be able to estimate , which depends on the (unknown) distribution , using only SQ queries. The rough idea is to express as the expectation, taken over , of the function (where the probability is taken only over the coins of ). We can use as the basis of an SQ query. In fact, to get a sufficiently accurate approximation, we must rescale the function somewhat, and keep careful track of the error introduced by the SQ oracle. We present the details in the proof of the following lemma:
We split the simulation over Claims 5.9 and 5.10. In the first claim we simulate noninteractive local algorithms using nonadaptive SQ algorithms. In the second claim we simulate interactive local algorithms using adaptive SQ algorithms.
We show how to simulate an -local randomizer using statistical queries to . Because the local algorithm is non-interactive, we can assume without loss of generality that it accesses each entry only once. (Otherwise, one can combine different operators, used to access , by combining their answers into a vector). Given , we want to sample with probability:
We construct an algorithm that given , , and access to the SQ oracle, outputs , such that the statistical difference between the output probability distributions of and the simulated randomizer is at most . Because the local algorithm makes queries, the overall statistical distance between the output distribution of the local algorithm and the distribution resulting from the simulation is at most , as desired.
An SQ algorithm that simulates an -local randomizer . 1. Sample . Let . 2. Define by , and let . 3. Query the SQ oracle , and let . 4. With probability , output . With the remaining probability, repeat from Step 1.
We now show that the statistical distance between the output of and the distribution is at most . As mentioned above, our initial approximation of in Step 1 is obtained by applying to some arbitrary input (namely, 0) in the domain and sampling . Since is -differentially private, approximates within a multiplicative factor of .
However, to carry out the rejection sampling strategy, we need to get a much better estimate of . Steps 2 and 3 compute such an estimate, , satisfying (with probability 1)
We establish the inclusion (5) below. For now, assume it holds on every iteration. Step 4 is a rejection sampling step which ensures that the output will follow a distribution close to . Inclusion (5) guarantees that is at most 1, so the probability in Step 4 is well defined. The difficulty is that the quantity is not a well-defined function of : it depends on the SQ oracle and may vary, for the same , from iteration to iteration.
Nevertheless, is fixed for any given iteration of the algorithm. In the given iteration, any particular element gets output with probability . The probability that the given iteration terminates (i.e., outputs some ) is then . By (5), this probability is in . Thus, conditioned on the iteration terminating, element is output with probability . Since , we can simplify this to get
This implies that no matter which iteration produces output, the statistical difference between the distribution of and will be at most , as desired.
Moreover, since each iteration terminates with probability at least , the expected number of iterations is at most . Thus, the total expected SQ query complexity of the simulation is .
Plugging in the bounds for and we get that where . This establishes (5) and concludes the proof. ∎
As in the previous claim, we show how to simulate the output of the local randomizers during the run of the local algorithm. A difference, however, is that because an entry may be accessed multiple times, we have to condition our sampling on the outcomes of previous (simulated) applications of local randomizers to .
More concretely, let be the sequence of randomizers that access the entry . To simulate , we must take into account the answers given by the simulations of . We show how to do this using adaptive statistical queries to . The notation is the same as in Claim 5.9. We want to output with probability
where () denotes the th randomizer applied to .
As before, we start by sampling . Let . Note that approximates within a multiplicative factor of because are respectively -,-differentially private, and . Hence, we can use the rejection sampling algorithm as in Claim 5.9. Rewrite :
Conditioned on a particular value of , the probabilities in the last expression depend only the coins of the randomizers. The outputs of the randomizers are independent conditioned on , and therefore we can simplify the expression above:
Let and denote the numerator and denominator, respectively, in the right hand side of the equation above. Let and denote the values inside the expectations that define and , respectively. Namely,
Let be the number of queries made by . Setting guarantees that the statistical difference between distributions and is at most , and hence the statistical difference between ’s and ’s output distributions is at most . As in Claim 5.9, the expected number of SQ queries for rejection sampling is . ∎
Note that the efficiency of the constructions in Lemma 5.8 depends on the efficiency of computing the functions submitted to the SQ oracle, e.g., the efficiency of computing the probability . We discuss this issue in the next section.
2 Implications for Local Learning
In this section, we define learning in the local and SQ models. The equivalence of the two models follows from the simulations described in the previous sections. An immediate but important corollary is that local learners are strictly less powerful than general private learners.
In order to state the equivalence between SQ and local learning, we require the following efficiency condition for a local randomizer.
Let be an -local randomizer. The randomizer is transparent if both: (i) for all inputs , the time needed to evaluate ; and (ii) for all inputs and outputs the time taken to compute the probability , are polynomially bounded in the size of the input and .
As stated, this definition requires exact computation of probabilities. This may not make sense on a finite-precision machine, since for many natural randomizers the transition probabilities are irrational. One can relax the requirement to insist that relevant probabilities are computable with additive error at most in time polynomial in .
All local protocols that have appeared in the literature are transparent, at least in this relaxed sense.
In the equivalences of the previous sections, transparency of local randomizers corresponds directly to efficient computability of the function in an SQ query. To see why, consider first the simulation of SQ algorithms by local algorithms: if the original SQ algorithm is efficient (that is, query can be evaluated in polynomial time) then the local randomizer can also be evaluated in polynomial time for all . Furthermore, it is simple to estimate for all inputs and outputs the probability since is a Laplacian random variable with known parameters. Second, in the SQ simulation of a local algorithm, the functions that are constructed can be evaluated efficiently precisely when the local randomizers are transparent.
We can now state the main result of this section, which follows from Lemmas 5.6 and 5.8, along with the correspondence between transparent randomizers and efficient SQ queries.
Furthermore, the simulations guarantee the following additional properties: (i) an efficient SQ learner is simulatable by an efficient local learner that uses only transparent randomizers; (ii) an efficient local learner that uses only transparent randomizers is simulatable by an efficient SQ learner; (iii) a nonadaptive SQ (resp. noninteractive local) learner is simulatable by a noninteractive local (resp. nonadaptive SQ) learner.
Now we can use lower bounds for SQ learners for PARITY (see, e.g., ) to demonstrate limitations of local learners. The lower bound of rules out SQ learners for PARITY that use at most queries of tolerance at least , even (a) allowing for unlimited computing time, (b) under the restriction that examples be drawn from the uniform distribution and (c) allowing a small probability of error (see Footnote 6). Since PARITY is (efficiently) privately learnable (Theorem 4.4), and since local learning is equivalent to SQ learning, we obtain:
Concept classes learnable by local learners are a strict subset of concept classes PAC learnable privately. This holds both with and without computational restrictions.
3 The Power of Interaction in Local Protocols
To complete the picture of locally learnable concept classes, we consider how interaction changes the power of local learners (and, equivalently, how adaptivity changes SQ learning). As mentioned in the introduction, interaction is very costly in typical applications of local algorithms. We show that this cost is sometimes necessary, by giving a concept class that an interactive algorithm can learn efficiently with a polynomial number of examples drawn from the uniform distribution, but for which any noninteractive algorithm requires an exponential number of examples under the same distribution.
Let MASKED-PARITY be the class of functions indexed by and :
where denotes the inner product of and modulo , and is the th bit of . This concept class divides the domain into two parts (according to the last bit, ). When , the concept behaves either like the PARITY concept indexed by , or like its negation, according to the bit (the “mask”). When , the concept essentially ignores the input example and outputs some bit of the parity vector .
Below, we consider the learnability of when the examples are drawn from the uniform distribution over the domain . In Section 5.3.1, we give a adaptive SQ learner for MASKED-PARITY under the uniform distribution. The adaptive learner uses two rounds of communication with the SQ oracle: the first, to learn from the half of the input, and the second, to retrieve the bit from the half of the input via queries that depend on .
In Section 5.3.2, we show that no nonadaptive SQ learner which uses examples can consistently produce a hypothesis that labels significantly more than of the domain correctly. The intuition is that as the queries are prepared nonadaptively, any information about gained from the half of the inputs cannot be used to prepare queries to the half. Since information about is contained only in the half, in order to extract , the SQ algorithm is forced to learn PARITY, which it cannot do with few examples. Our separation in the SQ model directly translates to a separation in the local model (using Theorem 5.14).
The following theorem summarizes our results.
There exists an efficient adaptive SQ learner for MASKED-PARITY over the uniform distribution.
No nonadaptive SQ learner can learn MASKED-PARITY (with a polynomial number of queries) even under the uniform distribution on examples. Specifically, there is an SQ oracle such that any nonadaptive SQ learner that makes queries to over the uniform distribution, all with tolerance at least , satisfies the following: if the concept is drawn uniformly at random from the set of MASKED-PARITY concepts, then, with probability at least over , the output hypothesis of the learner has .
The concept classes learnable by nonadaptive SQ learners (resp. noninteractive local learners) under the uniform distribution are a strict subset of the concept classes learnable by adaptive SQ learners (resp. interactive local learners) under the uniform distribution. This holds both with and without computational restrictions.
The learning theory literature distinguishes between strong learning, in which the learning algorithm is required to produce hypotheses with arbitrarily low error (as in Definition 2.4, where the parameter can be arbitrarily small), and weak learning, in which the learner is only required to produce a hypothesis with error bounded below by a polynomially small margin. The separation proved in this section (Theorem 5.16) applies only to strong learning: although no nonadaptive SQ learner can produce a hypothesis with error much better than , it is simple to design a nonadaptive weak SQ learner for MASKED-PARITY under the uniform distribution with error exactly 1/4.
In fact, it is impossible to obtain an analogue of our separation for weak learning. The characterization of SQ learnable classes in terms of “SQ dimension” by Blum et al. implies that adaptive and nonadaptive SQ algorithms are equivalent for weak learning. This is not explicit in , but follows from the fact that the weak learner constructed for classes with low SQ dimension is non-adaptive. (Roughly, the learner works by checking if the concept at hand is approximately equal to one of a polynomial number of alternatives; these alternatives depend on the input distribution and the concept class, but not on the particular concept at hand.)
The results of this section concern the learnability of MASKED-PARITY under the uniform distribution. The class MASKED-PARITY does not separate adaptive from nonadaptive distribution-free learners, since MASKED-PARITY cannot be learned by any SQ learner under the distribution which is uniform over examples with (in that case, learning MASKED-PARITY is equivalent to learning PARITY under the uniform distribution). Separating adaptive from nonadaptive distribution-free SQ learning remains an open problem.
3.1 An Adaptive Strong SQ Learner for MASKED-PARITY over the Uniform Distribution
Our adaptive learner for MASKED-PARITY uses two rounds of communication with the SQ oracle: first, to learn from the half of the input, and second, to retrieve the bit from the half of the input via queries that depend on . Theorem 5.16, part (1), follows from the proposition below.
Adaptive SQ Learner for MASKED-PARITY over the Uniform Distribution 1. For (in parallel) (a) Define by where , , , and . (b) where , and 2. (a) (b) Define by where , , , and . (c) , and (d) Output
The algorithm efficiently learns MASKED-PARITY (with probability 1) in 2 rounds using SQ queries computed over the uniform distribution with minimum tolerance .
Consider the queries in the first round. If , then
Note that the functions are all computable in time , and the computations performed by can be done in time , so the SQ learner is efficient. ∎
3.2 Impossibility of non-adaptive SQ learning for MASKED-PARITY
The impossibility result (Theorem 5.16, part (2)) for nonadaptive learners uses ideas from statistical query lower bounds (see, e.g., ).
Recall that the distribution is uniform over . For functions , recall that . Define the inner product of and as:
The quantity measures the correlation between and when is drawn from the uniform distribution .
Let the target function be chosen uniformly at random from the set . Consider a nonadaptive SQ algorithm that makes queries . The queries must be independent of and since the learner is nonadaptive. The only information about is in the outputs associated with the half of the inputs (recall that when ).
The main technical part of the proof follows the lower bound on SQ learning of PARITY. Using Fourier analysis, we split the true answer to a query into three components: a component that depends on the query but not the pair , a component that depends on and (but not ), and a component that depends on , and (see Equation (11) below). We show that for most target concepts the last component can be ignored by the SQ oracle. That is, a very close approximation to the correct output to the SQ queries made by the learner can be computed solely based on and . Consequently, for most target concepts , the SQ oracle can return answers that are independent of , and hence cannot be learned.
Consider a statistical query . For some , the value of depends on the label (i.e., ) and otherwise is insensitive to the label (i.e., ). Every statistical query can be decomposed into a label-independent and label-dependent part. This fact was first implicitly noted by Blum et al. and made explicit by Bshouty and Feldman (Lemma 30). We adapt the proof presented in for our purpose.
We can rewrite the expectation of on any concept in terms of these quantities:
Note that depends on the statistical query , but not on the target function. We now wish to analyze the second term, , more precisely. To this end, we define the following functions parameterized by :
Recall that is a sum over tuples . We can separate the sum into two pieces: one with tuples where and the other with tuples where . Using the functions just defined, we can write . Hence,
The inner product depends on the statistical query and on , but not on . Thus only the middle term on the righthand side of (11) depends on .
Consider an SQ oracle that responds to every query as follows (recall that is the uniform distribution):
If the condition is met for all the queries made by the learner, then the SQ oracle never replies with a quantity that depends on . We now show that this is typically the case.
Extend the definition of (Equation 10) to any by defining
Note that for and ,
Expanding the function in the orthonormal set , we get:
(The first inequality is loose in general because the set spans a subset of dimension whereas is taken from a space of dimension ). Similarly,
Summing the two previous equations, we get
Hence, at most functions can have . Since was chosen uniformly at random we can restate this: for any particular query , the probability that has inner product more than with is at most . This is true regardless of : since , we have , so the event that happens with probability at most over , for .
Recall that the learner makes queries, . Let be the event that for all (i.e., the oracle can answer each of the queries independently of ). Taking a union bound over queries, we have (where the probability is taken only over ).
We argued above that there is a valid SQ oracle which, conditioned on , can be simulated using but without knowledge of , as long as all queries are made with tolerance (as in the theorem statement). To conclude the proof, we now argue that no nonadaptive strong learner exists for MASKED-PARITY over the uniform distribution. For that we concentrate on the half of the inputs, where the outcome of depends on . Let be the output hypothesis of the learner. For any input we have . Thus either or , and so some choice of causes the error of to be at least .
Let be the event that . Because depends only on , we can think of as being selected after the learner’s hypothesis whenever occurs. Thus, . Using to denote the complement of the event , we get
Therefore, , as desired. ∎
Acknowledgments
We thank Enav Weinreb for many discussions related to the local model, Avrim Blum and Rocco Servedio for discussions about related work in learning theory, and Katrina Ligett and Aaron Roth for discussions about . We also thank an anonymous reviewer for useful comments on the paper and, in particular, for the simple proof of Theorem 3.6.
References
Appendix A Concentration Bounds
We need several standard tail bounds in this paper.
Let be i.i.d. Bernoulli random variables with . Then for every ,
Let be i.i.d. random variables drawn from (i.e., with probability density ). Then for every ,
The proof of this lemma is standard; we include it here since we were unable to find an appropriate reference.
Let . By the Markov inequality, for all ,