Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Real-Time Hate Speech Detection

Hard
HardMachine LearningFeature EngineeringDeep LearningSupervised LearningAsked 2 times

Problem

Business Context

Meta needs a real-time classifier to detect hate speech across Facebook and Instagram posts at global scale. The system must score billions of daily text posts quickly enough to support automated enforcement, ranking downweighting, and human review queues.

Dataset

You are given a historical training set built from policy-reviewed content, user reports, and sampled public posts.

Feature GroupCountExamples
Raw text1post_text, caption_text, OCR_extracted_text
Language metadata4locale, detected_language, script, translation_available
Author/account signals8account_age_days, prior_violations_90d, follower_count_bucket
Content context6surface, reshare_depth, media_present, group_type
Safety heuristics10slur_lexicon_hits, profanity_score, repeated_character_ratio
  • Size: 420M labeled posts collected over 18 months, 29 structured features plus text
  • Target: Binary — hate speech policy violation (1) vs non-violating content (0)
  • Class balance: Highly imbalanced — 0.35% positive, 99.65% negative
  • Missing data: 12% missing OCR text, 7% missing account-history features for new accounts, sparse coverage for low-resource languages

Success Criteria

A good solution should achieve high recall on violating content while keeping precision high enough to avoid overwhelming reviewers and minimizing false positives on benign reclaimed language or quoted speech. Target online inference latency is p95 < 40 ms per post for the first-stage model.

Constraints

  • Must support multilingual content and distribution shift across new slurs/evasion patterns
  • Must operate at billions of posts/day with strict serving cost limits
  • Must provide enough interpretability for policy audits and error analysis
  • Must degrade safely when language ID or OCR is missing

Deliverables

  1. Design a supervised ML pipeline for real-time hate speech detection on Meta surfaces.
  2. Choose model(s), justify them, and explain how you would handle extreme class imbalance.
  3. Define preprocessing and feature engineering for text plus structured metadata.
  4. Propose a train/validation/test strategy that avoids temporal leakage.
  5. Specify evaluation metrics, decision thresholds, and moderation-review tradeoffs.
  6. Provide production-quality Python code for training and offline evaluation of a first-stage classifier.
Practicing as: Research Scientist interview at Meta

Hi, I'll play your Meta interviewer for the Research Scientist role. Candidates describe these interviews as mixed and moderately difficult, so expect me to be professional and fair. Take your time with the question above and answer like we're in the room.

Take this as a live interview session →

You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.

Sign up freeI have an account
Sign up to unlock solutions
Meta Research Scientist Interview QuestionsMeta Machine Learning Engineer Interview QuestionsMeta Interview QuestionsTop 50 Deep Learning Interview Questions
Next questions
MetaDesign Hate-Speech Comment DetectionHardMetaStabilize Deep Ranking TrainingMediumMetaAnalyze Self-Attention for Feed RankingHard