Lion Cipher Lab

Flag out-of-distribution alerts with ensemble disagreement, and measure what softmax confidence misses

Why it matters

Security classifiers live in a world that keeps changing. A model trained on last quarter's traffic will meet a new tool, a new attacker technique, or a familiar app that changed its behaviour. When that happens, the model does not say 'I have never seen this'. It must pick one of the labels it knows, and it often reports a very high probability while doing it. Many teams use that probability as a safety net: if the model is less than 90% sure, send it to a human. This lab measures how well that net holds. You will train a small neural network to label network flows, then show it traffic it…

What you'll learn

Steps in this lab

  1. The words first: in-distribution, out-of-distribution, softmax confidence, and disagreement
  2. Open a terminal, make a folder, install numpy and scikit-learn
  3. Build the synthetic flows: four known classes and four kinds of never-seen traffic
  4. Write the evaluator: one MLP, a five-member ensemble, and five uncertainty scores
  5. Measure BEFORE: the single model's confidence on traffic it has never seen
  6. Measure AFTER: ensemble disagreement, where it helps and where it does not
  7. The fair rival: a plain distance on the inputs, and what it costs
  8. Honest negatives: near-OOD is hard for everyone, identical-looking C2 is invisible, and more members did not help
  9. Turn it into triage: accuracy versus coverage when the model abstains
  10. Do it better: how a pro would ship OOD flagging on a security classifier

Open the full interactive lab →