AITeky Learn

AiTeky Original Interactive Learning & Practice Advanced

Privacy-preserving machine learning: attacks, differential privacy and federated learning

Attack your own models to see what they leak (who was in the training data, a hidden input, a stolen copy), add calibrated noise with differential privacy by hand and in training, train across sites with federated learning, and review a model for privacy before release.

A trained model is a compressed copy of the data it learned from, and it keeps more than most teams expect. Given only the ability to ask it questions, an attacker can sometimes tell whether a particular person was in the training data, recover a sensitive detail about someone, or copy the model itself. Removing names from a file does not stop any of this.

This course teaches privacy for models by attacking first. You build a membership inference attack and measure how much three models leak; you recover a hidden input from a model's answers and copy a model with 2,000 questions; you add differential privacy by hand to counts and averages, and learn why repeated questions spend a budget; you write private training (clipped gradients and noise) with a privacy accountant and see what it costs; you train across five clinics with federated learning and find out what an update still reveals; and you finish with the privacy review a risk committee expects before a model leaves the building.

All the data are simulated with a fixed random seed, so the attacks can be checked against the truth. Real data are messier, and a real review must test the real model. Every lesson reports the result it got, including where the privacy tool cost accuracy or gave little. The threat model (a strong attacker who sees the model's probabilities) is stated in the lessons.

You need the machine learning course and the Responsible AI course (its lesson on protecting people in the data is the starting point); the statistics course helps.

  • Learn lessons explain one idea at a time and let you compute it.
  • Industry ready lessons decide and plan. Each ends with the interview questions that go with it.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 45 min Free sample πŸ”’ AiTeky Pass What a trained model remembers: guessing who was in the training data Train three models on 300 simulated patients, build the simplest membership inference attack (people the model has seen get a smaller loss), measure how well it tells members from outsiders, and see that the same attack barely works on a simpler model, so overfitting is the leak.
  2. 02 45 min πŸ”’ AiTeky Pass Guessing a secret attribute and copying a model through its answers Show two more leaks of a model that only answers questions: an attacker who knows most of a person's details recovers a sensitive one by trying each value and keeping the one that fits the model's answer, and anyone with 2,000 free queries trains a copy that agrees with the model on 9 inputs in 10.
  3. 03 50 min πŸ”’ AiTeky Pass Differential privacy by hand: noise, sensitivity and a privacy budget Release a count and an average of 5,000 simulated salaries with Laplace noise, see how the noise scale follows the sensitivity of the question and the privacy parameter epsilon, test a differencing attack on exact and noisy answers, and learn why asking the same question many times spends the budget.
  4. 04 55 min πŸ”’ AiTeky Pass Training a model with differential privacy: clip, add noise, count the budget Write differentially private gradient descent for a logistic regression in numpy (clip each person's gradient, add Gaussian noise), compute the privacy budget with a Renyi accountant, and measure the cost: with 300 training people a useful epsilon wrecks the model, with 3,000 the same epsilon costs under one point.
  5. 05 50 min πŸ”’ AiTeky Pass Federated learning: training across five clinics without pooling the records Train a logistic regression across five simulated clinics with different patient mixes by averaging their updates (federated averaging), compare it with training alone and with pooling everything, and show that an update can still reveal a record, so the update needs protection too.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 06 55 min πŸ”’ AiTeky Pass On the job: the privacy review before a model is released Run a privacy review on four candidate loan models trained on 1,500 customers: attack each with membership inference (AUC with a range, and the catch rate at a 1% false alarm), weigh it against accuracy, add a differentially private model, and write the release recommendation with its assumptions.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in