Membership Inference Attack Using Self Influence Functions

Gilad Cohen, Raja GiryesWACV 2022

Abstract

Membership Inference (MI) attacks pose a significant privacy risk by determining if a specific data point was part of a model's training set. While black-box attacks are well-studied, white-box attacks—leveraging internal model parameters—have historically shown limited gains, especially against models trained with data augmentation. This paper introduces a novel white-box MI attack based on Self-Influence Functions (SIF). By analyzing the second-order influence of a sample on its own loss, we demonstrate that training members exhibit distinct, "quiet" influence signatures compared to non-members. Our adaptive variant, adaSIF, effectively bypasses data augmentation defenses. Experimental results on CIFAR-10, CIFAR-100, and Tiny ImageNet show that SIF-based attacks achieve state-of-the-art performance, often reaching near-perfect member recall.

Introduction

Machine learning models often memorize details of their training data, a phenomenon that can be exploited via Membership Inference (MI) attacks. In an MI scenario, an adversary aims to predict whether a given record $x$ was used to train a target model $\mathcal{M}$. This is particularly critical in sensitive domains like healthcare or finance, where membership in a dataset (e.g., a "cancer patients" dataset) reveals sensitive attributes.

Current MI research distinguishes between black-box attacks, which only access model outputs (e.g., confidence scores), and white-box attacks, which have full access to gradients and parameters. Despite the additional information, white-box attacks have struggled to significantly outperform black-box counterparts. Furthermore, common regularization techniques like data augmentation—randomly perturbing images during training—often serve as an effective defense by preventing the model from over-memorizing specific pixel-level details. This work challenges the perceived limitations of white-box attacks by introducing Self-Influence Functions (SIF) as a powerful membership signal.

Methodology

Self-Influence Functions (SIF)

The core of our approach is the Influence Function, a technique from robust statistics used to estimate the effect of a training point on a model's parameters. Specifically, we define the Self-Influence Function (SIF) as the influence of a sample $z$ on its own loss $L(z, \theta)$.

Mathematically, the SIF for a point $z$ is calculated using the gradient of the loss $\nabla_\theta L(z, \theta)$ and the inverse Hessian matrix $H_\theta^{-1}$: $$ \text{SIF}(z) = \nabla_\theta L(z, \theta)^\top H_\theta^{-1} \nabla_\theta L(z, \theta) $$

The intuition is that for a training member, the model has already optimized its parameters to minimize the loss on that specific point. Consequently, the member's "self-influence" tends to be very small and stable—clustered tightly around zero. In contrast, non-members, which the model has never seen, produce gradients that interact with the Hessian in a way that results in highly volatile and extreme SIF scores.

Distribution of SIF and adaSIF scores for members and non-members. Members (red) cluster near zero, while non-members (blue) show high variance.

adaSIF: Defeating Data Augmentation

Data augmentation (e.g., random cropping, horizontal flipping) complicates MI attacks because the model never sees the exact original image during training. To counter this, we propose adaSIF (Adaptive SIF). Instead of calculating the SIF for a single instance, we average the SIF scores across multiple random augmentations of the target image. This process effectively "recovers" the membership signal by marginalizing out the noise introduced by the augmentation transformations.

Computational Efficiency

Directly computing the inverse Hessian $H_\theta^{-1}$ is computationally prohibitive for modern deep networks. We employ stochastic estimation techniques and Hessian-vector products (HVPs) to approximate the SIF scores efficiently, making the attack practical for large-scale architectures like ResNet and DenseNet.

Experimental Results

We evaluated SIF and adaSIF against several baselines:

  • Gap Attack: A simple attack based on the difference between training and test loss.
  • Black-box Attack: Attacks using only output probabilities.
  • Boundary Distance: A white-box attack that measures the distance to the nearest decision boundary.

Testing was conducted on CIFAR-10, CIFAR-100, and Tiny ImageNet across various architectures (AlexNet, ResNet18, ResNet110, DenseNet).

Performance comparison (Balanced Accuracy) across CIFAR-10, CIFAR-100, and Tiny ImageNet. SIF consistently outperforms existing black-box and white-box baselines.

As shown in the results, SIF-based attacks consistently achieve the highest balanced accuracy. On CIFAR-10, SIF often achieves near 100% recall for members, meaning it can identify training samples with almost perfect certainty. Even when models are trained with heavy data augmentation, adaSIF maintains a significant lead over other methods, proving that augmentation is not a sufficient defense against sophisticated white-box adversaries.

Discussion and Conclusion

The success of SIF highlights a fundamental vulnerability in deep learning: the second-order geometry of the loss landscape contains a much cleaner membership signal than first-order gradients or output probabilities. Members are "quiet" in the internal representation of the model, a signature that is difficult to mask without significantly altering the training process.

While our attack requires white-box access, it demonstrates that the privacy risks associated with model sharing are greater than previously estimated. Future work should focus on developing defenses that specifically target the second-order influence of training points, perhaps through differential privacy or specialized regularization techniques that "noisy-up" the member distribution to match that of non-members.

Summary updated

BibTeX
@inproceedings{cohen2022membership,
  author = {Gilad Cohen and Raja Giryes},
  title = {{Membership Inference Attack Using Self Influence Functions}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=k98TRUd9HT},
}
Figure