Membership Inference Attacks by Exploiting Loss Trajectory

Yiyong Liu, Zhengyu Zhao, Michael Backes, Yang Zhang

Abstract

Membership Inference Attacks (MIAs) are critical for auditing privacy in machine learning, yet traditional methods often struggle with high false-positive rates due to "easy" non-member samples that mimic the low loss of training data. This paper introduces TRAJECTORYMIA, a novel approach that shifts the focus from a model's final output to its training history. By utilizing knowledge distillation to reconstruct a model's learning process in a black-box setting, TRAJECTORYMIA extracts "loss trajectories" that reveal distinct patterns between members and non-members. Experimental results across various domains—including image, tabular, and text datasets—demonstrate that TRAJECTORYMIA provides up to a 6x improvement in True Positive Rates at very low False Positive Rates compared to existing state-of-the-art attacks.

Introduction

As machine learning models are increasingly deployed on sensitive data, the risk of privacy leakage grows. Membership Inference Attacks (MIAs) serve as the primary diagnostic tool for this risk, asking whether a specific data point was used to train a target model. Traditionally, these attacks rely on the intuition that models exhibit lower loss on training data (members) than on unseen data (non-members).

However, this intuition is often insufficient. Many data points are inherently "easy" for a model to classify, resulting in low loss even if they were never part of the training set. These easy non-members create a significant noise floor, leading to high false-positive rates that make privacy auditing unreliable in practice. To address this, we propose looking beyond the final state of a model to the journey it took during training: the loss trajectory.

The Problem: The "Easy Sample" Fallacy

Standard MIAs typically evaluate a model at its point of convergence. At this stage, both a memorized training sample and a simple, representative non-member sample may yield nearly identical low-loss values. This ambiguity is the primary bottleneck for high-precision membership inference. To distinguish between the two, one must observe how the model arrived at that low loss. A member is typically "learned" over time, showing a characteristic downward trend in loss as the model adapts to it, whereas an easy non-member often exhibits low loss from the very beginning of the training process.

Methodology: TRAJECTORYMIA

TRAJECTORYMIA introduces a method to extract these temporal patterns even when the attacker only has black-box access to a final, fully-trained model. The process involves four key stages:

  1. Knowledge Distillation: Since the attacker cannot see the target model's intermediate training states, they use the target model as a "teacher." A local "student" model is trained to mimic the teacher's outputs using an auxiliary dataset.
  2. Checkpointing: During this distillation process, the attacker saves the student model at regular intervals (e.g., every epoch). This effectively "re-simulates" a training history that approximates the target model's evolution.
  3. Trajectory Extraction: For any target data point, the attacker calculates the loss across the entire sequence of saved student checkpoints. This sequence forms the "distilled loss trajectory."
  4. Classification: The attacker trains a simple Multi-Layer Perceptron (MLP) to serve as an attack model. This model is trained to recognize the specific loss patterns that characterize members versus non-members.

Experimental Evaluation

The researchers evaluated TRAJECTORYMIA across a diverse range of benchmarks to ensure its generalizability:

  • Datasets: Image datasets (CIFAR-10, CIFAR-100, CINIC-10, GTSRB), tabular/social data (Purchase, Location), and text (20 Newsgroups).
  • Architectures: The attack was tested against various neural architectures, including ResNet-56, MobileNetV2, VGG-16, and WideResNet-32.

Key Results

The most significant finding was the attack's performance at low False Positive Rates (FPR), which is the most critical metric for real-world privacy auditing. On the CINIC-10 dataset, TRAJECTORYMIA achieved a 5.3% True Positive Rate (TPR) at a 0.1% FPR. While the absolute percentage may seem modest, it represents a 6x improvement over previous state-of-the-art methods, which typically achieved less than 0.8% TPR at the same precision level.

Furthermore, TRAJECTORYMIA consistently outperformed LiRA, a leading MIA that requires training hundreds of "shadow models." TRAJECTORYMIA achieved these superior results with significantly lower computational overhead, making it a more practical tool for auditors.

Insights and Discussion

The success of TRAJECTORYMIA stems from its ability to capture "sample hardness." By using distillation as a "time machine," the attack reveals whether a model's low loss is a result of general feature learning (easy samples) or specific memorization (members).

Interestingly, the attack proved robust to several common variables. It remained effective even when the attacker used a different model architecture for the student than the target, or when there was a distribution shift between the auxiliary data and the original training data. This suggests that the dynamics of loss trajectories are a fundamental property of the learning process rather than an artifact of specific configurations.

Conclusion and Future Work

TRAJECTORYMIA demonstrates that the temporal dimension of training contains vital information for privacy auditing that is lost when looking only at final model weights. By exploiting loss trajectories, researchers can identify training set membership with unprecedented accuracy at low false-positive rates.

Future research may explore more sophisticated modeling of these trajectories beyond simple MLPs, such as using Recurrent Neural Networks (RNNs) or Transformers. Additionally, investigating how privacy-preserving techniques like Differential Privacy (DP) influence these trajectories could lead to more robust defense mechanisms.

Summary updated

BibTeX
@inproceedings{liu2022membership,
  author = {Yiyong Liu and Zhengyu Zhao and Michael Backes and Yang Zhang},
  title = {{Membership Inference Attacks by Exploiting Loss Trajectory}},
  booktitle = {CCS},
  year = {2022},
  doi = {10.1145/3548606.3560684},
}
Figure