Business Context
You’re on the Trust & Safety ML team at StreamShare, a short-form video platform with 85M DAU and ~12M video uploads/day globally. Regulators and app stores require fast removal of CSAM, graphic violence, self-harm encouragement, extremist propaganda, and hate symbols. Human moderators can review only ~0.5–1% of uploads, so the company needs an ML system that can auto-block the worst content in near real time and route borderline cases to moderation queues.
The product requirement is: within 30 seconds of upload, produce a risk score and an action: ALLOW, QUEUE, or BLOCK. False negatives are high-severity safety incidents; false positives harm creators and retention. You are asked to design the first production version using “traditional ML” framing (classification, training, evaluation), but you may use pretrained embeddings.
Dataset
You have a labeled dataset built from moderator decisions and policy team audits.
| Component | Scale | What you get | Notes |
|---|
| Video metadata | 180M uploads | duration, country, device, account_age_days, prior_strikes, upload_hour | Some features are missing for new users (~8%) |
| Visual frames | 180M videos | 1 FPS sampled frames (JPEG) + timestamps | Avg 18 frames/video; long tail up to 10 minutes |
| Audio | 140M videos | 16kHz mono waveform + VAD segments | 22% missing (no audio track) |
| ASR transcript | 110M videos | text + word-level timestamps + confidence | ASR quality varies by language; 35% non-English |
| Labels | 180M videos | multi-label policy tags + final action | Labels are noisy; inter-rater agreement ~0.78 |
- Target: For this interview, model a binary label:
harmful=1 if policy requires BLOCK (CSAM/graphic violence/self-harm/extremism), else 0.
- Class balance: Highly imbalanced — about 0.35% harmful overall; spikes to 1–2% in some regions.
- Leakage risk: Some creators re-upload similar content; duplicates exist.
Success Criteria
- Safety operating point: Achieve ≥ 90% recall on harmful content at ≤ 2.0% false positive rate (FPR) on a held-out, recent-time test set.
- Queue efficiency: Among the top 1% highest-risk uploads, achieve ≥ 25% precision (so moderators see meaningful hits).
- Latency: End-to-end scoring within 30s of upload; model inference budget < 200ms per video on CPU for metadata + embeddings (GPU optional only for offline feature extraction).
- Robustness: Performance should not collapse on new uploads (cold-start users) and should be monitored for policy drift.
Constraints
- Privacy/compliance: Raw video cannot be retained beyond 30 days in some regions; you should prefer storing derived features/embeddings.
- Interpretability: Trust & Safety ops need reason codes (e.g., “violent imagery signal high”, “hate symbol detected”) for appeals.
- Training: You have a weekly training window on a Spark + GPU feature-extraction cluster; online serving is Kubernetes CPU.
Deliverables (what you must produce in the interview)
- Propose an end-to-end ML approach: feature extraction, model choice, and how you combine modalities.
- Define a leakage-safe split strategy and cross-validation plan.
- Describe how you handle extreme class imbalance and label noise.
- Specify evaluation metrics and how you pick thresholds for ALLOW/QUEUE/BLOCK.
- Provide a training + evaluation Python skeleton (production-quality) and explain how you’d deploy and retrain.