Artificial Intelligence · Privacy

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)

If the model reads the diary 8 times with the code in it, will it finish the sentence with the secret code?
Make a guess, then press Show me.

Ask the model to finish this sentence

the secret club code of mia is ?

What it thinks comes next (top 5 words)

The diary it trains on

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.

0 = off · more noise = more private, less accurate
Secret leaks / detective winsStill useful

Honest note: this is a toy. Real private training is careful maths, not a slider.

3. Keep data on your device

mydiarymydiarymydiary Shared modelaverages lessons lessonlessonlesson

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

Don't paste secrets (passwords, codes, private stuff) into chatbots. Things you type may be kept or used to train.
Check what an app collects before saying yes. Ask: does it really need my photos, location or contacts?
You can ask to see or delete your data. Grown-ups can do it in settings or by asking the company.

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?

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.