Randomly sampling production traffic starves a moderation classifier: in sampled user prompts, only 0.04% contained self-harm and 0.017% contained violent hate threats. Todor Markov, Lilian Weng, and colleagues at OpenAI show that treating taxonomy design, active learning, and data auditing as first-class model architecture raises rare-harm yield by up to 22.3x and drives up to 10x better performance on scarce categories.
- Active learning beats random sampling 10.1x to 22.3x: Across three rounds scoring 500,000 production prompts per iteration, active learning triggers at least one violation on 40% of selected examples versus 3.4% under random sampling.
- Independent heads outperform shared MLPs: Replacing a GPT decoder’s final linear layer with eight independent
[d_model, 256, 1]MLP heads cuts cross-category interference while needing fewer parameters. - Curated contrastive data lifts hate detection 32%: Adding 69k hand-templated contrastive pairs (such as “black blanket” vs. demographic groups) raises hate AUPRC from 0.417 to 0.551, whereas adding 2x uncurated synthetic data degrades accuracy.
- Domain adaptation helps cold starts, not data-rich runs: Wasserstein domain adversarial training (
WDAT) with 100k unlabeled production texts boosts public-only self-harm AUPRC from 0.063 to 0.281, then saturates once 60k labeled production examples arrive.
How It Works
Because academic datasets like tweets differ sharply from long LLM prompts and few-shot completions, the team anchors the entire system around an explicit severity taxonomy and a three-stage active learning loop. Five top-level classes (S, H, V, SH, HR) and three severe subclasses (S3, H2, V2) are paired with non-violating contextual classes (S0 medical or sex education, H0.a neutral identity mentions, H0.b quoted commentary, and V0 contextualized violence) so annotators share clear boundary rules.
In each training round, the pipeline masks PII from 500,000 production prompts, scores them with the current classifier, and selects roughly 2,000 examples across three parallel samplers: random traffic (to track deployment drift), high-score examples above a per-category threshold, and uncertainty samples near probability 0.5. Samples are re-weighted by the square root of metadata counts to preserve diversity before human labeling.
To keep rare-event annotation clean, auditors skip raw agreement accuracy, which stays artificially near 100% when negatives dominate. Instead, they audit 10 positives and 10 high-score (above 50%) candidates per category using ground-truth F1, and run two-fold cross-validation across the training set; whenever more than 30% of sampled model-label disagreements turn out to be errors, all flagged items are relabeled.
Key Findings
- Taxonomy alignment dominates public benchmarks: On OpenAI’s CommonCrawl-plus-synthetic public test set, the classifier beats Jigsaw’s Perspective API across matched categories (
0.9703vs.0.8709sexual,0.7968vs.0.6914hate,0.7371vs.0.5201violence,0.6191vs.0.3902harassment). It also leads on out-of-distribution Stormfront (0.9053vs.0.8754) and TweetEval Hate (0.6473vs.0.5961), while Perspective wins on its home Jigsaw Toxic split (0.9769vs.0.9304). - Active learning scales across iterations: Starting from 6,000 public examples and testing on 5,500 production samples, three active-learning rounds beat random sampling on AUPRC across every single category.
- Input reduction catches hidden overfitting: Token probing flagged memorized training strings, hashtag bias from Twitter corpora, over-weighting on punctuation symbols, and fragile handling of spaced slurs like
"w h o r e s".
Caveats and Builder Takeaway
Only about 5% of the training corpus (and 4% of the public test set) is non-English, so multilingual precision and tokenization remain unverified. Even after 69k contrastive examples, identity tokens such as "gay" or "her" still skew hate or sexual scores upward, and relying on US-centric definitions and majority-vote labels can flatten marginalized perspectives on borderline speech. Because production traffic cannot be open-sourced, external comparisons rely on public proxies and approximate label mappings.
For engineers building guardrails today, newer policy-tunable LLM classifiers like ShieldGemma, WildGuard, and Llama Guard 3 have largely replaced custom decoder-head training for general safety policies. Yet Markov et al.’s operational playbook stays essential whenever policies drift or harms are rare: define non-violating contextual classes up front, sample production traffic by uncertainty rather than uniformly, audit rare classes with F1 instead of accuracy, and probe triggers before shipping thresholds.


