Lion Cipher Lab

Reconstruct training data with a model inversion attack (AI privacy)

Why it matters

A trained model is a lossy compression of its training data: to score inputs well it has to memorize structure about what it saw, and that memory leaks through the numbers it hands back. Membership inference asks a yes/no question — 'was THIS record in the training set?'. Model inversion is scarier: it hands you a representative input for a class you never had. Fredrikson et al. (CCS 2015) showed that for a face-recognition model you can start from a blank image and, using nothing but the model's confidence outputs, hill-climb the pixels until a recognizable face of a real person in the…

What you'll learn

Steps in this lab

  1. The threat: a model is a leaky compression of its data
  2. Train the target model (digits, exposes confidences)
  3. The attack: gradient ascent on the input
  4. Measure it: cosine similarity, and separability
  5. The realistic threat surface: a black-box confidence API
  6. The countermeasure: coarsen the output, watch it collapse
  7. Defenses in practice (beyond coarsening)
  8. The judgment: when it's a real risk, and the honest limits

Open the full interactive lab →