Skip to main content
QUICK REVIEW

[Paper Review] Membership Inference Attacks against Language Models via Neighbourhood Comparison

Justus Mattern, Fatemehsadat Mireshghallah|arXiv (Cornell University)|May 29, 2023
Adversarial Robustness in Machine LearningComputer Science4 citations
TL;DR

This paper proposes neighborhood membership inference attacks for language models that compare a sample’s loss to losses of synthetically generated, semantically similar neighbor texts, eliminating the need for reference models trained on in-domain data. The method achieves competitive performance even with imperfect data and outperforms existing reference-free and imperfect-reference attacks, demonstrating that neighborhood comparison is a robust alternative to reference-based methods under realistic threat models.

ABSTRACT

Membership Inference attacks (MIAs) aim to predict whether a data sample was present in the training data of a machine learning model or not, and are widely used for assessing the privacy risks of language models. Most existing attacks rely on the observation that models tend to assign higher probabilities to their training samples than non-training points. However, simple thresholding of the model score in isolation tends to lead to high false-positive rates as it does not account for the intrinsic complexity of a sample. Recent work has demonstrated that reference-based attacks which compare model scores to those obtained from a reference model trained on similar data can substantially improve the performance of MIAs. However, in order to train reference models, attacks of this kind make the strong and arguably unrealistic assumption that an adversary has access to samples closely resembling the original training data. Therefore, we investigate their performance in more realistic scenarios and find that they are highly fragile in relation to the data distribution used to train reference models. To investigate whether this fragility provides a layer of safety, we propose and evaluate neighbourhood attacks, which compare model scores for a given sample to scores of synthetically generated neighbour texts and therefore eliminate the need for access to the training data distribution. We show that, in addition to being competitive with reference-based attacks that have perfect knowledge about the training data distribution, our attack clearly outperforms existing reference-free attacks as well as reference-based attacks with imperfect knowledge, which demonstrates the need for a reevaluation of the threat model of adversarial attacks.

Motivation & Objective

  • Address the unrealistic assumption in reference-based membership inference attacks that adversaries have access to high-quality, in-domain training data for reference models.
  • Investigate the fragility of reference-based attacks when reference data distributions differ from the target model’s training data.
  • Design a reference-free membership inference attack that maintains high performance without requiring access to training data distributions.
  • Demonstrate that neighborhood comparison using data-augmented neighbors can effectively calibrate model scores for membership inference.
  • Re-evaluate the threat model for membership inference attacks by showing that neighborhood-based methods are more robust and practical than reference-based approaches in privacy-sensitive settings.

Proposed method

  • Generate semantically similar neighbor texts for a target input by applying word replacements using a masked language model.
  • Compute the loss of the original sample and each neighbor under the target language model.
  • Compare the loss of the original sample to the average loss of its neighbors to determine membership status.
  • Classify a sample as a training member if its loss is significantly lower than the average loss of its neighbors, using a learned threshold γ.
  • Use a neighborhood-based calibration mechanism to account for intrinsic sample complexity, avoiding reliance on external reference models.
  • Train and evaluate the attack on multiple language model architectures and datasets, comparing performance to baseline reference-based and reference-free attacks.

Experimental results

Research questions

  • RQ1How does the performance of reference-based membership inference attacks degrade when the reference model is trained on a distribution different from the target model’s training data?
  • RQ2Can neighborhood comparison using synthetically generated neighbors serve as a viable alternative to reference models in membership inference attacks?
  • RQ3How does the proposed neighborhood attack compare in performance to both reference-based attacks with perfect knowledge and reference-free attacks with no access to training data?
  • RQ4To what extent does the neighborhood method mitigate the false-positive bias observed in simple loss-based attacks?
  • RQ5Does the neighborhood attack remain effective in privacy-sensitive domains where in-domain training data is unavailable?

Key findings

  • Reference-based attacks, such as Likelihood Ratio Attacks (LiRA), exhibit high fragility when the reference model is trained on a distribution different from the target model’s training data, leading to significant performance drops.
  • The proposed neighborhood attack achieves performance competitive with reference-based attacks that have perfect knowledge of the training data distribution, even without access to such data.
  • The neighborhood attack significantly outperforms existing reference-free attacks and reference-based attacks with imperfect reference data, demonstrating its robustness in realistic threat models.
  • The method effectively reduces false-positive rates by accounting for intrinsic sample complexity through neighborhood-based loss calibration.
  • The attack remains effective across multiple language model architectures and datasets, indicating broad applicability.
  • The results suggest that current threat models for membership inference attacks may be overly optimistic, and that neighborhood-based methods should be considered in future threat and defense analyses.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.