MoPe: Model Perturbation based Privacy Attacks on Language Models

Marvin Li, Jason Wang, Jeffrey G. Wang, Seth Neel

Abstract

Membership Inference Attacks (MIAs) are critical for auditing the privacy of Large Language Models (LLMs). Traditional attacks rely on loss values to identify training data, but loss is often a noisy and insufficient signal. We introduce MoPe (Model Perturbation), a white-box MIA that identifies training data by measuring the "sharpness" of the loss landscape. By adding small Gaussian noise to model parameters and observing the resulting loss increase, MoPe approximates the trace of the Hessian matrix. Our evaluation across the Pythia model suite demonstrates that MoPe significantly outperforms loss-based baselines, successfully detecting memorized data even when it exhibits average loss values.

1. Introduction

As Large Language Models (LLMs) are increasingly fine-tuned on sensitive proprietary data, the risk of training data leakage—where a model regurgitates its training set—becomes a critical bottleneck. Membership Inference Attacks (MIAs) aim to determine if a specific data point was included in a model's training set. The prevailing intuition is that models exhibit lower loss on training data. However, this signal is often unreliable as many non-training points may also have low loss due to inherent simplicity, while some training points may have higher loss due to complex optimization dynamics.

2. Methodology: Exploiting Loss Landscape Geometry

MoPe shifts the focus from the "depth" of the loss (the value itself) to the "sharpness" of the local minimum. The core hypothesis is that training points sit in sharper local minima than test points.

2.1 Model Perturbation

MoPe implements a white-box attack by directly perturbing the model's parameters $\theta$. Specifically, it adds random Gaussian noise $\epsilon$ to the weights and measures the change in log-likelihood (loss).

Conceptual comparison of loss landscapes for training and test data.

2.2 Hessian Trace Approximation

Mathematically, the expected change in loss under small parameter perturbations approximates the trace of the Hessian matrix. A larger increase in loss indicates a "brittler" or sharper region of the parameter space, which serves as a strong indicator of membership in the training set. This approach allows for the detection of training data even when its loss value is unremarkable.

3. Experimental Evaluation

The researchers evaluated MoPe using the Pythia Suite, comprising eight models ranging from 70M to 12B parameters trained on "The Pile." This setup facilitates an analysis of how memorization and attack efficacy scale with model size.

3.1 Comparative Performance

MoPe demonstrates superior detection capabilities compared to standard loss-based MIAs. For instance, on a 160M parameter model, MoPe achieved an Area Under the Curve (AUC) of 0.646, whereas the standard loss-based attack achieved only 0.512—barely better than random guessing.

Baseline performance of loss-based membership inference across model sizes.

4. Key Insights

  • Beyond Loss: MoPe can identify training points with completely average loss values, suggesting that privacy defenses focusing solely on increasing loss (e.g., certain unlearning methods) may be insufficient for true privacy.
  • Stability of Sharpness: Unlike loss, which tends to increase for earlier training batches as the model "forgets," the sharpness signal captured by MoPe remains relatively stable throughout the training process.
  • The Scaling Paradox: MoPe's performance peaks on mid-sized models (160M–410M) and declines for the largest 12B parameter models. This is likely due to increased noise in the Hessian approximation at higher dimensions rather than improved privacy in larger models. For these larger scales, ensembling MoPe with loss-based attacks can boost performance (e.g., to 0.544 AUC on the 12B model).

5. Conclusion

MoPe provides a powerful new lens for auditing LLM privacy by leveraging the geometry of the weight space. While currently a white-box attack requiring weight access, it sets a new benchmark for membership inference. Future research should focus on developing more stable Hessian estimators for extremely large models and exploring how landscape smoothing techniques might serve as a defense against such geometric attacks.

Summary updated

BibTeX
@inproceedings{li2023mope,
  author = {Marvin Li and Jason Wang and Jeffrey G. Wang and Seth Neel},
  title = {{MoPe: Model Perturbation based Privacy Attacks on Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.842},
}
Figure