Lion Cipher Lab

Run private ML inference with homomorphic encryption

Why it matters

Real ML increasingly runs on data that legally or ethically must never leave the client in the clear — patient records, financial signals, a user's private messages. Homomorphic encryption lets an untrusted server compute a prediction on an ENCRYPTED input and hand back an ENCRYPTED answer it cannot read. Understanding exactly what that buys you — and the sharp limits: no integrity, plaintext weights, a finite multiply budget, a five-orders-of-magnitude slowdown — is the difference between deploying privacy-preserving ML where it genuinely pays and cargo-culting it where a trusted enclave or…

What you'll learn

Steps in this lab

  1. The problem: prediction without disclosure
  2. Install and train a small classifier (plaintext, offline)
  3. Set up a CKKS context — and meet the parameter budget
  4. Encrypt the input and evaluate the linear layer homomorphically
  5. Approximate the sigmoid — and hit the multiply-depth wall
  6. Measure the cost, and reason about the security model

Open the full interactive lab →