P3SGD: Patient Privacy Preserving SGD for Regularizing Deep CNNs in Pathological Image Classification

Bingzhe Wu, Shiwan Zhao, Guangyu Sun, Xiaolu Zhang, Zhong Su, Caihong Zeng, Zhihong Liu

Introduction

In recent years, deep CNNs have emerged as powerful tools for various pathological image analysis tasks, such as tissue classification pedraza2017glomerulus; Gallego2018Glomerulus, lesion detection Janowczyk2016Deep; liu2017detecting, nuclei segmentation Nuclei_seg_2016; Nuclei_seg_2015; Nuclei_seg_2017, etc. The superior performance of deep CNNs usually relies on large amounts of labeled training data 2017dnnsurvey. Unfortunately, the lack of labeled pathological images for some tasks may lead to two notorious issues: (1) overfitting of the CNN models dropout14; Dropconnect; Zhang2016a and (2) privacy leakage Zhang2016a; memorization; Fredrikson2015; csf18_relation of the patients. Firstly, the performance of a CNN-based model is always harmed by the overfitting due to its large amounts of parameters and the insufficiency of training data. Secondly, pathological datasets usually contain sensitive information, which can be associated with each individual patient. The CNN-based models trained using conventional SGD may involuntarily reveal the private information of patients according to recent studies Zhang2016a; Fredrikson2015. For example, Zhang et al. Zhang2016a show that the CNN model can easily memorize some samples in the training dataset. Fredrikson et al. Fredrikson2015 propose a model-inversion attack to reconstruct images in the training dataset. In Figure 1 (a) and (b), we demonstrate an attacking example in our task, reconstructing the outline of a patch in the training dataset by leveraging a well-trained CNN model and its intermediate feature representations.

There have been numerous studies to solve either of two issues individually. On the one hand, to reduce the risk of overfitting in deep CNNs, previous research suggests adding appropriate randomness into the training phase dropout14; Dropconnect; xie2016disturblabel. For example, Dropout dropout14 adds randomness in activation by randomly discarding the hidden layers’ outputs. DropConnect Dropconnect adds randomness in weight parameters by randomly setting weights to zero during training. On the other hand, differential privacy dwork_dp_2006; DP_2008 emerges as a strong standard, which offers rigorous privacy guarantees for algorithms applied on the sensitive database. Recent works abadi2016deep; private_deep_vae are introduced to train deep CNN models within differential privacy. The main idea of these works is to perturb the gradient estimation at each step of an SGD algorithm. For example, Abadi et al. abadi2016deep use a differentially private additive-noise mechanism on the gradient estimation in an SGD. In addition, a few recent studies memorization; csf18_relation have shown that these two seemingly unrelated issues are implicitly relevant based on a natural intuition: “reducing the overfitting” and “protecting the individual’s privacy” share the same goal of encouraging a CNN model to learn the population’s features instead of memorizing the features of each individual.

In this paper, we propose a practical solution to alleviate both issues in a task of pathological image classification. In particular, we introduce a novel SGD algorithm, named P3SGD, which injects the well-designed noise into the gradient to obtain a degree of differential privacy and reduce overfitting at the same time. It is worth noting that a pathological database usually consists of a number of patients, each of whom is further associated with a number of image patches. We should protect the privacy in the patient level instead of image level as in most of the previous works. To achieve this goal, we propose to calculate the model update upon individual patient’s data and add carefully-calibrated Gaussian noise to the update for both privacy protection and model regularization. The most similar work to ours is the differentially private federated learning brendan2018learning; geyer2017differentially, which focuses on protecting the user-level privacy. In contrast to previous works, which use a globally fixed noise scale to build the noisy update abadi2016deep; brendan2018learning; geyer2017differentially, we propose an elaborated strategy to adaptively control the magnitude of the noisy update. In the experiment, we show that this strategy plays a key role in boosting performance of a deep CNN model. At last, we provide a rigorous privacy cost analysis using the moments accountant theorem abadi2016deep.

In summary, the main contributions of our work are as follows:

We introduce a practical solution, named P3SGD, to simultaneously address the overfitting and privacy leaking issues of deep CNNs in the pathological image classification. To the best of our knowledge, this is the first work to provide rigorous privacy guarantees in medical image analysis tasks.

Technically, we present a strategy to dynamically control the noisy update at each iterative step, which leads to a significant performance gain against the state-of-the-art methods brendan2018learning; geyer2017differentially.

We validate P3SGD on a real-world clinical dataset, which is less explored in previous studies. The results demonstrate that P3SGD is capable of reducing the risk of overfitting on various CNN architectures. Moreover, P3SGD provides a strong guarantee that the trained model protects the privacy of each patient’s data, even when the attacker holds enough extra side-information of the raw training dataset.

We qualitatively and quantitatively demonstrate that the CNN model trained using P3SGD is resistant to the model-inversion attack Fredrikson2015 (shown in Figure 1 (c)).

Related Work

Regularization in CNNs In the past years, numerous regularization techniques have been proposed to improve the generalization ability of deep CNNs 2009weight_decay; dropout14; Dropconnect; xie2016disturblabel; 2015SpatialDropout; 2018dropblock. These works mainly fall into two categories: explicit regularization and implicit (i.e., algorithmic) regularization.

For explicit regularization methods, various penalty terms are used to constrain weight parameters. For example, weight decay 2009weight_decay uses l2l2-regularization to constrain the parameters of a CNN model. Another direction is to introduce regularizers to decorrelate convolutional filters in deep CNNs wu_decorrelate; orgreg17, which improves the representation ability of the intermediate features extracted by those filters.

For implicit regularization methods, the core idea is to introduce moderate randomness in the model training phase. For example, Dropout dropout14 randomly discards the outputs of the hidden neurons in the training phase. However, Dropout is originally designed for fully-connected layers (FC). It is often less effective for convolutional layers, which limits its use in CNNs with few FC layers (e.g., ResNet). This is possibly caused by the fact that Dropout discards features without taking its spatial correlation into account (features from convolutional layers are always spatially correlated) 2018dropblock. To address this problem, a few recent works 2015SpatialDropout; 2018dropblock propose to inject structured noise into the features from convolutional layers. One state-of-the-art technique, named DropBlock 2018dropblock, is specially designed for convolutional layers, which randomly drops the features in a sub-region. Both of Dropout and DropBlock inject randomness into activation layers. In contrast, DisturbLabel xie2016disturblabel adds randomness into the loss function by randomly setting a part of labels to be incorrect in a training mini-batch. Data augmentation is another form of algorithmic regularization, which introduces noise into the input layer by randomly transforming training images Simonyan15. Our method can be categorized as implicit regularization. In contrast to previous works, our approach (P3SGD) imposes regularization at the parameter updating phase.

Privacy-preserving Deep Learning Meanwhile, there is an increasing concern for privacy leakage in deep learning models, since the training datasets may contain sensitive information. This privacy issue has attracted many research interests on the privacy-preserving deep learning abadi2016deep; shokri2015privacy; brendan2018learning; geyer2017differentially; 2016cryptonets; pate. One promising direction is to build machine learning models within differential privacy abadi2016deep; brendan2018learning; pate, which has been widely used in sensitive data analysis as a golden standard of privacy. The early solution is to perturb the model parameters private_lr09; private_obj_zhang or the objective function private_lr09; private_obj_colt12; private_deep_vae. However, such kind of simple solutions cause considerable performance decreasing private_erm; preivate_erm_nips17, the situation may become worse in the context of deep learning. Therefore, some recent studies focus on the gradient perturbation based methods abadi2016deep; brendan2018learning; geyer2017differentially; pate; scalable_pate. Abadi et al. abadi2016deep propose a differentially private version of SGD and present the moments accountant framework to provide tighter privacy bound than previous methods. The PATE framework pate; scalable_pate protects the privacy via transferring knowledge to the student model, from an ensemble of teacher models, which are trained on partitions of the training data.

Different from these works, which focus on image-level privacy, we aim to provide patient-level privacy in specific scenarios of pathological image analysis. The most similar works to ours are brendan2018learning; geyer2017differentially, which extend the private SGD into the federated learning paradigm federated_learning. However, applying these approaches to the real-world medical image data remains less explored. Moreover, these methods always lead to a performance drop compared with the models trained using non-private SGD. In this paper, we evaluate our method on a real-world pathological image dataset and show that the performance drop can be addressed by carefully controlling the noisy update using our strategy.

There are also some studies aiming to explore the relationship between the overfitting and the privacy leakage issues from the perspective of memorization memorization; csf18_relation. In this paper, we present a practical solution to alleviate these two related issues simultaneously.

Our Approach

In this section, we describe our approach in details and provide a rigorous privacy cost analysis using the moments accountant theorem abadi2016deep.

We firstly introduce some basic notations and definitions of differential privacy corresponding to our specific task.

In our setting, the pathological image dataset can be regarded as a database D\mathcal{D} with NpN_{p} patients. Generally speaking, each patient DiD_{i} consists of a number of image patches of various tissues, i.e., Di={(xk,yk)}k=1Ni\mathcal{D}_{i}=\{(\mathbf{x}_{k},\mathbf{y}_{k})\}^{N_{i}}_{k=1}, where NiN_{i} is the number of image patches of the ii-th patient. With a slight abuse of notations, we also denote D=⋃i=1NpDi\mathcal{D}=\bigcup_{i=1}^{N_{p}}\mathcal{D}_{i} as the whole set of images of all patients. Then, a basic concept of image-level adjacent databases can be defined as: two databases are adjacent if they differ in a single image-label pair abadi2016deep. This concept is widely used for image-level privacy protection.

However, such image-level privacy protection is insufficient for our tasks. Instead, we introduce a concept of patient-level adjacent databases defined as follows:

(Patient-level adjacent databases) D′\mathcal{D}^{\prime} and D′′\mathcal{D}^{\prime\prime} are adjacent: if D′\mathcal{D}^{\prime} can be obtained by adding all images of a single patient to D′′\mathcal{D}^{\prime\prime} or removing all images of a single patient from D′′\mathcal{D}^{\prime\prime}.

This definition is inspired by the prior works brendan2018learning; geyer2017differentially, in which the authors focus on user-level privacy. With the definition of adjacent databases, we can formally define the patient-level differential privacy as:

(Differential privacy) A randomized algorithm A:D→ R\mathcal{A}:D\to~R satisfies (ϵ,δ)(\epsilon,\delta)-differential privacy if for any two adjacent databases D′,D′′⊆D\mathcal{D}{{}^{\prime}},\mathcal{D}^{{}^{\prime\prime}}\subseteq D and for any subset of outputs S⊆RS\subseteq R it holds:

The randomized algorithm A\mathcal{A} is also known as the mechanism in the literature dwork_dp_2006. In our setting, A\mathcal{A} is the algorithm used to train deep CNNs, e.g., the SGD algorithm. DD denotes the training dataset (i.e., D\mathcal{D} in our case) and RR is the parameter space of a deep CNN. Intuitively, the Equation 1 indicates that participation of one individual patient in a training phase has a negligible effect on the final weight parameters. Another concept is the sensitivity of a randomized algorithm:

(Sensitivity) The sensitivity of a randomized algorithm A\mathcal{A} is the upper-bound of ∣∣A(D′)−A(D′′)∣∣2||\mathcal{A}(\mathcal{D}^{{}^{\prime}})-\mathcal{A}(\mathcal{D}^{{}^{\prime\prime}})||_{2}, where D′\mathcal{D}^{{}^{\prime}} and D′′\mathcal{D}^{{}^{\prime\prime}} are any adjacent databases (see in Define 1).

To establish a randomized algorithm that satisfies differential privacy, we need to bound its sensitivity. The most used strategy is to clip the norm of the parameter update. In next two subsections, we will introduce the traditional SGD and P3SGD separately, as two instances of the randomized algorithm A\mathcal{A}.

2 Standard SGD Algorithm

Here, l(x,y)l(\mathbf{x},\mathbf{y}) is the loss function, e.g., cross-entropy loss. Bt\mathcal{B}_{t} refers to a mini-batch of images which are randomly and independently drawn from the whole image set D\mathcal{D}. Note that we can add an additional regularization term into Equation 2, such as l2l2 term. At the tt-th step of the SGD algorithm, we can update the current parameter θt\boldsymbol{\theta}_{t} as θt+1=θt−γt⋅∇θtL(Bt;θt)\boldsymbol{\theta}_{t+1}=\boldsymbol{\theta}_{t}-\gamma_{t}\cdot\nabla_{\boldsymbol{\theta}_{t}}\mathcal{L}(\mathcal{B}_{t};\boldsymbol{\theta}_{t}).

3 P3SGD Algorithm

Overall, our framework comprises of three components, which are update computation, update sanitization, and privacy accumulation. Our method inherits the computing paradigm of federated learning federated_learning. Moreover, to protect the privacy, we need to inject well-designed Gaussian noise into each step’s update, which is marked as update sanitization. At last, we can use the moments accountant for privacy accumulation. The pseudo-code is depicted in Algorithm 1. Next, we will describe each of these components in details.

For update computation, at the beginning of the tt-th step of P3SGD, we randomly sample a patient batch Bt\mathcal{B}_{t} from the database D\mathcal{D} with a sampling ratio pp. Here, the notation Bt\mathcal{B}_{t} is different from the one in Equation 2, where the Bt\mathcal{B}_{t} is sampled from individual images instead of patients.

Then, for each patient ii in the sampled batch, we perform a back propagation to calculate gradients of the parameters via images of the patient ii. After that, we locally update the model using the computed gradients. After we traverse all images of this patient, we can obtain the model update with respect to patient ii. This procedure can be interpreted as performing SGD on the local data from patient ii.

In the next step, we average updates of all patients in Bt\mathcal{B}_{t} to obtain the final update at the tt-th step. Note that we need to control the sensitivity of the total update for further update sanitization. In practice, this is implemented by clipping the l2l2 norm of the update, with respect to each individual patient (as shown in line 2626 in Algorithm 1). Cu{\rm C_{u}} in Algorithm 1 denotes a predefined upper-bound. Thus, the sensitivity of the total update can be bounded by 2Cu2{\rm C_{u}} (a proof can be found in supplementary materials). The main idea of update computation is implemented by a function PatientUpdate, as shown in Algorithm 1.

To protect privacy, update sanitization needs to be performed. Specifically, we use Gaussian mechanism dwork_book to inject well-calibrated Gaussian noise into the original update, which leads to a noisy update. The variance of injected Gaussian noise is jointly determined by the upper-bound Cu{\rm C_{u}} of the update’s l2l2 norm and the noise scale zz. In this paper, we use a common strategy to set Cu{\rm C_{u}} as a globally fixed value similar to prior works abadi2016deep; brendan2018learning. Therefore, the choice of a noise scale factor zz is critical to train CNN model with high performance. Previous works abadi2016deep; brendan2018learning usually use a fixed noise scale throughout the training phase. However, the fixed noise scale factor may lead to the departure of the noisy update from the descent direction or an ignorable regularization effect, because the magnitudes of the updates may vary at different iterative steps. Thus, we argue that the strategy that uses a fixed noise scale may hinder the classification performance.

In this paper, we present an elaborated strategy to adaptively select the noise scale. This strategy is originated from the exponential mechanism dwork_book, which is a commonly used mechanism to build a differentially private version of the Argmax function. In this paper, the Argmax function refers to select the argument which maximizes a specific objective function. In our task, we use the negative loss function as the objective function, and the argument is the noisy update built upon different noise scales from the predefined set Ωz\Omega_{z}. We implement this strategy as a function NoisyUpdateSelect depicted in Algorithm 2. The predefined set Ωz\Omega_{z} contains NzN_{z} noise scale factors. Increasing NzN_{z} leads to more subtle control of the noisy update, which further boosts the performance. However, the increase of NzN_{z} also results in an increase of computational cost. Precisely, one more noise scale will bring about one more forward computation on all images in Bt\mathcal{B}_{t}. In practice, we find that setting Nz=2N_{z}=2 suffices for our task. Note that setting Nz=1N_{z}=1 degenerates to the method used in brendan2018learning; geyer2017differentially. In the experiments, we show this strategy is crucial to boost the performance.

For privacy accumulation, the composition theorem can be leveraged to compose the privacy cost at each iterative step. In this paper, we make use of the moments accountant abadi2016deep, which can obtain tighter bound than previous strong composition theorem 2010strong. Specifically, the moments accountant is to track a bound of the privacy loss random variable instead of a bound on the original privacy budget. Given a randomized algorithm A\mathcal{A}, the privacy loss at output oo is defined as:

Then, the privacy loss random variable C(A,aux,D′,D′′)C(\mathcal{A},\mathbf{aux},\mathcal{D}^{{}^{\prime}},\mathcal{D}^{{}^{\prime\prime}}) is defined by evaluating the privacy loss at the outcome sampled from A(D′)\mathcal{A}(\mathcal{D}^{\prime}) pate. Here, D′\mathcal{D}^{{}^{\prime}} and D′′\mathcal{D}^{{}^{\prime\prime}} are adjacent. aux\mathbf{aux} denotes the auxiliary information. In our P3SGD algorithm, auxiliary information at step tt is the weight parameters θt−1\boldsymbol{\theta}_{t-1} at the step t−1t-1. The algorithm A\mathcal{A} is also known as the adaptive mechanism in literature abadi2016deep. We can then define the moments accountant as follows:

where Mc(λ;aux,D′,D′′)M_{c}(\lambda;\mathbf{aux},\mathcal{D}^{{}^{\prime}},\mathcal{D}^{{}^{\prime\prime}}) is the moment generating function of the privacy loss random variable, which is calculated as:

Then, we introduce the composability and the tail bound of moments accountant as:

(Composability) Suppose that a randomized algorithm A\mathcal{A} consists of a sequence of adaptive mechanisms A1,…,Ak\mathcal{A}_{1},\dots,\mathcal{A}_{k} where Ai:∏j=1i−1Rj×D′→Ri\mathcal{A}_{i}:\prod_{j=1}^{i-1}\mathcal{R}_{j}\times\mathcal{D}^{{}^{\prime}}\rightarrow\mathcal{R}_{i}. The moments accountant of Ai\mathcal{A}_{i} is denoted as Mci(λ)M_{c}^{i}(\lambda). For any λ\lambda:

(Tail bound) For any ϵ≥0\epsilon\geq 0, the algorithm A\mathcal{A} satisfies (ϵ,δ)(\epsilon,\delta)-differential privacy for

Theorem 7 indicates that if the moments accountant of a randomized algorithm A\mathcal{A} is bounded, then A\mathcal{A} satisfies (ϵ,δ)(\epsilon,\delta)-differential privacy. The bound of the moments accountant for our strategy implemented in Algorithm 2 is guaranteed by the following theorem:

Given λ\lambda, the moments accountant of Algorithm 2 is bounded by q⋅λ(λ+1)ϵ22q\cdot\dfrac{\lambda(\lambda+1)\epsilon^{2}}{2}.

The proof can be done using the privacy amplification amplicication11 and the theorem in the prior literature bun2016concentrated. More details can be found in appendix of this work.

Privacy guarantee: In this paper, privacy accumulation is to accumulate the moments accountant’s bound at each step. Note that privacy accumulation needs to be performed at the noisy update selection (line 1717 in Algorithm 1) and the model update via noisy update (line 1818 in Algorithm 1). For the NoisyUpdateSelect in line 1717, we can calculate a bound via Theorem 3. For the model update in line 1818, the bound is obtained based on the property of Gaussian Mechanism (Lemma 3 in appendix of abadi2016deep). Once we bound the moments accountant at each iterative step, we can compose these bounds using Theorem 6. At last, the total privacy cost is obtained based on Theorem 7. It suffices to compute the Mc(λ)M_{c}(\lambda) when λ≤32\lambda\leq 32. In practice, we use a finite set {1,⋯ ,32}\{1,\cdots,32\} following prior work abadi2016deep.

Experimental Results

In this section, we verify the effectiveness of P3SGD on a real-world clinical dataset. This dataset is collected by the doctors in our team. The dataset consists of 12161216 patients and each patient contains around 5050 image patches. The task we consider in this paper is glomerulus classification, which aims to classify whether an image patch contains a glomerulus or not. This task has also been studied in a recent work Gallego2018Glomerulus. We ask the doctors to manually label the image patches. For a fair comparison, we set the weight decay to 1e-4 and use data augmentation in all experiments. Specifically, we perform data augmentation by (1) randomly flipping input images vertically and/or horizontally, and (2) performing random color jittering, including changing the brightness and saturation of input images. All input images are resized into 224×224224\times 224, and pixel intensity values are normalized into $.All. All1216patientsinthedatasetarerandomlysplitintoatrainingdataset(patients in the dataset are randomly split into a training dataset (1000patients)andatestingdataset(patients) and a testing dataset (216$ patients).

2 Classification Evaluation

To validate the superiority of P3SGD in reducing overfitting, we compare it with the standard SGD (without Dropout). We also provide comparisons with the strategy that combines the standard SGD with Dropout. As a result, there are three training strategies: SGD, SGD+Dropout, and P3SGD.

We first evaluate our method on the ResNet-18 architecture he2016deep. For the standard SGD with Dropout, we insert Dropout between convolutional layers and set the drop ratio to 0.30.3 following wider-resnet. To provide a reasonable weight initialization, we firstly pre-train the CNN model on a publicly available pathological image dataset http://www.andrewjanowczyk.com/use-case-4-lymphocyte-detection/. The pre-training does not take an extra privacy cost, since we do not interact with the original training dataset in this stage. The pre-training can also help us to determine the hyper-parameters in Algorithm 1. For P3SGD, we set the total updating rounds TT to 100100 and set the noise scale ϵ2\epsilon^{2} to 0.10.1 for selecting noisy update. The sampling ratio pp is set to 0.10.1 and Ωz\Omega_{z} is set to be {3.0,1.0}\{3.0,1.0\}. The Cu{\rm C_{u}} and Co{\rm C_{o}} are set to 5.05.0 and 3.03.0, respectively. To facilitate the discussion, we denote SGD and P3SGD as the models trained using SGD (without Dropout) and P3SGD (we use the abbreviations in the following discussions).

From the results of ResNet-18 (Table 1), we observe that SGD obviously overfits (it even reaches nearly 100%100\% training accuracy). In contrast, P3SGD drastically decreases the gap between training and testing accuracies and improves the testing accuracy. In particular, P3SGD outperforms SGD by 2.98%2.98\% in the testing accuracy (a 38.5%38.5\% relative drop in classification error), while the gap is decreased from 7.60%7.60\% to 0.47%0.47\%, which shows a 93.8%93.8\% relative improvement. These results indicate that P3SGD significantly reduces the overfitting in the ResNet-18 model compared with the standard SGD. We also plot the loss curves of ResNet-18 in Figure 2, which further demonstrates the regularization effect of P3SGD. Besides, there is no significant performance improvement when we apply Dropout on ResNet-18. Dropout even leads to a slight decrease (from 92.25%92.25\% to 92.12%92.12\%) in testing accuracy. We will discuss this phenomenon in details in Section 4.4.

Besides the ResNet-18, we also conduct extensive experiments on other popular CNN architectures. In general, we mainly test on two types of CNN models, namely, traditional CNNs and modern CNNs The modern CNN consists of convolutional layers except the final prediction layer, which comprises of a global average pooling and a fully-connected layer. (denoted by T and M in Table 1). Specifically, six architectures are included: AlexNet 2012alexnet, VGG-16 2014vgg, ResNet-18 he2016deep, ResNet-34 he2016deep, MobileNet 2017mobilenets, and MobileNet v2 2018mobilev2. For traditional CNNs (e.g., AlexNet), we insert Dropout between fully connected (FC) layers and set the drop ratio to 0.50.5 following dropout14. The results are summarized in Table 1. On the one hand, our method consistently boosts the testing accuracy over the standard SGD (without Dropout) on various CNN architectures. The ResNet-34 trained with P3SGD achieves the highest testing accuracy at 95.34%95.34\% among all network architectures and training strategies. In particular, P3SGD outperforms Dropout technique on all modern CNNs, e.g., the testing accuracy gain is 2.12%2.12\% in the case of ResNet-34. On the other hand, the training accuracy is suppressed when we use P3SGD to train the CNN model, which further leads to a decrease of the gap between training and testing accuracy.

Despite the superiority of our method, we observe that Dropout is usually more effective than P3SGD on the traditional CNNs, e.g., it obtains a slight accuracy gain of 0.45%0.45\% in the case of VGG-16 compared to P3SGD. We provide some interpretations in the discussion part. We also notice that, under the standard SGD (without Dropout) training strategy, the modern CNNs have less overfitting (measured as the gap between training and testing accuracies) than traditional CNNs. This may be caused by the regularization effect brought by the Batch Normalization batchnorm which exists in the modern CNNs.

3 Privacy Cost Analysis

Another advantage of P3SGD is to provide patient-level privacy within differential privacy. The differentially private degree is measured by (ϵ,δ)(\epsilon,\delta) (i.e, privacy cost) in Equation 1. In this part, we calculate the total spend of privacy cost via the moments accountant theorem. The target δ\delta is fixed to 1∣Np∣1.1\dfrac{1}{|N_{p}|^{1.1}} (NpN_{p} is the number of patients in the training set), which is suggested by the previous literature dwork_dp_2006. In our task, the δ\delta is around 5e−45e-4 (Np=1000N_{p}=1000). To verify the effectiveness of our proposed strategy for dynamically controlling the noisy update, we compare it with the strategy of fixed noise scale (marked by ✗ in Table 2) which is adopted by the state-of-the-art works geyer2017differentially; brendan2018learning. For simplicity, we use adaptive and fixed to denote these two strategies. All the experiments are performed on ResNet-18.

We test on various noise scale sets Ωz\Omega_{z} to show how the noise scale affects the performance. We find that the noise scale greater than 3.03.0 leads to unstable training. In practice, we build Ωz\Omega_{z} using the noise scale from {1.0,2.0,3.0}\{1.0,2.0,3.0\}. Overall, P3SGD with the adaptive strategy (Ωz={3.0,1.0}\Omega_{z}=\{3.0,1.0\}) achieves the best testing accuracy of 95.23%95.23\% at a privacy cost of 6.976.97. For the fixed strategy, a larger noise scale leads to a lower privacy cost, however, it may cause the noisy update deviating from the decent direction and further hinders the testing accuracy. For example, setting Ωz\Omega_{z} to {3.0}\{3.0\} leads to the lowest privacy cost of 4.704.70 and the worst accuracy of 92.15%92.15\%, while setting Ωz={1.0}\Omega_{z}=\{1.0\} achieves a better accuracy of 94.38%94.38\% but a much higher privacy cost of 8.488.48. The adaptive strategy provides a reasonable solution for this dilemma of the fixed strategy.

In general, the adaptive strategy leads to a better trade off between the privacy cost and the testing accuracy. Specifically, extending the fixed scale {z1}\{z_{1}\} or {z2}\{z_{2}\} to {z1,z2}\{z_{1},z_{2}\} achieves the testing accuracy higher than or approaching to the best testing accuracy among the corresponding fixed strategies, while with a reasonable privacy cost. For instance, the adaptive strategy with {3.0,1.0}\{3.0,1.0\} achieves the accuracy of 95.23%95.23\%, which is higher than the fixed strategy with either {3.0}\{3.0\} or {1.0}\{1.0\}. Our strategy also outperforms a naive solution by setting the noise scale to the average of 1.01.0 and 3.03.0 (i.e., {2.0}\{2.0\}). There is even an accuracy gain of 0.85%0.85\% by extending {1.0}\{1.0\} to {3.0,1.0}\{3.0,1.0\}. We infer this accuracy gain comes from the stronger regularization effect brought by the larger noise scale. Meanwhile, the adaptive strategy ({3.0,1.0}\{3.0,1.0\}) achieves a moderate privacy cost between the costs obtained by the corresponding fixed strategies (setting Ωz\Omega_{z} to {1.0}\{1.0\} or {3.0}\{3.0\}).

To conclude, our proposed strategy can be seen as a simplified version of line search in numerical optimization 06optimization, and provides a more careful way to control the magnitude of the added noise. The effectiveness of our strategy comes from the fine-grained way to control the noisy update.

4 Discussions

In this subsection, we first analyze the performance of different types of CNNs. We then compare P3SGD with the state-of-the-art regularization mechanism. Finally, we show that the model trained with P3SGD is resistant to a model-inversion attack.

Network Architecture. As shown in Table 1, Dropout and our method P3SGD demonstrate totally different effects on the two types of CNN architectures (traditional CNNs and modern CNNs). Specifically, our method outperforms Dropout on modern CNNs, instead, Dropout is more effective on the traditional CNN architectures. This may be caused by following reasons: (1) Dropout is originally designed for the FC layers due to its huge numbers of parameters (e.g., around 90%90\% parameters of VGG-16 are from the FC layers). However, there is only one FC layer with a few parameters in modern CNN architectures. (2) The cooperation of Dropout and Batch Normalization can be problematic batchnorm. As we know, batch normalization layer widely exists in modern CNNs (e.g, ResNet he2016deep). (3) Dropout discards features randomly, however, the features extracted by convolutional layers are always spatially correlated, which impedes the use of Dropout on convolutional layers. Some recent works propose to modify Dropout for convolutional layers. We compare our method with a variant of Dropout in the next part.

Other Regularization Techniques. From the previous discussion, some advanced forms of Dropout should be adopted in the modern CNN. In this part, we compare our method with a recent technique, named DropBlock 2018dropblock, on ResNet-18. For a fair comparison with Dropout, we insert DropBlock between every two convolutional layers and set the drop ratio to 0.30.3 following 2018dropblock. The results are shown in Table 3. DropBlock achieves a testing accuracy gain of 2.75%2.75\% against Dropout, while P3SGD outperforms both Dropout and DropBlock. In contrast to P3SGD, DropBlock has no suppression effect on the training accuracy. We guess that the performance gain of DropBlock comes from the effect of the implicit model ensemble. We further combine P3SGD with DropBlock but do not obtain obvious accuracy boost.

Model-inversion Attack. To demonstrate that P3SGD is resistant to the model-inversion attack federated_learning; mahendran2015understanding, we perform an inversion attack on CNN models trained with different strategies. As a case study, we conduct experiments on the ResNet-18 and use the output features from the 33-th residual block to reconstruct the input image (see details in the appendix). Some visualizations are shown in Figure 3. We can reconstruct the outline of the tissue in the input image using the features from the SGD. In contrast, we can not obtain any valuable information from P3SGD (i.e., the model is oblivious to training samples). It indicates that SGD is more vulnerable than P3SGD. Quantitatively, we perform attack on all the training images and report the average PSNR values as: 27.8227.82 for P3SGD and 27.8427.84 for SGD. We also conduct the same study on patches from the testing dataset and show some examples in the left part in Figure 3. The results show that it is hard to reconstruct the input image for both SGD and P3SGD, since the testing examples are not touched by the model in the training phase. This provides some cues for the memorization ability of CNNs Zhang2016a.

Conclusion

In this paper, we introduce a novel SGD schema, named P3SGD, to regularize the training of deep CNNs while provide rigorous privacy protection within differential privacy. P3SGD consistently outperforms SGD on various CNN architectures. The key technical innovation lies in the strategy that adaptively controls the noisy update. We conduct an analysis and show the effectiveness of this strategy. We also perform a model-inversion attack and show that the model trained with P3SGD is resistant to such an attack.

This research paves a new way to regularize deep CNNs on pathological image analysis with an extra advantage of appealing patient-level privacy protection. Applying this method to other types of medical image analysis tasks is promising and implies a wide range of clinical applications.

Acknowledgment Bingzhe Wu and Guangyu Sun are supported by National Natural Science Foundation of China (No.61572045).

References