Week 13: Privacy in ML Pipelines and Trade-Offs, plus Exam 3
Dates: Apr 5-9 · Reading: Handout 11: Privacy-Preserving ML and Trade-Offs · Exam 3 covers Weeks 10-13
Machine learning runs on data about people. This week we learn to learn from that data without exposing individuals - differential privacy, federated learning, and encrypted computation - and weigh the real trade-offs between privacy, accuracy, and security. Monday: privacy-preserving ML (with a real privacy-vs-accuracy experiment) and the security-vs-privacy tension. Wednesday: a guided Exam 3 review (Weeks 10-13), exam & quiz logistics, and a Week 14 preview. Lab 11 released; Exam 3 and Quiz 10 this week.
Learning Objectives
- Explain privacy-preserving ML: differential privacy, federated learning, encrypted computation
- Interpret the privacy vs. accuracy trade-off (the epsilon budget)
- Discuss the tension between security and privacy, with real examples
- Apply ethical reasoning to ML deployment decisions
Lecture Slides
⬇ Monday: Privacy-Preserving ML & Trade-Offs (PPTX) ⬇ Wednesday: Exam 3 Review & Week 14 Preview (PPTX)
Monday Session
Why privacy matters in ML and how models can leak data (recall Week 10). Differential privacy - add calibrated noise; the epsilon budget tunes privacy vs. accuracy (a real experiment: epsilon=1 reached ~0.93 vs a 0.96 baseline). Federated learning - data stays on-device, only updates are shared. Encrypted computation - compute on ciphertext. Then the security-vs-privacy tension with real SecOps dilemmas.
Wednesday Session
A guided Exam 3 review: an active, quick-check tour of Weeks 10-13 (attacks on ML, LLM security, ethics & fairness, privacy), how the exam and Quiz 10 work, and a preview of Week 14 (Trustworthy AI).
Exam 3 Prep
📄 Exam 3 Study Guide (PDF) 📝 Practice Exam (PDF) ✅ Practice Exam Answer Key (PDF)
Lab
Lab 11: Differential Privacy. In Colab, add Laplace noise to the training data at several privacy budgets (epsilon), then plot and interpret the privacy vs. accuracy trade-off - reproducing the Monday lecture curve. Synthetic data.
⬇ Lab 11 starter notebook (.ipynb)
Quiz / This Week
Quiz 10 (this week). Data privacy & PII; differential privacy and the epsilon budget; federated learning; encrypted computation; why anonymization is weak; security vs. privacy trade-offs. Exam 3 (Weeks 10-13) is also open this week.
In-Class Activity
Membership Inference Attack — CTFd capture-the-flag challenge (Colab + browser). Graded, 20 points.
⬇ Activity slides (PPTX) 📄 Student worksheet (PDF)
🚩 CTF challenge starter (.ipynb)