Notes

Model Inversion

Training leaves traces. A model fitted to data carries information about that data in its weights, and someone who can query the model may be able to read part of it back out. Model inversion is that attack: using access to a model to reconstruct the inputs it learned from.

What it looks like against a language model

The classic demonstration, on an image classifier, recovered a recognisable face from a name and a confidence score. With text models the targets differ:

  • Memorised training passages — private correspondence, API keys, clinical notes — coaxed out by a prefix that happens to sit next to them.
  • Private attributes of a person the model was fine-tuned on, inferred from how confidently it completes statements about them.
  • Original text reconstructed from an embedding vector, which matters because vector stores are often treated as if they were anonymised.
Neighbouring attacks

Three ideas get conflated. Membership inference asks only whether a given record was in the training set. Data extraction elicits verbatim memorised strings without targeting anyone in particular. Model inversion aims at reconstructing content or attributes. They share one cause — memorisation of rare examples — and the same defences blunt all three.

What reduces the risk

Deduplicating the training corpus removes most of the memorisation that makes extraction easy, because repeated strings are the ones a model learns verbatim. Beyond that: train with differential privacy when the data is genuinely sensitive, keep secrets out of fine-tuning sets rather than hoping the model forgets them, filter outputs, and withhold the token-probability access these attacks lean on.

Model inversion is an attack that reconstructs information about a model's training data from access to the model itself — memorised passages, private attributes of people it was fine-tuned on, or the original text behind an embedding vector. It matters because weights and embeddings are routinely shared as though they were anonymous. Training-data deduplication, differential privacy, output filtering and withholding token probabilities all reduce the exposure.

A model learns from examples, and some of what it learned sticks a little too firmly. Model inversion is the trick of questioning an AI system cleverly enough that it hands back pieces of the material it was trained on — somebody's address, a password that was sitting in a document, details of a patient. Nobody broke into a database; the information came out of the model itself. It is the main reason to think twice before training a system on sensitive records, and why handing someone a trained model is not as private as it sounds.