Training a Policy Violation Classifier With 0.1 Percent Positives
Last updated: November 29, 2026
Quick Overview
Only about 1 in 1,000 uploaded videos violates a specific policy. Explain how to train and evaluate a classifier that is useful for the moderation team.
TikTok
November 29, 20260
0
0 solved
Only about 1 in 1,000 uploaded videos violates a specific policy. Explain how to train and evaluate a classifier that is useful for the moderation team.
Content moderation at TikTok involves many rare violation types, so class imbalance is a frequent interview topic. Interviewers check sampling, loss choices, the right evaluation metrics and how thresholds map to human review capacity.
What the Interviewer Expects
- Explain why accuracy is useless at this base rate
- Use precision-recall curves and PR AUC
- Apply class weighting, focal loss or resampling
- Collect more positives through active learning
- Set thresholds based on review queue capacity
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 choose between oversampling and class weights?
- What does focal loss change?
- How would you estimate recall if you only review flagged videos?
- How do you keep calibrated scores after reweighting?
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
Ask how the classifier is used: auto-removal (needs very high precision), routing to reviewers (limited by queue capacity), or demotion. Also ask how many labeled positives exist and how labels are co...
Approach
At a 0.1% base rate, a model predicting "no violation" always is 99.9% accurate and useless. Focus on precision and recall of the positive class....