Skip to content

Stolen Memories: Leveraging Model Memorization for Calibrated White-Box Membership Inference Attacks

Stolen Memories: Leveraging Model Memorization for Calibrated White-Box Membership Inference

arXiv· arXiv:1906.11798· Klas Leino, Matt FredriksonCarnegie Mellon UniversityIndexed by this site · 18 days ago· Originally publishedSelected AttacksSelectedAttention39

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose a white-box membership inference attack that exploits the model's idiosyncratic use of features, which the authors claim outperforms black-box baselines and can be calibrated to high precision.

Threat modelThe attacker has white-box access to the target model (full weights and architecture), the training algorithm and hyperparameters, the training set size, and a proxy dataset S̃ disjoint from the training set and from the same distribution; the attacker does not know any sample in the target model's training set.

Questions
Membership inference (MI) attacks determine whether a data point is in a model's training set. Existing white-box attacks fail to effectively exploit model-internal information, and the authors believe prior attacks struggle to give credible positive inferences.
Methods
The authors propose a white-box attack based on "the model's specific use of features as membership evidence": using the difference between the weights (or internal influence) of a surrogate model and the target model to build a logistic attack model (bayes-wb), or learning a displacement function (general-wb), and calibrating precision with a heuristic threshold.
Experiments and results
On 9 real datasets and synthetic data, the authors report that bayes-wb/general-wb achieve higher accuracy and precision than naive and shadow-bb in most cases; after calibration, precision on convolutional models can reach above 75%; DP with small ε can weaken the attack but harms accuracy, and at ε=16 the protection is limited.
Limitations and future work
The authors point out: when the training set is large, the attack advantage becomes very small (<4% on the full Adult); DP with small ε has a high accuracy cost; the calibration hyperparameter α is difficult to tune in practice; transfer learning may reduce leakage but the authors did not verify this experimentally.
Experimental setuplinear softmax regression model、multi-layer perceptron (MLP) et al. · Synthetic、Breast Cancer Wisconsin (BCW) et al. · accuracy、advantage et al.
Evaluated models
linear softmax regression modelmulti-layer perceptron (MLP)CNN based on LeNet
Benchmarks
SyntheticBreast Cancer Wisconsin (BCW)Pima Diabetes (PD)Hepatitis (Hep)German Credit (GC)AdultMNISTLFWCIFAR10CIFAR100
Metrics
accuracyadvantageprecisionrecall
AI summaryand selection rationaleKlas Leino and Matt Fredrikson propose a white-box membership inference attack that treats the model's anomalous reliance on features specific to the training set as evidence of membership, requires no access to the target model's training data, and can be calibrated with confidence scores to high precision. Methodologically, it approximates the Bayes-optimal attack using the weight difference between an in-distribution proxy model and the target model, then extends to each layer of a deep network via a local linear approximation. The authors claim that on synthetic data and 9 real datasets, its accuracy and precision outperform prior black-box methods, and that it can still make high-confidence inferences on models with generalization error below 2%. Defense evaluations show that smaller generalization error is insufficient to stop the attack; small-ε differential privacy reduces attack effectiveness but noticeably loses accuracy, and at the larger ε used in practice (e.g., ε=16), attack effectiveness is close to that on an unprotected model.

Klas Leino and Matt Fredrikson propose a white-box membership inference attack that treats the model's anomalous reliance on features specific to the training set as evidence of membership, requires no access to the target model's training data, and can be calibrated with confidence scores to high precision. Methodologically, it approximates the Bayes-optimal attack using the weight difference between an in-distribution proxy model and the target model, then extends to each layer of a deep network via a local linear approximation. The authors claim that on synthetic data and 9 real datasets, its accuracy and precision outperform prior black-box methods, and that it can still make high-confidence inferences on models with generalization error below 2%. Defense evaluations show that smaller generalization error is insufficient to stop the attack; small-ε differential privacy reduces attack effectiveness but noticeably loses accuracy, and at the larger ε used in practice (e.g., ε=16), attack effectiveness is close to that on an unprotected model.

Why it was selectedThe paper presents a concrete construction and calibration method for white-box membership inference, and shows that differential privacy with a larger ε offers limited protection in practical tests.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to perform effective membership inference in a white-box setting without holding any training samples of the target model, and to calibrate high precision.

    Core question: In a white-box setting where the attacker does not possess any training data of the target model, how can internal model information be used to perform effective membership inference (MI) and give trustworthy positive inferences.

    • Problem setting and importance: Machine learning models may leak training data information through their behavior or parameters; MI is itself a privacy threat and is also regarded as a general indicator of whether a model leaks privacy. The authors argue that as long as an attacker can credibly identify even a single training point, a privacy violation has occurred, so the attack should have high-precision capability.
    • Shortcomings of existing methods: The authors state that most MI attacks use the shadow model approach; Nasr et al. extended it to the white-box setting with poor results and instead assumed the attacker knows a considerable portion of the target model's training data; in addition, the authors find that shadow attacks' confidence scores are usually poorly calibrated, and raising the threshold sometimes lowers precision instead, making trustworthy inference difficult.
    • Core observation: Memorization caused by overfitting is not necessarily reflected in the model's output behavior, but may be reflected in the model's specific use of features (including features learned in internal layers)—for example, the model uses coincidental features specific to training samples to make predictions, even if its black-box output appears to generalize well.
    • What the paper proposes: White-box attacks bayes-wb and general-wb based on the above observation (including an extension to deep models and a meta model combining layers), a heuristic method for calibrating precision, and an evaluation against defenses such as differential privacy and dropout.
    • Threat model:
      • Goal: Given a data point (x,y) and its true label, determine whether it is in the training set S of the target model ĝ.
      • Knowledge: The attacker knows the learning algorithm (including hyperparameters) and the training set size, and possesses a finite dataset S̃ disjoint from S and drawn from the same distribution D*.
      • Capability: White-box access to ĝ, i.e., obtaining the complete model representation produced by the learning algorithm (weight matrices, biases, layer operators and activation functions), rather than being limited to queries.
      • Victim systems: Feedforward neural networks and linear classifiers; the paper emphasizes that the attacker does not know any sample in S.
  2. What related research exists?

    Related work is divided into three groups: MI on statistical summaries, black-box MI, and white-box MI; this paper is positioned as a white-box attack under the standard threat model.

    Membership inference on statistical summaries

    • Homer et al. (2008)—the paper calls it the first membership inference attack on genomic data; several subsequent works study membership attacks on statistics commonly used in genome-wide association studies.
    • Komarova et al. (2015)—studies a partial-disclosure scenario: the attacker obtains a fixed statistical estimate combining public and private sources and infers an individual's sensitive traits.

    (Black-box) membership inference on machine learning models

    • Ateniese et al. (2015)—given the parameters of an SVM or HMM, the attacker can extract training data information.
    • Yeom et al. (2017)—proves that generalization error necessarily leads to membership inference vulnerability; this yields the naive attack (predict correctly means judged as a member), which this paper uses as one of its baselines.
    • Shokri et al. (2016)—proposes the shadow model attack (called shadow-bb in this paper): train shadow models on data from the same distribution as the target model, then use their outputs to train an attack model; Salem et al. (2019), Hayes et al. (2017) and others also use similar techniques. The paper points out that the attack model learned by this method may itself overfit, and that softmax outputs highly overlap with prediction correctness, so it may not provide more information than naive.
    • Other scenarios: Hayes et al. (2017) study MI on GANs; Hitaj et al. (2017), Melis et al. (2018), Nasr et al. (2018) study MI in collaborative/federated learning.

    White-box membership inference

    • Hayes et al. (2017)—their GAN attack uses only the discriminator's outputs rather than learned weights, and the paper points out that it is not white-box in the same sense.
    • Nasr et al. (2018)—performs a white-box attack using the gradient of the target model's loss with respect to the weights; the paper points out that their threat model is further relaxed, with the attacker able to access up to half of the target model's training data, and that they find simply extending the shadow method to internal activations does not improve accuracy.

    Baselines and benchmarks: the baselines compared in the experiments are the naive attack and shadow-bb (Shokri et al.); evaluation uses synthetic data and 9 datasets (BCW, PD, Hep, GC, Adult, MNIST, LFW, CIFAR10, CIFAR100).

    The authors position this paper as: a membership inference attack that fully exploits white-box information under the standard threat model in which the attacker holds no real training samples; the authors state that no effective white-box attack existed under this setting before.

  3. How does the paper address this problem?

    Treating "differences in feature usage between the training distribution and the population distribution" as membership evidence, construct a logistic attack model using the difference in weights between the target model and the proxy model.

    Overall idea: an overfitted model uses features in an idiosyncratic way, and this feature usage itself is membership evidence. The attacker trains a proxy model on a proxy dataset, characterizes this evidence by the difference between the target model's and the proxy model's parameters, constructs two types of attacks, bayes-wb and general-wb, then extends them to deep networks and calibrates precision.

    Problem formalization and metrics

    • Adopt Yeom et al.'s MI definition: b is drawn uniformly from {0,1}; when b=1 the attacker is given a point from the population, when b=0 a point from the training set S; the attacker predicts b.
    • Metrics: accuracy; advantage = 2×(accuracy) − 1, scaling accuracy to [-1,1]; precision (the key metric emphasized by the authors, defined as 1/2 when there are no positive predictions); recall (explicitly downplayed by the authors, since predicting all as members gives a perfect score).

    Bayes-optimal attack under the ideal setting (theoretical source of bayes-wb)

    • Generative assumptions: labels follow Categorical(p*), features follow a multivariate Gaussian N(µ_y, Σ) per class, and Σ* is diagonal (naive-Bayes assumption).
    • Theorem 1: Under the above assumptions and with Σ̂=Σ, p̂=p, the Bayes-optimal predictor for membership inference is my(x) = s̄(wyT x + by), where wy = (μ̂y − μ∗y)/σ2; that is, the attack model's weights are large only on features where "the difference between the training-set mean and the population mean relative to the variance is large."
    • Observation 1: Under a linear softmax model, the optimal attack model's parameters approximately equal the difference between the corresponding weights and biases of the target model and the proxy model, i.e., w_y = Ŵ_:y − W̃_:y, yielding Algorithm 1 (bayes-wb).

    Learning a displacement function (general-wb)

    • View bayes-wb as a special case of the element-wise displacement function d(x,y)=x−y; for non-Gaussian distributions a more suitable displacement function can be learned.
    • The displacement function D is modeled as a one-dimensional convolutional neural network (first layer kernel size and stride 2, subsequent layers 1); S̃ is split into in/out parts to train a shadow target and proxy, a labeled dataset T is constructed, and D is trained (Algorithm 2).

    Extension to deep models

    • Difficulty: internal features of different models have no semantic correspondence, which the authors say is exactly why prior white-box shadow methods need the target model's training data.
    • Approach: for each slice ⟨g,h⟩ of the network, construct a local linear approximation, replacing weights with internal influence (Leino et al. 2018) χ: χ satisfies linear consistency and efficiency relative to a zero baseline, so that g(z) = χ(g◦h,P0z)ᵀz + g(0), and thus the attack of Section 3 can be applied to any layer (Algorithm 4).
    • Layer-wise combination: train a meta model that takes the confidence outputs of the per-layer attacks as input and outputs a single membership decision; in general-wb the meta model can be trained jointly with the per-layer displacement functions.

    Precision calibration

    • Under the generative assumptions the attack output is the true membership probability; when the assumptions are violated, use a heuristic (Algorithm 3): treat all of S̃ as non-members, and given a false-positive tolerance α, set the threshold τ_y for class y to the α quantile of the confidence scores of samples of that class in S̃.
    • The authors report that this heuristic consistently improves attack precision on real data (Section 5.5).
  4. What experiments did the paper conduct?

    Four attacks are compared on synthetic data and 9 real datasets, and calibration, layer-wise combination, data scale, and DP/dropout defenses are evaluated.

    Experimental setup

    • Models under test: linear softmax regression (synthetic data only), single-hidden-layer MLP (2n hidden units, non-image data), LeNet-based CNN (two 5×5 convolutional layers + a 500-neuron fully connected layer, image data); trained with SGD, learning rate 0.1, decay 1e-4, Nesterov momentum, and 25%/50% dropout for the CNN.
    • Datasets: synthetic data (10 classes, 75 features, 400/800/1600 examples) and 9 real datasets; sizes and target model train/test accuracy are shown in Figure 4 (e.g., Adult 48,841 examples, CIFAR100 test accuracy 0.312, MNIST test accuracy 0.987).
    • Data split: train/test each take 1/4, hold-out takes 1/2; the target model uses only train, the attack uses only hold-out; evaluation is on train (members) and test (non-members); each experiment is repeated 10 times and averaged.
    • Attack implementation: bayes-wb uses the mean weights of 10 proxy models; general-wb and the meta model are trained for 32 epochs (Adam) on data from 10 shadow models; shadow-bb uses 10 shadow models; nM and nD are selected by scanning parameters on the validation set.
    • Metrics: accuracy, advantage, precision, recall; Figure 10 reports uncalibrated precision.

    Main results

    Accuracy and precision (uncalibrated) of the four attacks on 9 datasets in Figure 10:

    Swipe horizontally to read the table

    Datasetnaive accshadow-bb accbayes-wb accgeneral-wb accgeneral-wb prec
    BCW0.5220.5000.5140.5230.528
    PD0.5170.5080.5170.5190.561
    Hep0.5950.5530.6050.6180.609
    GC0.6180.5820.6230.6220.637
    Adult0.5060.5240.5070.5160.516
    MNIST0.5060.5060.5750.5210.640
    LFW0.5820.5970.6180.6190.586
    CIFAR100.6660.6840.6860.7090.646
    CIFAR1000.8310.8470.8470.8720.792

    (According to Figure 10; the precision column lists only general-wb to limit the number of columns; see the original table for the rest.)

    • The authors report: bayes-wb or general-wb achieves the highest accuracy among the four methods on every dataset except Adult, and higher precision than the other two methods on all datasets; accuracy is higher by up to 7 percentage points, and precision is usually higher by at least 5 percentage points.
    • Exceptions: on Adult, shadow-bb's accuracy (0.524) is higher than both attacks in this paper; on BCW, bayes-wb (0.514) is lower than general-wb and naive.
    • Recall is usually highest for naive or shadow-bb, but the authors point out that their precision is lower, and that naive's high recall is merely a result of high training accuracy.

    Calibration and performance on well-generalizing models

    • After calibration with Algorithm 3 (α=0.90, 0.99), Figure 11 shows that the precision of bayes-wb and general-wb rises every time, often by more than 10 percentage points; the authors state that 0.90 and 0.99 can serve as practical "rule-of-thumb" values, but also point out that in practice it is not easy for an attacker to tune α.
    • The authors report: on all convolutional models general-wb can be calibrated to above 75% precision, including MNIST with a generalization error of only 1.1%; on MLPs calibration consistency is somewhat worse, with bayes-wb exceeding 70% on BCW and Hep.
    • For shadow-bb, raising the threshold sometimes instead lowers precision; in individual cases the average confidence of non-members is higher than that of members, causing precision to fall slightly below 50%.
    • On well-generalizing models: the authors report that on MNIST the advantage of general-wb and bayes-wb is 3.5 times and 12.5 times that of naive respectively, and on Adult general-wb is 2.6 times; shadow-bb's advantage on these datasets except Adult is usually below 2%.

    Sensitivity, data scale, and layer-wise combination

    • Comparison with the omniscient attack (Figure 5, synthetic data, n=100/200/400): bayes-wb achieves on average 84% of the omniscient attack's advantage; the smallest-capacity general-wb recovers on average 94% of bayes-wb's advantage, and the learned displacement function is almost exactly element-wise subtraction; with excess capacity it is about 92% of the smallest capacity.
    • Data scale: Figure 7 shows that on Adult the attack advantage decreases as training data increases, falling below 4% at the full 48,841 examples; Figure 8 shows an overall decreasing trend with scale on each dataset, but CIFAR10/CIFAR100 are clear exceptions, which the authors suggest may be related to differences in the number of features, network capacity, and generalization error.
    • Layer-wise combination (Figure 9): on 4 LeNet target models, the meta attack's accuracy is higher than any single-layer attack; the authors report that on MNIST the meta attack's advantage exceeds the sum of all single layers, and on this basis conjecture that transfer learning may reduce leakage (not experimentally verified).

    Other ablations and analyses

    • Hyperparameter tuning (Figure 6, Hepatitis): general-wb's validation accuracy and test accuracy follow similar trends and peak at the same architecture, and the authors state that validation accuracy can be used for tuning.
    • Similarity between shadow-bb and naive: on LFW, naive reproduces 88% of shadow-bb's correct predictions, and the authors believe softmax outputs highly overlap with prediction correctness.
    • Defenses (Figures 12, 13): as ε decreases the attack effect drops rapidly; at ε=16, on BCW, PD, and LFW the protection is weaker than dropout and harms accuracy; on Hep, 16-DP does not bring general-wb below shadow-bb's level against the undefended model; only on GC does 16-DP balance defense and accuracy.
    • Comparison with DP theoretical bounds: at ε=0.25 the theoretical maximum accuracy is 64.2%, and the closest attack is 53.5% on LFW (25% of the theoretical maximum advantage); dropout in most cases has little effect on attack accuracy but can improve model accuracy.
  5. What are some points that can be further explored?

    The authors discuss limitations such as the accuracy cost of DP and the attack weakening on large datasets, and propose directions such as transfer learning and defense design.

    Limitations and future directions noted by the authors

    • More training data weakens the attack: the authors state that on the full Adult dataset the attack advantage becomes very small (<4%), and suggest this may indicate that Adult is large enough for a medium-scale MLP and hard to leak (Section 5.3).
    • The calibration hyperparameter α is not easy to tune in practice; the authors only give empirical "rule-of-thumb" values of 0.90/0.99 (Section 5.5).
    • Although differential privacy with small ε can weaken the attack, the model accuracy cost is high; the authors state this limits the practicality of this defense and "highlights the need for more research in this area" (Section 6).
    • The protective effect of DP with large ε (e.g., 16) varies by dataset and model, and the actual benefit cannot be taken for granted; the authors suggest using this attack to help choose ε for a specific application (Section 6).
    • The authors speculate that transfer learning (pretraining on public data and privately fine-tuning only the top layer) may be a practical defense, because experiments show that all layers participate in leakage; this is a hypothesis and was not tested experimentally (Sections 5.4, 6).
    • The authors warn that "regularization that improves generalization prevents MI" may not hold generally: a model can predict correctly on unseen points while leaking membership information through its parameters (Section 6).

    Scope of experiments

    • The models tested are three architectures: linear softmax regression, single-hidden-layer MLP, and LeNet-style CNN, across 10 dataset-architecture combinations (Figure 4).
    • The attacks compared are four: naive, shadow-bb, bayes-wb, general-wb; the defense evaluations include dropout and (ε,δ)-DP (ε ∈ {0.25, 1, 4, 16}, moments accountant / Tensorflow Privacy).
    • Each experiment is repeated 10 times and averaged; the attacker's data is a hold-out (half of the data), bayes-wb uses 10 surrogate models, and shadow-type methods use 10 shadow models.
    • The paper discusses black-box defenses such as Shokri et al.'s top-k restriction and softmax temperature, and Salem et al.'s model stacking, noting that they can be bypassed in the white-box setting, but no experiments were run on these defenses.
    • The paper does not report the runtime or computational cost of the attacks; the calibration results in Figure 11 are not given as point-by-point values (bar chart only).
  6. Summarize the main content of the paper

    Uses the model's specific use of features to perform white-box membership inference without the target model's training data, and can be calibrated to high precision.

    A membership inference (MI) attack paper studying how, in a white-box setting where the attacker holds no training samples of the target model, to exploit model-internal information to infer whether a point is in the training set.

    • Core observation: an overfitted model's "memorization" is not necessarily reflected in output errors but in the model's idiosyncratic use of features—coincidental features in the training set (such as the pink background of a particular face photo) are used by the model as a basis for prediction, and this itself is membership evidence.
    • Method: derive the Bayes-optimal attack under Gaussian naive-Bayes assumptions (Theorem 1), whose weights are proportional to the mean difference between the training distribution and the population distribution; in practice approximate with a proxy model, yielding bayes-wb (weight subtraction) and general-wb (learning a displacement function); extend the attack to each layer of deep networks via local linear approximations constructed with internal influence, then combine per-layer outputs with a meta model; calibrate precision with an α-quantile heuristic.
    • Main results (Figure 10): on 9 real datasets, the authors report that bayes-wb or general-wb has the highest accuracy on every dataset except Adult (e.g., on CIFAR100 general-wb 0.872 vs shadow-bb 0.847), and higher precision on all datasets; the higher accuracy of shadow-bb on Adult is an exception.
    • Calibration and well-generalizing models: after calibration, precision on convolutional models can reach above 75%, including MNIST with a generalization error of only 1.1%; the authors report that on MNIST bayes-wb's advantage is 12.5 times that of naive; while for shadow-bb, raising the threshold sometimes instead lowers precision.
    • Defense evaluation: DP with small ε can weaken the attack but at a large accuracy cost; at ε=16 protection is limited on most datasets, and only German Credit balances defense and accuracy; dropout has little effect on the attack and can improve accuracy, and the authors consider regularization a possibly more practical defense, but warn that improving generalization is not sufficient to prevent leakage.
    • Authors' conclusion: the authors state this is the first MI attack under the standard threat model that fully exploits white-box information, and that its analysis deepens understanding of the overfitting mechanism; the privacy-utility trade-off of DP presents a subtle picture, much work remains for effective defenses, and the authors expect the insights of this paper to be usable for designing defenses.

Related papers

Show 3 more papers
Read originalarxiv.org