How content moderation works at scale
Content moderation combines perceptual hashing (PhotoDNA) for known bad content, ML classifiers for new violations, and human review queues for high-confidence ambiguous cases.
Why content moderation needs a tiered pipeline
A platform must make a decision about content before it spreads, but the decision can involve text, images, video, audio, account history, audience, and local policy. A single classifier cannot provide instant, context-aware, and inexpensive decisions for every item. The usual architecture is a funnel: cheap high-precision checks first, probabilistic classifiers next, and human or policy review for ambiguous or high-impact cases.
The system also has two kinds of correctness. It must reduce harmful content and comply with applicable policy or law, while avoiding unjustified removals and giving users a review path. That makes thresholds, auditability, appeals, and moderator well-being part of the architecture rather than afterthoughts.
Scope and assumptions
This article covers text, image, video, and link ingestion at a large-platform scale, but the figures and thresholds are illustrative. Exact policies vary by jurisdiction, content category, product surface, and severity. The flow includes known-content matching, ML classification, human review, actioning, appeals, and feedback into model training.
30-second mental model
Think of moderation as a confidence-and-cost funnel:
- Normalize the content into text, frames, audio, metadata, and hashes.
- Catch known cases with high-precision rules and perceptual or exact hashes.
- Score new cases with specialized classifiers and context features.
- Route by risk: allow, reduce distribution, remove, or send to a prioritized reviewer.
- Learn and audit from decisions, appeals, policy changes, and model-quality metrics.
Each stage should preserve evidence, decision reasons, model or rule versions, and the ability to reverse or re-evaluate an action.
Content moderation is a funnel with three main automated and human stages, each progressively more expensive and context-aware:
-
Perceptual hashing (Tier 1): Compare incoming content against a database of known-bad hashes. This is fast, high-precision, and handles previously identified illegal or policy-violating content (child exploitation material, known terrorist propaganda). The share of violations caught depends on the corpus and should be measured; false positives still need a review path.
-
ML classification (Tier 2): Run every piece of content through machine learning classifiers that detect categories like nudity, violence, hate speech, and spam. This is moderately fast, catches a large share of novel violations, and produces probabilistic confidence scores that need threshold tuning and calibration.
-
Human review (Tier 3): Route content that falls in the "uncertain" confidence range to human moderators, prioritized by severity and reach. This is slower and more expensive than automated inference but handles context-dependent decisions that ML cannot make reliably.
The key architectural challenge is not any single tier. It is the routing logic between tiers: which confidence thresholds trigger which actions, how to prioritize the human review queue, and how to handle the tradeoff between speed (take it down now) and accuracy (are we sure it is actually a violation).
The Architecture
Five-minute end-to-end flow
Here is how the flow works, step by step:
-
Content arrives: A user posts an image, writes a comment, or uploads a video. The preprocessor extracts analyzable content: text is tokenized, images are resized and normalized, video is broken into key frames.
-
Tier 1 hash check: The content's perceptual hash is compared against a database of known-bad hashes. If there is a verified match, the system can block or quarantine it immediately and preserve the evidence for required reporting and review. This catches re-uploads of previously identified illegal material; latency should be measured for the chosen hash store.
-
Tier 2 ML classification: If no hash match, the content runs through multiple ML classifiers simultaneously (one for nudity, one for violence, one for hate speech, etc.). Each classifier returns a confidence score between 0 and 1.
-
Confidence routing: A routing engine examines the scores. High confidence (above 0.95) triggers automatic removal. Low confidence (below 0.7) means the content is allowed. The middle band (0.7 to 0.95) is routed to human review.
-
Human review: A priority queue ranks items by severity (the type of violation) multiplied by reach (how many people will see this content). A moderator reviews the content in context and makes a final decision.
-
Appeals: Users whose content was removed can appeal. A different moderator reviews the decision. If the second moderator disagrees with the first, the content is restored.
The important operational shape is the funnel: Tier 1 is cheap and precise, Tier 2 handles the bulk of novel content at moderate cost, and Tier 3 is expensive but necessary for context-dependent or high-impact cases.
Perceptual Hashing and Known-Bad Content Detection
The fastest and most accurate layer in the pipeline is hash matching. It answers one question: "Have we seen this exact (or nearly exact) piece of content before, and was it previously classified as a violation?"
The key concept: a perceptual hash is not a cryptographic hash. MD5 or SHA-256 produces a completely different output if you change a single pixel. A perceptual hash produces a similar output for visually similar images. Crop the image, add a watermark, change the resolution, or apply a filter, and the perceptual hash stays nearly identical.
PhotoDNA is an example of a perceptual-hash system that generates a compact representation from an image's structural properties. Similarity thresholds depend on the algorithm, corpus, and calibration; do not treat a particular Hamming distance as universal.
Continue Reading with Premium
Unlock this article and every other in-depth system design guide on the platform with SDEpedia Premium.
Related Articles
TikTok's For You Page uses video completion rate as its primary signal, feeds that into a real-time recommendation model, and bootstraps new users with trending content before personalization kicks in. Here's what's known about how it works.
Modern fraud detection combines a rule engine for known patterns, an ML ensemble for scoring novel transactions, and a real-time feature store for sub-100ms decisions. Learn the architecture behind Stripe Radar, PayPal, and bank card fraud systems.