Lion Cipher Lab

Distil an expensive model's phishing verdicts into a tiny local classifier, and measure what the student inherits

Why it matters

Every security team that has tried a frontier model on phishing triage hits the same wall: it labels emails well, but it is too slow and too expensive to run on every message. The standard move is DISTILLATION - let the big model label a few thousand emails once, train a tiny model on those labels, and run the tiny one on everything. It works: here a student that costs nothing to run, answers in microseconds instead of 1.2 seconds, and handles 92% of email on its own inside a cascade matched the expensive model's accuracy for $4.65 per 10,000 emails instead of $60. But a student learns its…

What you'll learn

Steps in this lab

  1. The words first: teacher, student, distillation, hard and soft labels, calibration, cascade, drift - and the fact that the teacher here is a stub
  2. Open a terminal and make a scratch folder (Windows, macOS, Linux)
  3. Where this sits: you are building the cheap model, not choosing one
  4. Build 12,300 answer-keyed emails: nine lure and legitimate families, a hidden-image lure, and a week-2 campaign
  5. Write the STUB teacher: its whole error model, including the blind spot, written down
  6. Write the student: hashed words, logistic regression, and SGD by hand
  7. Distil four ways and draw the label-count curve
  8. Soft labels helped less than hoped - and the spoken confidence helped not at all
  9. Build the cascade: the student answers what it is sure about, the teacher gets the rest
  10. The honest negative: the student inherits the blind spot, more confidently, and agreement hides it
  11. Repair it with a small, targeted human budget - and see why adding labels alone was not enough
  12. Prove where the failure came from: give the teacher eyes and re-run
  13. Week 2: a new campaign - the teacher bends, the student breaks, and a $0.60 monitor notices
  14. Read the terms before you distil: some providers forbid training on their outputs
  15. Why this, not that: distil versus keep calling, a bigger student, or human labels only
  16. When NOT to distil
  17. The way a pro does it differently, and what to ship

Open the full interactive lab →