Lion Cipher Lab

Label alerts on a budget with active learning, and measure it against random sampling

Why it matters

Every security team that wants a machine-learning detector hits the same wall: the alerts are free, the labels are not. A label here means an analyst looked at the alert and decided malicious or benign, and that costs real minutes of a scarce person. If only 3% of alerts are malicious, labeling at random spends 97% of the budget confirming boring things, and 300 random labels buy about nine attacks to learn from. ACTIVE LEARNING is the idea that the model should choose which alerts the analyst labels next, usually the ones it is least sure about. The research literature reports large label…

What you'll learn

Steps in this lab

  1. The words first: label, oracle, pool, budget, active learning - and the fact that everything here is synthetic
  2. Open a terminal, make a folder, install numpy and scikit-learn
  3. Build the pool: 20,000 synthetic alerts, a separate test set, and a simulated analyst
  4. Write the experiment: four ways to spend 300 labels, scored on data none of them saw
  5. Measure: random vs uncertainty vs hybrid, five seeds each
  6. Honest negative 1: the cold start - uncertainty is only as good as the model asking
  7. Honest negative 2: sampling bias - the labeled set lies about the world
  8. Honest negative 3: the rare sub-type nobody asked about - then fix it with diversity
  9. Honest negative 4: a tired analyst who gets one label in ten wrong
  10. Plan the budget and test a stop rule before trusting it
  11. Do it better: the way a pro spends a label budget, and when not to bother

Open the full interactive lab →