Source-linked AI summary

White-box vs Black-box: Bayes Optimal Strategies for Membership Inference

Alexandre Sablayrolles, Matthijs Douze, Yann Ollivier, Cordelia Schmid, Hervé Jégou

arXiv:1908.11229v1stat.MLcs.CRcs.LG

TL;DR

Membership inference asks whether a sample belonged to a model’s training set, raising privacy concerns under assumptions about attacker knowledge. The paper derives an optimal probabilistic strategy, approximates it for practical attacks, and reports improved performance over existing methods across simple and complex settings.

  • Problem

    Membership inference seeks to determine whether a sample was used to train a model, with implications for training-data privacy and intellectual property.

  • Method

    A probabilistic analysis derives the optimal attack under assumptions on parameter distributions, then approximates it into explicit strategies based on loss and calibration.

  • Results

    The optimal strategy depends only on loss, and the proposed approximations outperform existing methods on logistic regression, CIFAR, and Imagenet.

  • Takeaways & Limitations

    In the paper’s asymptotic setting, access to model parameters does not improve membership inference beyond optimized black-box access to loss.

  • Takeaways & Limitations

    The analysis assumes the attacker knows the data distribution and model specifications, although some methods may not require all of this information.

Abstract

from arXiv · show

Membership inference determines, given a sample and trained parameters of a machine learning model, whether the sample was part of the training set. In this paper, we derive the optimal strategy for membership inference with a few assumptions on the distribution of the parameters. We show that optimal attacks only depend on the loss function, and thus black-box attacks are as good as white-box attacks. As the optimal strategy is not tractable, we provide approximations of it leading to several inference methods, and show that existing membership inference methods are coarser approximations of this optimal strategy. Our membership attacks outperform the state of the art in various settings, ranging from a simple logistic regression to more complex architectures and datasets, such as ResNet-101 and Imagenet.

1. Introduction

The paper formulates membership inference as deciding whether a sample was used to train a model and derives an optimal probabilistic attack. Under stated assumptions, the optimal strategy depends only on loss, while tractable approximations outperform existing methods across several settings.

  • Problem: Membership inference tests whether a specific sample was used to train a model, given the sample and model information.The problem is framed as a privacy question concerning training data and intellectual property.
  • Attack settings: The attacker may operate white-box with all network parameters or black-box with only classifier outputs such as decisions, losses, or full class responses.The paper focuses on black-box access to the loss incurred by the correct label.
  • Optimal strategy: Under mild assumptions, the optimal inference strategy depends on the classifier only through its loss, so asymptotically white-box attacks provide no additional information.The result applies within the paper’s probabilistic framework for Bayesian or noisy training.
  • Approximations: Approximations yield three explicit membership attack strategies, while existing state-of-the-art methods are characterized as coarser approximations.The approximations make the otherwise intractable optimal strategy usable in practice.
  • Empirical evaluation: The proposed simplified strategy outperforms state-of-the-art membership inference methods on CIFAR and Imagenet image-classification benchmarks.The comparison specifically names shadow models as the state-of-the-art baseline in this setting.

2. Related work

Related work connects membership inference to memorization, overfitting, differential privacy, and shadow-model attacks. Prior studies examine leakage across discriminative and generative models and use simulated models to infer membership from black-box outputs.

  • Memorization and leakage: Prior work studies how neural networks memorize training data, including fitting random labels on datasets such as CIFAR10 and Imagenet.These studies relate memorization capabilities to dataset-dependent effective capacity.
  • Differential privacy: Differential-privacy research links privacy guarantees to generalization and proposes Bayesian posterior sampling or noisy SGD for private learning.The cited work frames avoiding overfitting as relevant to privacy protection.
  • Membership inference: Membership-inference research develops attacks for discriminative and generative models, including methods targeting samples with differing vulnerability.The cited literature includes attacks based on classifier outputs and strategies for identifying vulnerable training images.
  • Shadow models: Shadow models simulate training on public data splits, allowing attackers to analyze output patterns from models with known membership labels.This prior setup uses black-box-(iii) access to full responses for all classes and assumes public and private data share a distribution.

3. Membership inference model

The paper formulates membership inference as Bayesian inference about whether a sample belongs to the training set, under a stochastic posterior distribution over model parameters. It derives optimal strategies, interprets their loss-based score, and connects membership privacy with differential privacy guarantees.

  • Posterior model: The parameter distribution models randomness from Bayesian posterior sampling, noisy training, or stochastic optimization.The temperature T controls this stochasticity: T = 1 gives the Bayesian posterior, while T →0 gives MAP inference.
  • Problem formulation: Membership inference determines whether a sample z1 was used for training, given model parameters θ and the sample itself.The framework introduces a binary membership variable m1 for z1.
  • Bayes-optimal inference: Theorem 1 derives Bayes-optimal membership inference without assuming a particular form for the parameter distribution.Its derivation treats θ as a random variable and does not require the loss function to appear explicitly.
  • Bayes-optimal inference: Theorem 2 further makes the optimal inference explicit under the assumed posterior and bases it on a score involving the sample loss.The score is passed through a sigmoid, although thresholding the score directly is equivalent because the sigmoid is increasing.
  • Score interpretation: The threshold τp(z1) represents the typical loss of z1 under models trained without that sample, so losses below it provide evidence for membership.When the loss is near the threshold, the posterior membership probability equals the prior λ; when the score is positive, it exceeds λ.
  • Privacy connection: Higher temperature T decreases the membership score and posterior membership probability, corresponding to greater randomness protecting training-data privacy.The paper also relates differential-privacy guarantees to membership privacy, while noting that differential privacy generally constrains training and can reduce accuracy.

4. Approximations for membership inference

The paper approximates an intractable optimal membership-inference strategy with sample-calibrated, loss-threshold, and Taylor-based methods. These approximations explain existing attacks and improve separation by accounting for sample difficulty.

  • The authors derive three explicit attacks—MAST, MALT, and MATT—from approximations to the intractable optimal strategy.Existing membership-inference methods are characterized as coarser approximations of the same optimal strategy.
  • The calibrating term τ(z1) reflects sample difficulty, so a low loss alone does not necessarily indicate training membership.Easy-to-predict samples can have low loss whether or not they were included in training.
  • Assuming τ(·) is constant reduces the optimal strategy to thresholding the sample loss ℓ(θ, z1).The sample is predicted as a training point when its loss is below τ, and as a test point otherwise.
  • For Gaussian mean estimation, τ(zi) depends on the sample’s distance from µ, making atypical samples harder to calibrate globally.The per-sample threshold MAST separates training and non-training score distributions better than a global threshold.
  • MALT uses a constant loss threshold, MAST estimates per-sample thresholds from subsampled models, and MATT uses a Taylor expansion around separately trained parameters.MATT relies on a Gaussian posterior or Laplace approximation and is experimentally simplified using an estimated score.
  • The Taylor-based approximation becomes negligible at rate 1/n relative to parameter-estimation terms shrinking at 1/√n.This asymptotic comparison motivates dropping the smaller term in the approximate score.

5. Membership inference algorithms

The practical algorithms convert membership scores into decisions using thresholds, with MALT and MAST relying on loss calibration and MATT using parameter-space Taylor information. MATT is unsuitable for neural networks because their parameterizations need not align.

  • Membership inference asks whether a candidate sample belongs to the training set of a model with parameters θ.
  • The 0-1 baseline predicts membership from whether the model classifies the sample correctly, and its accuracy rises with the overfitting gap.Its accuracy is better than random guessing, with improvement proportional to ptrain − ptest.
  • Thresholds for the score variants are estimated on simulated datasets with known membership labels, and cross-validation makes almost no difference.The threshold is a one-dimensional parameter and is therefore not prone to overfitting.
  • MALT thresholds the sample loss, whereas MAST estimates a separate threshold for each sample from models trained on different subsamples.
  • MATT estimates its score using a separately trained parameter set and a gradient step over the loss.The method assumes parameters lie near a unique global minimum.
  • MATT cannot be applied to neural networks because functionally equivalent networks can have different parameters through operations such as channel permutation.

6. Experiments

Experiments evaluate attack accuracy and mean average precision from logistic regression through convolutional networks and Imagenet models. The proposed methods outperform baselines, while augmentation reduces but does not eliminate membership leakage.

  • The experiments measure attack accuracy plus mAPtrain and mAPtest across machine-learning tasks of increasing complexity.Mean average precision is invariant to increasing transformations of the attack scores.
  • 6.2. Logistic regression: MATT and MALT perform similarly on mAPtest, but MATT slightly outperforms MALT on mAPtrain.MALT more easily identifies high-loss test samples; low-loss samples may belong to either split.
  • 6.3. Small convolutional network: On CIFAR-10 with a small neural network, the proposed estimations outperform the related membership-inference methods.MAST has only a slight advantage over MALT despite being calibrated directly for each investigated sample.
  • 6.4. Evaluation on Imagenet: On Imagenet, no augmentation yields about 90% attack accuracy for the authors’ approach versus 77% for existing approaches.The experiments use deep convolutional architectures including VGG-16 and ResNet-101.
  • 6.4. Evaluation on Imagenet: Stronger data augmentation reduces attack accuracy, but membership inference remains above 64%.Augmentation narrows the training-versus-held-out accuracy gap, decreasing both Bayes and MALT attack accuracy.

7. Conclusion

The paper derives an optimal membership-inference strategy and approximates it with practical methods. These methods outperform competing strategies on both logistic regression and deep ImageNet classification.

  • The optimal inference strategy does not depend on classifier parameters when the loss is available, but is not explicit enough for direct practical use.
  • Two approximations produce three concrete membership-inference strategies.
  • The strategies outperform competitive methods on a simple logistic problem and significantly outperform the baseline for deep convolutional membership inference on ImageNet.MATT achieves a large margin on the logistic problem, while MALT is applied to the ImageNet setting.

A.1. Accuracy of the 0-1 attack

The 0-1 attack evaluates membership by whether a sample is classified correctly. Its accuracy combines correct classification probabilities for training and non-training samples.

  • The 0-1 attack uses g1 to indicate whether z1 was classified correctly.It is accurate when g1 = 1 for training images and g1 = 0 for other images.
  • The attack accuracy is λp_train + (1 − λ)(1 − p_test).This equals P(g1=1 | m1=1)P(m1=1) + P(g1=0 | m1=0)P(m1=0).

A.2. Gaussian data

The Gaussian-data analysis models the average of centered Gaussian variables as Gaussian and rewrites a quadratic expression around a shifted center.

  • With µ = 0, θ is the mean of n centered Gaussian variables with covariance I and therefore follows a Gaussian distribution.The supplied passage specifies the resulting variance only incompletely.
  • The quadratic expression n∥t∥2 + ∥z − t∥2 is decomposed into a centered term around ω and a residual involving ∥z∥2.

A.3. Bound on variations of a sigmoid

The appendix bounds sigmoid variations using monotonicity and Lipschitz continuity, then justifies neglecting approximation errors that are smaller than the main term.

  • For v > u, the sigmoid relation follows directly from σ being increasing.
  • For u > v, the analysis separately examines the reversed ordering to establish the corresponding sigmoid bound.
  • The sigmoid is Lipschitz-continuous with constant 1/4, which yields Equation (47).
  • The MATT approximation is justified by bounding its omitted quantity and comparing it with the main term.
  • δ2 has order 1/n^2, while δ1 and the main term have orders 1/n and 1/√n, respectively, so δ1 and δ2 can be neglected.
Loading 1908.11229v1…