Your data, your privacy
Models learn from examples, and sometimes they remember too much. Everything here is made up: invented kids, a pretend club and a fake secret code. Pick a lab, make a guess, then press Show me!
The Treehouse Club diary (all invented)
Ask the model to finish this sentence
What it thinks comes next (top 5 words)
The diary it trains on
Was this dot in the training set?
Dots and what the model learned (filled = in training, ring = brand new)
Your detective game
How sure was the model? Training dots vs new dots
Watch it learn
Challenges
Each challenge changes the lab while it trains, and the chart marks the moment with a flag.
Protect the secret
1. Clean the data
The safest secret is one the model never saw. Take it out, or at least stop it repeating.
(These change Lab 1's diary while it trains.)
2. Add noise (a toy privacy dial)
Each learning step is limited in size, then a bit of random fuzz is added, so no single example can stand out.
Honest note: this is a toy. Real private training is careful maths, not a slider.
3. Keep data on your device
Your phone learns from your diary at home and sends only a small lesson, never the diary. (Lessons can still leak a little, so real systems add noise too.)
What you can do
How it works
Learn from examples
A model changes itself to match its training examples.
Repeats get remembered
Things seen again and again, or seen rarely but studied for ages, stick hardest.
Clues leak
A model is more sure about what it studied. That is a clue a detective can use.
Blur the clue
Limit each step, add noise, and the model forgets who exactly was in the class.
Share less
Best of all, collect less, delete what you don't need, and keep data at home.
What just happened?
- A model trained on a diary with a secret in it could finish the secret when asked. Repeating the secret made it worse; removing it fixed it.
- A model that studied its examples too hard was more sure about dots it had seen. A detective could use that to guess who was in the training set, better than chance.
- Noise and limits made the leak and the clue smaller, but the model also got a bit less useful. Privacy has a price.
- Best protections: don't put secrets in, keep data at home, share less, and delete when you can.
For grown-ups: what's really going on
Everything is synthetic. Lab 1 is a word-level language model with a 3-word context: a softmax table over a 60-word vocabulary trained by full-batch gradient descent. Lab 2 is a 2-14-14-1 tanh network on 2D points with 20% label noise. Both are deliberately tiny, so the effects are visible and cheap to measure.
- Memorisation and training-data extraction: rare or repeated strings can be reproduced by prompting with their prefix. Here the prompt "…code of mia is" shares its context with six harmless sentences, so a once-seen secret gets about 14% and ten repeats about 65%. Duplicated data raises extraction risk in large models too.
- Membership inference: the detective thresholds the model's confidence in the dot's label. When the network overfits (about 98% train vs 71% test accuracy) the best threshold wins about 71% of balanced guesses; with weight decay or four times more data it falls to about 57%. 50% is chance.
- Differential privacy (epsilon, noise): DP-SGD clips each example's gradient so any one record has bounded influence, then adds Gaussian noise scaled to that bound. Smaller epsilon means more noise and a stronger guarantee. The dial is a toy: it does not compute or certify an epsilon, and the clipping here is per distinct sentence-piece, not true per-record accounting.
- Federated learning: devices train locally and send only model updates, which are averaged on a server. Updates can still leak, so it is usually combined with DP and secure aggregation.
- Data minimisation, deletion and unlearning: collect only what you need, de-duplicate, remove sensitive items before training. Deleting a record from a dataset does not remove it from an already-trained model; machine unlearning and retraining are active research areas.