Lion Cipher Lab

Scale test-time compute with Best-of-N and a verifier, then watch a weak verifier get gamed (deterministic regex-detection stub)

Why it matters

"Scaling test-time compute" is one of the strongest ideas in modern AI: sample many candidate answers, score them with a verifier, keep the best, and watch quality climb - Snell and colleagues showed it can beat training a bigger model. Security teams are starting to use it to generate and rank things a machine can check, like detection rules. This lab builds the smallest honest version - Best-of-N over candidate detection regexes that must match malicious log lines and spare benign ones - and then shows the failure that the cheerful version hides. With a STRONG verifier (the full labeled set…

What you'll learn

Steps in this lab

  1. The words first: test-time compute, Best-of-N, a verifier, held-out data, reward hacking - and the fact that the generator here is a stub
  2. Open a terminal and make a scratch folder (Windows, macOS, Linux)
  3. Build a labeled corpus: malicious vs benign command-line log lines, plus a tiny weak smoke test
  4. Write the candidate generator and the two verifiers, then read the self-test
  5. Scale Best-of-N and print the two curves, side by side
  6. Read the curves: the strong verifier helps to a plateau, the weak verifier makes more compute worse
  7. The honest negative: the weak verifier got GAMED - look at the rule it chose
  8. Why this, not that - when Best-of-N helps, when it hacks your metric, and how a pro builds the verifier
  9. Ship it: prove the fix is coverage not cleverness, decide what to log, and clean up

Open the full interactive lab →