Waypoint 03 · Privacy research
Membership Inference Attack Study
A classical machine-learning privacy study asking whether model behavior can reveal which text samples appeared in training.
I led the testing and evaluation work across the target classifier and learned membership attack.
As team lead, I coordinated the project and led the design and execution of testing procedures alongside Christian Cevallos, Lucas Ramos, and Justin Cardenas.
01 · Context
The problem
A classifier can keep its training reviews hidden and still reveal clues about which reviews it has seen.
Membership inference predicts whether a particular sample was used to train a model. It does not need to recover the original text: knowing that a record was included can itself reveal sensitive information. Our question was whether the behavior of a sentiment classifier exposed enough signal to distinguish training reviews from unseen reviews.
This was a classical machine-learning experiment: TF-IDF represented the text, and logistic regression classified sentiment. A second logistic-regression model learned to predict membership from the target classifier’s outputs.
02 · Frame
Experiment design
Two distinct IMDB subsets
We sampled 500 members from IMDB’s official training split and 500 non-members from its official test split. Sampling was stratified by sentiment with random seed 42; the target trained only on members.
Words to sentiment
TF-IDF used up to 5,000 terms and removed English stopwords. Its vocabulary was fitted only on member reviews, then applied to unseen reviews. Logistic regression predicted positive or negative sentiment.
A single confidence threshold
The midpoint of member and non-member mean maximum confidence defined the threshold. Reviews at or above it were predicted to be members. The baseline was evaluated on all 1,000 reviews used to derive that threshold.
A separate membership classifier
The 1,000 attack-feature rows were split 70/30, stratified by membership with seed 42: 700 for attack training and 300 for evaluation. The held-out set contained 150 members and 150 non-members of the target model.
03 · Public evidence
Inspect the experiment.
The report records the experiment’s measurements and team contributions. The code exposes how the data, target model, and attacks were constructed; the recorded demo provides a walkthrough.

Follow the public materials
Dataset preparation establishes which reviews the target sees. Target training fits the text representation and sentiment classifier. Attack implementation defines the signals, threshold, learned model, and evaluation split.
Watch the recorded public demo linked on the report’s cover, or follow the repository’s run instructions to inspect the pipeline.
The measurements below reproduce the report’s recorded run. They are not a new experiment or a claim about every text classifier.
04 · Engineering
Key decisions
- 01
Keep membership grounded in the training boundary.
Only the member subset trained the target classifier and TF-IDF vocabulary. Non-member reviews remained unseen by that training process, preserving the meaning of the membership labels.
- 02
Start with an inspectable baseline.
A confidence threshold made the initial question easy to test. The learned attack then combined five behavior signals rather than relying on a single score.
- 03
Separate sentiment performance from attack performance.
The target predicts sentiment; the attacker predicts membership. I led testing and evaluation across both stages, keeping the evaluation task and sample group explicit when interpreting the results.
- 04
Hold out rows for the learned attack.
The attack model’s evaluation rows were excluded from its own training. A held-out attack row can still be a member of the target’s training set: these are two different training boundaries.
05 · Signals
Attack features
- Python
- scikit-learn
- TF-IDF
- Logistic regression
- Maximum confidence
- The largest predicted sentiment probability.
- True-class confidence
- The probability assigned to the review’s known sentiment label.
- Loss
- The negative log of true-class confidence; lower loss indicates a better fit to that review.
- Entropy
- The uncertainty across the predicted sentiment probabilities.
- Correctness
- Whether the predicted sentiment matches the known label.
The learned attack needs probability outputs and the review’s true sentiment label to construct these features. It also trains on labeled membership examples from the controlled experiment. This access is an assumption of the study.
06 · Collaboration
Team and contribution
I led the project direction, coordinated development, and designed and executed the testing procedures. Development and analysis were a shared effort.
- Diego Martinez
- Team lead; project direction, development coordination, and testing design and execution
- Christian Cevallos
- Documentation, implementation support, and refinement of the final report
- Justin Cardenas
- Research, theoretical foundation, and development of key components
- Lucas Ramos
- Presentation organization and slide design, alongside development contributions
07 · Results
Results
The recorded run exposed a measurable membership signal in this classifier’s behavior.
| Sample group | Accuracy | Evaluation context |
|---|---|---|
| Members | 98.2% | 500 reviews used to train the target |
| Non-members | 76.6% | 500 reviews unseen during target training |
These are sentiment accuracy measurements, not membership-attack success rates. The training-to-unseen gap is consistent with overfitting and motivates testing for privacy leakage; the gap alone is not proof of membership for an individual review.
| Metric | Baseline threshold attack | Learned attack |
|---|---|---|
| Accuracy | 69.2% | 70.7% |
| F1 | 69.0% | 72.3% |
| ROC-AUC | Not reported | 0.765 |
The baseline threshold was derived from and evaluated on all 1,000 reviews. The learned attack trained on 700 rows and was evaluated on the remaining 300. Because the evaluation sets and fitting procedures differ, 69.2% and 70.7% are not a like-for-like estimate of improvement.
The groups are balanced, so random membership guessing has an expected accuracy of 50%. F1 balances precision and recall with member as the positive class. ROC-AUC measures ranking across thresholds; 0.765 is not 76.5% accuracy. The report provides one recorded run without confidence intervals or repeated-seed analysis.
Source: section 9, “Results and Evaluation,” on page 5 of the report, with evaluation procedures in the attack code.
08 · Boundary
Limitations
A controlled sample. The results cover 500 member and 500 non-member IMDB reviews, one target classifier, and one recorded run. They do not establish a general privacy guarantee or population-wide attack rate.
Attacker access matters. The learned attack assumes probability outputs, known sentiment labels, and labeled membership training examples. A system that exposes less information presents a different attack setting.
Different evaluation procedures. The baseline uses the same rows to derive and evaluate its threshold; the learned attack holds out 30%. A shared untouched evaluation set would support a stronger comparison.
No uncertainty estimate. The report does not provide repeated runs, confidence intervals, or statistical significance tests. Small differences between methods should be interpreted cautiously.
No mitigation evaluation. Differential privacy is discussed as related work but was not implemented or tested. This experiment measures leakage rather than establishing a defense.
Scope of the evidence. The study uses classical text classification and public movie reviews. It neither extracts private text nor establishes how these findings transfer to other datasets or model families.