Revisiting Membership Inference Under Realistic Assumptions

Bargav Jayaraman, Lingxiao Wang, Katherine Knipmeyer, Quanquan Gu, David Evans

Introduction

Differential privacy has become the gold standard for performing any privacy-preserving statistical analysis over sensitive data. Its privacy-utility tradeoff is controlled by the privacy loss budget parameter ϵ\epsilon (and failure probability δ\delta). While it is a well known fact that larger privacy loss budgets lead to more leakage, it is still an open question how low privacy loss budgets should be to provide meaningful privacy in practice.

Although differential privacy provides strong bounds on the worst-case privacy loss, it does not elucidate what privacy attacks could be realized in practice. Attacks, on the other hand, provide an empirical lower bound on privacy leakage for a particular setting. Many attacks on machine learning algorithms have been proposed that aim to infer private information about the model or the training data. These attacks include membership inference (Shokri et al., 2017; Long et al., 2017; Salem et al., 2019; Yeom et al., 2018), attribute inference (Fredrikson et al., 2014, 2015; Yeom et al., 2018), property inference (Ateniese et al., 2015; Ganju et al., 2018), model stealing (Lowd and Meek, 2005; Tramèr et al., 2016) and hyperparameter stealing (Wang and Gong, 2018; Yan et al., 2020). Of these, membership inference attacks are most directly connected to the differential privacy definition, and thus are a good basis for evaluating the privacy leakage of differentially private mechanisms. Given a small enough privacy loss budget, a differentially private mechanism should provide a defense against these attacks. But, in practice it is rarely possible to obtain a model with enough utility without increasing the privacy loss budget beyond the minimum needed to establish such guarantees. Instead, models are tested using empirical methods using simulated attacks to understand how much an adversary would be able to infer. Previous works on membership inference attacks only consider balanced priors, however, leading to a skewed understanding of inference risk in cases where models are likely to face adversaries with imbalanced priors. In this work, we develop a metric based on positive predictive value that captures the inference risk even in scenarios where the priors are skewed, and introduce a new attack strategy that shows models are vulnerable to inference attacks even in settings where previous attacks would be unable to infer anything useful.

Theoretical Contributions. Motivated by recent results (Jayaraman and Evans, 2019; Liu et al., 2019), we aim to develop more useful privacy metrics. Similarly to Liu et al. (2019), we adopt a hypothesis testing perspective on differential privacy in which the adversary uses hypothesis testing on the differentially private mechanism’s output to make inferences about its private training data. We use the recently proposed ff-differential privacy notion (see Section 3.1) to bound the privacy leakage of the mechanism. Using this hypothesis testing framework, we tighten the theoretical bound on the advantage metric (Section 4.1). Then, we show that this metric alone does not suffice in most realistic scenarios since it does not consider the prior probability of the data distribution from which the adversary chooses records. We propose using positive predictive value (PPV) in conjunction with the advantage metric as it captures this notion, and provide a theoretical analysis of this metric (Section 4.2).

Empirical Contributions. We provide a threshold selection procedure that can be used to improve any threshold-based inference attack to better capture how an adversary with a particular goal would use the attack (Section 5.1). We use this procedure for the loss-based attack of Yeom et al. (2018) and the confidence-based attack of Shokri et al. (2017), as well as for two new attacks. We propose a novel inference attack strategy that samples points around the candidate input to gauge if it is near a local minimum in the loss function (Section 5.2). The Merlin attack uses this strategy to decide if an input is a member based on a threshold on the ratio of samples where the loss value increases. Our Morgan attack (Section 5.3) combines this with thresholds on the per-instance loss value. Finally, we use these attacks to empirically evaluate the privacy leakage of neural networks trained both with and without differential privacy on four multi-class data sets considering balanced and imbalanced prior data distribution (Section 7). Our main empirical findings include:

Non-private models are vulnerable to high-confidence membership inference attacks in both balanced and imbalanced prior settings.

PPV changes with the prior and hence it is a more reliable metric in imbalanced prior settings.

The Morgan attack achieves higher PPV than Merlin, which already outperforms previous attacks.

Private models can be vulnerable to our attacks, but only when privacy loss budgets are well above the theoretical guarantees.

Related Work

While statistical membership inference attacks were demonstrated on genomic data in the late 2000s (Homer et al., 2008; Sankararaman et al., 2009), the first membership inference attacks against machine learning models were performed by Shokri et al. (2017). In these attacks, the attacker exploits the model confidence reflecting overfitting to infer membership. Shokri et al. (2017) consider the balanced prior setting and evaluate the attack success with an accuracy metric. The attacker trains shadow models similar to the target model, and uses these shadow models to train a membership inference model. Yeom et al. (2018) proposed a simpler, but usually more effective, attack based on per-instance loss and proposed using membership advantage metric for attack evaluation as it has theoretical interpretation with differential privacy.

Yeom et al.’s membership advantage metric is useful for balanced prior settings, but not representative of true privacy leakage in realistic scenarios (as we demonstrate in Section 4). Rahman et al. (2018) evaluate differentially private mechanisms against membership inference attacks and use accuracy and F-score as privacy leakage metrics. But they do not specify the theoretical relationship between their privacy leakage metrics and the privacy loss budgets (i.e., how the metric would scale with increasing privacy loss budget) necessary to gain insight as to what privacy loss budgets are safe even in the worst case scenarios. Jayaraman and Evans (2019) evaluate the private mechanisms against both membership inference and attribute inference attacks using the advantage privacy leakage metric of Yeom et al. (2018). All the above works consider a balanced prior data distribution probability and hence are not applicable to settings where the prior probability is skewed.

Liu et al. (2019) theoretically evaluate differentially private mechanisms using a hypothesis testing framework using precision, recall and F-score metrics. They give a theoretical relationship connecting these metrics to the differential privacy parameters (ϵ\epsilon and δ\delta) and give some insights for choosing the parameter values based on the background knowledge of the adversary. Recently, Balle et al. (2019) provided hypothesis testing framework for analysing the relaxed variants of differential privacy that use Rényi divergence. However, neither of the above works provide empirical evaluation of privacy leakage of the private mechanisms. In another recent work, Farokhi and Kaafar (2020) propose using conditional mutual information as the privacy leakage metric and derive its upper bound based on Kullback–Leibler divergence. Although they provide a relationship between this upper bound and the privacy loss budget, they do not evaluate the empirical privacy leakage in terms of the proposed metric. We provide a theoretical analysis of privacy leakage metrics and perform membership inference attacks under the more realistic assumptions of different prior data distribution probabilities and an adversary that can adaptively pick inference thresholds based on specific attack goals.

Differential Privacy

This section provides background on the differential privacy notions we use. Table 1 summarizes the notations we use throughout.

Dwork et al. (2006) introduced a formal notion of privacy that provides a probabilistic information-theoretic security guarantee:

A randomized algorithm M\mathcal{M} is (ϵ,δ)(\epsilon,\delta)-differentially private if for any pair of neighbouring data sets S,S′S,S^{\prime} that differ by one record, and any set of outputs OO,

Thus, the ratio of output probabilities across neighbouring data sets is bounded by the ϵ\epsilon and δ\delta parameters. The intuition behind this definition is to make any pairs of neighbouring data sets indistinguishable to the adversary given the information released.

From a hypothesis testing perspective (Wasserman and Zhou, 2010; Kairouz et al., 2017; Liu et al., 2019; Balle et al., 2019; Dong et al., 2019), the adversary can be viewed as performing the following hypothesis testing problem given the ouput of either M(S)\mathcal{M}(S) or M(S′)\mathcal{M}(S^{\prime}):

According to the definition of differential privacy, given the information released by the private algorithm M\mathcal{M}, the hardness of this hypothesis testing problem for the adversary is measured by the worst-case likelihood ratio between the distributions of the outputs M(S)\mathcal{M}(S) and M(S′)\mathcal{M}(S^{\prime}). Following Wasserman and Zhou (2010), a more natural way to characterize the hardness of this hypothesis testing problem is its type I and type II errors and can be formulated in terms of finding a rejection rule ϕ\phi which trades off between type I and type II errors in an optimal way. In other words, for a fixed type I error α\alpha, the adversary tries to find a rejection rule ϕ\phi that minimizes the type II error β\beta. More specifically, recalling the definition of trade-off function from Dong et al. (2019):

For any two probability distributions PP and QQ on the same space, the trade-off function T(P,Q):→T(P,Q):\rightarrow is defined as:

where the infimum is taken over all (measurable) rejection rules, and αϕ\alpha_{\phi} and βϕ\beta_{\phi} are the type I and type II errors for the rejection rule ϕ\phi.

This definition suggests that the larger the trade-off function is, the harder the hypothesis testing problem will be. It has been established in Dong et al. (2019) that a function f:→f:\rightarrow is a trade-off function if and only if it is convex, continuous, non-increasing, and f(x)≤1−xf(x)\leq 1-x for x∈x\in. Thus, differential privacy can be reformulated as finding the trade-off function ff that limits the adversary’s hypothesis testing power, i.e., it maximizes the adversary’s type II error for any given type I error.

The hypothesis testing formulation of differential privacy described above leads to the notion of ff-differential privacy (Dong et al., 2019) (ff-DP) which aims to find the optimal trade-off between type I and type II errors and will be used to derive the theoretical upper bounds of our proposed metrics for the privacy leakage.

Let ff be a trade-off function. A mechanism M\mathcal{M} is ff-differentially private if for all neighbouring data sets SS and S′S^{\prime}:

Note that in the above definition, we abuse the notations of M(S)\mathcal{M}(S) and M(S′)\mathcal{M}(S^{\prime}) to represent their corresponding distributions. For an (ϵ,δ)(\epsilon,\delta)-differentially private algorithm, the trade-off function fϵ,δf_{\epsilon,\delta} is given by Lemma 3.4 (proved by Wasserman and Zhou (2010) and Kairouz et al. (2017)):

Suppose M\mathcal{M} is an (ϵ,δ)(\epsilon,\delta)-differentially private algorithm, then for a false positive rate of α\alpha, the trade-off function is:

This lemma suggests that higher values of fϵ,δ(α)f_{\epsilon,\delta}(\alpha) correspond to more privacy and perfect privacy would require fϵ,δ(α)=1−αf_{\epsilon,\delta}(\alpha)=1-\alpha. In addition, increasing ϵ\epsilon and δ\delta decreases fϵ,δ(α)f_{\epsilon,\delta}(\alpha), reflecting the expected reduction in privacy.

2 Gaussian Differential Privacy

The Gaussian mechanism is one of the most popular and fundamental approaches for achieving differential privacy, especially for differentially private deep learning (Abadi et al., 2016). Noisy stochastic gradient descent (SGD) and noisy Adam (Andrew et al., 2019), i.e., adding Gaussian noise (Gaussian mechanism) to SGD and Adam, are often used as the underlying private optimizers for training neural networks with privacy guarantees. Precisely characterizing the privacy loss of the composition of Gaussian mechanisms and deriving its sub-sampling amplification results, leads to the notion of Gaussian differential privacy (Dong et al., 2019), which belongs to the family of ff-DP with a single parameter μ\mu that defines the mean of the Gaussian distribution.

A mechanism M\mathcal{M} is μ\mu-Gaussian differentially private if for all neighbouring data sets SS and S′S^{\prime}:

where Gμ=T(N(0,1),N(μ,1))G_{\mu}=T(\mathcal{N}(0,1),\mathcal{N}(\mu,1)).

In this definition, GμG_{\mu} is a trade-off function and hence μ\mu-GDP is identical to ff-DP where f=Gμf=G_{\mu}. Lemma 3.6, which is established in Dong et al. (2019), gives the equation for computing GμG_{\mu}:

Given that M\mathcal{M} is a μ\mu-Gaussian differentially private algorithm, then for a false positive rate of α\alpha, the trade-off function is given as:

where Φ\Phi is the cumulative distribution function of standard normal distribution.

The Gaussian mechanism for μ\mu-GDP is given by the following theorem (Dong et al., 2019).

A mechanism M\mathcal{M} operating on a statistic θ\theta is μ\mu-GDP if M(S)=θ(S)+ζ\mathcal{M}(S)=\theta(S)+\zeta, where ζ∼N(0,∇(θ)2/μ2)\zeta\sim\mathcal{N}(0,\nabla(\theta)^{2}/\mu^{2}) and ∇(θ)\nabla(\theta) is the global sensitivity of θ\theta.

We also have the relationship between μ\mu-GDP and (ϵ,δ)(\epsilon,\delta)-DP as follows (Corollary 2.13 in Dong et al. (2019) and Theorem 8 in Balle and Wang (2018)):

A mechanism is μ\mu-GDP if and only if it is (ϵ,δ(ϵ))(\epsilon,\delta(\epsilon))-DP for all ϵ≥0\epsilon\geq 0, where

Gaussian differential privacy supports lossless composition of mechanisms (Corollary 3.3 in Dong et al. (2019)) and privacy amplification due to sub-sampling (Theorem 4.2 in Dong et al. (2019)).

The TT-fold composition of μi\mu_{i}-GDP mechanisms is μ12+⋯+μT2−GDP\sqrt{\mu_{1}^{2}+\cdots+\mu_{T}^{2}}-GDP.

Suppose M\mathcal{M} is ff-DP on Dm\mathcal{D}^{m}, if we apply M\mathcal{M} to a subset of samples with sampling ratio τ=m/n∈\tau=m/n\in, then M\mathcal{M} is min⁡{fτ,fτ−1}∗∗\min\{f_{\tau},f_{\tau}^{-1}\}^{**}-DP, where fτ=τf+(1−τ)Idf_{\tau}=\tau f+(1-\tau)Id.

The function IdId is the identity function defined as Id(x)=1−xId(x)=1-x, and min⁡{fτ,fτ−1}∗∗\min\{f_{\tau},f_{\tau}^{-1}\}^{**} is the double conjugate of min⁡{fτ,fτ−1}\min\{f_{\tau},f_{\tau}^{-1}\} function. Theorems 3.7, 3.9 and 3.10 can be combined to achieve GDP for gradient perturbation based machine learning algorithms such as noisy SGD and noisy Adam. For instance, adding standard Gaussian noise with standard deviation σ\sigma to each batch of gradients sampled with probability τ\tau would lead to τT(e1/σ2−1)\tau\sqrt{T(e^{1/\sigma^{2}}-1)}-GDP for TT compositions (Bu et al., 2019). In our experiments, we use such result to characterize the privacy loss of our private optimizers for training differentially private neural networks, and use Proposition 3.8 to convert it into (ϵ,δ)(\epsilon,\delta)-DP for the purpose of comparison.

Measuring Privacy Leakage

To evaluate privacy leakage, we define an adversarial game inspired by Yeom et al. (2018). Unlike their game which assumes a balanced prior, our game factors in the prior membership distribution probability. The adversarial game models the scenario where an adversary has access to a model, MS\mathcal{M}_{S}, trained over a data set SS, knowledge of the training procedure and data distribution, and wishes to infer whether a given input is a member of that training set.

Assume a membership adversary, A\mathcal{A}, who has information about the training data set size nn, the distribution D\mathcal{D} from which the data set is sampled, and the prior membership probability pp. The adversary runs this experiment:

Sample a training set S∼DnS\sim\mathcal{D}^{n} and train a model MS\mathcal{M}_{S} over the training set SS.

Randomly sample b∈{0,1}b\in\{0,1\}, such that b=1b=1 with probability pp.

If b=1b=1, then sample z∼S\mathbf{z}\sim S; else sample z∼D\mathbf{z}\sim\mathcal{D}.

Output 1 if A(z,MS,n,D)=b\mathcal{A}(\mathbf{z},\mathcal{M}_{S},n,\mathcal{D})=b; otherwise output 0.

Note that our experiment incorporates the prior probability pp of sampling a record, compared to the setting of Yeom et al. that assumes balanced prior probability (p=0.5p=0.5). We consider skewed prior pp as inferring membership is more important than inferring non-membership in our problem setting. This is different from the semantic security analogue where all messages are treated equally regardless of the skewness of the message distribution. For most practical scenarios (that is, where being exposed as a member carries meaningful risk to an individual), pp is much smaller than 0.5. For instance, for a scenario of an epidemic outbreak, the training set could be the list of patients with the disease symptoms admitted at a hospital. The non-members can be the remaining population of the city or a district. Hence, assuming a balanced prior of p=0.5p=0.5 is not a realistic assumption, and it is important to develop a privacy metric that can be used to evaluate scenarios with lower (or higher) priors.

The membership advantage metric, Adv\mathit{Adv}, was defined by Yeom et al. (2018) as the difference between the true positive rate and the false positive rate for the membership inference adversary provided that p=0.5p=0.5 (i.e., balanced prior membership distribution). Yeom et al. showed that for an ϵ\epsilon-differentially private mechanism, the theoretical upper bound for membership advantage is eϵ−1e^{\epsilon}-1, which can be quite loose for higher ϵ\epsilon values and is not defined for eϵ−1>1e^{\epsilon}-1>1 since the membership advantage metric proposed by Yeom et al. is only defined between and 11. Moreover, the bound is not valid for (ϵ,δ)(\epsilon,\delta)-differentially private algorithms which are more commonly used for private deep learning.

We derive a tighter bound for the membership advantage metric that is applicable to (ϵ,δ)(\epsilon,\delta)-differentially private algorithms based on the notion of ff-DP:

Let M\mathcal{M} be an (ϵ,δ)(\epsilon,\delta)-differentially private algorithm. For any randomly chosen record z\mathbf{z} and fixed false positive rate α\alpha, the membership advantage of a membership inference adversary A\mathcal{A} is bounded by:

where fϵ,δ(α)=max⁡{0,1−δ−eϵα,e−ϵ(1−δ−α)}f_{\epsilon,\delta}(\alpha)=\max\big\{0,1-\delta-e^{\epsilon}\alpha,e^{-\epsilon}(1-\delta-\alpha)\big\}.

The proof follows directly from Yeom at al.’s definition, AdvA(α)=TPR−FPR\mathit{Adv}_{\mathcal{A}}(\alpha)=\mathit{TPR}-\mathit{FPR}, when we have balanced prior membership distribution, p=0.5p=0.5. For a given FPR=αFPR=\alpha, we have 1−TPR≥fϵ,δ(α)1-TPR\geq f_{\epsilon,\delta}(\alpha) according to the definition of trade-off function (Definition 3.2 and Lemma 3.4). Therefore, AdvA(α)≤1−fϵ,δ(α)−α.\mathit{Adv}_{\mathcal{A}}(\alpha)\leq 1-f_{\epsilon,\delta}(\alpha)-\alpha. ∎

Figure 1 shows the relationship between the false positive rate α\alpha of a given membership inference adversary and the upper bound of the advantage given by Theorem 4.1. This bound lies strictly between 0 and 1 and is tighter than the bound of Yeom et al. (2018), as shown in Figure 2. However, this metric is limited to balanced prior distribution of data and hence can overestimate (or underestimate) the privacy threat in any scenario where the prior probability is not 0.50.5. Thus, membership advantage alone is not a reliable way to measure the privacy leakage. Hence, we next propose the positive predictive value metric that considers the prior distribution of data.

2 Positive Predictive Value

Positive predictive value (PPV) gives the ratio of true members predicted among all the positive membership predictions made by an adversary (the precision of the adversary). For an (ϵ,δ)(\epsilon,\delta)-differentially private algorithm, the PPV is bounded by the following theorem:

Let M\mathcal{M} be an (ϵ,δ)(\epsilon,\delta)-differentially private algorithm and A\mathcal{A} be a membership inference adversary. For any randomly chosen record z\mathbf{z} and a fixed false positive rate of α\alpha, the positive predictive value of A\mathcal{A} is bounded by

where fϵ,δ(α)=max⁡{0,1−δ−eϵα,e−ϵ(1−δ−α)}f_{\epsilon,\delta}(\alpha)=\max\big\{0,1-\delta-e^{\epsilon}\alpha,e^{-\epsilon}(1-\delta-\alpha)\big\}, γ=(1−p)/p\gamma=(1-p)/p, and pp is the prior membership probability defined in Membership Experiment 4.1.

According to the trade-off function definition (Definition 3.2 and Lemma 3.4), for a given FPR=αFPR=\alpha, we have 1−TPR≥fϵ,δ(α)1-TPR\geq f_{\epsilon,\delta}(\alpha). Since PPVA(α,γ)=TP/(TP+FP)\mathit{PPV}_{\mathcal{A}}(\alpha,\gamma)=TP/(TP+FP), we can obtain:

Like membership advantage, the PPV metric is strictly bounded between 0 and 1. Moreover, the bound on PPV metric considers the prior distribution via γ\gamma, which gives the ratio of probability of selecting a non-member to a member. This allows the PPV metric to better capture the privacy threat across different settings. Figure 3(a) shows the effect of varying the false positive rate α\alpha and Figure 3(b) shows the effect of varying the prior distribution probability γ\gamma on the PPV metric. For example, for ϵ=5,δ=10−5,α=0.01,γ=100\epsilon=5,\delta=10^{-5},\alpha=0.01,\gamma=100, the advantage metric can be as high as 0.98, while the PPV metric is close to 0.5 (i.e., coin toss probability). Thus, in such cases, advantage grossly overestimates the privacy threat.

Inference Attacks

While the previous section covers the metrics to evaluate privacy leakage, here we discuss about the membership inference attack procedures. In Section 5.1, we describe our threshold selection procedure for threshold-based inference attacks. Section 5.2 presents our threshold-based inference attack that perturbs a query record and uses the direction of change in per-instance loss of the record for membership inference. Section 5.3 presents our second attack that combines our first attack with the threshold-based attack of Yeom et al. (2018).

The membership inference attacks we consider need to output a Boolean result for each test, converting a real number measure from a test into a Boolean that indicates whether or not a given input is considered a member. The effectiveness of an attack depends critically on the value of this decision threshold.

We introduce a simple procedure to select the decision threshold for any threshold-based attack where the adversary’s goal is to maximize leakage for a given expected maximum false positive rate:

Given an adversary, A\mathcal{A}, that knows information about a target model including the training data distribution D\mathcal{D}, training set size nn, training procedure, and model architecture, as well as knowing the prior distribution probability pp for the suspected membership set, this procedure finds a threshold ϕ\phi that maximizes the privacy leakage of the sampled data points for a given maximum false positive rate α\alpha.

Sample a training data set Sˉ∼Dn\bar{S}\sim\mathcal{D}^{n} for training a model MSˉ\mathcal{M}_{\bar{S}}.

Randomly sample b∈{0,1}b\in\{0,1\}, such that b=1b=1 with probability pp.

Sample record z∼Sˉ\mathbf{z}\sim\bar{S} if b=1b=1, otherwise z∼D\mathbf{z}\sim\mathcal{D}.

Output the decision threshold, ϕ\phi, that maximizes its true positive rate constrained to a maximum false positive rate of α\alpha for the inference attack, A(z,MSˉ,n,D,ϕ)\mathcal{A}(\mathbf{z},\mathcal{M}_{\bar{S}},n,\mathcal{D},\phi).

Note that in comparison to Experiment 4.1, the adversary A\mathcal{A} takes an additional parameter ϕ\phi here. With this ϕ\phi, the adversary can query the target model MS\mathcal{M}_{S} to perform membership inference. Procedure 5.1 works for any threshold-based inference attack where an adversary knows the data distribution and model training process well enough to train its own models similar to the target model.

Application to Shokri’s Attack. In the membership inference attack of Shokri et al. (2017), the attacker first trains multiple shadow models similar to the target model, and then uses these shadow models to train an inference model for binary classification. We modify this attack by taking the softmax output of the inference model that indicates the model’s prediction confidence, and use our threshold selection procedure on the model confidence. By default, the model predicts the input is a member if the confidence is above 0.5, which is equivalent to Shokri et al.’s original version. We vary this threshold between 0 and 1 according to Procedure 5.1, and refer to this inference adversary as Shokri.

2 Merlin

Procedure 5.1 can be used on any threshold-based inference attack. Here, we introduce a new threshold-based membership inference attack called MerlinBackronym for MEasuring Relative Loss In Neighborhood. that uses a different approach to infer membership. Instead of the per-instance loss of a record, this method uses the direction of change in per-instance loss of the record when it is perturbed with a small amount of noise. The intuition here is that due to overfitting, the target model’s loss on a training set record will tend to be close to a local minimum, so the loss at perturbed points near the original input will be higher. On the other hand, the loss is equally likely to either increase or decrease for a non-member record.

Algorithm 1 describes the attack procedure. For a query record z\mathbf{z}, random Gaussian noise with zero mean and standard deviation σ\sigma is added and the change of loss direction is recorded. This step is repeated TT times and the countcount is incremented each time the per-instance loss of the perturbed record increases. Though we use Gaussian noise, the algorithm works for other noise distributions as well. We also tried uniform distribution and observed similar results, but with different σ\sigma values. Both the parameters TT and σ\sigma can be pre-tuned on a hold-out set to maximize the attacker’s distinguishing power and fixed for the entire attack process. In our experiments, we find T=100T=100 and σ=0.01\sigma=0.01 work well across all data sets. Finally, the query record z\mathbf{z} is classified as a member when count/T≥ϕcount/T\geq\phi, where ϕ\phi is a threshold that could be set by Procedure 5.1.

Comparison with Related Attacks. Although the intuition behind the Merlin is new, it has similarities with previous attacks that also involve sampling. Fredrikson et al. (2015) proposed a white-box attack for model inversion problem, which is different from the membership inference problem we consider, where the attacker has count information of all training instances and uses it to guess the most probable value for the sensitive attribute of the query training instance. This ‘count’ is different from the count used in Merlin attack. Long et al. (2018) proposed a black-box model inversion attack that is similar to Merlin. While the Merlin attack considers the target point’s environment in the input space, the attacks in Long et al. (2018) consider the target point’s environment in the logit-space, i.e., the output of the target network before the softmax is applied. As the logit-space is much more dense than the input space, Merlin is much more fine-grained, enabling it to detect membership where the logit-space attacks would not. Choo et al. (2020) recently proposed a label-only membership inference attack which is similar to Merlin in the sense that they also use the model’s behavior on neighboring points as part of a membership inference attack. The key difference is that they assume the neighboring points, which in their case are data augmentations of the target record, are also present in the training set, while we do not have any such assumptions for Merlin.

3 Morgan

Both Yeom and Merlin use different information for membership inference and hence do not necessarily identify the same member records. Some members are more vulnerable to one attack than the other, and different inputs produce false positives for each attack. Our observations of the distribution of the values from the Yeom and Merlin attacks (see Figure 7) motivate combining the attacks in a way that can maximize PPV by excluding points with very low per-instance loss. The intuition is that if the per-instance loss is extremely low, the Merlin attack will suggest a local minimum, but in fact it is a near-global minimum, which is not as strongly correlated with being a member. Hence, we introduce a combination of the Yeom and Merlin attacks, called MorganMeasuring lOss, Relatively Greater Around Neighborhood., that combines both attacks to identify inputs that are most likely to be members.

The Morgan attack uses three thresholds: a lower threshold on per-instance loss ϕL\phi_{L}, an upper threshold on per-instance loss ϕU\phi_{U}, and a threshold on the ratio as used by Merlin, ϕM\phi_{M}. Morgan classifies a record as member if the per-instance loss of the record is between ϕL\phi_{L} and ϕU\phi_{U}, both inclusive, and has a Merlin ratio of at least ϕM\phi_{M}. The ϕU\phi_{U} and ϕM\phi_{M} thresholds are set using the standard threshold selection procedure for the Yeom and Merlin attacks respectively, by varying their α\alpha values. A value for ϕL\phi_{L} is found using a grid search to find the maximum PPV possible in conjunction with ϕU\phi_{U} and ϕM\phi_{M} thresholds, and selecting the lowest value for ϕL\phi_{L} that achieves that PPV to maximize the number of members identified. Note that all three thresholds are selected together to maximize the PPV on a separate holdout set that is disjoint from the target training set, as is done in our threshold selection procedure 5.1. As reported in Table 2, this exposes some members with 100% PPV for both RCV1X and CIFAR-100. Section 7 reports on Morgan’s success on identifying the most vulnerable records with >95%>95\% PPV at balanced prior and with >90%>90\% PPV in skewed prior cases (γ>1\gamma>1).

Experimental Setup

This section describes the data sets and models used, along with the training procedure. We evaluate our methods on both standard (non-private) models and models trained using differential privacy mechanisms. We focus on differentially private models since our theoretical bounds apply to these models. Although several other defenses have been proposed, such as dropout, model stacking or MemGuard (Jia et al., 2019), our theoretical bounds do not apply to them and we do not include them in our evaluation.Our attacks and experimental tests do, however, and it will be interesting to see how effective non-DP defenses are against our attacks, so we do plan to include evaluations of other defenses in future work.

Table 2 summarizes the data sets used and the performance of non-private models trained over each data set, and the maximum PPV of the most effective membership inference attack (Morgan). In the balanced prior setting (γ=1\gamma=1), some members are exposed with very high confidence (>95%>95\% PPV) for all the test data sets. The membership inference is significant even in the imbalanced prior case, when γ=10\gamma=10. We defer discussion of these results to Section 7.

Data Sets. Multi-class classification tasks are more vulnerable to membership inference, as shown in prior works on both black-box (Shokri et al., 2017; Yeom et al., 2018) and white-box (Nasr et al., 2019) attacks. Hence, we select four multi-class classification tasks for our experiments. Although these data sets are public, they are representative of data sets that contain potentially sensitive information about individuals.

– Purchase-100X: Shokri et al. (2017) created Purchase-100 data set by extracting customer transactions from Kaggle’s acquire valued customers challenge (Competition, 2014). The authors arbitrarily selected 600 items from the transactions data and considered only those customers who purchased at least one of the 600 items. Their resulting data set consisted of 197,000 customer records with 600 binary features representing the customer purchase history. The records are clustered into 100 classes, each representing a unique purchase style, such that the goal is to predict a customer’s purchase style. Since we needed more records for our experiments with the γ=10\gamma=10 setting, we curated our own data set by following the same procedure but instead of 600 arbitrary items taking the 600 most frequently purchased items. This resulted in an expanded, but similar, data set with around 300,000 customer records which we call Purchase-100X.

– Texas-100: The Texas hospital data set, also used by Shokri et al. (2017), consists of 67,000 patient records with 6,000 binary features where each feature represents a patient’s medical attribute. This data set also has 100 output classes where the task is to identify the main procedure that was performed on the patient. This data set is too small for tests with high γ\gamma settings, but a useful benchmark for the other settings.

– RCV1X: The Reuters RCV1 corpus data set (Lewis et al., 2004) is a collection of Reuters newswire articles with more than 800,000 documents, a 47,000-word vocabulary and 103 classes. The original 103 classes are arranged in a hierarchical manner, and each article can belong to more than one class. We follow data pre-processing procedures similar to Srivastava et al. (2014) to obtain a data set such that each article only belongs to a single class. The final data set we use has 420,000 articles, 2,000 most frequent words represented by their term frequency–inverse document frequency (TFIDF) which are used as features and 52 classes. We call our expanded data set RCV1X.

– CIFAR-100: We use the standard CIFAR-100 (Krizhevsky, 2009) data set used in machine learning which consists of 60,000 images of 100 common world objects. The task is to identify an object based on the input RGB image consisting of 32×3232\times 32 pixels. Although the privacy issue here is not clear, we include this data set in our experiments because it is used as a benchmark in many privacy works.

Model Architecture. We train neural networks with two hidden layers using ReLU activation. Each hidden layer has 256 neurons and the output layer is a softmax layer. Several previous works used similar multi-layer ReLU network architectures to analyze privacy-preserving machine learning (Shokri and Shmatikov, 2015; Abadi et al., 2016; Shokri et al., 2017). Details on hyperparameters can be found in Appendix A. Table 2 includes the training and test accuracy of non-private models across the four data sets.As with all of the experimental results we report in this paper, the results are averaged over five runs in which the target model is trained from the scratch for each run. Although we tuned the model hyperparameters to maximize the test accuracy for each data set, there is a considerable gap between the training and test accuracy. This generalization gap indicates that the model overfits the training data, and hence, there is information in the model that could be exploited by inference attacks.

Private Model Training. We evaluate the model accuracy of private neural network models trained on different data sets. We vary the privacy loss budget ϵ\epsilon between 0.1 and 100 for differentially private training and repeat the experiments five times for all the settings to report the average results.

We report the accuracy loss, which gives the relative loss in test accuracy of private models with respect to non-private baseline:

Figure 4 gives the accuracy loss of differentially private models trained on different data sets with varying privacy loss budgets. The private models are trained using the gradient perturbation mechanism where the gradients at each epoch are clipped and Gaussian noise is added to preserve privacy. The privacy accounting for composition of mechanisms is done via both Gaussian differential privacy (GDP) (Dong et al., 2019) and the prior state-of-the-art Rényi differential privacy (RDP) (Mironov, 2017). As shown in the figure, the GDP mechanism has a lower accuracy loss for ϵ≤10\epsilon\leq 10 due to its tighter privacy analysis. The GDP composition theorem requires that the individual mechanisms be highly private, and hence it is hard to reduce noise for ϵ>10\epsilon>10 without increasing the failure probability δ\delta. For all the data sets, GDP performs better than RDP, hence we only report the results for GDP in the remaining experiments.

Empirical Results

In this section, we evaluate our threshold selection procedure (Procedure 5.1) across the four inference attacks. We first consider the Yeom attack, and show that our threshold selection procedure can be used to obtain thresholds that achieve particular attacker goals, such as maximizing the PPV or membership advantage metric, or minimizing the false positive rate. Next, we use our threshold selection procedure on the Shokri attack and discuss the results in Section 7.2. In Section 7.3 we evaluate the Merlin attack using the same threshold selection procedure, and find that it achieves higher PPV metric compared to both Yeom and Shokri. Then, Section 7.4 shows how the Morgan attack achieves higher PPV by combining aspects of both Yeom and Merlin. Results in the first four subsections focus on non-private models and balanced prior scenarios. In Section 7.5 we evaluate the attacks on differentially private models. Section 7.6 presents results for scenarios with imbalanced priors. The results show that non-private models are vulnerable to our proposed attacks, especially Morgan, even in the skewed prior settings. Private models are vulnerable in the balanced prior setting if the privacy loss budget is set beyond theoretical guarantees.

The Yeom attack uses a fixed threshold on per-instance loss for its membership inference test. A query record is classified as a member if its per-instance loss is less than the selected threshold. We show that the adversary can achieve better privacy leakage, specific to particular attack goals, by using our threshold selection procedure.

Results on Purchase-100X. Figure 5(a) shows the distribution of per-instance loss of members and non-members for a non-private model trained on Purchase-100X. Per-instance losses of members are concentrated close to zero, and most of the loss values are less than 0.001. Whereas for non-members, the loss values are spread across the range. This suggests that a larger fraction of members will be identified by the attacker with high precision (PPV) for loss thresholds less than 0.001, and hence the privacy leakage will be high.

Another notable observation is that out of the 10,000 test records there are 959.2±23.5959.2\pm 23.5 non-members (average across five runs) with zero loss, and hence the minimum achievable false positive rate is around 10%. This is reflected in Figure 5(b), which shows the effect of selecting different loss thresholds on the privacy leakage metrics. An attacker can use our threshold selection procedure to choose a loss threshold to meet specific attack goals, such as minimizing the false positive rate (Min FPR), or achieving a fixed false positive rate (Fixed FPR), or maximizing either of the privacy leakage metrics (Max PPVAPPV_{\mathcal{A}} and Max AdvAAdv_{\mathcal{A}}). Table 3 summarizes these scenarios and compares their thresholds with the threshold selected by the method of Yeom et al. (Fixed ϕ\phi). For Fixed FPR, we consider an attacker with a false positive rate of 1% (α=1%\alpha=1\%).

The attacker uses Procedure 5.1 to find the loss threshold, ϕ\phi, corresponding to α=1%\alpha=1\%, which it uses for membership inference on the target set. However, since the minimum achievable false positive rate for Yeom on Purchase-100X is 10%, this attack fails to find a suitable threshold. For maximizing PPV or advantage, the attacker can use the threshold selection procedure with varying α\alpha values and choose the threshold ϕ\phi that maximizes the required privacy metric. In comparison, Fixed ϕ\phi uses expected training loss as threshold which does not necessarily maximize the privacy leakage. As the results in the table demonstrate, an attacker can accomplish different attack goals, and achieve increased privacy leakage, using the Yeom attack with thresholds chosen using our threshold selection procedure.

Results on Other Data Sets. Table 4 compares the performance of Yeom against non-private models across the Texas-100 and RCV1X data sets. We observe similar trends of privacy leakage corresponding to the selected thresholds for these data sets as we did for Purchase-100X so present most of the results for these data sets in Appendix B, and only discuss some notable differences here. Results for CIFAR-100 can be found in Appendix B.

For Texas-100, Yeom can achieve false positive rates as low as 3%. The attack performance on this data set is comparable to that of Purchase-100X. For RCV1X, the attack success rate is substantially lower than that for the other data sets. This is because, unlike the other data sets which have 100 classes, RCV1X is a 52-class classification task. As reported in prior works (Song, 2017; Yeom et al., 2018), success of membership inference attack is proportional to the complexity of classification task. We further note that the maximum PPV that can be achieved by Yeom on RCV1X is only around 58%, at which point the membership advantage is close to 27%. This gives credence to our claim that membership advantage should not be solely relied on as a measure of inference risk. While membership advantage can be high, the privacy leakage is negligible for balanced priors when the PPV is close to 50%. Later in Section 7.6 we show that this phenomenon is prevalent across all data sets when the prior is imbalanced.

Yeom’s performance on CIFAR-100 is similar to that on Purchase-100X and Texas-100 data sets. Since the model does not completely overfit on CIFAR-100, the distribution of loss values for both members and non-members are not far apart, and as a consequence Yeom is able to achieve much lower false positive rates.

Using Class-Based Thresholds. Recently, Song and Mittal (2020) demonstrated that the approach of Yeom et al. (2018) can be further improved by using class-based thresholds instead of one global threshold on loss values. We implement this approach, using our threshold setting algorithm to independently set the threshold for each class (referred as Yeom CBT). This enables finding class-based thresholds corresponding to smaller α\alpha values, as seen for the minimum FPR (α=0.01\alpha=0.01) and fixed FPR (α=1\alpha=1) cases for Purchase-100X in Table 3. Nonetheless, the maximum PPV still does not increase much beyond Yeom on Purchase-100X, with the largest increase being from 73.0% to 73.4%. For other data sets, though, this technique improves the maximum PPV of Yeom. For Texas-100, the PPV increases from 76% to 92%, for RCV1X, the PPV increases from 58% to 93% and for CIFAR-100, the PPV increases from 73% to 81% (see Appendix B). However, the maximum PPV never exceeds beyond Merlin or Morgan. While Song and Mittal (2020) also showed the application of their class-based thresholds on other metrics such as model confidence and modified entropy, their experimental results show that these approaches achieve similar attack performance to the CBT on per-instance loss metric. Hence, we do not include the CBT results for other metrics.

2 Shokri Attack

The Shokri attack (Shokri et al., 2017) requires training multiple shadow models on hold-out data sets similar to the target model. These shadow models are used to train an inference model that outputs a confidence value between 0 and 1 for membership inference, where 1 indicates member. We use the experimental setting of Jayaraman and Evans (2019) to train five shadow models with the same architecture and hyperparameter settings of the target model. The inference model is a two-layer neural network with 64 neurons in each hidden layer. As with the Yeom attack, our threshold selection procedure can be used to increase privacy leakage for Shokri.

Results on Purchase-100X. Table 3 shows the privacy leakage of Shokri for different attack goals. The original attack of Shokri et al. (Fixed ϕ\phi) uses a threshold of 0.5 on the inference model confidence and achieves close to 50% membership advantage, but has a PPV of around 67%. Using our threshold setting procedure to maximize PPV, Shokri achieves PPV of over 73%, which is comparable to the Yeom attack.

Results on Other Data Sets. Table 4 shows the results of Shokri across multiple data sets. The Shokri attack performance varies considerably across different data sets when compared to the Yeom attack. While Shokri achieves higher PPV than Yeom on Texas-100 and RCV1X, reflecting significant privacy risk on these data sets, Yeom outperforms Shokri on CIFAR-100. However, Merlin and Morgan consistently achieve higher PPV than both Yeom and Shokri (see Sections 7.3 and 7.4).

Using Class-Based Thresholds. We also use class-based thresholds for Shokri attack and include the results for Purchase-100X in Table 3 (called Shokri CBT). However, we do not observe any significant improvement in privacy leakage over the Shokri attack. While the maximum membership advantage increases from 50% to around 60%, the maximum PPV is still close to 72%. We observe similar behaviour across other data sets.

3 Merlin Attack

Next, we perform inference attacks using the Merlin (Algorithm 1) where the attacker perturbs a record with random Gaussian noise of magnitude σ=0.01\sigma=0.01 and notes the direction of change in loss. This process is repeated T=100T=100 times and the attacker counts the number of times the loss increases out of TT trials to find the Merlin ratio, count/Tcount/T. If the Merlin ratio exceeds a threshold, then the record is classified as a member. As with the Yeom and Shokri experiments, we use Procedure 5.1 to select a suitable threshold.

Results on Purchase-100X. Figure 6(a) shows the distribution of Merlin ratio for member and non-member records for a non-private model trained on the Purchase-100X data set. The average Merlin ratio is 0.57±0.170.57\pm 0.17 for member records, whereas for the non-member records it is 0.52±0.160.52\pm 0.16. A peculiar observation is that the Merlin ratio is zero for a considerable fraction of members and non-members. For these non-member records, the loss is very high to begin with and hence it never increases for the nearby noise points. Whereas for the member records, the loss value does not change even with addition of noise. As mentioned in step 5 of Algorithm 1, we only check if the loss increases upon perturbation since we believe that equality is not a strong indicator of membership. Hence these outliers indicate regions where the loss doesn’t change, not points where it always decreases.

Figure 6(b) shows the attack performance with varying thresholds. Merlin can achieve much higher PPV than Yeom and Shokri. Table 3 summarizes the thresholds selected by Merlin with different attack goals and compares the performance with Yeom and Shokri. While Yeom can only achieve a minimum false positive rate of 10% on this data set, Merlin can achieve false positive rate as low as 0.01%. Thus Merlin is successful at a fixed false positive rate of 1% where Yeom fails. Another notable observation is that Merlin can achieve close to 93% PPV, while the maximum possible PPV achievable via Yeom and Shokri (including their CBT versions) is under 74%. Thus, this attack is more suitable for scenarios where attack precision is preferred.

Results on Other Data Sets. Table 4 compares the membership inference attack performance against non-private models across the other data sets. The Merlin attack consistently achieves higher PPV than Yeom and Shokri across all the data sets. Merlin is more successful on Texas-100 compared to Purchase-100X, as the gap between Merlin ratio distribution of member records and non-member records is high for Texas-100 (see Appendix B for more analysis). More surprisingly, while Yeom is less successful on RCV1X, we find that Merlin still manages to achieve a very high PPV that even exceeds the PPV of Shokri (see Table 4). Thus, Merlin poses a credible privacy threat even in scenarios where Yeom fails. However, Merlin does not perform significantly better than Yeom and Shokri on CIFAR-100 since the per-instance loss of members is high on this data set and hence the members are not at local minimum. Appendix B provides more details on all these results.

Using Class-Based Thresholds. We also tried class-based thresholds for Merlin, like we did for Yeom and Shokri. However, we found that this approach does not benefit Merlin as the individual classes do not have enough records to provide meaningful thresholds. Using class-based thresholds for Merlin increases the advantage metric from 0.1% to 2.8%, but decreases the maximum achievable PPV from around 93.4% to 83.1%. We observed similar behavior across different thresholds.

4 Morgan Attack

The Morgan attack (Section 5.3) combines both Yeom and Merlin attacks to identify the most vulnerable members. Recall that Morgan classifies a record as member if its per-instance loss is between ϕL\phi_{L} and ϕU\phi_{U} and if the Merlin ratio is at least ϕM\phi_{M}.

Results on Purchase-100X. Figure 7(a) shows the loss and Merlin ratio for members and non-members for one run of non-private model training in balanced prior. As shown, a fraction of members are clustered between 3.4\times10−53.4\text{\times}{10}^{-5} and 6.0\times10−46.0\text{\times}{10}^{-4} loss and with Merlin ratio at least 0.88, and in this region there are very few non-members. Thus, Morgan can target these vulnerable members whereas Yeom and Merlin fail to do, being restricted to a single threshold. As reported in Table 3, Morgan succeeds at achieving around 98% PPV while Yeom and Merlin only achieve 73% and 93% PPV respectively at maximum on Purchase-100X.

Results on Other Data Sets. Morgan exposes members with 100% PPV in our experiments against non-private models for the RCV1X and CIFAR-100 data sets, and exceeds 95% PPV for Texas-100 (see Table 4, and Appendix B). Morgan benefits by using multiple thresholds and is able to identify the most vulnerable members with close to 100% confidence. Further discussion on these results can be found in Appendix B.

5 Impact of Privacy Noise

So far, all results we have reported are for inference attacks on models trained without any privacy protections. We also evaluated membership inference attacks against the private models and found the models to be vulnerable to Merlin and Morgan at privacy loss budgets high enough to train useful models. Like the experiments with non-private models, here also we repeat the experiments five times and report average results and standard error. In each run, we train a private model from scratch and perform the attack procedure on it.

Table 5 compares the maximum PPV achieved by Yeom, Shokri, Merlin and Morgan against private models trained on Purchase-100X with varying privacy loss budgets. As expected, the privacy leakage increases with the privacy loss budget. Merlin and Morgan both achieve high PPV for privacy loss budgets, ϵ≥10\epsilon\geq 10 (large enough to offer no meaningful privacy guarantee, but this is still smaller than needed to train useful models). Morgan has higher PPV on average and less deviation than Merlin.

Yeom and Shokri Attacks. To understand how the privacy noise influences Yeom attack success, we plot the loss distribution of member and non-member records for a private model trained with ϵ=100\epsilon=100 in Figure 8(a). The figure shows that the noise reduces the gap between the two distributions when compared to Figure 5(a) with no privacy. Hence differential privacy limits the success of Yeom by spreading out the loss values for both member and non-member distributions. This has the counter-productive impact of reducing the number of non-member records with zero loss from 959.2±23.5959.2\pm 23.5 (in non-private case) to 98.0±16.098.0\pm 16.0. This reduces the minimum achievable false positive rate to 1%, and hence allows the attacker to set α\alpha thresholds smaller than 10% against private models which wasn’t possible in the non-private case. However, the PPV is still less than 60% for these thresholds.

Figure 8(b) shows the attack performance at different thresholds. Due to the reduced gap between the member and non-member loss distributions, the PPV is close to 60% across all loss thresholds even if the maximum membership advantage is considerable (close to 20% for ϵ=100\epsilon=100). Thus even with minimal privacy noise, the privacy leakage risk to membership inference attacks is significantly mitigated. For ϵ=1\epsilon=1, the minimum false positive rate goes to 0.01%, allowing Yeom to achieve high PPV but with high deviation. The average PPV is close to 50%. We observe similar trends for other data sets and hence defer these results to Appendix C. Similar to Yeom, Shokri attack also achieves only around 60% PPV even for ϵ=100\epsilon=100, and hence does not pose significant privacy threat.

Merlin and Morgan Attacks. Figure 8(c) shows the distribution of Merlin ratio for member and non-member records on a private model trained with ϵ=100\epsilon=100. When compared to the corresponding distribution for a non-private model (see Figure 6(a)), the gap between the distributions is greatly reduced. This restricts the privacy leakage across all thresholds, as shown in Figure 8(d). Though the maximum PPV can still be high enough to pose an exposure risk at higher privacy loss budgets. We observe similar trends for Merlin on the other data sets (see Appendix C). Unlike for non-private models, Morgan does not achieve close to 100% PPV as the members and non-members are not easily distinguishable due to the added privacy noise (see Figure 7(b)), but it does better than Merlin. Regardless, models trained with high privacy loss budgets can still be vulnerable to Merlin and Morgan even if Yeom and Shokri do not succeed. This shows the importance of choosing appropriate privacy loss budgets for differential privacy mechanisms.

6 Imbalanced Scenarios

As discussed in Section 4, the membership advantage metric does not consider the prior distribution probability and hence does not capture the true privacy risk for imbalanced prior settings. In this section, we provide empirical evidence that the PPV metric captures privacy leakage more naturally in imbalanced prior settings, and hence is a more reliable metric for evaluating the privacy leakage.

In imbalanced prior settings, the candidate pool from which the attacker samples records for inference testing has γ\gamma times more non-member records than members. In other words, a randomly selected candidate is γ\gamma times more likely to be a non-member than a member record. We keep the training set size fixed to 10,000 records as in our previous experiments, so need a test set size that is γ\gamma times the training set size. For each data set, we set γ\gamma as high as possible given the available data. As mentioned in Section 6, we constructed expanded versions of the Purchase-100 and RCV1 data sets to enable these experiments. Both the Purchase-100X and RCV1X data sets have more than 200,000 records, and hence are large enough to allow setting γ=10\gamma=10. We did not have source data to expand Texas-100, so are left with a data set with only 67,000 records and hence only have results for γ=2\gamma=2. The threshold selection procedure (Procedure 5.1) uses holdout training and test sets that are disjoint from the target training and test sets mentioned above, so the data set needs at least (γ+1)×20,000(\gamma+1)\times 20,000 records to run the experiments.

Table 6 shows the effect of varying γ\gamma on the maximum PPV of inference attacks against non-private models trained on different data sets. We can see a clear drop in PPV values across all data sets with increasing γ\gamma values for Yeom, Shokri and Merlin. Although, Merlin consistently outperforms Yeom and Shokri across all settings. At γ=0.1\gamma=0.1, the base rate for PPV is 90%. While Yeom and Shokri achieve between 90% and 97% PPV, Merlin achieves close to 100% PPV across all data sets. For γ=2\gamma=2, the maximum PPV of Yeom is close to 60%, whereas Merlin still achieves high enough PPV to pose some privacy threat. Both the Yeom and Shokri attacks, and our Merlin attack are less successful as the γ\gamma value increases to 10. However, Morgan consistently achieves close to 100% PPV across all settings, thereby showing the vulnerability of non-private models even in the skewed prior settings. This is graphically shown in Figure 7(c) where Morgan is able to identify the most vulnerable members on Purchase-100X even at γ=10\gamma=10. The advantage values remain more or less the same across different γ\gamma values for both Yeom and Merlin on Purchase-100X, as shown in Figure 9. These results support our claim that PPV is a more reliable metric in skewed prior scenarios. We observe the same trend for the other data sets, and hence do not include their plots.

While Yeom, Shokri and Merlin do not pose an exposure threat in the imbalanced prior settings where γ\gamma values are higher than 10, Morgan still exposes some vulnerable members with close to 100% PPV. Thus, our proposed attacks pose significant threat even in more realistic settings of skewed priors, where the existing attacks fail. We observe that the private models are not vulnerable to any of our inference attacks in the imbalanced prior setting where γ>1\gamma>1. At γ=2\gamma=2, the best attack achieves maximum PPV close to 48% across all data sets, whereas at γ=10\gamma=10, this further drops to around 17%. Hence we do not show the membership inference attack results against private models for these settings.

Conclusion

Understanding the privacy risks posed by machine learning involves considerable challenges, and there remains a large gap between achievable privacy guarantees, and what can be inferred using known attacks in practice. While membership inference has previously been evaluated in balanced prior settings, we consider scenarios with imbalanced priors and show that there are attacks which pose serious privacy threats even in such settings where previous attacks fail.

We introduce a novel threshold selection procedure that allows adversaries to choose inference thresholds specific to their attack goals, and propose two new membership inference attacks, Merlin and Morgan, that outperform previous attacks in the settings that concern us most: being able to identify members, with very high confidence, even from candidate pools where most candidates are not members. From experiments on four data sets under different prior distribution settings, we find that the non-private models are highly vulnerable to such attacks, and the models trained with high privacy loss budgets can still be vulnerable.

Availability

All of our code and data for our experiments is available at https://github.com/bargavj/EvaluatingDPML.

Acknowledgments

This work was partially supported by grants from the National Science Foundation (#1717950 and #1915813).

References

Appendix A Hyperparameters

Appendix B Additional Results for Non-Private Models

Results on Texas-100. We plot the distribution of per-instance loss for a non-private model trained on Texas-100 in Figure 10(a). A notable difference is that the number of non-members having zero loss is lower than that of Purchase-100X. As a result, the false positive rate can be as low as 3% for this data set. This is depicted in Figure 10(b) which shows the performance of Yeom against a non-private model at different thresholds. The trend is similar to what we observe for Purchase-100X.

Figure 10(c) shows the distribution of Merlin ratio against a non-private model trained on Texas-100. The gap between the member and non-member distributions is greater than that of Purchase-100X and hence this attack is more effective on this data set. An important indicator is that all members have non-zero Merlin ratio. The average Merlin ratio is 0.81±0.120.81\pm 0.12 for members whereas it is 0.65±0.220.65\pm 0.22 for non-members. Figure 10(d) shows the performance of Merlin on non-private model at different count thresholds. These results further validate the effectiveness of selecting a good threshold based on our proposed procedure. Figure 13(a) shows the scatter plot of per-instance loss and Merlin ratio for all records. Similar to the case of Purchase-100X, more fraction of members are concentrated between 1.2\times10−41.2\text{\times}{10}^{-4} and 5.1\times10−35.1\text{\times}{10}^{-3} loss and have Merlin ratio greater than 0.900.90. Table 7 compares the membership inference attacks across different attack settings on Texas-100. As shown, Merlin achieves higher PPV values than both Yeom and Shokri. Using class based thresholds drastically improves PPV for Yeom such that Yeom CBT achieves maximum PPV comparable to Merlin. As with Purchase-100X, we observe no benefit of using CBT for Merlin. While Shokri achieves 89% PPV, slightly less than Merlin, on this data set, using CBT decreases the PPV to 85%. Morgan achieves highest PPV among all attacks.

Results on RCV1X. We plot the distribution of per-instance loss of members and non-members for a non-private model trained on RCV1X in Figure 11(a). While more members are concentrated closer to zero loss than the non-members, we observe that the gap between the two distributions is not as large as with the other data sets. Moreover, 3504±4443504\pm 444 non-members have zero loss, and hence the minimum possible false positive rate for Yeom is around 33%. Figure 11(b) shows the performance of Yeom for different loss thresholds. The maximum PPV that can be achieved using this attack is only around 58%, at which point the advantage is close to 27%. Thus while the advantage metric would suggest that there is privacy risk, Yeom does not pose significant risk as PPV is close to 50% for balanced prior. Shokri, on the other hand, achieves a PPV of 91% (see Table 4) and poses a significant privacy risk.

Figure 11(c) shows the distribution of Merlin ratio for a non-private model trained on RCV1X. While the gap between distributions is small, the PPV can still be high as depicted in Figure 11(d). Merlin achieves a maximum PPV of around 99% on an average for threshold values close to 0.97, and hence poses privacy threat even when Yeom fails. Table 8 compares the attacks on RCV1X for different attack goals. Yeom is benefited from using class based thresholds, as the maximum PPV jumps from 58% to 93%. However, Merlin still outperforms Yeom CBT at maximum PPV setting. As with other data sets, Shokri does not benefit from CBT technique. Figure 13(b) shows the loss and Merlin ratio scatter plot on RCV1X. Though the members and non-members are less differentiated, Morgan is still able to identify the most vulnerable members with 100% confidence (see Table 8).

Results on CIFAR-100. Figure 12(a) shows the distribution of per-instance loss for a non-private model trained on CIFAR-100. The loss of both members and non-members is high, since the model does not completely overfit on this data set. Figure 12(b) shows the performance of Yeom for different loss thresholds. Figures 12(c) and 12(d) show the distribution of Merlin ratio and leakage metrics for different thresholds. Using CBT on Yeom increases the maximum PPV from 73% to 81% (Table 9), exceeding that of Merlin. Shokri is less successful on this data set, achieving only 65% PPV, and does not benefit from the CBT technique. Figure 13(c) shows the loss and Merlin ratio of all records on CIFAR-100. As shown, members with high Merlin ratio are distinguishable from non-members. Morgan is able to identify certain members with 100% PPV (see Table 9).

Appendix C Additional Results for Private Models

The plots for private models on all three data sets are similar to that of Purchase-100X and do not convey any additional information, hence we do not include them. They only corroborate the fact that adding privacy noise reduces the gap between member and non-member distributions and in turn limits the attack success. Instead, we directly compare the maximum PPV of the attacks against private models trained with varying privacy loss budgets across all three data sets in Table 10. As with Purchase-100X, adding noise allows Yeom to set much smaller thresholds on Texas-100. For higher ϵ\epsilon values, Yeom poses some privacy threat but the PPV deviation is high. On RCV1X, the α\alpha values are still high and hence Yeom is not successful even for ϵ=100\epsilon=100. On CIFAR-100, Yeom is able to achieve considerably high PPV values for ϵ=1\epsilon=1 and ϵ=10\epsilon=10, but the deviation is very high, indicating that the attack is only successful in some runs. At ϵ=100\epsilon=100, Yeom fails to pose any threat. Shokri achieves close to 50% PPV across all data sets, and hence fails to pose any privacy threat even against models trained with large privacy loss budgets. Merlin achieves higher PPV than both Yeom and Shokri on an average across all data sets. Similar to Purchase-100X, Merlin achieves high PPV values for ϵ=10\epsilon=10 and ϵ=100\epsilon=100 on RCV1X. However, it does not achieve high enough PPV on Texas-100 and CIFAR-100 to pose serious privacy threat, even for ϵ=100\epsilon=100. On the other hand, Morgan poses serious privacy threat against models trained with high privacy loss budgets across all the tested data sets.