Choosing Per-Tenant Thresholds For A Rare Attack Classifier
Last updated: November 29, 2026
Quick Overview
Your BEC classifier outputs a score, attacks are about 1 in 50,000 messages, and each customer tolerates only a handful of false quarantines per week. Explain how you would evaluate the model and set operating thresholds, including whether thresholds should differ by tenant.
Abnormal Security
November 29, 20260
0
0 solved
Your BEC classifier outputs a score, attacks are about 1 in 50,000 messages, and each customer tolerates only a handful of false quarantines per week. Explain how you would evaluate the model and set operating thresholds, including whether thresholds should differ by tenant.
At Abnormal, a missed attack can mean a wire transfer and a false positive means a CFO's legitimate invoice disappears, so threshold choice is a product decision expressed in math. The interviewer checks that you avoid accuracy and ROC AUC traps at extreme imbalance, translate rates into absolute counts per tenant, and reason about calibration and label noise.
What the Interviewer Expects
- Rejects accuracy and explains why ROC AUC can look great while being useless
- Uses precision-recall and false positives per tenant per week as the operating metric
- Converts rates into expected counts using tenant volume
- Discusses calibration before sharing thresholds across tenants
- Considers tiered actions (banner, quarantine) instead of one threshold
- Addresses noisy and delayed labels
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you estimate recall when most missed attacks are never labeled?
- Would you let customers move the threshold themselves? What guardrails?
- How do you keep the threshold valid as the attack mix shifts?
- How would a cascade with a second model change the analysis?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Prevalence . Tenants range from 500 to 200,000 mailboxes. The budget is stated per tenant per week, e.g. at most 3 false quarantines. Labels come from analyst review, cus...
Approach
Evaluate on a time-based holdout with precision-recall curves, not ROC. With prevalence this low, a false positive rate of sounds tiny but is 5 false alarms per true attack. The decision met...