On The Vulnerability of Recurrent Neural Networks to Membership Inference Attacks

Yunhao Yang, Parham Gohari, Ufuk Topcu

Introduction

While much of the privacy community has focused on standard feed-forward models, recent research highlights that Recurrent Neural Networks (RNNs) are uniquely vulnerable to leaking their training data. This paper provides a sobering look at how network architecture dictates privacy profiles, demonstrating that RNNs are significantly more susceptible to Membership Inference Attacks (MIAs) than their feed-forward counterparts, even at equivalent performance levels.

Methodology

The study investigates whether the temporal, loopy nature of RNNs (commonly used for sequential data like text and speech) makes them inherently more "leaky" than Feed-Forward Neural Networks (FFNNs). To evaluate this, the authors employ a standard MIA framework based on shadow modeling.

The shadow modeling framework used to train the Membership Inference Attack (MIA) model.

In this framework, an attacker trains "shadow models" on data partitions (In vs. Out) to learn the output patterns associated with members of the training set. These patterns are then used to train an MIA classifier. The authors also utilize Prediction Entropy Analysis to measure model uncertainty and a novel Gaussian Privacy Module (GPM) to enforce Differential Privacy (DP) post-training.

Experimental Setup

The comparison between RNNs (specifically LSTMs and ReNet) and FFNNs (ResNet and Transformers) spanned three distinct tasks:

  1. Image Classification: Using the CIFAR-10 dataset.
  2. Machine Translation: Using Multi30K and WMT14 English-French datasets.
  3. Deep Reinforcement Learning: Using the MiniGrid-MultiRoom environment.

To ensure a fair comparison, factors such as parameter count and overall model accuracy were strictly controlled across architectures.

Key Insights

The Entropy Gap

Even with identical validation accuracy, RNNs typically exhibit much lower prediction entropy on training data than FFNNs. This "entropy gap" serves as a clear signal for attackers to distinguish training members from non-members.

Memorization without Overfitting

In Reinforcement Learning experiments, RNNs were found to "memorize" specific environment maps. For instance, agents reached goals in 20 steps on training maps compared to 35 steps on validation maps. This discrepancy occurred even when the reward system did not explicitly incentivize memorization, suggesting an architectural predisposition toward memorization.

Resistance to Forgetting

Unlike FFNNs, which often suffer from "catastrophic interference" (forgetting early training batches), RNNs maintain high MIA accuracy for data encountered at the very beginning of the training process. This persistence makes early training data just as vulnerable as recent data.

Results and the "Privacy Tax"

The empirical results consistently showed higher attack accuracy against RNNs across all tested tasks.

Attack accuracy over training epochs, demonstrating the increasing vulnerability of models to MIAs as training progresses.

Furthermore, the study identified a significant "privacy tax" for recurrent architectures. Standard defenses like L2 weight regularization provided only marginal benefits for RNNs compared to FFNNs. When implementing Differential Privacy (DP-SGD), RNNs suffered a much steeper loss in utility to achieve the same privacy epsilon (e.g., < 10). In image classification, RNNs traded off nearly double the utility for the same noise variance.

Conclusion

The research provides strong empirical evidence that recurrence leads to higher memorization and increased privacy risks. While the theoretical root cause remains an open question, these findings suggest that researchers must weigh the "privacy cost" when choosing between RNNs and alternative architectures like Transformers for sequential tasks. Future work will explore if newer models, such as State Space Models, inherit these recurrent privacy vulnerabilities.

Summary updated

BibTeX
@article{yang2021vulnerability,
  author = {Yunhao Yang and Parham Gohari and Ufuk Topcu},
  title = {{On The Vulnerability of Recurrent Neural Networks to Membership Inference Attacks}},
  journal = {Proc. Priv. Enhancing Technol.},
  year = {2021},
}
Figure