Differentially Private Releasing via Deep Generative Model (Technical Report)

Xinyang Zhang, Shouling Ji, Ting Wang

Abstract

Privacy-preserving releasing of complex data (e.g., image, text, audio) represents a long-standing challenge for the data mining research community. Due to rich semantics of the data and lack of a priori knowledge about the analysis task, excessive sanitization is often necessary to ensure privacy, leading to significant loss of the data utility. In this paper, we present dp-GAN, a general private releasing framework for semantic-rich data. Instead of sanitizing and then releasing the data, the data curator publishes a deep generative model which is trained using the original data in a differentially private manner; with the generative model, the analyst is able to produce an unlimited amount of synthetic data for arbitrary analysis tasks. In contrast of alternative solutions, dp-GAN highlights a set of key features: (i) it provides theoretical privacy guarantee via enforcing the differential privacy principle; (ii) it retains desirable utility in the released model, enabling a variety of otherwise impossible analyses; and (iii) most importantly, it achieves practical training scalability and stability by employing multi-fold optimization strategies. Through extensive empirical evaluation on benchmark datasets and analyses, we validate the efficacy of dp-GAN.

(The source code and the data used in the paper is available at: https://github.com/alps-lab/dpgan)

Introduction

With the continued advances in mobile computing and the surging popularity of social media, a massive amount of semantic-rich data (e.g., image, text, audio) about individuals is being collected. While analyzing and understanding such data entails tremendous commercial value (e.g., targeted advertisements and personalized recommendations), governments and organizations all have recognized the critical need of respecting individual privacy in such practice (apple). In general, privacy protection can be enforced in two settings. In the interactive setting, a trusted curator collects data from individuals and provides a privacy-preserving interface for the analyst to execute queries over the data; in the more challenging non-interactive setting, the curator releases a “sanitized” version of the data, simultaneously providing analysis utility for the analyst and privacy protection for the individuals represented in the data (Dwork:2014:book).

Hitherto, privacy-preserving releasing of semantic-rich data still represents a long-standing challenge for the privacy and security research communities: the rich semantics of such data enable a wide variety of potential analyses, while the concrete analyses are often unknown ahead of releasing, especially in the case of exploratory data analysis. Therefore, to ensure privacy, excessive sanitization is often necessary, which may completely destroy the data utility for potential analyses.

In this paper, we tackle this challenge by integrating the state-of-the-art deep learning methods with advanced privacy-preserving mechanism. Specifically, we present dp-GAN, a new private releasing framework for semantic-rich data. With dp-GAN, instead of releasing a sanitized version of the original data, the curator publishes a generative model (i.e., generative adversarial network (Goodfellow:2014:nips)), which is trained using the original data in a privacy-preserving manner. The analyst, once equipped with this generative model, is able to produce synthetic data for the intended analysis tasks. The high-level framework of dp-GAN is illustrated in Figure 1.

In comparison with alternative solutions (e.g., sanitizing and then releasing the data), dp-GAN highlights with a number of significant advantages. First, it enforces differential privacy (Dwork:2006:icalp), the state-of-the-art privacy principle, in the training of generative models. Due to its closure under post-processing property (Dwork:2014:book), differential privacy ensures that the released model provides theoretically guaranteed privacy protection for the training data. Second, the use of generative models (e.g., generative adversarial networks in particular) as the vehicles of data releasing enables the synthesized data to capture the rich semantics of the original data. The faithful preservation of desirable utility leads to a variety of otherwise impossible analyses. For example, we show empirically that dp-GAN is able to effectively support semi-supervised classification tasks. Finally, the generative model is able to produce an unlimited amount of synthetic data for arbitrary analysis tasks, as shown in Figure 1.

However, realizing dp-GAN entails two major challenges. First, it requires new algorithmic advances to implement differential privacy within generative model training. To this end, we extend the framework of Improved Wasserstein GAN (Gulrajani:2017:wganip) by integrating the state-of-the-art privacy enhancing mechanisms (e.g., Gaussian mechanism (Dwork:2014:book)) and provide refined analysis of privacy loss within this framework. Second, the stability and scalability issues of training GAN models are even more evident once privacy enhancing mechanisms are incorporated. To this end, we develop multi-fold optimization strategies, including weight clustering, adaptive clipping, and warm starting, which significantly improve both training stability and utility retention. Our contributions can be summarized as follows.

First, to our best knowledge, dp-GAN is the first working framework that realizes the paradigm of privacy-preserving model releasing for semantic-rich data. We believe this new paradigm is applicable for a broad range of privacy-sensitive data publishing applications.

Second, in implementing dp-GAN, we develop multi-fold system optimization strategies that not only successfully incorporate privacy enhancing mechanisms within training deep generative model, but also significantly improve the stability and scalability of generative model training itself.

Third, we conduct extensive empirical evaluation using real large-size image data to validate the efficacy of dp-GAN. We show that dp-GAN, besides providing theoretically guaranteed privacy protection, preserves desirable utility of the original data, enabling a set of otherwise impossible analysis tasks.

The remainder of the paper proceeds as follows. Section 2 reviews the background of deep generative models and differential privacy; Section 3 presents the high-level design of dp-GAN; Section 4 details its implementation, in particular, the multi-fold optimizations to improve the stability and scalability of model training; Section 5 empirically evaluates our proposed solution; Section 6 discusses additional relevant literature; The paper is concluded in Section 7.

Preliminaries

In this section, we introduce the two basic building blocks of dp-GAN, generative adversarial network and differential privacy.

The generative adversarial network (GAN) (Goodfellow:2014:nips) is a class of unsupervised learning algorithms which are implemented by an adversarial process. As illustrated in Figure 2, the GAN architecture typically comprises two neural networks, a generator GG and a discriminator DD, in which GG learns to map from a latent distribution pzp_{z} to the true data distribution pdatap_{\rm data}, while DD discriminates between instances sampled from pdatap_{\rm data} and that generated by GG. Here GG’s objective is to “fool” DD by synthesizing instances that appear to have come from pdatap_{\rm data}. This framework corresponds to solving a minimax two-player game with the following objective function:

where xx and zz are sampled from pdatap_{\text{data}} and pzp_{\bm{z}} respectively.

Since its advent, GAN finds applications in varied unsupervised and semi-supervised learning tasks (Chen:2016:infogan; Radford:2015:dcgan; Donahue:2016:adl; Kumar:2017:semiinv; Reed:2016:generative; Ledig:2016:superres; Yeh:2016:inpaint; Rajeswar:2017:adversarial). One line of work takes the trained discriminator as a feature extractor and applies it in varied settings; the other line focuses on the latent variable zz in the generator, either using regularization to make zz semantically meaningful (Donahue:2016:adl; Chen:2016:infogan) or extracting information in the latent space directly (Radford:2015:dcgan).

Despite its simplicity, the original GAN formulation is unstable and inefficient to train. A number of followup work (Zhao:2016:energy; Chen:2016:infogan; Radford:2015:dcgan; Nowozin:2016:fgan; Arjovsky:2017:wgan; Gulrajani:2017:wganip) propose new training procedures and network architectures to improve training stability and convergence rate. In particular, the Wasserstein generative adversarial network (WGAN) (Arjovsky:2017:wgan) and Improved Training of Wasserstein GANs (Gulrajani:2017:wganip) attempt to minimize the earth mover distance between the synthesized distribution and the true distribution rather than their Jensen-Shannon divergence as in the original GAN formulation. Formally, improved WGAN adopts the following objective functions:

Here, x^=αx+(1−α)Gθ(z)\hat{x}=\alpha x+(1-\alpha)G_{\theta}(z), in which α\alpha is a random number sampled from $.Theregularizationtermenforcesthenormof. The regularization term enforces the norm ofD$’s gradients to be close to 1. This formulation is shown to allow more stable and faster training (Gulrajani:2017:wganip).

In the following, without loss of generality, we will exemplify with the improved WGAN formulation to implement dp-GAN.

2. Differential Privacy

By providing theoretically guaranteed protection, differential privacy (DP) (Dwork:2009:tcc; Dwork:2006:icalp; Dwork:2014:book) is considered one of the strongest privacy definitions.

Mechanisms. For a given deterministic function ff, DP is often achieved by injecting random noise into ff’s output, while the noise magnitude is determined by ff’s sensitivity. If ff is vector-valued, i.e., f:Dn↦Rmf:\mathcal{D}^{n}\mapsto\mathcal{R}^{m}, its sensitivity is defined as: \Updeltaf=max⁡d,d′∥f(d)−f(d′)∥\Updelta f=\max_{d,d^{\prime}}\|f(d)-f(d^{\prime})\|, where \Updeltaf\Updelta f represents the maximum influence of a single data entry on ff’s output, quantifying the (worst-case) uncertainty to be added to ff’s output to hide the presence of that entry.

where N(0,(\Updeltaf)2σI)\mathcal{N}(0,(\Updelta f)^{2}\sigma\mathcal{I}) is a Gaussian distribution with zero mean and covariance matrix (\Updeltaf)2σI(\Updelta f)^{2}\sigma\mathcal{I} and I\mathcal{I} is the identity matrix.

Properties. In addition, DP also features the following key properties, which we leverage in implementing dp-GAN.

Closure under post-processing. Any computation on the output of a DP-mechanism does not increase privacy loss.

Sequential composability. The composition of a sequence of DP-mechanisms is also DP-satisfying.

We may use the composition theorems (Dwork:2014:book; Dwork:2010:boosting) to estimate the privacy loss after kk-fold application of DP-mechanisms.

Models and Algorithms

In this section, we present the basic design of dp-GAN, a generic framework for differentially private releasing of semantic-rich data.

Similar to the line of work on differentially private deep learning (e.g., (Abadi:2016:dpdl)), dp-GAN achieves DP by injecting random noise in the optimization procedure (e.g., stochastic gradient descent (Song:2013:stochastic)). Yet, the GAN architecture, which comprises a generator GG and a discriminator DD, presents unique challenges for realizing this idea. A naïve solution is to inject noise in training both GG and DD; the minimax game formulation however makes it difficult to tightly estimate the privacy loss, resulting in excessive degradation in the produced models.

We opt to add random perturbation only in training DD. The rationale behind our design choice is as follows. First, as shown in Figure 2, the real data is directly accessible only by DD; thus, it suffices to control the privacy loss in training DD. Second, in comparison with GG, which often employs building blocks such as batch normalizations (Ioffe:2015:bn) and residual layers (He:2016:resnet; He:2016:imapresnet) in order to generate realistic samples, DD often features a simpler architecture and a smaller number of parameters, which make it possible to tightly estimate the privacy loss.

After deciding where to enforce privacy protection, next we present the basic construct of dp-GAN, as sketched in Algorithm 1. At a high level, dp-GAN is built upon the improved WGAN framework and enforces DP by injecting random noise in updating the discriminator DD. Specifically, when computing DD’s gradients with respect to a real sample xx (line 7), we first clip the gradients by a threshold CC (line 8), ensuring that the sensitivity is bounded by CC; we then add random noise sampled from a Gaussian distribution. Additionally, we use a privacy accountant A\mathcal{A} similar to (McSherry:2009:PIQ:1559845.1559850) to track the cumulative privacy loss. This process iterates until convergence or exceeding the privacy budget (line 14).

2. Privacy Analysis

A key component of dp-GAN is to keep track the cumulative privacy loss during the course of training, i.e., privacy accountant A\mathcal{A}, which integrates two building blocks: moments accounting and sub-sampling. Next we elaborate on each component.

In (Abadi:2016:dpdl), Abadi et al. propose moments accounting, a privacy accounting method, which provides tighter estimation of the privacy loss than the composition theorems. Specifically, consider the privacy loss as a random variable ZZ, which is defined as:

where d,d′∈Dnd,d^{\prime}\in\mathcal{D}^{n} are two neighboring datasets, M\mathcal{M} is the random mechanism, and o∈Ro\in\mathcal{R} is an outcome.

The privacy loss can be estimated by bounding the λ\lambda–th moment of ZZ, which is calculated via evaluating the moment generating function of ZZ at λ\lambda:

To enforce DP, one needs to consider αM\alpha_{\mathcal{M}} across all possible d,d′d,d^{\prime}, i.e., αM≜max⁡d,d′αM(λ;d,d′)\alpha_{\mathcal{M}}\triangleq\max_{d,d^{\prime}}\alpha_{\mathcal{M}}(\lambda;d,d^{\prime}).

Using Markov’s inequality, it can be proved that for any ϵ>0\epsilon>0, M\mathcal{M} satisfies (ϵ,δ)(\epsilon,\delta)-DP for δ=min⁡λ(αM−λϵ)\delta=\min_{\lambda}(\alpha_{\mathcal{M}}-\lambda\epsilon) (Abadi:2016:dpdl). Besides, if M\mathcal{M} is the composition of a sequence of sub-mechanisms {Mj}j=1J\{\mathcal{M}_{j}\}_{j=1}^{J}, it holds that αM(λ)≤∑j=1JαMj(λ)\alpha_{\mathcal{M}}(\lambda)\leq\sum_{j=1}^{J}\alpha_{\mathcal{M}_{j}}(\lambda). In tracking the privacy loss, we apply numerical integration to compute αM(λ)\alpha_{\mathcal{M}}(\lambda).

Sub-sampling

During each iteration of training DD, we sample a batch of examples from the real dataset (line 4). The randomness due to sampling adds another level of privacy protection. According to the privacy amplification theorems (Beimel:2014:sample; Kasiviswanathan:2011:sample), this sampling procedure achieves (O(qϵ,qδ))(\mathcal{O}(q\epsilon,q\delta))-DP per iteration with respect to the whole dataset where q=m/nq=m/n is the sampling ratio per batch, σ=2log⁡(1.25/δ)/ϵ\sigma=\sqrt{2\log(1.25/\delta)}/\epsilon, and ϵ≤1\epsilon\leq 1.

Using moments accounting (Abadi:2016:dpdl), it can be proved that Algorithm 1 is (O(qϵt),δ)(\mathcal{O}(q\epsilon\sqrt{t}),\delta)-DP, where tt is the total number of iterations in the main loop, if the noise scale σ\sigma and the clipping threshold CC are chosen appropriately.

Algorithm 1 is (O(qϵt),δ)(\mathcal{O}(q\epsilon\sqrt{t}),\delta)-DP, where tt is the total number of iterations in the main loop, if the noise scale σ\sigma and the clipping threshold CC are chosen appropriately.

We have the following facts about moments accounting, Gaussian mechanism, and random sampling (Abadi:2016:dpdl):

(1) Let M\mathcal{M} be the composition of a sequence of sub-mechanisms {Mj}j=1J\{\mathcal{M}_{j}\}_{j=1}^{J}, it holds that αM(λ)≤∑j=1JαMj(λ)\alpha_{\mathcal{M}}(\lambda)\leq\sum_{j=1}^{J}\alpha_{\mathcal{M}_{j}}(\lambda).

(2) Using Markov’s inequality, we have for any ϵ>0\epsilon>0, M\mathcal{M} satisfies (ϵ,δ)(\epsilon,\delta)-DP for δ=min⁡λ(αM−λϵ)\delta=\min_{\lambda}(\alpha_{\mathcal{M}}-\lambda\epsilon).

(3) Consider a function ff which maps a data sample to a real-valued vector, with its output bounded by ∣∣f∣∣2≤1||f||_{2}\leq 1. Let σ≥1\sigma\geq 1 and I\mathcal{I} be a set of samples from [n][n] where each i∈Ii\in\mathcal{I} is selected from [n][n] independently with probability q≤116σq\leq\frac{1}{16\sigma}. Then for any positive integer λ≤−σ2ln⁡(qσ)\lambda\leq-\sigma^{2}\ln(q\sigma), the mechanism M(d)=∑i∈If(di)+N(0,σ2I)\mathcal{M}(d)=\sum_{i\in\mathcal{I}}f(d_{i})+\mathcal{N}(0,\sigma^{2}\mathbf{I}) satisfies

Assume that σ\sigma and λ\lambda satisfy the condition in (3). The log-moment of Algorithm 1 is bounded by α(λ)≤q2λ2t/σ2\alpha(\lambda)\leq q^{2}\lambda^{2}t/\sigma^{2}, according to (2) and (3). To ensure that Algorithm 1 satisfies (ϵˉ,δˉ)(\bar{\epsilon},\bar{\delta})-DP, it suffices to have (i) q2λ2t/σ2≤λϵˉ/2q^{2}\lambda^{2}t/\sigma^{2}\leq\lambda\bar{\epsilon}/2, (ii) exp⁡(−λϵˉ/2)≤δˉ2\exp(-\lambda\bar{\epsilon}/2)\leq\bar{\delta}^{2}, and (iii) λ≤−σ2log⁡(qσ)\lambda\leq-\sigma^{2}\log(q\sigma).

With easy calculation, it can be verified that there exist two constants c1c_{1} and c2c_{2}, such that when ϵˉ=c1q2t\bar{\epsilon}=c_{1}q^{2}t and σ=c2q−log⁡δˉ/ϵˉ\sigma=c_{2}q\sqrt{-\log\bar{\delta}}/\bar{\epsilon}, all the aforementioned conditions are met. □\square

Optimizations

The GAN formulation is known for its training stability issue (Gulrajani:2017:wganip). This issue is even more evident in the dp-GAN framework, as random noise is injected in each training step. In our empirical study (Section 5), it is observed that the basic dp-GAN suffers a set of drawbacks.

Its synthesized data is often of low quality, e.g., unrealistic looking images.

It converges slower than its regular GAN counterpart, resulting in excessive privacy loss, and sometimes even diverges.

Its framework is fairly rigid, unable to take advantage of extra resources, e.g., a small amount of public data.

Here we propose a suite of optimization strategies that significantly improve dp-GAN’s training stability and convergence rate. Specifically, we enhance the basic dp-GAN along three directions.

Parameter grouping - By carefully grouping the parameters and perform stratified clipping over different groups, we strike a balance between convergence rate and privacy cost.

Adaptive clipping - By monitoring the change of gradient magnitudes, we dynamically adjust the clipping bounds to achieve faster convergence and stronger privacy.

Warm starting - By initializing the model with a good starting point, we boost up the convergence and save the privacy budget for critical iterations.

Next we detail each of these optimization strategies.

As shown in Algorithm 1, the DP constraint essentially influences the training in two key operations (line 8): clipping - the norm of gradients is truncated by an upper bound CC, and perturbation - random noise is added to the gradients. We propose to explore the opportunities to optimize these two critical operations.

In Algorithm 1, the gradients of all the parameters are grouped together to compute the norm. This global clipping scheme minimizes the privacy budget spent in each iteration, but introduces excessive random noise for some parameters, causing slow convergence. At the other end of the spectrum, one may clip the gradient of each parameter with a parameter-specific clipping bound, which may reduce the overall amount of random noise, but at the cost of privacy budget. Here we propose two alternative grouping strategies that strike a balance between convergence rate and privacy loss per iteration.

In most GAN architectures (e.g., convolutional layers and fully connected layers), there are two types of parameters, weights and biases. For example, a fully connected layer models a linear function f(x)=w⋅x+bf(x)=w\cdot x+b where ww and bb are the weight and bias parameters respectively. In our empirical study, it is observed that the magnitudes of the biases’ gradients are often close to zero, while the magnitudes of the weights’ gradients are much larger. Thus, our first strategy is to differentiate weight and bias parameters and to group the gradients of all the bias parameters together for the clipping operation. Given the large number of bias parameters, under the same amount of overall privacy budget, this strategy almost doubles the allowed number of iterations, with little influence on the convergence rate (details in Section 5).

Weight Clustering

While it is natural to group the bias parameters together as many of them are close to zero, the grouping of the weight parameters is much less obvious. Here we propose a simple yet effective strategy to stratify and cluster the weight parameters. Assuming that we have the optimal parameter-specific clipping bound {c(gi)}i\{c(g_{i})\}_{i} for each weight’s gradient {gi}i\{g_{i}\}_{i} (we will show how to achieve this shortly), we then cluster these parameters into a predefined number of groups using a hierarchical clustering procedure, as sketched in Algorithm 2.

2. Adaptive Clipping

In Algorithm 1, the gradient clipping bound CC is a hyper-parameter that needs careful tuning. Overly small CC amounts to excessive truncation of the gradients, while overly large CC is equivalent to overestimating the sensitivity, both resulting in slow convergence and poor utility. However, within the improved WGAN framework, it is challenging to find a near-optimal setting of CC, due to reasons including: (i) the magnitudes of the weights and biases and their gradients vary greatly across different layers; and (ii) the magnitudes of the gradients are constantly changing during the training.

To overcome these challenges, we propose to constantly monitor the magnitudes of the gradients before and during the training, and set the clipping bounds based on the average magnitudes. Specifically, we assume that besides the private data Dpri\mathcal{D}_{\rm pri} to train the model, we have access to a small amount of public data Dpub\mathcal{D}_{\rm pub} which is available in many settings. During each training step, we randomly sample a batch of examples from Dpub\mathcal{D}_{\rm pub}, and set the clipping bound of each parameter as the average gradient norm with respect to this batch. In our empirical study (Section 5), we find that this adaptive clipping strategy leads to much faster training convergence and higher data utility.

3. Warm Starting

It is expected that due to the random noise injected in each training step, the GAN with the DP constraint often converges slower than its vanilla counterpart, especially during its initial stage. To boost up the convergence rate, we propose to leverage the small amount of public data Dpub\mathcal{D}_{\rm pub} to initialize the model. Specifically, using Dpub\mathcal{D}_{\rm pub}, we first train a few iterations without the DP constraint, and then continue the training using Dpri\mathcal{D}_{\rm pri} under the DP constraint.

This strategy provides a warm start for dp-GAN. It helps find a satisfying starting point, which is essential for the model to converge, and also saves a significant amount of privacy budget for more critical iterations.

An astute reader may point out that since there is public data available, one may just use the public data for training. The issue is that the public data is often fairly limited, which may not be sufficient to train a high-quality GAN. Further, the large amount of private data is valuable for improving the diversity of the samples synthesized by the generator (details in Section 5).

4. Advanced Algorithm

Putting everything together, Algorithm 3 sketches the enhanced dp-GAN framework. Different from Algorithm 1, we initialize the model with a warm starting procedure using the public data Dpub\mathcal{D}_{\text{pub}} (line 1). During each training iteration, we first estimate the clipping bound of each parameter using Dpub\mathcal{D}_{\text{pub}} (line 4-5), then group the parameters into kk groups {Gj}j=1k\{G_{j}\}_{j=1}^{k}, each GjG_{j} sharing similar clipping bound cjc_{j} (line 6). In our current implementation, we use the average clipping bounds in GjG_{j} to estimate cjc_{j}. We then perform group-wise clipping and perturbation (line 9-12). The remaining part is similar to Algorithm 1. The process iterates until the generator’s parameters converge or the privacy budget is used up (line 19).

Astute readers may raise the concern about possible additional privacy loss due to the multiple optimization strategies. We have the following theorem.

Algorithm 3 is (O(qϵt),δ)(\mathcal{O}(q\epsilon\sqrt{t}),\delta)-DP, where tt is the total number of iterations in the main loop, if the noise scale σ\sigma and the clipping threshold CC are chosen appropriately.

Algorithm 3 differs from Algorithm 1 mainly in its use of finer-grained clippings for different groups of parameters, which however does not cause additional privacy loss. Intuitively, thanks to the composability property of the moments accounting (Abadi:2016:dpdl), the privacy loss due to applying parameter-specific clipping is completely accounted.

Next we prove that the strategy of weight clustering does not cause unaccounted privacy loss, while similar arguments apply to other optimization strategies as well.

In Algorithm 1, in the ii-th iteration, the gradient g(i)g^{(i)} is first clipped by a global bound cc and the random noise ξ∼N(0,(σc)2I)\xi\sim\mathcal{N}(0,(\sigma c)^{2}\mathbf{I}) is applied to g(i)g^{(i)} to ensure (ϵ,δ)(\epsilon,\delta)-DP, where σ=2log⁡(1.25/δ)/ϵ\sigma=\sqrt{2\log(1.25/\delta)}/\epsilon.

In Algorithm 3, g(i)g^{(i)} is divide into kk sub-vectors {gj(i)}j=1k\{g_{j}^{(i)}\}_{j=1}^{k}. Each sub-vector gj(i)g_{j}^{(i)} is clipped by a group-specific bound cjc_{j} and the random noise ξj∼N(0,(σcj)2I)\xi_{j}\sim\mathcal{N}(0,(\sigma c_{j})^{2}\mathbf{I}) is applied, where σ=2log⁡(1.25/δ)/ϵ\sigma=\sqrt{2\log(1.25/\delta)}/\epsilon. Thus, releasing each gj(i)g_{j}^{(i)} satisfies (ϵ,δ)(\epsilon,\delta)-DP. As {gj(i)}j=1k\{g_{j}^{(i)}\}_{j=1}^{k} are disjoint, applying the parallel composability property of DP (Dwork:2014:book), releasing {gj(i)}j=1k\{g_{j}^{(i)}\}_{j=1}^{k} also satisfies (ϵ,δ)(\epsilon,\delta)-DP.

Empirical Evaluation

In this section, we empirically evaluate the proposed dp-GAN framework. The experiments are designed to answer four key questions that impact dp-GAN’s practical use. First, is dp-GAN able to synthesize visually vivid image data, under the DP constraint? Second, does the synthesized data demonstrate sufficient quality and diversity, from a quantitative perspective? Third, does the synthesized data retain enough utility for concrete data analysis tasks? Finally, how do different optimization strategies influence dp-GAN’s performance? We begin with describing the experimental setting.

In our experiments, we use three benchmark datasets:

MNIST, which consists of 70K handwritten digit images of size 28×2828\times 28, split into 60K training and 10K test samples.

CelebA, which comprises 200K celebrity face images of size 48×4848\times 48, each with 40 attribute annotations.

LSUN, which contains around one million labeled images of size 64×6464\times 64, for each of the 10 scene categories.

For the MNIST and CelebA datasets, we split the training data (which is the entire dataset if no labeling information is considered) using the ratio of 2:982:98 as publicly available data Dpub\mathcal{D}_{\rm pub} and private data Dpri\mathcal{D}_{\rm pri} respectively. We train dp-GAN on Dpri\mathcal{D}_{\rm pri} under the DP constraint. For the LSUN dataset, we consider two settings. First, we consider it as an unlabeled dataset and split it into 2:982:98 as public data Dpub\mathcal{D}_{\rm pub} and private data Dpri\mathcal{D}_{\rm pri}, which we denote as LSUN-U. Second, we consider the label information of the dataset. We sample 500K images from each of the top 5 categories (in terms of number of images), which are then split into 2:982:98 as Dpub\mathcal{D}_{\rm pub} and Dpri\mathcal{D}_{\rm pri} respectively. We refer to this dataset as LSUN-L.

The network architecture of dp-GAN is similar to (Gulrajani:2017:wganip), which we adpat to each dataset. The default setting of the parameters is as follows: the coefficient of gradient penalty λ=10\lambda=10, the number of critic iterations per GAN’s iteration ncritic=4n_{\text{critic}}=4, the batch size m=64m=64. The setting of the parameters specific to each dataset is summarized in Table 1, where (α,β1,β2)(\alpha,\beta_{1},\beta_{2}) are the hyper-parameters of the Adam optimizer, (ϵ,δ)(\epsilon,\delta) are the privacy budget, and σ\sigma is the noise scale. The setting of σ\sigma follows the setting in (Abadi:2016:dpdl), which is considered sufficiently strict in typical applications. The last two hyper-parameters are for advanced dp-GAN: kk is the number of groups for weight clustering, and twarmt_{\text{warm}} is the number of iterations for warm starting with public data.

All the experiments are conducted on TensorFlow.

2. Qualitative Evaluation

In this set of experiments, we qualitative evaluate the quality of the data synthesized by dp-GAN. Figure 3, 4, 5, and 6 show a set of synthetic samples generated by dp-GAN, which has been trained on the MNIST, LSUN-U, LSUN-L, and CelebA datasets respectively. It is noted that in all the cases, dp-GAN is able to generate visually vivid images of quality comparable to original ones, while, at the same time, providing strong privacy protection (see Table 1).

3. Quantitative Evaluation

Next we conduct quantitative evaluation of dp-GAN’s performance. Specifically, we first compare the synthetic data against the real data in terms of their statistical properties, including Inception scores and Jensen-Shannon divergence; we then evaluate the quality of the synthetic data in semi-supervised classification tasks.

In (Salimans:2016:improved), Salimans et al. propose to use Inception score to measure the quality of data generated by GAN. Formally, the Inception score Even though the datasets here are not ImageNet, we still refer to Eqn. 4 as Inception score in the following. of a generator GG is defined as:

Here, (i) xx is a sample generated by GG. (ii) Pr(y∣x){\rm Pr}(y|x) is the conditional distribution imposed by a pre-trained classifier to predict xx’s label yy. If xx is similar to a real sample, we expect the entropy of Pr(y∣x){\rm Pr}(y|x) to be small. (iii) Pr(y)=∫xPr(y∣x=G(z)dz{\rm Pr}(y)=\int_{x}{\rm Pr}(y|x=G(z){\rm d}z is the marginal distribution of yy. If GG is able to generate a diverse set of samples, we expect the entropy of Pr(y){\rm Pr}(y) to be large. Thus, by measuring the KL divergence of the two distributions, s(G)s(G) captures both the quality and diversity of the synthetic data. For the MNIST and LSUN-L datasets, we use the entire training set to train baseline classifiers to estimate Pr(y∣x){\rm Pr}(y|x). The classifiers are tuned to achieve reasonable performance on the validation sets (99.06% for MNIST and 88.73% for LSUN-L).

Table 2 summarizes the Inception scores of synthetic data (generated by regular GAN and dp-GAN) and real data for the MNIST and LSUN-L datasets. It can be noticed that dp-GAN is able to synthesize data with Inception scores fairly close to the real data and that generated by regular GANs (without privacy constraints). For example, in the case of MNIST, the difference between the real data and the synthetic data by dp-GAN is less than 1.32.

To measure dp-GAN’s performance with respect to unlabeled data (e.g., CelebA and LSUN-U), we train another discriminator D′D^{\prime} using the real data and test whether D′D^{\prime} is able to discriminate the synthetic data. We consider two distributions: (i) Pr(y∣x){\rm Pr}(y|x) is the conditional distribution that D′D^{\prime}’s prediction about xx’s source (real or synthetic) and (ii) Bp\mathcal{B}_{p} is a Bernoulli distribution with p=0.5p=0.5. We use the Jensen-Shannon divergence of the two distributions to measure the quality of the synthetic data:

Intuitively, a smaller value of s(G)s(G) indicates that D′D^{\prime} has more difficulty to discriminate the synthetic data, i.e., better quality of the data generated by GG.

Table 4 summarizes the quality scores of the real and synthetic data (regular GAN and dp-GAN) on the CelebA and LSUN-U datasets. Observe that dp-GAN generates data of quality close to that by regular GAN (without privacy constraints), especially in the case of LSUN-U, i.e., 0.25 versus 0.29. This may be explained by that compared with CelebA, LSUN-U is a relatively larger dataset, enabling dp-GAN to better capture the underlying data distribution.

GANs that generate images with a single label or without a explicit classification task. We can consider train another discriminator DD to produce a signal to identify if the images come from generative distribution G(p(z))G\left(p\left(z\right)\right) (z∼p(z))(z\sim p(z)) or real data distribution pdatap_{\text{data}}. We donate y=1y=1 if an image xx comes from real distribution, and y=−1y=-1 if it is a generated one. Here we use Jensen–Shannon divergence to measure the distance between two distributions. Specifically, we take

to measure the quality of generated examples without an explicit supervised task. Here p(y∣x)p\left(y|x\right) is the conditional probability of a sample xx is coming from pdatap_{\text{data}}, which is a Bernoulli distribution, and q(y)q(y) is a Bernoulli distribution with parameter p=0.5p=0.5. Thus, the better the generator, the smaller its score, as even a good discriminator is not able to decide if the sample xx is coming from the generator GG or pdatap_{\text{data}}. In table 4, we show the quality of scores of unlabeled images with CelebA and LSUN–Bedroom datasets.

Analysis Tasks

We further evaluate dp-GAN’s performance in concrete analysis tasks. Specifically, we consider the use of synthetic data in a semi-supervised classification task. In such a task, the analyst possesses a small amount of public, labeled data and a large amount of synthetic, unlabeled data (generated by dp-GAN). The goal is to leverage both the labeled and unlabeled data to train a better classifier than that trained only using the limited labeled data.

To make things more interesting, we consider the setting of two separate classifiers. The first one C1\mathcal{C}_{1} has the same structure as a regular image classifier; while the second one C2\mathcal{C}_{2} classifies using both an image and its code. The architecture of C2\mathcal{C}_{2} is designed to learn the correlation between the codes and the images. The learning procedure is sketched in Algorithm 4, it consists of two part for each iteration. In the first part (line 2-5), we first sample a batch of mm codes z^\hat{z}, and generate images z^\hat{z} from generator GG with z^\hat{z}, and use C1\mathcal{C}_{1} to classify z^\hat{z} into category y^\hat{y}. Then we update C2\mathcal{C}_{2} with (z^,x^,y^)(\hat{z},\hat{x},\hat{y}) (line 5). In the second part (line 6-9), we sample a batch of m⋅(1−ps)m\cdot(1-p_{s}) real examples (x,y)(x,y) from the labeled data, and then sample another batch of m⋅psm\cdot p_{s} codes z^\hat{z} and their synthetic images z^\hat{z}, and labeled them with C2\mathcal{C}_{2} as y^\hat{y}. Now we take both sets of inputs to update C1\mathcal{C}_{1}.

We hope that C1\mathcal{C}_{1} and C2\mathcal{C}_{2} would converge quickly. However, In the experiments, we found that if we use the data from C2\mathcal{C}_{2} too early, it would cause the entire model unstable, and difficult to converge to a proper accuracy, due to that C2\mathcal{C}_{2} is not fully trained with correct labels (i.e., in early state, both C1\mathcal{C}_{1} and C2\mathcal{C}_{2} have low accuracy). Thus, In practice, it is sensible to increase psp_{s} gradually during the training after some iterations. In our experiments, we first introduce ps=0p_{s}=0 at the one third point of the regular model, and gradually increase it to ps, finalp_{\text{s, final}}. Then we follow the flow in Algorithm 4 with ps=ps, finalp_{s}=p_{\text{s, final}}.

We evaluate dp-GAN’s performance in such a task on the LSUN-L dataset. It is clear that the semi-supervised classifier steadily outperforms the supervised classifier. The difference is especially evident when the size of the public data is small (i.e., limited number of labeled samples). For example, for n=0.5×104n=0.5\times 10^{4}, the semi-supervised classifier outperforms the supervised one by more than 6%. We can thus conclude that dp-GAN supplies valuable synthetic data for such semi-supervised classification tasks.

4. Effectiveness of Optimizations

In the final set of experiments, we evaluate the impact of different optimization strategies on dp-GAN’s performance.

We first measure the strategy of weight clustering on the number of allowed iterations given the same privacy constraints. Table 7 compares the number of allowed iterations before and after applying the weight clustering strategy. It is clear that across all the datasets, this strategy significantly increases the number of allowed iterations, thereby improving the retained utility in the generative models.

We further measure the impact of different configures of multiple optimization strategies on dp-GAN’s performance with results listed in Table 9 and Table 10 for the labeled and unlabeled datasets respectively. It is observed that in general, combining multi-fold optimizations significantly boosts dp-GAN’s performance. For example, in the case of Inception score, the score is increased from 6.59 to 8.64.

Additional Related Work

Recent research has suggested that it is possible to enforce strong differential privacy protection in many types of analyses without significant utility loss (see (Dwork:2009:tcc) for an excellent survey).

The existing work can be roughly categorized into supervised settings, such as logistic regression (Chaudhuri:2011:erm) and support vector machine (SVM) (Chaudhuri:2011:erm; Rubinstein:2009:dpsvm), and unsupervised settings, such as publishing histograms (Xu:2013:differentially), releasing contingency tables (Yang:2012:differential), hypothesis testing (Gaboardi:2016:dpht), collaborative recommendation (Zhu:2016:dprecommend), K-Means clustering (Su:2016:dpkmeans), and spectral graph analysis (Wang:2013:dpga). To our best knowledge, this work represents one of the first attempts in the direction of differentially private publishing of semantic-rich data.

More recently, extensive research effort has focused on enforcing differential privacy in training deep learning models. Adadi et al. (Abadi:2016:dpdl) proposed to use differentially private stochastic gradient descent (Song:2013:stochastic) to enforce (ϵ,δ)(\epsilon,\delta)-differential privacy in training deep neural networks. Phan et al. (Phan:2016:dpae), proposed to apply the functional mechanism (Zhang:2012:functional) to train differentially private auto-encoders. In (Phan:2017:dplap), Phan et al. proposed an adaptive Laplace mechanism to reduce the required random noise. Our work advances this line of research by enforcing differential privacy in the setting of training generative adversarial networks, a new class of deep learning models.

The work most relevant to ours is perhaps (Gergely:2017:dpmixgen), in which Gergely et al. proposed a framework of training differential private deep generative networks. Our work however differs from (Gergely:2017:dpmixgen) in significant ways. First, (Gergely:2017:dpmixgen) used a two-stage process that first performs clustering and then produces generative models such as Restricted Boltzmann Machine (RBM) (Fischer:2012:rbmintro) and Variational Auto-Encoder (VAE) (Kingma:2013:vae); in contrast, our work provides an end-to-end solution that produces general GAN, which is known to outperform RBM and VAE in data synthesis. Second, the method in (Fischer:2012:rbmintro) only works well for low-dimensional data (e.g., 784 for MNIST and 1303 for CDR); in contrast, dp-GAN is able to generate high-quality, high-dimensional synthetic data (e.g., 12,288 for LSUN). In (Jones:2017:dpgan), Jones et al. also proposed a differentially private GAN framework, which however only generates low-dimensional samples (3×123\times 12) and meanwhile requires label information. In comparison, dp-GAN works well for high-dimensional data without any labeling information. To achieve this, dp-GAN adopts multiple optimization strategies that improve both training stability and utility retention.

Conclusion and Discussion

In this paper, we present dp-GAN, a generic framework of publishing semantic-rich data in a privacy-preserving manner. Instead of releasing sanitized datasets, dp-GAN releases differentially private generative models, which can be used by analysts to synthesize unlimited amount of data for arbitrary analysis tasks. To achieve this, dp-GAN integrates the generative adversarial network framework with differential privacy mechanisms, provides refined analysis of privacy loss within this framework, and employs a suite of optimization strategies to address the training stability and scalability challenges. Using benchmark datasets and analysis tasks, we show that dp-GAN is able to synthesize data of utility comparable to original data, at the cost of modest privacy loss.

This work also opens several avenues for further research. For example, in this paper we mostly focus on publishing image data, while it is worth investigation to adapt dp-GAN to support other types of semantic-rich data (e.g., LSTM for language modeling tasks). In addition, dp-GAN is formulated as an unsupervised framework, while its extension to supervised and semi-supervised learning is attractive for data with label information.

References