Lion Cipher Lab

Invert text embeddings to recover private input: prove your vector database is NOT anonymized (free, local, deterministic, no model download)

Why it matters

Teams reach for a vector database and quietly assume that once a sensitive note -- a diagnosis, a salary, a termination reason, a support ticket with a customer's data -- has been 'turned into an embedding,' it is now just an opaque list of numbers and therefore anonymized. That assumption is wrong, and this lab proves it three ways on your own machine. This is specifically TEXT-EMBEDDING inversion and linkage, a different threat from the two neighbouring labs: model inversion reconstructs an IMAGE from a trained classifier's outputs, and gradient leakage recovers inputs from GRADIENTS shared…

What you'll learn

Steps in this lab

  1. The myth: 'we embedded it, so it's anonymized'
  2. Sparse vs dense embeddings -- the two shapes you will attack
  3. Set up the environment (offline, no model download)
  4. Write the inversion script
  5. Part 2 -- exact inversion of a sparse embedding (100% recovery)
  6. Part 3 -- linkage: recover WHICH private sentence made a dense vector
  7. Part 4 -- greedy reconstruction, and the many-to-one collision
  8. Part 5 -- the noise defense, and its measured privacy/utility cost
  9. The judgment: treat every embedding as sensitive as its source
  10. Do it better -- where a production version goes

Open the full interactive lab →