Scalable Private Learning with PATE

Nicolas Papernot, Shuang Song, Ilya Mironov, Ananth Raghunathan, Kunal Talwar, Úlfar Erlingsson

Introduction

Many attractive applications of modern machine-learning techniques involve training models using highly sensitive data. For example, models trained on people’s personal messages or detailed medical information can offer invaluable insights into real-world language usage or the diagnoses and treatment of human diseases (McMahan et al., 2017; Liu et al., 2017). A key challenge in such applications is to prevent models from revealing inappropriate details of the sensitive data—a non-trivial task, since models are known to implicitly memorize such details during training and also to inadvertently reveal them during inference (Zhang et al., 2017; Shokri et al., 2017).

Recently, two promising, new model-training approaches have offered the hope that practical, high-utility machine learning may be compatible with strong privacy-protection guarantees for sensitive training data (Abadi et al., 2017). This paper revisits one of these approaches, Private Aggregation of Teacher Ensembles, or PATE (Papernot et al., 2017), and develops techniques that improve its scalability and practical applicability. PATE has the advantage of being able to learn from the aggregated consensus of separate “teacher” models trained on disjoint data, in a manner that both provides intuitive privacy guarantees and is agnostic to the underlying machine-learning techniques (cf. the approach of differentially-private stochastic gradient descent (Abadi et al., 2016)). In the PATE approach multiple teachers are trained on disjoint sensitive data (e.g., different users’ data), and uses the teachers’ aggregate consensus answers in a black-box fashion to supervise the training of a “student” model. By publishing only the student model (keeping the teachers private) and by adding carefully-calibrated Laplacian noise to the aggregate answers used to train the student, the original PATE work showed how to establish rigorous (ε,δ)(\varepsilon,\delta) differential-privacy guarantees (Papernot et al., 2017)—a gold standard of privacy (Dwork et al., 2006). However, to date, PATE has been applied to only simple tasks, like MNIST, without any realistic, larger-scale evaluation.

The techniques presented in this paper allow PATE to be applied on a larger scale to build more accurate models, in a manner that improves both on PATE’s intuitive privacy-protection due to the teachers’ independent consensus as well as its differential-privacy guarantees. As shown in our experiments, the result is a gain in privacy, utility, and practicality—an uncommon joint improvement.

The primary technical contributions of this paper are new mechanisms for aggregating teachers’ answers that are more selective and add less noise. On all measures, our techniques improve on the original PATE mechanism when evaluated on the same tasks using the same datasets, as described in Section 5. Furthermore, we evaluate both variants of PATE on a new, large-scale character recognition task with 150 output classes, inspired by MNIST. The results show that PATE can be successfully utilized even to uncurated datasets—with significant class imbalance as well as erroneous class labels—and that our new aggregation mechanisms improve both privacy and model accuracy.

To be more selective, our new mechanisms leverage some pleasant synergies between privacy and utility in PATE aggregation. For example, when teachers disagree, and there is no real consensus, the privacy cost is much higher; however, since such disagreement also suggest that the teachers may not give a correct answer, the answer may simply be omitted. Similarly, teachers may avoid giving an answer where the student already is confidently predicting the right answer. Additionally, we ensure that these selection steps are themselves done in a private manner.

To add less noise, our new PATE aggregation mechanisms sample Gaussian noise, since the tails of that distribution diminish far more rapidly than those of the Laplacian noise used in the original PATE work. This reduction greatly increases the chance that the noisy aggregation of teachers’ votes results in the correct consensus answer, which is especially important when PATE is scaled to learning tasks with large numbers of output classes. However, changing the sampled noise requires redoing the entire PATE privacy analysis from scratch (see Section 4 and details in Appendix A).

Finally, of independent interest are the details of our evaluation extending that of the original PATE work. In particular, we find that the virtual adversarial training (VAT) technique of Miyato et al. (2017) is a good basis for semi-supervised learning on tasks with many classes, outperforming the improved GANs by Salimans et al. (2016) used in the original PATE work. Furthermore, we explain how to tune the PATE approach to achieve very strong privacy (ε≈1.0\varepsilon\approx 1.0) along with high utility, for our real-world character recognition learning task.

This paper is structured as follows: Section 2 is the related work section; Section 3 gives a background on PATE and an overview of our work; Section 4 describes our improved aggregation mechanisms; Section 5 details our experimental evaluation; Section 6 offers conclusions; and proofs are deferred to the Appendices.

Related Work

Differential privacy is by now the gold standard of privacy. It offers a rigorous framework whose threat model makes few assumptions about the adversary’s capabilities, allowing differentially private algorithms to effectively cope against strong adversaries. This is not the case of all privacy definitions, as demonstrated by successful attacks against anonymization techniques (Aggarwal, 2005; Narayanan & Shmatikov, 2008; Bindschaedler et al., 2017).

The first learning algorithms adapted to provide differential privacy with respect to their training data were often linear and convex (Pathak et al., 2010; Chaudhuri et al., 2011; Song et al., 2013; Bassily et al., 2014; Hamm et al., 2016). More recently, successful developments in deep learning called for differentially private stochastic gradient descent algorithms (Abadi et al., 2016), some of which have been tailored to learn in federated (McMahan et al., 2017) settings.

Differentially private selection mechanisms like GNMax (Section 4.1) are commonly used in hypothesis testing, frequent itemset mining, and as building blocks of more complicated private mechanisms. The most commonly used differentially private selection mechanisms are exponential mechanism (McSherry & Talwar, 2007) and LNMax (Bhaskar et al., 2010). Recent works offer lower bounds on sample complexity of such problem (Steinke & Ullman, 2017; Bafna & Ullman, 2017).

The Confident and Interactive Aggregator proposed in our work (Section 4.2 and Section 4.3 resp.) use the intuition that selecting samples under certain constraints could result in better training than using samples uniformly at random. In Machine Learning Theory, active learning (Cohn et al., 1994) has been shown to allow learning from fewer labeled examples than the passive case (see e.g. Hanneke (2014)). Similarly, in model stealing (Tramèr et al., 2016), a goal is to learn a model from limited access to a teacher network. There is previous work in differential privacy literature (Hardt & Rothblum, 2010; Roth & Roughgarden, 2010) where the mechanism first decides whether or not to answer a query, and then privately answers the queries it chooses to answer using a traditional noise-addition mechanism. In these cases, the sparse vector technique (Dwork & Roth, 2014, Chapter 3.6) helps bound the privacy cost in terms of the number of answered queries. This is in contrast to our work where a constant fraction of queries get answered and the sparse vector technique does not seem to help reduce the privacy cost. Closer to our work, Bun et al. (2017) consider a setting where the answer to a query of interest is often either very large or very small. They show that a sparse vector-like analysis applies in this case, where one pays only for queries that are in the middle.

Background and Overview

We introduce essential components of our approach towards a generic and flexible framework for machine learning with provable privacy guarantees for training data.

Here, we provide an overview of the PATE framework. To protect the privacy of training data during learning, PATE transfers knowledge from an ensemble of teacher models trained on partitions of the data to a student model. Privacy guarantees may be understood intuitively and expressed rigorously in terms of differential privacy.

Illustrated in Figure 2, the PATE framework consists of three key parts: (1) an ensemble of nn teacher models, (2) an aggregation mechanism and (3) a student model.

Teacher models: Each teacher is a model trained independently on a subset of the data whose privacy one wishes to protect. The data is partitioned to ensure no pair of teachers will have trained on overlapping data. Any learning technique suitable for the data can be used for any teacher. Training each teacher on a partition of the sensitive data produces nn different models solving the same task. At inference, teachers independently predict labels.

Aggregation mechanism: When there is a strong consensus among teachers, the label they almost all agree on does not depend on the model learned by any given teacher. Hence, this collective decision is intuitively private with respect to any given training point—because such a point could have been included only in one of the teachers’ training set. To provide rigorous guarantees of differential privacy, the aggregation mechanism of the original PATE framework counts votes assigned to each class, adds carefully calibrated Laplacian noise to the resulting vote histogram, and outputs the class with the most noisy votes as the ensemble’s prediction. This mechanism is referred to as the max-of-Laplacian mechanism, or LNMax, going forward.

For samples xx and classes 1,…,m1,\ldots,m, let fj(x)∈[m]f_{j}(x)\in[m] denote the jj-th teacher model’s prediction and nin_{i} denote the vote count for the ii-th class (i.e., ni≜∣fj(x)=i∣n_{i}\triangleq|f_{j}(x)=i|). The output of the mechanism is A(x)≜arg⁡ ⁣max⁡⁡i(ni(x)+Lap(1/γ))\mathcal{A}(x)\triangleq\operatorname*{\arg\!\max}_{i}\left(n_{i}(x)+\text{Lap}\left(1/\gamma\right)\right). Through a rigorous analysis of this mechanism, the PATE framework provides a differentially private API: the privacy cost of each aggregated prediction made by the teacher ensemble is known.

Student model: PATE’s final step involves the training of a student model by knowledge transfer from the teacher ensemble using access to public—but unlabeled—data. To limit the privacy cost of labeling them, queries are only made to the aggregation mechanism for a subset of public data to train the student in a semi-supervised way using a fixed number of queries. The authors note that every additional ensemble prediction increases the privacy cost spent and thus cannot work with unbounded queries. Fixed queries fixes privacy costs as well as diminishes the value of attacks analyzing model parameters to recover training data (Zhang et al., 2017). The student only sees public data and privacy-preserving labels.

2 Differential Privacy

Differential privacy (Dwork et al., 2006) requires that the sensitivity of the distribution of an algorithm’s output to small perturbations of its input be limited. The following variant of the definition captures this intuition formally:

A randomized mechanism M\mathcal{M} with domain D\mathcal{D} and range R\mathcal{R} satisfies (ε,δ)(\varepsilon,\delta)-differential privacy if for any two adjacent inputs D,D′∈DD,D^{\prime}\in\mathcal{D} and for any subset of outputs S⊆RS\subseteq\mathcal{R} it holds that:

For our application of differential privacy to ML, adjacent inputs are defined as two datasets that only differ by one training example and the randomized mechanism M\mathcal{M} would be the model training algorithm. The privacy parameters have the following natural interpretation: ε\varepsilon is an upper bound on the loss of privacy, and δ\delta is the probability with which this guarantee may not hold. Composition theorems (Dwork & Roth, 2014) allow us to keep track of the privacy cost when we run a sequence of mechanisms.

3 Rényi Differential Privacy

Papernot et al. (2017) note that the natural approach to bounding PATE’s privacy loss—by bounding the privacy cost of each label queried and using strong composition (Dwork et al., 2010) to derive the total cost—yields loose privacy guarantees. Instead, their approach uses data-dependent privacy analysis. This takes advantage of the fact that when the consensus among the teachers is very strong, the plurality outcome has overwhelming likelihood leading to a very small privacy cost whenever the consensus occurs. To capture this effect quantitatively, Papernot et al. (2017) rely on the moments accountant, introduced by Abadi et al. (2016) and building on previous work (Bun & Steinke, 2016; Dwork & Rothblum, 2016).

In this section, we recall the language of Rényi Differential Privacy or RDP (Mironov, 2017). RDP generalizes pure differential privacy (δ=0\delta=0) and is closely related to the moments accountant. We choose to use RDP as a more natural analysis framework when dealing with our mechanisms that use Gaussian noise. Defined below, the RDP of a mechanism is stated in terms of the Rényi divergence.

The Rényi divergence of order λ\lambda between two distributions PP and QQ is defined as:

A randomized mechanism M\mathcal{M} is said to guarantee (λ,ε)(\lambda,\varepsilon)-RDP with λ≥1\lambda\geq 1 if for any neighboring datasets DD and D′D^{\prime},

RDP generalizes pure differential privacy in the sense that ε\varepsilon-differential privacy is equivalent to (∞,ε)(\infty,\varepsilon)-RDP. Mironov (2017) proves the following key facts that allow easy composition of RDP guarantees and their conversion to (ε,δ)(\varepsilon,\delta)-differential privacy bounds.

If a mechanism M\mathcal{M} consists of a sequence of adaptive mechanisms M1,…,Mk\mathcal{M}_{1},\dots,\mathcal{M}_{k} such that for any i∈[k]i\in[k], Mi\mathcal{M}_{i} guarantees (λ,εi)(\lambda,\varepsilon_{i})-RDP, then M\mathcal{M} guarantees (λ,∑i=1kεi)(\lambda,\sum_{i=1}^{k}\varepsilon_{i})-RDP.

If a mechanism M\mathcal{M} guarantees (λ,ε)(\lambda,\varepsilon)-RDP, then M\mathcal{M} guarantees (ε+log⁡1/δλ−1,δ)(\varepsilon+\frac{\log 1/\delta}{\lambda-1},\delta)-differential privacy for any δ∈(0,1)\delta\in(0,1).

While both (ε,δ)(\varepsilon,\delta)-differential privacy and RDP are relaxations of pure ε\varepsilon-differential privacy, the two main advantages of RDP are as follows. First, it composes nicely; second, it captures the privacy guarantee of Gaussian noise in a much cleaner manner compared to (ε,δ)(\varepsilon,\delta)-differential privacy. This lets us do a careful privacy analysis of the GNMax mechanism as stated in Theorem 3. While the analysis of Papernot et al. (2017) leverages the first aspect of such frameworks with the Laplace noise (LNMax mechanism), our analysis of the GNMax mechanism relies on both.

4 PATE Aggregation Mechanisms

The aggregation step is a crucial component of PATE. It enables knowledge transfer from the teachers to the student while enforcing privacy. We improve the LNMax mechanism used by Papernot et al. (2017) which adds Laplace noise to teacher votes and outputs the class with the highest votes.

First, we add Gaussian noise with an accompanying privacy analysis in the RDP framework. This modification effectively reduces the noise needed to achieve the same privacy cost per student query.

Second, the aggregation mechanism is now selective: teacher votes are analyzed to decide which student queries are worth answering. This takes into account both the privacy cost of each query and its payout in improving the student’s utility. Surprisingly, our analysis shows that these two metrics are not at odds and in fact align with each other: the privacy cost is the smallest when teachers agree, and when teachers agree, the label is more likely to be correct thus being more useful to the student.

Third, we propose and study an interactive mechanism that takes into account not only teacher votes on a queried example but possible student predictions on that query. Now, queries worth answering are those where the teachers agree on a class but the student is not confident in its prediction on that class. This third modification aligns the two metrics discussed above even further: queries where the student already agrees with the consensus of teachers are not worth expending our privacy budget on, but queries where the student is less confident are useful and answered at a small privacy cost.

5 Data-dependent Privacy in PATE

A direct privacy analysis of the aggregation mechanism, for reasonable values of the noise parameter, allows answering only few queries before the privacy cost becomes prohibitive. The original PATE proposal used a data-dependent analysis, exploiting the fact that when the teachers have large agreement, the privacy cost is usually much smaller than the data-independent bound would suggest.

In our work, we perform a data-dependent privacy analysis of the aggregation mechanism with Gaussian noise. This change of noise distribution turns out be technically much more challenging than the Laplace noise case and we defer the details to Appendix A. This increased complexity of the analysis however does not make the algorithm any more complicated and thus allows us to improve the privacy-utility tradeoff.

An additional challenge with data-dependent privacy analyses arises from the fact that the privacy cost itself is now a function of the private data. Further, the data-dependent bound on the privacy cost has large global sensitivity (a metric used in differential privacy to calibrate the noise injected) and is therefore difficult to sanitize. To remedy this, we use the smooth sensitivity framework proposed by Nissim et al. (2007).

Appendix B describes how we add noise to the computed privacy cost using this framework to publish a sanitized version of the privacy cost. Section B.1 defines smooth sensitivity and outlines algorithms 3–5 that compute it. The rest of Appendix B argues the correctness of these algorithms. The final analysis shows that the incremental cost of sanitizing our privacy estimates is modest—less than 50% of the raw estimates—thus enabling us to use precise data-dependent privacy analysis while taking into account its privacy implications.

Improved Aggregation Mechanisms for PATE

The privacy guarantees provided by PATE stem from the design and analysis of the aggregation step. Here, we detail our improvements to the mechanism used by Papernot et al. (2017). As outlined in Section 3.4, we first replace the Laplace noise added to teacher votes with Gaussian noise, adapting the data-dependent privacy analysis. Next, we describe the Confident and Interactive Aggregators that select queries worth answering in a privacy-preserving way: the privacy budget is shared between the query selection and answer computation. The aggregators use different heuristics to select queries: the former does not take into account student predictions, while the latter does.

This section uses the following notation. For a sample xx and classes 11 to mm, let fj(x)∈[m]f_{j}(x)\in[m] denote the jj-th teacher model’s prediction on xx and ni(x)n_{i}(x) denote the vote count for the ii-th class (i.e., ni(x)=∣{j ⁣:fj(x)=i}∣n_{i}(x)=|\{j\colon f_{j}(x)=i\}|). We define a Gaussian NoisyMax (GNMax) aggregation mechanism as:

where N(0,σ2)\mathcal{N}(0,\sigma^{2}) is the Gaussian distribution with mean 0 and variance σ2\sigma^{2}. The aggregator outputs the class with noisy plurality after adding Gaussian noise to each vote count. In what follow, plurality more generally refers to the highest number of teacher votes assigned among the classes.

The Gaussian distribution is more concentrated than the Laplace distribution used by Papernot et al. (2017). This concentration directly improves the aggregation’s utility when the number of classes mm is large. The GNMax mechanism satisfies (λ,λ/σ2)(\lambda,\lambda/\sigma^{2})-RDP, which holds for all inputs and all λ≥1\lambda\geq 1 (precise statements and proofs of claims in this section are deferred to Appendix A). A straightforward application of composition theorems leads to loose privacy bounds. As an example, the standard advanced composition theorem applied to experiments in the last two rows of Table 1 would give us ε=8.42\varepsilon=8.42 and ε=10.14\varepsilon=10.14 resp. at δ=10−8\delta=10^{-8} for the Glyph dataset.

2 The Confident-GNMax Aggregator

In this section, we propose a refinement of the GNMax aggregator that enables us to filter out queries for which teachers do not have a sufficiently strong consensus. This filtering enables the teachers to avoid answering expensive queries. We also take note to do this selection step itself in a private manner.

The proposed Confident Aggregator is described in Algorithm 1. To select queries with overwhelming consensus, the algorithm checks if the plurality vote crosses a threshold TT. To enforce privacy in this step, the comparison is done after adding Gaussian noise with variance σ12\sigma_{1}^{2}. Then, for queries that pass this noisy threshold check, the aggregator proceeds with the usual GNMax mechanism with a smaller variance σ22\sigma_{2}^{2}. For queries that do not pass the noisy threshold check, the aggregator simply returns ⊥\bot and the student discards this example in its training.

In practice, we often choose significantly higher values for σ1\sigma_{1} compared to σ2\sigma_{2}. This is because we pay the cost of the noisy threshold check always, and without the benefit of knowing that the consensus is strong. We pick TT so that queries where the plurality gets less than half the votes (often very expensive) are unlikely to pass the threshold after adding noise, but we still have a high enough yield amongst the queries with a strong consensus. This tradeoff leads us to look for TT’s between 0.6×0.6\times to 0.8×0.8\times the number of teachers.

The privacy cost of this aggregator is intuitive: we pay for the threshold check for every query, and for the GNMax step only for queries that pass the check. In the work of Papernot et al. (2017), the mechanism paid a privacy cost for every query, expensive or otherwise. In comparison, the Confident Aggregator expends a much smaller privacy cost to check against the threshold, and by answering a significantly smaller fraction of expensive queries, it expends a lower privacy cost overall.

3 The Interactive-GNMax Aggregator

While the Confident Aggregator excludes expensive queries, it ignores the possibility that the student might receive labels that contribute little to learning, and in turn to its utility. By incorporating the student’s current predictions for its public training data, we design an Interactive Aggregator that discards queries where the student already confidently predicts the same label as the teachers.

Given a set of queries, the Interactive Aggregator (Algorithm 2) selects those answered by comparing student predictions to teacher votes for each class. Similar to Step 1 in the Confident Aggregator, queries where the plurality of these noised differences crosses a threshold are answered with GNMax. This noisy threshold suffices to enforce privacy of the first step because student predictions can be considered public information (the student is trained in a differentially private manner).

For queries that fail this check, the mechanism reinforces the predicted student label if the student is confident enough and does this without looking at teacher votes again. This limited form of supervision comes at a small privacy cost. Moreover, the order of the checks ensures that a student falsely confident in its predictions on a query is not accidentally reinforced if it disagrees with the teacher consensus. The privacy accounting is identical to the Confident Aggregator except in considering the difference between teachers and the student instead of only the teachers votes.

In practice, the Confident Aggregator can be used to start training a student when it can make no meaningful predictions and training can be finished off with the Interactive Aggregator after the student gains some proficiency.

Experimental Evaluation

Our goal is first to show that the improved aggregators introduced in Section 4 enable the application of PATE to uncurated data, thus departing from previous results on tasks with balanced and well-separated classes. We experiment with the Glyph dataset described below to address two aspects left open by Papernot et al. (2017): (a) the performance of PATE on a task with a larger number of classes (the framework was only evaluated on datasets with at most 10 classes) and (b) the privacy-utility tradeoffs offered by PATE on data that is class imbalanced and partly mislabeled. In Section 5.2, we evaluate the improvements given by the GNMax aggregator over its Laplace counterpart (LNMax) and demonstrate the necessity of the Gaussian mechanism for uncurated tasks.

In Section 5.3, we then evaluate the performance of PATE with both the Confident and Interactive Aggregators on all datasets used to benchmark the original PATE framework, in addition to Glyph. With the right teacher and student training, the two mechanisms from Section 4 achieve high accuracy with very tight privacy bounds. Not answering queries for which teacher consensus is too low (Confident-GNMax) or the student’s predictions already agree with teacher votes (Interactive-GNMax) better aligns utility and privacy: queries are answered at a significantly reduced cost.

We evaluate with two computer vision tasks (MNIST and Street View House Numbers (Netzer et al., 2011)) and census data from the UCI Adult dataset (Kohavi, 1996). This enables a comparative analysis of the utility-privacy tradeoff achieved with our Confident-GNMax aggregator and the LNMax originally used in PATE. We replicate the experimental setup and results found in Papernot et al. (2017) with code and teacher votes made available online. The source code for the privacy analysis in this paper as well as supporting data required to run this analysis is available on Github.https://github.com/tensorflow/models/tree/master/research/differential_privacy

A detailed description of the experimental setup can be found in Papernot et al. (2017); we provide here only a brief overview. For MNIST and SVHN, teachers are convolutional networks trained on partitions of the training set. For UCI Adult, each teacher is a random forest. The test set is split in two halves: the first is used as unlabeled inputs to simulate the student’s public data and the second is used as a hold out to evaluate test performance. The MNIST and SVHN students are convolutional networks trained using semi-supervised learning with GANs à la Salimans et al. (2016). The student for the Adult dataset are fully supervised random forests.

This optical character recognition task has an order of magnitude more classes than all previous applications of PATE. The Glyph dataset also possesses many characteristics shared by real-world tasks: e.g., it is imbalanced and some inputs are mislabeled. Each input is a 28×2828\times 28 grayscale image containing a single glyph generated synthetically from a collection of over 500K computer fonts.Glyph data is not public but similar data is available publicly as part of the notMNIST dataset. Samples representative of the difficulties raised by the data are depicted in Figure 3. The task is to classify inputs as one of the 150150 Unicode symbols used to generate them.

This set of 150 classes results from pre-processing efforts. We discarded additional classes that had few samples; some classes had at least 50 times fewer inputs than the most popular classes, and these were almost exclusively incorrectly labeled inputs. We also merged classes that were too ambiguous for even a human to differentiate them. Nevertheless, a manual inspection of samples grouped by classes—favorably to the human observer—led to the conservative estimate that some classes remain 5 times more frequent, and mislabeled inputs represent at least 10%10\% of the data.

To simulate the availability of private and public data (see Section 3.1), we split data originally marked as the training set (about 65M points) into partitions given to the teachers. Each teacher is a ResNet (He et al., 2016) made of 32 leaky ReLU layers. We train on batches of 100 inputs for 40K steps using SGD with momentum. The learning rate, initially set to 0.10.1, is decayed after 10K steps to 0.010.01 and again after 20K steps to 0.0010.001. These parameters were found with a grid search.

We split holdout data in two subsets of 100K and 400K samples: the first acts as public data to train the student and the second as its testing data. The student architecture is a convolutional network learnt in a semi-supervised fashion with virtual adversarial training (VAT) from Miyato et al. (2017). Using unlabeled data, we show how VAT can regularize the student by making predictions constant in adversarialIn this context, the adversarial component refers to the phenomenon commonly referred to as adversarial examples (Biggio et al., 2013; Szegedy et al., 2014) and not to the adversarial training approach taken in GANs. directions. Indeed, we found that GANs did not yield as much utility for Glyph as for MNIST or SVHN. We train with Adam for 400 epochs and a learning rate of 6⋅10−56\cdot 10^{-5}.

2 Comparing the LNMax and GNMax Mechanisms

Section 4.1 introduces the GNMax mechanism and the accompanying privacy analysis. With a Gaussian distribution, whose tail diminishes more rapidly than the Laplace distribution, we expect better utility when using the new mechanism (albeit with a more involved privacy analysis).

To study the tradeoff between privacy and accuracy with the two mechanisms, we run experiments training several ensembles of MM teachers for M∈{100,500,1000,5000}M\in\{100,500,1000,5000\} on the Glyph data. Recall that 65 million training inputs are partitioned and distributed among the MM teachers with each teacher receiving between 650K and 13K inputs for the values of MM above. The test data is used to query the teacher ensemble and the resulting labels (after the LNMax and GNMax mechanisms) are compared with the ground truth labels provided in the dataset. This predictive performance of the teachers is essential to good student training with accurate labels and is a useful proxy for utility.

For each mechanism, we compute (ε,δ)(\varepsilon,\delta)-differential privacy guarantees. As is common in literature, for a dataset on the order of 10810^{8} samples, we choose δ=10−8\delta=10^{-8} and denote the corresponding ε\varepsilon as the privacy cost. The total ε\varepsilon is calculated on a subset of 4,000 queries, which is representative of the number of labels needed by a student for accurate training (see Section 5.3). We visualize in Figure 4 the effect of the noise distribution (left) and the number of teachers (right) on the tradeoff between privacy costs and label accuracy.

As long as each teacher has sufficient data to learn a good-enough model, increasing the number MM of teachers improves the tradeoff—as illustrated on the right of Figure 4 with GNMax. The larger ensembles lower the privacy cost of answering queries by tolerating larger σ\sigma’s. Combining the two observations made in this Figure, for a fixed label accuracy, we lower privacy costs by switching to the GNMax aggregator and training a larger number MM of teachers.

3 Student Training with the GNMax Aggregation Mechanisms

As outlined in Section 3, we train a student on public data labeled by the aggregation mechanisms. We take advantage of PATE’s flexibility and apply the technique that performs best on each dataset: semi-supervised learning with Generative Adversarial Networks (Salimans et al., 2016) for MNIST and SVHN, Virtual Adversarial Training (Miyato et al., 2017) for Glyph, and fully-supervised random forests for UCI Adult. In addition to evaluating the total privacy cost associated with training the student model, we compare its utility to a non-private baseline obtained by training on the sensitive data (used to train teachers in PATE): we use the baselines of 99.2%99.2\%, 92.8%92.8\%, and 85.0%85.0\% reported by Papernot et al. (2017) respectively for MNIST, SVHN, and UCI Adult, and we measure a baseline of 82.2%82.2\% for Glyph. We compute (ε,δ)(\varepsilon,\delta)-privacy bounds and denote the privacy cost as the ε\varepsilon value at a value of δ\delta set accordingly to number of training samples.

Given a pool of 500 to 12,000 samples to learn from (depending on the dataset), the student submits queries to the teacher ensemble running the Confident-GNMax aggregator from Section 4.2. A grid search over a range of plausible values for parameters TT, σ1\sigma_{1} and σ2\sigma_{2} yielded the values reported in Table 1, illustrating the tradeoff between utility and privacy achieved. We additionally measure the number of queries selected by the teachers to be answered and compare student utility to a non-private baseline.

The Confident-GNMax aggregator outperforms LNMax for the four datasets considered in the original PATE proposal: it reduces the privacy cost ε\varepsilon, increases student accuracy, or both simultaneously. On the uncurated Glyph data, despite the imbalance of classes and mislabeled data (as evidenced by the 82.2% baseline), the Confident Aggregator achieves 73.5% accuracy with a privacy cost of just ε=1.02\varepsilon=1.02. Roughly 1,300 out of 12,000 queries made are not answered, indicating that several expensive queries were successfully avoided. This selectivity is analyzed in more details in Section 5.4.

On Glyph, we evaluate the utility and privacy of an interactive training routine that proceeds in two rounds. Round one runs student training with a Confident Aggregator. A grid search targeting the best privacy for roughly 3,400 answered queries (out of 6,000)—sufficient to bootstrap a student—led us to setting (T=3500,σ1=1500,σ2=100)(T\texttt{=}3500,\sigma_{1}\texttt{=}1500,\sigma_{2}\texttt{=}100) and a privacy cost of ε≈0.59\varepsilon\approx 0.59.

In round two, this student was then trained with 10,000 more queries made with the Interactive-GNMax Aggregator (T=3500,σ1=2000,σ2=200)(T\texttt{=}3500,\sigma_{1}\texttt{=}2000,\sigma_{2}\texttt{=}200). We computed the resulting (total) privacy cost and utility at an exemplar data point through another grid search of plausible parameter values. The result appears in the last row of Table 1. With just over 10,422 answered queries in total at a privacy cost of ε=0.84\varepsilon=0.84, the trained student was able to achieve 73.2% accuracy. Note that this students required fewer answered queries compared to the Confident Aggregator. The best overall cost of student training occurred when the privacy costs for the first and second rounds of training were roughly the same. (The total ε\varepsilon is less than 0.59×2=1.180.59\times 2=1.18 due to better composition—via Theorems 1 and 2.)

Note that the Glyph student’s accuracy remains seven percentage points below the non-private model’s accuracy achieved by training on the 65M sensitive inputs. We hypothesize that this is due to the uncurated nature of the data considered. Indeed, the class imbalance naturally requires more queries to return labels from the less represented classes. For instance, a model trained on 200K queries is only 77% accurate on test data. In addition, the large fraction of mislabeled inputs are likely to have a large privacy cost: these inputs are sensitive because they are outliers of the distribution, which is reflected by the weak consensus among teachers on these inputs.

4 Noisy Threshold Checks and Privacy Costs

Sections 4.1 and 4.2 motivated the need for a noisy threshold checking step before having the teachers answer queries: it prevents most of the privacy budget being consumed by few queries that are expensive and also likely to be incorrectly answered. In Figure 5, we compare the privacy cost ε\varepsilon of answering all queries to only answering confident queries for a fixed number of queries.

We run additional experiments to support the evaluation from Section 5.3. With the votes of 5,000 teachers on the Glyph dataset, we plot in Figure 5 the histogram of the plurality vote counts (ni∗n_{i^{*}} in the notation of Section 4.1) across 25,000 student queries. We compare these values to the vote counts of queries that passed the noisy threshold check for two sets of parameters TT and σ1\sigma_{1} in Algorithm 1. Smaller values imply weaker teacher agreements and consequently more expensive queries.

When (T=3500,σ1=1500)(T\texttt{=}3500,\sigma_{1}\texttt{=}1500) we capture a significant fraction of queries where teachers have a strong consensus (roughly >4000>4000 votes) while managing to filter out many queries with poor consensus. This moderate check ensures that although many queries with plurality votes between 2,500 and 3,500 are answered (i.e., only 50–70% of teachers agree on a label) the expensive ones are most likely discarded. For (T=5000,σ1=1500)(T\texttt{=}5000,\sigma_{1}\texttt{=}1500), queries with poor consensus are completely culled out. This selectivity comes at the expense of a noticeable drop for queries that might have had a strong consensus and little-to-no privacy cost. Thus, this aggressive check answer fewer queries with very strong privacy guarantees. We reiterate that this threshold checking step itself is done in a private manner. Empirically, in our Interactive Aggregator experiments, we expend about a third to a half of our privacy budget on this step, which still yields a very small cost per query across 6,000 queries.

Conclusions

The key insight motivating the addition of a noisy thresholding step to the two aggregation mechanisms proposed in our work is that there is a form of synergy between the privacy and accuracy of labels output by the aggregation: labels that come at a small privacy cost also happen to be more likely to be correct. As a consequence, we are able to provide more quality supervision to the student by choosing not to output labels when the consensus among teachers is too low to provide an aggregated prediction at a small cost in privacy. This observation was further confirmed in some of our experiments where we observed that if we trained the student on either private or non-private labels, the former almost always gave better performance than the latter—for a fixed number of labels.

Complementary with these aggregation mechanisms is the use of a Gaussian (rather than Laplace) distribution to perturb teacher votes. In our experiments with Glyph data, these changes proved essential to preserve the accuracy of the aggregated labels—because of the large number of classes. The analysis presented in Section 4 details the delicate but necessary adaptation of analogous results for the Laplace NoisyMax.

As was the case for the original PATE proposal, semi-supervised learning was instrumental to ensure the student achieves strong utility given a limited set of labels from the aggregation mechanism. However, we found that virtual adversarial training outperforms the approach from Salimans et al. (2016) in our experiments with Glyph data. These results establish lower bounds on the performance that a student can achieve when supervised with our aggregation mechanisms; future work may continue to investigate virtual adversarial training, semi-supervised generative adversarial networks and other techniques for learning the student in these particular settings with restricted supervision.

Acknowledgments

We are grateful to Martín Abadi, Vincent Vanhoucke, and Daniel Levy for their useful inputs and discussions towards this paper.

References

Appendix A Appendix: Privacy Analysis

In this appendix, we provide the proofs of Theorem 3 and Section 4.1. Moreover, we present Appendix A, which provides optimal values of μ1\mu_{1} and μ2\mu_{2} to apply towards Theorem 3 for the GNMax mechanism. We start off with a statement about the Rényi differential privacy guarantee of the GNMax.

The GNMax aggregator Mσ\mathcal{M}_{\sigma} guarantees (λ,λ/σ2)\left(\lambda,\lambda/\sigma^{2}\right)-RDP for all λ≥1\lambda\geq 1.

The result follows from observing that Mσ\mathcal{M}_{\sigma} can be decomposed into applying the arg⁡ ⁣max⁡⁡\operatorname*{\arg\!\max} operator to a noisy histogram resulted from adding Gaussian noise to each dimension of the original histogram. The Gaussian mechanism satisfies (λ,λ/2σ2)(\lambda,\lambda/2\sigma^{2})-RDP (Mironov, 2017), and since each teacher may change two counts (incrementing one and decrementing the other), the overall RDP guarantee is as claimed. ∎

For a GNMax aggregator Mσ\mathcal{M}_{\sigma}, the teachers’ votes histogram nˉ=(n1,…,nm)\bar{n}=(n_{1},\dots,n_{m}), and for any i∗∈[m]i^{*}\in[m], we have

Recall that Mσ(D)=arg⁡ ⁣max⁡⁡(ni+Zi)\mathcal{M}_{\sigma}{(D)}=\operatorname*{\arg\!\max}(n_{i}+Z_{i}), where ZiZ_{i} are distributed as N(0,σ2)\mathcal{N}(0,\sigma^{2}). Then for any i∗∈[m]i^{*}\in[m], we have

where the last equality follows from the fact that Zi−ZjZ_{i}-Z_{j} is a Gaussian random variable with mean zero and variance 2σ22\sigma^{2}. ∎

We now present a precise statement of Theorem 3.

Before we proceed to the proof, we introduce some simplifying notation. For a randomized mechanism M\mathcal{M} and neighboring datasets DD and D′D^{\prime}, we define

As the proof involves working with the RDP bounds in the exponent, we set ζ1≜eε1(μ1−1)\zeta_{1}\triangleq e^{\varepsilon_{1}(\mu_{1}-1)} and ζ2≜eε2(μ2−1)\zeta_{2}\triangleq e^{\varepsilon_{2}(\mu_{2}-1)}.

Finally, we define the following shortcuts:

From the definition of Rényi differential privacy, (μ1,ε1)(\mu_{1},\varepsilon_{1})-RDP implies:

Since μ1≥λ{\mu_{1}}\geq\lambda, f(x)≜xμ1−1λ−1f(x)\triangleq x^{\frac{\mu_{1}-1}{\lambda-1}} is convex. Applying Jensen’s Inequality we have the following:

Next, by the bound at order μ2\mu_{2}, we have:

By the data processing inequality of Rényi divergence, we have

which implies pμ2qμ2−1≤ζ2\frac{p^{\mu_{2}}}{q^{{\mu_{2}}-1}}\leq{\zeta_{2}} and thus

Combining (A) and (5), we can derive a bound at λ\lambda.

Let the functions f1(⋅)f_{1}(\cdot) and f2(⋅)f_{2}(\cdot) be

Then f1(x)+f2(x)f_{1}(x)+f_{2}(x) is increasing in [0,min⁡(1,ζ2/(μ1μ1−1⋅μ2μ2−1)μ2)]\left[0,\min\left(1,\zeta_{2}/\left(\frac{\mu_{1}}{{\mu_{1}-1}}\cdot\frac{\mu_{2}}{{\mu_{2}-1}}\right)^{\mu_{2}}\right)\right].

Taking the derivative of f1(x)f_{1}(x), we have:

For x∈[0,ζ2/(μ1μ1−1⋅μ2μ2−1)μ2]x\in\left[0,\zeta_{2}/\left(\frac{\mu_{1}}{{\mu_{1}-1}}\cdot\frac{\mu_{2}}{\mu_{2}-1}\right)^{\mu_{2}}\right] and y∈[1,∞)y\in[1,\infty), define g(x,y)g(x,y) as:

We claim that g(x,y)g(x,y) is increasing in yy and therefore g(x,y)≥g(x,1)g(x,y)\geq g(x,1), and prove it by showing the partial derivative of g(x,y)g(x,y) with respect to yy is non-negative. Take a derivative with respect to yy as:

To see why gy′(x,y)g^{\prime}_{y}(x,y) is non-negative in the respective ranges of xx and yy, note that:

Consider 1−x1−(xμ2−1ζ2)1/μ2\frac{1-x}{1-(x^{{\mu_{2}-1}}{\zeta_{2}})^{1/{\mu_{2}}}}. Since ζ2≥1\zeta_{2}\geq 1 and x≤1x\leq 1, we have x≤ζ2x\leq\zeta_{2} and hence

Therefore we can set y=1−x1−(xμ2−1ζ2)1/μ2y=\frac{1-x}{1-(x^{{\mu_{2}-1}}{\zeta_{2}})^{1/{\mu_{2}}}} and apply the fact that g(x,y)≥g(x,1)g(x,y)\geq g(x,1) for all y≥1y\geq 1 to get

Taking the derivative of f2(x)f_{2}(x), we have:

Combining the two terms together, we have:

For f′(x)f^{\prime}(x) to be non-negative we need:

Theorem 3 yields data-dependent Rényi differential privacy bounds for any value of μ1\mu_{1} and μ2\mu_{2} larger than λ\lambda. The following proposition simplifies this search by calculating optimal higher moments μ1\mu_{1} and μ2\mu_{2} for the GNMax mechanism with variance σ2\sigma^{2}.

When applying Theorem 3 and Appendix A for GNMax with Gaussian of variance σ2\sigma^{2}, the right-hand side of (2) is minimized at

Putting this together, we apply the following steps to calculate RDP of order λ\lambda for GNMax with variance σ2\sigma^{2} on a given dataset DD. First, we compute a bound qq according to Appendix A. Then we use the smaller of two bounds: a data-dependent (Theorem 3) and a data-independent one (Appendix A) :

where A\boldsymbol{A} and B\boldsymbol{B} are defined as in the statement of Theorem 3, the parameters μ1\mu_{1} and μ2\mu_{2} are selected according to Appendix A, and ε1≜μ1/σ2\varepsilon_{1}\triangleq\mu_{1}/\sigma^{2} and ε2≜μ2/σ2\varepsilon_{2}\triangleq\mu_{2}/\sigma^{2} (Appendix A). Importantly, the first expression is evaluated only when q<1q<1, μ1≥λ\mu_{1}\geq\lambda, μ2>1\mu_{2}>1, and q≤e(μ2−1)ε2/(μ1μ1−1⋅μ2μ2−1)μ2q\leq e^{(\mu_{2}-1)\varepsilon_{2}}/\left(\frac{\mu_{1}}{\mu_{1}-1}\cdot\frac{\mu_{2}}{\mu_{2}-1}\right)^{\mu_{2}}. These conditions can either be checked for each application of the aggregation mechanism, or a critical value of q0{q_{0}} that separates the range of applicability of the data-dependent and data-independent bounds can be computed for given σ\sigma and λ\lambda. In our implementation we pursue the second approach.

The following corollary offers a simple asymptotic expression of the privacy of GNMax for the case when there are large (relative to σ\sigma) gaps between the highest three vote counts.

If the top three vote counts are n1>n2>n3n_{1}>n_{2}>n_{3} and n1−n2n_{1}-n_{2}, n2−n3≫σn_{2}-n_{3}\gg\sigma, then the mechanism GNMax with Gaussian of variance σ2\sigma^{2} satisfies (λ,exp⁡(−2λ/σ2)/λ)(\lambda,\exp(-2\lambda/\sigma^{2})/\lambda)-RDP for λ=(n1−n2)/4\lambda=(n_{1}-n_{2})/4.

Appendix B Smooth Sensitivity and Publishing the Privacy Parameter

This section has the following structure. First we recall the notion of smooth sensitivity and introduce an algorithm for computing the smooth sensitivity of the privacy loss function of the GNMax mechanism. In the rest of the section we prove correctness of these algorithms by stating several conditions on the mechanism, proving that these conditions are sufficient for correctness of the algorithm, and finally demonstrating that GNMax satisfies these conditions.

We aim at calculating a smooth sensitivity of β(q(nˉ))\boldsymbol{\beta}\left(q(\bar{n})\right) whose definition we recall now.

Given the smoothness parameter β\beta, a β\beta-smooth sensitivity of f(n)f(n) is defined as

is an upper bound on the local sensitivity.

B.2 Notation and Conditions

We find that the algorithm and the proof of its correctness are more naturally expressed if we relax the notions of a histogram and its neighbors to allow non-integer values.

We generalize histograms to be any vector with non-negative real values. This relaxation is used only in the analysis of algorithms; the actual computations are performed exclusively over integer-valued inputs.

Define a “move” as increasing one bar by some value in anddecreasingonebarbya(possiblydifferent)valueinand decreasing one bar by a (possibly different) value in subject to the resulting value be non-negative. Notice the difference between the original problem and our relaxation. In the original formulation, the histogram takes only integer values and we can only increase/decrease them by exactly 11. In contrast, we allow real values and a teacher can contribute an arbitrary amount in $$ to any one class.

Define the distance between two histograms nˉ=(n1,…,nm)\bar{n}=(n_{1},\dots,n_{m}) and nˉ′=(n1′,…,nm′)\bar{n}^{\prime}=(n^{\prime}_{1},\dots,n^{\prime}_{m}) as

which is equal to the smallest number of “moves” needed to make the two histograms identical. We use the ceiling function since a single step can increase/decrease one bar by at most 11.

We say that two histograms are neighbors if their distance dd is 1.

Notice that analyses of Rényi differential privacy for LNMax, GNMax and the exponential mechanism are still applicable when the neighboring datasets are defined in this manner.

Throughout this section we will be referring to the list of conditions on q(⋅)q(\cdot) and β(⋅)\boldsymbol{\beta}\left(\cdot\right):

The function q(⋅)q(\cdot) is continuous in each argument nin_{i}.

β(⋅)\boldsymbol{\beta}\left(\cdot\right) has the following shape: there exist constants β∗\beta^{*} and q0≤0.5{q_{0}}\leq 0.5, such that β(q)\boldsymbol{\beta}\left(q\right) non-decreasing in [0,q0][0,{q_{0}}] and β(q)=β∗≥β(q0)\boldsymbol{\beta}\left(q\right)=\beta^{*}\geq\boldsymbol{\beta}\left({q_{0}}\right) for q>q0q>{q_{0}}. The constant β∗\beta^{*} corresponds to a data-independent bound.

The function q(nˉ)q(\bar{n}) is invariant under addition of a constant, i.e.,

and q(nˉ)q(\bar{n}) is invariant under permutation of nˉ\bar{n}, i.e.,

Finally, we require that if n(1)=n(2)n^{(1)}=n^{(2)}, then q(nˉ)≥q0q(\bar{n})\geq{q_{0}}.

We may additionally assume that q0≥q([n,0,…,0]){q_{0}}\geq q([n,0,\dots,0]). Indeed, if this condition is not satisfied, then the data-dependent analysis is not going to be used anywhere. The most extreme histogram—[n,0,…,0][n,0,\dots,0]—is the most advantageous setting for applying data-dependent bounds. If we cannot use the data-dependent bound even in that case, we would be using the data-independent bound everywhere and do not need to compute smooth sensitivity anyway. Yet this condition is not automatically satisfied. For example, if mm (the number of classes) is large compared to nn (the number of teachers), we might have large q([n,0,…,0])q([n,0,\dots,0]). So we need to check this condition in the code before doing smooth sensitivity calculation.

B.3 Correctness of Algorithms 3–5

Recall that local sensitivity of a deterministic function ff is defined as max⁡f(D)−f(D′)\max f(D)-f(D^{\prime}), where DD and D′D^{\prime} are neighbors.

Under conditions C2–C6, Algorithm 3 computes an upper bound on local sensitivity of β(q(nˉ))\boldsymbol{\beta}\left(q(\bar{n})\right).

as an upper bound on the local sensitivity of β(q(⋅))\boldsymbol{\beta}\left(q(\cdot)\right) at input nˉ\bar{n}.

By (8) and (9) applied to the intersection of the two ranges, it holds that

We next prove correctness of Algorithm 4, which computes the maximal sensitivity of β\boldsymbol{\beta} at a fixed distance.

The proof relies on the following notion of a partial order between histograms.

Prefix sums Si(nˉ)S_{i}(\bar{n}) are defined as follows:

We say that a histogram nˉ\bar{n} dominates nˉ′\bar{n}^{\prime}, denoted as nˉ⪰nˉ′\bar{n}\succeq\bar{n}^{\prime}, iff:

The function q(⋅)q(\cdot) is monotone under this notion of dominance (assuming certain conditions hold):

We may assume that n(1)=n′(1)n^{(1)}=n^{\prime(1)}. Indeed, if this does not hold, add ∣n(1)−n′(1)∣|n^{(1)}-n^{\prime(1)}| to all coordinates of the histogram with the smaller of the two values. This transform does not change the qq value (by C8) and it preserves the ⪰\succeq relationship as all prefix sums Si(⋅)S_{i}(\cdot) remain unchanged.

We make a simple observation that will be helpful later:

The inequality holds because the prefix sum accumulates the gaps between the largest value of nˉ\bar{n} and all other values in the non-decreasing order. Any deviation from this order may only increase the prefix sums.

The following lemma constructs a monotone chain (in the partial order of dominance) of histograms connecting nˉ\bar{n} and nˉ′\bar{n}^{\prime} via a sequence of intermediate steps that either do not change the value of qq or touch at most two coordinates at a time.

There exists a chain nˉ=nˉ0⪰nˉ1⪰⋯⪰nˉd=nˉ′\bar{n}=\bar{n}_{0}\succeq\bar{n}_{1}\succeq\cdots\succeq\bar{n}_{d}=\bar{n}^{\prime}, such that for all i∈[d]i\in[d] either d(nˉi−1,nˉi)=1d(\bar{n}_{i-1},\bar{n}_{i})=1 or nˉi−1=π(nˉi)\bar{n}_{i-1}=\pi(\bar{n}_{i}) for some permutation π\pi on [m][m]. Additionally, n0(1)=⋯=nd(1)n^{(1)}_{0}=\dots=n^{(1)}_{d}.

If the distance is 0, the statement is immediate. Otherwise, find the smallest ii so that Si(nˉ)>Si(nˉ′)S_{i}(\bar{n})>S_{i}(\bar{n}^{\prime}) (if all prefix sums are equal and n(1)=n′(1)n^{(1)}=n^{\prime(1)}, it would imply that nˉ=nˉ′\bar{n}=\bar{n}^{\prime}). In particular, it means that nj=nj′n_{j}=n^{\prime}_{j} for j<ij<i and ni<ni′≤ni−1=ni−1′n_{i}<n^{\prime}_{i}\leq n_{i-1}=n^{\prime}_{i-1}. Let x≜min⁡(ni′−ni,1)x\triangleq\min(n^{\prime}_{i}-n_{i},1). Define nˉ′′\bar{n}^{\prime\prime} as identical to nˉ′\bar{n}^{\prime} except that ni′′=ni′−xn^{\prime\prime}_{i}=n^{\prime}_{i}-x. The new value is guaranteed to be non-negative, since x≤ni′−nix\leq n^{\prime}_{i}-n_{i} and ni≥0n_{i}\geq 0. Note that nˉ′′\bar{n}^{\prime\prime} is not necessarily sorted anymore. Consider two possibilities.

Case II: nˉ⋡nˉ′′\bar{n}\nsucceq\bar{n}^{\prime\prime}. This may happen because the prefix sums of nˉ′′\bar{n}^{\prime\prime} increase compared to Sj(nˉ′)S_{j}(\bar{n}^{\prime}) for j≥ij\geq i. Find the smallest such i′i^{\prime} so that ∑j=1i′(n1′′−nj′′)>Si′(nˉ)\sum_{j=1}^{i^{\prime}}(n^{\prime\prime}_{1}-n^{\prime\prime}_{j})>S_{i^{\prime}}(\bar{n}). (Since nˉ′′\bar{n}^{\prime\prime} is not sorted, we fix the order in which prefix sums are accumulated to be the same as in nˉ\bar{n}; by (10) i′i^{\prime} is well defined). Next we let nˉ′′′\bar{n}^{\prime\prime\prime} be identical to nˉ′′\bar{n}^{\prime\prime} except that ni′′′′=ni′′′+xn_{i^{\prime}}^{\prime\prime\prime}=n_{i^{\prime}}^{\prime\prime}+x. In other words, nˉ′′′\bar{n}^{\prime\prime\prime} differs from nˉ′\bar{n}^{\prime} by shifting xx from coordinate ii to coordinate i′i^{\prime}.

We argue that incrementing ni′′′n_{i^{\prime}}^{\prime\prime} by xx does not change the maximal value of nˉ′′\bar{n}^{\prime\prime}, i.e., n1′′′>ni′′′′n_{1}^{\prime\prime\prime}>n_{i^{\prime}}^{\prime\prime\prime}. Our choice of i′i^{\prime}, which is the smallest index so that the prefix sum over nˉ′′\bar{n}^{\prime\prime} overtakes that over nˉ\bar{n}, implies that n1′′−ni′′′>n1−ni′n_{1}^{\prime\prime}-n_{i^{\prime}}^{\prime\prime}>n_{1}-n_{i^{\prime}}. Since n1′′=n1n_{1}^{\prime\prime}=n_{1}, it means that ni′>ni′′′n_{i^{\prime}}>n_{i^{\prime}}^{\prime\prime} (and by adding xx we move ni′′′n_{i^{\prime}}^{\prime\prime} towards ni′n_{i^{\prime}}). Furthermore,

(We use ni′≤nin_{i^{\prime}}\leq n_{i}, which is implied by i′>ii^{\prime}>i.)

We claim that ∑j=1t(n1′′′−nj′′′)≤St(nˉ)\sum_{j=1}^{t}(n_{1}^{\prime\prime\prime}-n_{j}^{\prime\prime\prime})\leq S_{t}(\bar{n}) for all tt, and thus, via (10), nˉ⪰nˉ′′′\bar{n}\succeq\bar{n}^{\prime\prime\prime}. The choice of i′i^{\prime} makes the statement trivial for t<i′t<i^{\prime}. For t≥i′t\geq i^{\prime} the following holds:

We may again apply the induction hypothesis to the pair nˉ\bar{n} and nˉ′′′\bar{n}^{\prime\prime\prime}, thus completing the proof of the lemma. ∎

To complete the proof of the proposition, we need to argue that the values of qq are also monotone in the chain constructed by the previous lemma. Concretely, we put forth

The fact that d(nˉ,nˉ′)=1d(\bar{n},\bar{n}^{\prime})=1 and nˉ⪰nˉ′\bar{n}\succeq\bar{n}^{\prime} means that there is either a single index ii so that ni′<nin_{i}^{\prime}<n_{i}, or there exist two indices ii and jj so that ni′<nin^{\prime}_{i}<n_{i} and nj′>njn^{\prime}_{j}>n_{j}. The first case is immediate, since qq is non-decreasing in all inputs except for the largest (by C7).

Let ni′=ni−xn^{\prime}_{i}=n_{i}-x and nj′=nj+yn^{\prime}_{j}=n_{j}+y, where x,y>0x,y>0. Since nˉ⪰nˉ′\bar{n}\succeq\bar{n}^{\prime}, it follows that ni≥njn_{i}\geq n_{j} and x>yx>y. Consider two cases.

Case I: ni′≥nj′n^{\prime}_{i}\geq n^{\prime}_{j}, i.e., removing xx from nin_{i} and adding yy to njn_{j} does not change their ordering. Let

Case II: ni′≤nj′n^{\prime}_{i}\leq n^{\prime}_{j}. In this case we swap the iith and jjth indices in nˉ′\bar{n}^{\prime} by defining nˉ′′\bar{n}^{\prime\prime} which differs from it in nˉi′′=nˉj′\bar{n}_{i}^{\prime\prime}=\bar{n}^{\prime}_{j} and nˉj′′=nˉi′\bar{n}_{j}^{\prime\prime}=\bar{n}^{\prime}_{i}. By C8, q(nˉ′′)=q(nˉ′)q(\bar{n}^{\prime\prime})=q(\bar{n}^{\prime}) and, of course, nˉ′′⪰nˉ\bar{n}^{\prime\prime}\succeq\bar{n} since the prefix sums remain unchanged. The benefit of doing this transformation is that we are back in Case I, where the relative order of coordinates that change between nˉ\bar{n} and nˉ′′\bar{n}^{\prime\prime} remains the same.

Applying Section B.3 we construct a chain of histograms between nˉ\bar{n} and nˉ′\bar{n}^{\prime}, which, by Section B.3, is non-increasing in q(⋅)q(\cdot). Together this implies that q(nˉ)≤q(nˉ′)q(\bar{n})\leq q(\bar{n}^{\prime}), as claimed. ∎

We apply the notion of dominance in proving the following proposition, which is used later in arguing correctness of Algorithm 4.

Let nˉ\bar{n} be an integer-valued histogram and dd be a positive integer. And q(⋅)q(\cdot) satisfies C1, C7, and C8. The following holds:

Assuming n(1)−n(2)≥2dn^{(1)}-n^{(2)}\geq 2d, let nˉ∗\bar{n}^{*} be obtained from nˉ\bar{n} by decrementing n(1)n^{(1)} by dd and incrementing n(2)n^{(2)} by dd. Then

Assuming ∑i=2mn(i)≥d\sum_{i=2}^{m}n^{(i)}\geq d, let nˉ∗∗\bar{n}^{**} be obtained from nˉ\bar{n} by incrementing n1n_{1} by dd, and by repeatedly decrementing the histogram’s current second highest value by one, dd times. Then

Towards proving the claims, we argue that nˉ∗\bar{n}^{*} and nˉ∗∗\bar{n}^{**} are, respectively, the minimal and the maximal elements in the histogram dominance order (Section B.3) in the set of histograms at distance dd from nˉ\bar{n}. By Section B.3 the claims follow.

Take any histogram nˉ′\bar{n}^{\prime} at distance dd from nˉ\bar{n}. Our goal is to prove that nˉ′⪰nˉ∗\bar{n}^{\prime}\succeq\bar{n}^{*}. Recall the definition of the distance d(⋅,⋅)d(\cdot,\cdot) between two histograms d(nˉ,nˉ′)=max⁡{∑i ⁣:ni>ni′⌈ni−ni′⌉,∑i ⁣:ni<ni′⌈ni′−ni⌉}d(\bar{n},\bar{n}^{\prime})=\max\left\{\sum_{i\colon n_{i}>n^{\prime}_{i}}\lceil n_{i}-n^{\prime}_{i}\rceil,\sum_{i\colon n_{i}<n^{\prime}_{i}}\lceil n^{\prime}_{i}-n_{i}\rceil\right\}. If the distance is bounded by dd, it means, in particular, that

That lets us bound the prefix sums of nˉ′\bar{n}^{\prime} as follows:

We demonstrated that nˉ′⪰nˉ∗\bar{n}^{\prime}\succeq\bar{n}^{*}, which, by Section B.3, implies that q(nˉ′)≤q(nˉ∗)q(\bar{n}^{\prime})\leq q(\bar{n}^{*}). Together with the immediate d(nˉ,nˉ∗)=dd(\bar{n},\bar{n}^{*})=d we prove the claim.

Assume wlog that nˉ\bar{n} is sorted in the descending order. Define the following value that depends on nˉ\bar{n} and dd:

The constant uu is the smallest such xx so that the total mass that can be shaved from elements of nˉ\bar{n} above xx (excluding n1n_{1}) is at most dd.

We give the following equivalent definition of nˉ∗∗\bar{n}^{**}:

Fix any i∈[m]i\in[m] and any histogram nˉ′\bar{n}^{\prime} at distance dd from nˉ\bar{n}. Our goal is to prove that Si(nˉ∗∗)≥Si(nˉ′)S_{i}(\bar{n}^{**})\geq S_{i}(\bar{n}^{\prime}) and thus nˉ∗∗⪰nˉ′\bar{n}^{**}\succeq\bar{n}^{\prime}. Assume the opposite and take largest ii such that Si(nˉ∗∗)<Si(nˉ′)S_{i}(\bar{n}^{**})<S_{i}(\bar{n}^{\prime}).

We may assume that n′(1)=n1∗∗=n1+dn^{\prime(1)}=n_{1}^{**}=n_{1}+d. Consider the following cases.

Case I. If n∗∗(i)<un^{**(i)}<u, the contradiction follows from

The last equality is due to the fact that all differences between nˉ\bar{n} and nˉ∗∗\bar{n}^{**} are confined to the indices that are less than ii.

Case II. If n∗∗(i)=un^{**(i)}=u and n′(i)≥un^{\prime(i)}\geq u, the contradiction with Si(nˉ∗∗)<Si(nˉ′)S_{i}(\bar{n}^{**})<S_{i}(\bar{n}^{\prime}) follows immediately from

Case III. Finally, consider the case when n∗∗(i)=un^{**(i)}=u and v≜n′(i)<uv\triangleq n^{\prime(i)}<u. Since ii is the largest such that Si(nˉ∗∗)<Si(nˉ′)S_{i}(\bar{n}^{**})<S_{i}(\bar{n}^{\prime}), it means that n∗∗(i+1)<n′(i+1)≤v<u=n∗∗(i)n^{**(i+1)}<n^{\prime(i+1)}\leq v<u=n^{**(i)} and thus n∗∗(i)−n∗∗(i+1)≥2n^{**(i)}-n^{**(i+1)}\geq 2 (we rely on the fact that the histograms are integer-valued). It implies that all differences between nˉ\bar{n} and nˉ∗∗\bar{n}^{**} are confined to the indices in [1,i][1,i]. Then,

which contradicts the assumption that Si(nˉ∗∗)<Si(nˉ′)S_{i}(\bar{n}^{**})<S_{i}(\bar{n}^{\prime}).

We may now state and prove the main result of this section.

Assume that q(⋅)q(\cdot) satisfies conditions C1–C8 and nˉ\bar{n} is an integer-valued histogram. Then the following two claims are true:

Algorithm 5 computes \SSβ(nˉ)\SS_{\beta}(\bar{n}), which is a β\beta-smooth upper bound on smooth sensitivity of β(q(⋅))\boldsymbol{\beta}\left(q(\cdot)\right).

Claim 2. The second claim follows from the specification of Algorithm 5 and the first claim. ∎

B.4 GNMax Satisfies Conditions C1–C8

where i∗i^{*} is the histogram nˉ\bar{n}’s highest coordinate, i.e., ni∗≥nin_{i^{*}}\geq n_{i} for all ii (if there are multiple highest, let i∗i^{*} be any of them). Recall that erf⁡\operatorname{erf} is the error function, and erfc⁡\operatorname{erfc} is the complement error function.

Appendix A demonstrates that q(nˉ)q(\bar{n}) bounds from above the probability that GNMax outputs anything but the highest coordinate of the histogram.

Conditions C1, C7, and C8 follow by simple calculus (q0{q_{0}}, defined below, is at most 0.5).

For any neighbor nˉ′\bar{n}^{\prime} of nˉ\bar{n}, i.e., d(nˉ′,nˉ)=1d(\bar{n}^{\prime},\bar{n})=1, the following bounds hold:

Assume wlog that i∗=1i^{*}=1. Let xi≜n1−nix_{i}\triangleq n_{1}-n_{i} and qi≜erfc⁡(xi/2σ)/2q_{i}\triangleq\operatorname{erfc}(x_{i}/2\sigma)/2, and similarly define xi′x^{\prime}_{i} for nˉ′\bar{n}^{\prime}. Observe that ∣xi−xi′∣≤2|x_{i}-x_{i}^{\prime}|\leq 2, which, by monotonicity of erfc⁡\operatorname{erfc}, implies that

(Although i∗i^{*} may change between nˉ\bar{n} and nˉ′\bar{n}^{\prime}, the bounds still hold.)

Our first goal is to upper bound q(nˉ′)q(\bar{n}^{\prime}) for a given value of q(nˉ)q(\bar{n}). To this end we set up the following maximization problem

We may temporarily ignore the non-negative constraints, which end up being satisfied by our solution. Consider using the method of Lagrange multipliers and take a derivative in xix_{i}’:

Since the expression is symmetric in i>1i>1, it means that the local optima are attained at x2=⋯=xmx_{2}=\dots=x_{m} (the second derivative confirms that these are local maxima). After solving for (m−1)erfc⁡(x/2σ)=2q(m-1)\operatorname{erfc}(x/2\sigma)=2q we have

where mm is the number of classes. Similarly,

B.4.2 Conditions C5 and C6

Rather than proving these statements analytically, we check these assumptions for any fixed σ\sigma and λ\lambda via a combination of symbolic and numeric analyses.

B.5 Rényi Differential Privacy and Smooth Sensitivity

Although the procedure for computing a smooth sensitivity bound may be quite involved (such as Algorithms 3–5), its use in a differentially private data release is straightforward. Following Nissim et al. (2007), we define an additive Gaussian mechanism where the noise distribution is scaled by σ\sigma and a smooth sensitivity bound:

We claim that this mechanism satisfies Rényi differential privacy for finite orders from a certain range.

The (β,σ)(\beta,\sigma)-GNSS mechanism Fσ\mathcal{F}_{\sigma} is (λ,ε)(\lambda,\varepsilon)-RDP, where

Consider two neighboring datasets DD and D′D^{\prime}. The output distributions of the (β,σ)(\beta,\sigma)-GNSS mechanism on DD and D′D^{\prime} are, respectively,

The Rényi divergence between two normal distributions can be computed in closed form (van Erven & Harremoës, 2014):

provided s2≜(1−λ)⋅\SSβ(D)2+λ⋅\SSβ(D′)2>0s^{2}\triangleq(1-\lambda)\cdot\SS_{\beta}(D)^{2}+\lambda\cdot\SS_{\beta}(D^{\prime})^{2}>0.

According to the definition of smooth sensitivity (Section B.1)

Bound (12) together with the condition that λ≤1/(2β)\lambda\leq 1/(2\beta) implies that

The above lower bound ensures that s2s^{2} is well-defined, i.e., non-negative, as required for application of (11).

Combining bounds (12)– (14), we have that

Note that if λ≫1\lambda\gg 1, σ≪λ\sigma\ll\lambda, and β≪1/(2λ)\beta\ll 1/(2\lambda), then (β,σ)(\beta,\sigma)-GNSS satisfies (λ,(λ+1)/σ2)(\lambda,(\lambda+1)/\sigma^{2})-RDP. Compare this with RDP analysis of the standard additive Gaussian mechanism, which satisfies (λ,λ/σ2)(\lambda,\lambda/\sigma^{2})-RDP. The difference is that GNSS scales noise in proportion to smooth sensitivity, which is no larger and can be much smaller than global sensitivity.

B.6 Putting It All Together: Applying Smooth Sensitivity

Recall our initial motivation for the smooth sensitivity analysis: enabling privacy-preserving release of data-dependent privacy guarantees. Indeed, these guarantees vary greatly between queries (see Figure 5) and are typically much smaller than data-independent privacy bounds. Since data-dependent bounds may leak information about underlying data, publishing the bounds themselves requires a differentially private mechanism. As we explain shortly, smooth sensitivity analysis is a natural fit for this task.

We first consider the standard additive noise mechanism where the noise (such as Laplace or Gaussian) is calibrated to the global sensitivity of the function we would like to make differentially private. We know that Rényi differential privacy is additive for any fixed order λ\lambda, and thus the cumulative RDP cost is the sum of RDP costs of individual queries each upper bounded by a data-independent bound. Thus, it might be tempting to use the standard additive noise mechanism for sanitizing the total, but that would be a mistake.

In contrast with the global sensitivity of BσB_{\sigma} that may be quite high—particularly for the second step of the Confident GNMax aggregator—its smooth sensitivity can be extremely small. Towards computing a smooth sensitivity bound on BσB_{\sigma}, we prove the following theorem which defines a smooth sensitivity of the sum in terms of local sensitivities of its parts.

We need to argue that \SS(⋅)\SS(\cdot) is β\beta-smooth, i.e., \SS(D1)≤eβ⋅\SS(D2)\SS(D_{1})\leq e^{\beta}\cdot\SS(D_{2}) for any neighboring D1,D2∈DD_{1},D_{2}\in\mathcal{D}, and it is an upper bound on the local sensitivity of F(D1)F(D_{1}), i.e., \SS(D1)≥∣F(D1)−F(D2)∣\SS(D_{1})\geq\left|F(D_{1})-F(D_{2})\right|.

Smoothness follows from the observation that

for all neighboring datasets D1D_{1} and D2D_{2} (by the triangle inequality over distances). Then

The fact that \SS(⋅)\SS(\cdot) is an upper bound on the local sensitivity of F(⋅)F(\cdot) is implied by the following:

Applying Theorem 7 allows us to compute a smooth sensitivity of the sum more efficiently than summing up smooth sensitivities of its parts. Results below rely on this strategy.

Table 2 revisits the privacy bounds in Table 1. For all data-dependent privacy claims of the Confident GNMax aggregator we report parameters for their smooth sensitivity analysis and results of applying the GNSS mechanism for their release.

Consider the first row of the table. The MNIST dataset was partitioned among 250 teachers, each getting 200 training examples. After the teachers were individually trained, the student selected at random 640 unlabeled examples, and submitted them to the Confident GNMax aggregator with the threshold of 200, and noise parameters σ1=150\sigma_{1}=150 and σ2=40\sigma_{2}=40. The expected number of answered examples (those that passed the first step of Algorithm 1) is 283, and the expected Rényi differential privacy is ε=1.18\varepsilon=1.18 at order λ=14\lambda=14. This translates (via Theorem 2) to (2.00,10−5)(2.00,10^{-5})-differential privacy, where 2.00 is the expectation of the privacy parameter ε\varepsilon.

These costs are data-dependent and they cannot be released without further sanitization, which we handle by adding Gaussian noise scaled by the smooth sensitivity of ε\varepsilon (the GNSS mechanism, Section B.5). At β=0.0329\beta=0.0329 the expected value of smooth sensitivity is 0.06180.0618. We choose σ\SS=6.23\sigma_{\SS}=6.23, which incurs, according to Theorem 6, an additional (data-independent) (14,0.52)(14,0.52)-RDP cost. Applying (β,σ\SS)(\beta,\sigma_{\SS})-GNSS where σ\SS=6.23\sigma_{\SS}=6.23, we may publish differentially private estimate of the total privacy cost that consists of a fixed part—the cost of applying Confident GNMax and GNSS—and random noise. The fixed part is 2.52=1.18+0.52−ln⁡(10−5)/142.52=1.18+0.52-\ln(10^{-5})/14, and the noise is normally distributed with mean 0 and standard deviation σ\SS⋅0.0618=0.385\sigma_{\SS}\cdot 0.0618=0.385. We note that, in contrast with the standard additive noise, one cannot publish its standard deviation without going through additional privacy analysis.

Some of these constants were optimally chosen (via grid search or analytically) given full view of data, and thus provide a somewhat optimistic view of how this pipeline might perform in practice. For example, σ\SS\sigma_{\SS} in Table 2 were selected to minimize the total privacy cost plus two standard deviation of the noise.

The following rules of thumb may replace these laborious and privacy-revealing tuning procedures in typical use cases. The privacy parameter δ\delta must be less than the inverse of the number of training examples. Giving a target ε\varepsilon, the order λ\lambda can be chosen so that log⁡(1/δ)≈(λ−1)ε/2\log(1/\delta)\approx(\lambda-1)\varepsilon/2, i.e., the cost of the δ\delta contribution in Theorem 2 be roughly half of the total. The β\beta-smoothness parameter can be set to 0.4/λ0.4/\lambda, from which smooth sensitivity \SSβ\SS_{\beta} can be estimated. The final parameter σ\SS\sigma_{\SS} can be reasonably chosen between 2⋅(λ+1)/ε2\cdot\sqrt{(\lambda+1)/\varepsilon} and 4⋅(λ+1)/ε4\cdot\sqrt{(\lambda+1)/\varepsilon} (ensuring that the first, dominant component, of the cost of the GNSS mechanism given by Theorem 6 is between ε/16\varepsilon/16 and ε/4\varepsilon/4).