Skip to content

Empirical evaluation of membership inference attacks against NLP text classifiers: an SST-2 baseline studyEmpirical Evaluation of Membership Inference Attacks on NLP Text Classifiers: A Baseline Study on SST-2

arXiv: Adversarial Attacks, Backdoors & Poisoning· arXiv:2609.10935· William Novak, Muhammad AbusaqerDepartment of Math, Data & Technology, Minot State UniversityIndexed by this site · 2026-10-01· Originally publishedAttacks

Quick read

Evaluation and benchmarks

Based on the paper PDF (AI-generated); refer to the original

The authors compare membership inference leakage of TF-IDF+LR and DistilBERT on SST-2: both have Attack AUC above random (0.5615/0.5800), and training DistilBERT for 1 fewer epoch reduces leakage with almost no drop in accuracy.

Questions
The training data of NLP text classifiers may contain sensitive user text, and membership inference attacks (MIA) can determine whether a given record participated in training, but text classification research usually evaluates only utility and rarely evaluates privacy leakage.
Methods
A controlled benchmark is built on GLUE SST-2: using the same loss-threshold MIA (with per-sample negative log-likelihood as the attack signal) to compare TF-IDF+Logistic Regression and DistilBERT, and testing two simple mitigations—stronger regularization for LR (C=0.3) and training DistilBERT for 1 fewer epoch.
Experiments and results
DistilBERT has higher utility (dev accuracy 0.9466 vs 0.8756), but both models leak membership signals (Attack AUC 0.5800 vs 0.5615). Stronger regularization for LR reduces leakage but lowers dev accuracy by 0.0187; after changing DistilBERT to 2 epochs, AUC drops to 0.5654 with almost unchanged accuracy.
Limitations and future work
The authors note that the study uses only a single dataset, a single attack family, and a small number of mitigation settings, and the results should be regarded as a baseline rather than a universal conclusion; future directions include more datasets, stronger attacks such as shadow-model, and more formal defenses such as differential privacy. The paper does not report the sample size of the attack set or the number of repetitions.
Experimental setupTF-IDF + Logistic Regression、DistilBERT (distilbert-base-uncased) · GLUE SST-2 · Attack AUC、Attack Advantage et al.
Threat model
The attacker attempts to determine whether a given record was used to train the target model (membership inference). The attack is loss-threshold MIA: it uses per-sample negative log-likelihood as the signal, assuming training members have lower loss; the paper does not explicitly state how the attacker accesses model outputs (black-box, etc.). The victim systems are SST-2 sentiment classifiers (TF-IDF+LR and DistilBERT).
Evaluated models
TF-IDF + Logistic RegressionDistilBERT (distilbert-base-uncased)
Benchmarks
GLUE SST-2
Metrics
Attack AUCAttack AdvantageAttack Accuracydevelopment accuracymacro F1
AI summaryA controlled benchmark on the GLUE SST-2 sentiment dataset compares privacy leakage under loss-threshold membership inference attacks (MIA) between TF-IDF + Logistic Regression and fine-tuned DistilBERT. DistilBERT achieves development set accuracy 0.9466 and macro F1 0.9460, while Logistic Regression achieves 0.8756 and 0.8727, but both leak membership signals, with attack AUCs of 0.5615 and 0.5800 respectively.

A controlled benchmark on the GLUE SST-2 sentiment dataset compares privacy leakage under loss-threshold membership inference attacks (MIA) between TF-IDF + Logistic Regression and fine-tuned DistilBERT. DistilBERT achieves development set accuracy 0.9466 and macro F1 0.9460, while Logistic Regression achieves 0.8756 and 0.8727, but both leak membership signals, with attack AUCs of 0.5615 and 0.5800 respectively.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors propose a controlled benchmark on SST-2 that quantifies membership inference leakage and the privacy-utility trade-off of traditional and transformer text classifiers.

    Core question: how much training membership information NLP text classifiers leak when only prediction outputs are exposed, and whether simple training adjustments can reduce leakage while preserving utility.

    • Setting and importance: the authors note that text datasets often contain sensitive user-generated content, and NLP systems are increasingly deployed through prediction APIs and cloud services, so membership inference can reveal whether personal data entered a sensitive dataset.
    • Existing shortcomings: the authors point out that the text classification literature mostly emphasizes predictive performance, and privacy evaluation is rarely treated as a first-class criterion; models may have strong utility yet still retain measurable membership signals, and the link between overfitting and privacy leakage is documented in the literature.
    • Core observation: the authors hypothesize that member samples generally have lower loss than non-members, so a loss-threshold attack can separate the two; stronger task performance itself should not be taken as evidence of privacy safety.
    • What the paper proposes: a controlled benchmark on GLUE SST-2 comparing TF-IDF+Logistic Regression and DistilBERT under the same loss-threshold MIA and the same utility/privacy evaluation framework, and testing two simple mitigations (stronger regularization, fewer fine-tuning epochs).
    • Threat model:
      • Attacker goal: determine whether a specific record was used to train the target model (membership inference).
      • Attacker knowledge and capability: uses loss-threshold MIA with per-sample negative log-likelihood as the attack signal; the paper does not explicitly state the access mode (terms such as black-box are not used to describe this experiment).
      • Victim system: SST-2 sentiment classifiers, with the two target models being TF-IDF+LR and DistilBERT.
      • Success criterion: Attack AUC, Attack Advantage, and Attack Accuracy at the optimal threshold above random level.
  2. What related research exists?

    Related work covers foundational MIA attacks, the overfitting connection, surveys of attacks and defenses, and fairness and NLP setting studies; this paper's positioning is to fill the gap in same-condition privacy comparison between traditional and transformer models.

    Foundational MIA work

    • Shokri et al. (2017) — formalized membership inference attacks, proposed the shadow-model attack, and argued that black-box access to prediction outputs suffices to extract membership signals.
    • Yeom et al. (2018) — clarified the connection between membership inference and overfitting: models with poor generalization and lower loss on training points leak more, which is the basis for loss-based MIA.

    Survey work

    • Niu et al. (2024) — surveyed MIA attacks and defenses in supervised, generative, and deep learning settings, and discussed defenses such as regularization, distillation, and differential privacy and their performance costs.
    • Wu and Cao (2025) — a survey of MIA for large-scale models, organized by access settings such as black-box and white-box, arguing that the threat persists as model scale increases.

    Fairness and NLP settings

    • Zhong et al. (2022) — studied the differential impact of MIA on different subgroups, arguing that privacy evaluation should consider a fairness dimension rather than only overall attack success rate.
    • Shejwalkar et al. (2021) — studied user-level MIA on NLP classification models (Reddit and Amazon settings) and found that leakage is related to per-user data volume and data scale.

    Comparative baselines and this paper's positioning

    • Abusaqer and Saquer (2025) — compared transformer and traditional ML models on Twitter cyberbullying detection, but compared only utility; the authors of this paper state that their benchmark follows this side-by-side comparison approach but extends it to the privacy leakage dimension.
    • Authors' positioning: prior work is either survey, foundational attack, or focused on fairness and NLP-specific settings, and lacks a unified comparison of traditional sparse-feature classifiers and compact transformers under the same loss-threshold attack and the same evaluation framework; this paper fills that gap.
  3. How does the paper address this problem?

    Under the same SST-2 split and the same loss-threshold MIA, compare the two target models, measuring privacy with Attack AUC/Advantage and utility with dev accuracy/macro F1, then test one mitigation for each.

    Overall approach: under a fixed dataset and fixed attack, conduct a controlled comparison of the two target models TF-IDF+LR and DistilBERT, first measuring the utility and leakage of the baselines, then applying one lightweight training adjustment to each to observe the privacy-utility change.

    Data and splits

    • Use the GLUE SST-2 binary sentiment dataset; the official training set is split by stratified sampling with a fixed random seed of 42 into target-train (80%) and target-dev (20%).
    • The official validation set is kept as a clean non-member pool for privacy evaluation.

    Target models and training configurations

    • TF-IDF+LR: lowercasing, English stop-word removal, unigram+bigram, min_df=2, max_features=20,000; liblinear solver, max_iter=1000; baseline C=1.0, mitigation setting C=0.3.
    • DistilBERT (distilbert-base-uncased): truncation/padding to 128 tokens; batch size 16, learning rate 2×10⁻⁵, weight_decay=0.01; baseline 3 epochs, mitigation setting 2 epochs.

    Attack design

    • Use loss-threshold MIA: for each sample compute −log pθ(y ∣ x), i.e., the negative log-likelihood of the true class; the attack score is the negative of the loss, and a higher score means a higher likelihood of being a member.
    • The rationale is that overfitted models give lower loss to training members; the attack set is a balanced set, sampling an equal number of members from target-train and an equal number of non-members from the official validation set (the paper does not state the specific number of records).

    Evaluation metrics

    • Utility: development accuracy and macro F1; additionally record the average loss on the three splits target-train, target-dev, and validation to characterize fitting and generalization.
    • Privacy: Attack AUC (the ability to separate members/non-members across thresholds) and Attack Advantage, defined as maxτ (TPR(τ) − FPR(τ)), i.e., the difference between TPR and FPR at the optimal threshold; additionally report Attack accuracy at the optimal threshold as a supplement.

    Implementation

    • Python + Jupyter Notebook; the traditional pipeline uses scikit-learn, and the transformer pipeline uses Hugging Face Transformers and PyTorch; intermediate results (prediction probabilities, per-sample loss, attack summaries) are all saved to support reproducibility.
  4. What experiments did the paper conduct?

    Baseline comparison plus two groups of mitigation experiments: DistilBERT has higher utility but also higher AUC; 2-epoch mitigation reduces leakage with almost unchanged accuracy, and LR with stronger regularization reduces leakage but drops accuracy.

    Experimental setup

    • Models tested: TF-IDF + Logistic Regression and DistilBERT (distilbert-base-uncased), both as target models.
    • Dataset: GLUE SST-2; the official training set is split 80/20 stratified (seed 42) into target-train/target-dev, and the official validation set serves as the non-member pool; the paper does not report the attack set sample size.
    • Attack: loss-threshold MIA, with the attack score being the negative loss per sample, and equal numbers of members/non-members in the attack set.
    • Metrics: utility is dev accuracy and macro F1; privacy is Attack AUC, Attack Advantage, and Attack accuracy at the optimal threshold; the average loss of the three splits is also recorded.
    • Mitigation settings: LR reduces C from 1.0 to 0.3; DistilBERT reduces fine-tuning from 3 epochs to 2 epochs.
    • Number of repetitions: not reported in the paper.

    Main results

    According to Table 1 (baseline) and Table 2 (change of mitigation relative to baseline):

    Swipe horizontally to read the table

    ModelDev Acc.Macro F1Train LossDev LossVal. LossAttack AUCAttack Adv.Attack Acc.
    TF-IDF+LR (C=1.0)0.87560.87270.31050.35010.45530.56150.16970.5849
    DistilBERT (3 epochs)0.94660.94600.05100.23410.44710.58000.13650.5682
    LR mitigation Δ (C=0.3)-0.0187-0.0202———-0.0230-0.0367—
    DistilBERT mitigation Δ (2 epochs)-0.0001-0.0002———-0.0145-0.0195—
    • The authors state that DistilBERT has higher utility and a higher Attack AUC (stronger average ranking separability), but LR has a higher Attack Advantage (larger local separation at the optimal threshold), so the authors argue that privacy risk cannot be judged by a single metric alone.
    • The authors note that the average loss of members is lower than that of non-members for both models, which is exactly the signal exploited by the loss-threshold attack, consistent with existing conclusions linking overfitting and leakage.
    • The authors consider the leakage to be moderate: all Attack AUCs are in the 0.54–0.58 range, stronger than random but far from reliable extraction.

    Mitigation experiments

    • Stronger regularization for LR (C=0.3): Attack AUC drops from 0.5615 to 0.5385, Attack Advantage drops from 0.1697 to 0.1330; dev accuracy drops by 0.0187 and macro F1 by 0.0202; the average loss of all three splits rises (0.3105→0.4151, 0.3501→0.4358, 0.4553→0.4894). The authors interpret this as privacy gains obtained at the cost of visible utility loss.
    • DistilBERT reduced to 2 epochs: Attack AUC drops from 0.5800 to 0.5654, Attack Advantage drops from 0.1365 to 0.1170; dev accuracy 0.9466→0.9465, macro F1 0.9460→0.9458; train loss rises to 0.0771, dev and val loss drop to 0.2005 and 0.3777. The authors consider this consistent with reduced overfitting, and the most favorable privacy-utility trade-off among the tested settings.

    Other ablations and analyses

    • The paper has no other ablations; Figures 1–4 show bar charts of dev accuracy and Attack AUC for the baseline and mitigation runs respectively (the converted text has no specific bar values; refer to Table 1 and 2 for the numbers).
  5. What are some points that can be further explored?

    The authors acknowledge a single dataset, a single attack family, and few mitigation settings, and that the results are only a baseline; future work can expand the data, attack, and defense space.

    Limitations and future directions noted by the authors

    • Scope limitations (Section 5.4): The study uses only a single dataset, a single attack family, and a small number of mitigation settings, and the results should be understood as a compact empirical baseline rather than a universal conclusion about privacy leakage in all NLP systems.
    • Extend datasets (Section 6): Future work could evaluate more datasets beyond SST-2 to test whether the trends are stable across different text domains, class distributions, and task difficulties.
    • Extend the attack space (Section 6): Stronger shadow-model or confidence-based attacks could be included to give a more comprehensive view of privacy risk under alternative adversarial assumptions.
    • Extend the mitigation space (Section 6): Stronger weight decay, calibration-based methods, or differential privacy training could be added to compare heuristic mitigations with more formal defenses.
    • Expand the experimental matrix (Section 6): Future work could compare more transformer settings, more regularization choices, and multiple privacy metrics to test whether the favorable performance of the 2-epoch DistilBERT mitigation generalizes; it could also examine whether similar privacy-utility trade-offs appear in cybersecurity-oriented NLP tasks.

    Experimental coverage

    • There are 2 models tested: TF-IDF+LR and DistilBERT (distilbert-base-uncased) (Section 3).
    • The dataset is only GLUE SST-2; the attack is only the loss-threshold MIA family; the mitigations are only two settings, C=0.3 and 2 epochs (Sections 3 and 4).
    • The paper does not report the specific sample size of the attack set, only stating that members and non-members are equal in number (Section 3).
    • The paper does not report the number of repeated runs or the variance or statistical tests of the results (Sections 3 and 4).
  6. Summarize the main content of the paper

    MIA baseline study on SST-2: both models have moderate leakage, and training DistilBERT for 1 fewer epoch is the mitigation with the best trade-off among the tested settings.

    A benchmark study of membership inference privacy: the authors build a controlled comparison on GLUE SST-2 to answer how much membership information traditional text classifiers and compact transformers each leak, the relationship between leakage and overfitting, and whether simple mitigations can preserve utility.

    • Problem: Text training data may contain sensitive user content, and MIA can determine whether a record participated in training, but text classification research usually evaluates only utility.
    • Method: Under the same loss-threshold MIA (using per-sample negative log-likelihood as the attack signal), compare TF-IDF+LR and DistilBERT, measuring utility with dev accuracy/macro F1 and privacy with Attack AUC/Advantage; the mitigations are stronger regularization for LR (C=0.3) and reducing DistilBERT to 2 epochs.
    • Baseline results: DistilBERT has higher utility (dev accuracy 0.9466, macro F1 0.9460, versus 0.8756/0.8727 for LR), but both leak membership signals, with Attack AUC of 0.5800 and 0.5615 respectively, and LR has a higher Attack Advantage (0.1697 vs 0.1365) (Table 1).
    • Mitigation results: After stronger regularization for LR, AUC drops to 0.5385, but dev accuracy drops by 0.0187; after DistilBERT 2 epochs, AUC drops to 0.5654, and dev accuracy goes only from 0.9466 to 0.9465 (Table 2).
    • Authors' conclusion: Stronger utility does not eliminate privacy risk; in this benchmark leakage is measurable but moderate (AUC 0.54–0.58); lightweight training adjustments can reduce leakage with almost no loss in accuracy, and among them the privacy-utility trade-off of 2-epoch DistilBERT is the most favorable in the tested settings; the authors emphasize that the conclusions are limited to the baseline scope of a single dataset and a single attack family.
Read originalarxiv.org