Lion Cipher Lab

Give an alert classifier a coverage guarantee with conformal prediction, then break it with drift

Why it matters

An alert-triage classifier that says 'benign, 0.91' gives you one guess and a number you have to trust. Conformal prediction gives you something you can sign: a SET of labels per alert, built so that the true label is inside it at least 90% of the time (or 95%, or 98% - you choose), with no assumption about what the data looks like beyond one: tomorrow's alerts are drawn the same way as the ones you calibrated on. That makes the output operational. A set with one label can be automated; a set with two or three is the model saying 'I cannot tell these apart' and goes to an analyst, so the…

What you'll learn

Steps in this lab

  1. The words first: conformal prediction, prediction sets, coverage, alpha, and the one assumption
  2. Recap of the abstention gate, and why a set is a different tool
  3. Open a terminal, make a scratch folder, install two packages
  4. Build a synthetic triage queue and a classifier to put sets on
  5. Split conformal by hand: the score, the finite-sample quantile, the sets
  6. Is the 0.9098 luck? Re-split 500 times and read what the guarantee actually says
  7. Set size is analyst workload: route every alert from its set
  8. Marginal coverage hides the malicious class: class-conditional (Mondrian) conformal
  9. Break it: a campaign week and a new attack variant (the honest negative)
  10. Contain it: a coverage monitor, then recalibrate on recent labelled alerts
  11. The judgment: when a coverage guarantee is worth it, when it is not, and how a pro does it

Open the full interactive lab →