KatInterview

Designing a Multimodal Weapon Ad Moderation Pipeline

System DesignModel answer
HardModel answerSystem Designsystem designmachine learningcontent moderation

Last updated

Design a scalable multimodal machine learning system to detect and block illegal weapon ads under strict latency and high recall requirements.

Context

You are tasked with designing the automated policy enforcement system for a global digital platform. The system must analyze every ad submission—including headline text, static images, video streams, audio tracks, and linked landing pages—to identify and block prohibited items, specifically restricted firearms, illegal weapon components, and related contraband, prior to ad delivery.

System Requirements

Functional Requirements

  1. Multimodal Analysis: Combine features from copy text, image OCR, visual object detection, speech transcripts, and landing page contents.
  2. Real-Time Moderation: Provide low-latency verdicts for newly submitted ads.
  3. Human Review Workflow: Escalate uncertain or suspicious cases to human moderation queues without blocking overall platform throughput.
  4. Adversarial Resilience: Detect obfuscation strategies, including text baked into images, homoglyphs, evasive video editing, and clean ad creative pointing to restricted destination URLs.

Non-Functional Requirements

  1. Low Latency: The initial synchronous submission evaluation must complete with a P99 latency $< 200\text{ ms}$ for standard static formats.
  2. High Recall & Precision Controls: Weapon policy enforcement demands high recall (target $\ge 98%$) while controlling false positives to protect legitimate advertiser workflows.
  3. High Throughput & Elasticity: Baseline capacity of $\sim 150\text{ QPS}$ with burst tolerance exceeding $1,500\text{ QPS}$ during peak shopping periods.

Key Discussion Points

  1. System & Processing Architecture: Synchronous vs. asynchronous execution paths, API contracts, caching mechanisms, and fallback patterns under load.
  2. ML Pipeline & Fusion Strategy: Text, vision, and audio feature extraction, along with early, intermediate, and late fusion trade-offs.
  3. Adversarial Defenses: Technical solutions for evading policy detection across all modalities.
  4. Human-in-the-Loop & Model Operations: Dynamic thresholding, prioritized queueing, active learning feedback loops, and canary deployments.

Hints

Hint 1

Distinguish between ad submission moderation and real-time auction bidding. Full video processing should happen asynchronously post-submission while keeping the ad unlisted, rather than trying to fit frame analysis into sub-200ms auction SLAs.

Hint 2

Construct a multi-stage funnel: fast perceptual hashing/deduplication -> lightweight single-modality checks -> multimodal intermediate fusion -> prioritized human review.

Hint 3

Consider cross-modal semantic dependency. A photo of an unmachined metal cylinder is benign on its own, but combined with copy stating 'no FFL required,' it represents a clear policy violation.