by Samy (Kondasamy Jayaraman)

Module 45 · What a model remembers

Intermediate

A model can recite what it saw often

Larkspur wants to train on tickets that hold card numbers. Here you plant fake PINs, pull them back out, and find the fix that works best.

Read as
!!

The whole idea in one example

Two fake PINs, one prompt each

Seen 64 times

recited

“4719.”

“Mira Okafor's account PIN is …” comes back with Mira’s own PIN.

Seen once

rank 81

“4719.”

Mira’s PIN, not Owen’s, yet Owen’s still ranks 81 of 10,000, where a random PIN would sit near 5,000.

Larkspur’s toy: a tiny model trained ahead of time with 4 fake PINs planted in its text; the replies here are its own. After an output filter the first reply reads “[redacted].”, yet asked one digit at a time it still leaks.

How it works

Four ideas carry the module

  1. !!

    1 Copies get recited

    A line seen often comes back word for word

    A large-model finding: Carlini and colleagues (2021) pulled hundreds of training sequences, word for word, out of GPT-2 by prompting it, names, phone numbers and email addresses among them, each in just one document of its training text. Larger models were more vulnerable.

    Source, checked 30 October 2026

  2. ...

    2 Rank every guess

    Exposure: how far above chance the secret ranks

    A real-model finding: Carlini and colleagues (The Secret Sharer, 2019) planted made-up secrets, canaries, in training text to measure how easily they could be guessed back. From models trained without care for memorisation, they pulled out unique secrets such as credit card numbers.

    Source, checked 30 October 2026

  3. ...

    3 Remove duplicates

    Fewer copies, less reciting

    A large-model finding: Kandpal, Wallace and Raffel (2022) found a sequence present 10 times in training is generated about 1,000 times more often than one present once, and that removing duplicates makes models far harder to pull training text from.

    Source, checked 30 October 2026

  4. ...

    4 Scrub before training

    Keep secrets out: scrub, or train with privacy built in

    Abadi and colleagues (2016) showed deep networks can be trained with differential privacy, a method that caps how much any one training example can change the model, at a manageable cost in quality.

    Source, checked 30 October 2026

The story

Larkspur’s old tickets

Larkspur Supply Co. wants to train its support model on old tickets that hold card numbers, so the team plants fake PINs and watches what leaks. You’re on the team that decides what goes into training.

Played Pre-training? It teaches what a data mix does; here, what leaks back out of one.

4
fake PINs planted in training, labelled fake
2
recited word for word when asked
81
the once-seen PIN’s rank of 10,000 (chance: about 5,000)
43.2%
of guesses on unseen text with the right next piece in its top 5, PINs scrubbed out

Your path

The chapters

  1. Chapter 1

    Seen once, seen often

    Does a model keep the exact words of a line it saw many times?

  2. Chapter 2

    A planted secret

    How do you test whether a model leaks a secret, without a real secret?

  3. Chapter 3

    Ask it to finish

    Which planted PINs does the model give back when asked?

  4. Chapter 4

    How sure is it?

    How do you measure a secret the model doesn’t say outright?

  5. Chapter 5

    Copies make it worse

    Does removing duplicates stop the model reciting the PINs?

  6. Chapter 6

    Keep it out

    Which fix keeps a secret safe: a filter on replies, or scrubbing the text?

  7. Chapter 7

    Workbench: a data policy

    Which policy leaks no PIN and keeps the model useful?

Who it’s for

  • Engineers
  • Product managers
  • Analysts
  • No code needed

Anyone deciding whether customer data can go into a model’s training text, and what to do to it first. Knowing that a model is trained on text is enough.