KatInterview

Designing a Multimodal Classifier for Prohibited Item Listings

Machine LearningModel answer
HardModel answerMachine Learningmultimodalcontent-moderationclassification

Last updated

Design an end-to-end ML system that detects policy-violating item-for-sale posts by combining text, image, and behavioral signals at platform scale.

The Problem

A large social platform allows users to post buy/sell listings in a dedicated marketplace surface as well as in general feeds and community groups. Platform policy prohibits listings that offer regulated items — firearms, ammunition, and certain weapon components — for sale, trade, or transfer between private individuals.

Your task is to design a scalable ML system that automatically detects and acts on these violating posts.

What you are building

A real-time and near-real-time classification pipeline that:

  • Reads each new post (text, images, metadata) and outputs a violation score
  • Takes an enforcement action — auto-remove, queue for human review, or allow — based on that score
  • Handles millions of posts per day with p99 latency under 500 ms on high-risk surfaces
  • Remains effective as adversarial users try to evade detection

Scope

Structure your answer around these four areas:

  1. Policy and labeling — What counts as a violation? How do you build and maintain ground-truth labels at scale?
  2. System architecture — How does a post flow from ingestion to an enforcement decision?
  3. Multimodal modeling — How do you extract and combine signals from text, images, OCR, and metadata?
  4. Reliability and drift — How do you handle adversarial evasion, monitor quality over time, and keep the system improving?

Constraints and expectations

  • The violating class is rare: roughly 0.01–0.05% of posts
  • Errors are asymmetric: false positives harm legitimate users; false negatives allow policy violations to spread
  • Sellers actively adapt their language and images to avoid detection
  • Human review capacity is finite (order of tens of thousands of items per day), so the model must route intelligently
  • Content is multilingual and may include up to ~10 images per post

A strong answer defines the violation precisely, justifies architectural choices with trade-offs, explains how the multimodal signals interact, and addresses adversarial robustness and feedback loops — not just model selection.

Hints

Hint 1

Start by pinning down what makes a post a violation: it is the combination of a regulated item AND transactional intent, not either one alone. This distinction drives your labeling criteria, your hard-negative strategy, and your fusion approach.

Hint 2

Think in stages: a cheap cascade of keyword/hash filters, then parallel feature extraction (text encoder, image encoder, OCR), then a fusion model. Most posts exit early, which lets you keep p99 latency under budget without burning GPU on every post.

Hint 3

Adversarial evasion is a core requirement, not an afterthought. Cover text normalization (homoglyphs, leetspeak, slang), OCR on images (sellers embed prices in photos), and perceptual hashing for known violating media. Then explain how your retraining loop catches novel evasion patterns.