Offline Evaluation That Tracks Online Risk
A classifier scores better offline. Will the launch catch more of the harm users actually see?
Integrity models — fake accounts, child safety, content similarity — are scored offline before they launch, and the usual evaluation set came from labels that already existed: items users reported or earlier models sent to human review. That baseline was convenient and biased in a specific direction. It was rich in the violations previous systems already found and thin in the ordinary traffic where a new model's false positives and missed cases actually live. An AUC gain on that set measured ranking within a population no launch would ever face, so a candidate could win offline while barely changing the risk users saw.
The fix started by naming the target quantity: harm reaching users on the live surface, and how a model at its launch threshold would change it. I drew the evaluation sample from production traffic, stratified by model score so the rare high-score region had enough labelled cases, and kept each stratum's inclusion probability so every labelled item carries a weight back to the population. That separates two questions a single number had blurred. AUC on the reweighted sample says how well the model ranks live traffic, but AUC does not move with prevalence, so it cannot say how much harm is caught. Prevalence-weighted precision and recall at the launch threshold carry that question, each with an interval that reflects the stratified design.
| Question | Queue-sampled set (baseline) | Stratified production sample |
|---|---|---|
| Who is in the evaluation set? | Items already reported or sent to review | Live traffic, sampled by model score with known weights |
| What does AUC describe? | Ranking among items earlier systems surfaced | Ranking across the traffic the launch will score |
| How much harm is caught at launch? | Not answerable; the queue sets the prevalence | Weighted precision and recall at the threshold, with intervals |
| What can it still miss? | Everything outside the queue | New abuse patterns not yet in the sampled traffic, and reviewer label error |
Four product and platform teams adopted the design as their launch standard, so a model shipped on what it would do to live prevalence rather than on a queue-set AUC. Along the way I caught a data leak in a partner team's pipeline that had affected three model launches, led the fix with that team and rebuilt the trust the miss had cost. The design has its own limits: review labels carry error, a representative sample ages as adversaries adapt, and an offline estimate of prevalence is still not an online measurement of harm prevented. What I carry into every evaluation since is to name the population and the quantity before choosing the metric, because a metric computed on a convenient sample answers a question nobody asked.