Diagnosing a Spike in Harassment Policy Violations
Statistics & ExperimentsModel answerLast updated
A monthly moderation report shows harassment violations rising sharply — determine whether the surge is real or a measurement artifact, then design and evaluate a mitigation.
Background
You're a Data Scientist on a content integrity team. At your monthly review, you notice that the Harassment category jumped sharply compared to the prior month. A post is flagged as violating when its model score exceeds 0.5, and the monthly counts are based on distinct posts that were viewed during each calendar month. A single post can be tagged under multiple violation categories simultaneously.
Work through the five parts below. For each part, reason out loud: state your assumptions, flag what you'd need to look up, and call out the statistical traps.
Part 1 — Define what moved
Before investigating causes, nail down the metric. Distinguish between a volume increase (more harassment posts exist) and a rate increase (a larger proportion of content is harassing). Which prevalence definitions and denominators would you compute? Over which time windows would you compare them?
Part 2 — Generate hypotheses
List the most plausible explanations, covering both genuine behavioral changes and measurement artifacts. Your list should include at minimum:
- A true rise in abusive behavior
- Shifts in traffic composition across surfaces, regions, languages, or creator cohorts
- Seasonality or external real-world events
- Coordinated campaigns or repeat offenders
- Changes to the policy definition
- Changes to the model version, decision threshold, or score calibration
- Data pipeline, logging, or backfill issues
Part 3 — Investigate: real signal or artifact?
Lay out a concrete, prioritized investigation plan. Specify:
- Which metrics and segments you'd pull
- Which external datasets you'd request (human-review labels, user reports, enforcement logs, model-version metadata)
- How you'd address denominator effects, Simpson's paradox, selection bias, label drift, and model calibration — do not just name them; explain how each one could fool you here and how you'd control for it
- How you'd validate model-scored metrics against human-reviewed ground truth
Part 4 — Propose mitigations (assume the surge is real)
Recommend a set of interventions spanning product, ranking, policy, operations, and ML. Separate short-term containment actions from longer-term structural fixes.
Part 5 — Evaluate a mitigation
Pick one intervention and design an experiment or quasi-experiment to test it. Specify: primary metric, guardrail metrics, unit of randomization (or rollout design if a clean experiment isn't feasible), and how you'd handle the tradeoffs between false positives, fairness, and user experience.
Hints
Hint 1
Start with the denominator before the numerator. If total viewed posts grew 30% month-over-month, raw violation counts can rise while the prevalence rate is flat or even falling. Write out the exact metric formula before forming any hypothesis.
Hint 2
To separate a model artifact from a real behavioral change, overlay your daily time series with model deployment dates and threshold-change events. A sharp step function aligned with a deploy is a red flag. Then re-score a frozen random sample from both months using a single pinned model version — if the gap collapses, the classifier is the culprit.
Hint 3
When drawing a sample for human review, do not pull from flagged or reported posts — that population over-represents high-confidence and high-visibility cases. Use a stratified random sample across score bins and apply inverse-probability weights to recover an unbiased prevalence estimate.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Part 1 — Defining the movement precisely
The first task is agreeing on what "increased" means before any causal reasoning begins.
Key metrics to compute side by side:
| Metric | Formula | What it tells you |
|---|---|---|
| Violation volume | # distinct viewed posts with score > 0.5 | Absolute scale of the problem |
| Post prevalence | Harassment posts / all distinct posts viewed | Share of the corpus that is harassing |
| View prevalence | Views of harassment posts / total views | User harm experienced — this is the north star |
| User exposure rate | % of active users who saw ≥ 1 harassment post | Breadth of harm |
| Category share | Harassment posts / all violating posts | Mix shift among violations (can rise even if harassment rate is flat) |
Denominator traps to flag immediately:
- If total viewed posts grew 30% (say, a product launch drove traffic), violation volume rises mechanically even at a constant rate.
- Category share can increase because other violation categories were suppressed, not because harassment grew. Since posts are multi-label, shares don't sum to 100%.
- "Distinct posts viewed this month" includes old posts that resurfaced via shares or recommendations. Segment by post-creation date vs. view date to separate new content from recirculated content.
Time windows: daily and weekly series distinguish step changes (deploy-like) from ramps (behavioral trends). Compare month-over-month for the headline, year-over-year for the same calendar month to control for seasonality, and set a 3–6 month trailing baseline with confidence intervals to judge whether the jump is statistically unusual.
Part 2 — Hypothesis space
| Explanation | Signature to look for |
|---|---|
| True behavior increase | Gradual rise across segments; user reports and human-labeled prevalence rise together |
| Traffic-mix shift | Rates stable within segments, but volume shifted toward high-harassment surfaces or demographics |
| Seasonality or external event | Mirrors the prior-year pattern, or spike tied to an election, sports season, or viral controversy |
| Coordinated campaign or repeat offenders | Volume concentrated in few accounts; new-account spike; clustered targets |
| Policy definition change | Step change on the guideline effective date; reviewer labels shift on a fixed gold set |
| Model version or threshold change | Step change on a deploy date; mass redistribution of scores near 0.5 |
| Calibration drift | Score distribution shifts without a matching change in human-labeled rate |
| Logging/backfill issue | Sudden jump in row counts, null scores, duplicate post IDs, or historical months being overwritten |
| Enforcement slowdown | Harassment posts stay live longer, accumulating views — view prevalence rises but creation rate is flat |
Part 3 — Investigation plan
Priority order: cheapest checks first.
Step 1 — Data integrity. Verify row counts, null rates on probability_violating, and deduplication on post ID. Confirm no backfill job rewrote prior months. Ensure both months use identical query logic and threshold definitions.
Step 2 — Model metadata overlay. Join scores to model-version and threshold-change logs. Plot the daily metric with deploy dates as vertical markers. A step function coinciding with a deploy is strong evidence of an artifact. To confirm, re-score a frozen random sample from both months using a single pinned model version — if the gap disappears, the classifier is the cause, not behavior.
Step 3 — Score distribution and calibration. Compare full score histograms, not just the share above 0.5. A shift of probability mass that was sitting near 0.45 to 0.55 produces a large swing in thresholded counts but represents almost no change in actual prevalence. Track Σp (the sum of calibrated probabilities over all posts) as a threshold-agnostic prevalence estimator. Build monthly reliability diagrams from human labels: if precision at the 0.5 threshold dropped from 80% to 55%, the model is drifting. This is the calibration drift check.
Denominator effects: always divide by the right base. Volume rising 20% while views rose 25% is a decrease in view prevalence — easy to miss if you only report numerators.
Simpson's paradox: aggregate prevalence can rise while every individual segment's rate is flat or falling. Example: traffic shifted to a region where the classifier has a high false-positive rate, so the platform-wide number rises even though no segment got worse. The fix there belongs in the model, not in policy. Run a shift-share decomposition: Δprevalence = Σ(change in mix × old rate) + Σ(old mix × change in rate). This separates composition effects from genuine rate changes.
Step 4 — Human-label ground truth. Draw a stratified random sample of viewed posts, stratified by score bin and surface. Oversample high-score bins and apply inverse-probability weights to recover an unbiased prevalence estimate. Do not sample from reported or flagged posts — that introduces selection bias toward obvious, high-visibility cases and inflates apparent precision. Have reviewers label under a frozen guideline with a gold set included to track inter-rater agreement. Estimate true prevalence with confidence intervals for both months.
Label drift: if guidelines, reviewer vendors, or training changed between months, labels themselves shifted. Re-label a held-out sample of last month's posts under current guidelines to isolate policy change from behavior change.
Step 5 — Corroborating signals. User reports per 1k views are model-independent (though biased by reporting campaigns and UI changes). Enforcement logs show removal counts, time-to-action, and appeal overturn rates. Offender concentration analysis checks whether the top 1% of authors account for a rising share of violations.
Verdict logic: Real surge = human-labeled prevalence and user reports both rise, within-segment rates increase. Artifact = surge coincides with a deploy or backfill, human-labeled prevalence is flat. Often it's both; report each component with confidence intervals.
Part 4 — Mitigations
Short-term containment (days):
- Surge human reviewer capacity on the affected segment and run targeted takedowns on coordinated networks.
- In ranking, apply a soft demotion to borderline-scoring content (scores 0.3–0.5) on high-visibility surfaces, and reduce new-account amplification in affected clusters.
- In product, rate-limit comments and DMs from new or unconnected accounts; give targets "limit replies" and hidden-words controls; add a pre-post friction nudge ("Are you sure you want to post this?").
Longer-term fixes (weeks to quarters):
- Retrain the classifier on fresh, policy-aligned labels with better coverage of affected languages and content formats; add an account-level behavioral model to complement the post-level score.
- Move from a hard 0.5 threshold to a tiered decision framework (e.g., auto-remove above 0.9, throttle-and-review between 0.6–0.9, no action below 0.6) to reduce sensitivity to calibration drift.
- Build a living calibration monitoring dashboard that fires an alert when reliability curves shift beyond a threshold, so the next drift is caught within days, not at the monthly review.
- Address root causes in product: stronger friction on account creation in high-spam clusters, friction on mass-messaging, and improved offender appeal workflows to reduce recidivism.
Part 5 — Experiment design (pre-post friction nudge)
Intervention: show a confirmation nudge ("This looks like it might be hurtful — reconsider posting?") when a user's draft comment scores above 0.5.
Unit of randomization: individual user accounts. Randomizing at post level risks within-user contamination. A 50/50 split is reasonable if power analysis (based on the harassment rate and minimum detectable effect) supports it; otherwise, run a smaller holdback.
Primary metric: harassment view prevalence (views of flagged posts / total views) in the treatment group vs. control.
Guardrail metrics:
- Overall comment submission rate (to detect chilling effects on legitimate speech)
- False-positive rate on human-labeled samples (fairness: are certain languages or communities disproportionately nudged?)
- User retention and session depth (UX guardrail)
- Appeal overturn rate (are we correctly catching harassment or just friction-ing legitimate users?)
Main tradeoffs: The nudge will reduce some true harassment, but it will also interrupt legitimate users whose comments happen to score above 0.5. If the classifier's precision at 0.5 is only 60%, most nudged users are false positives — that degrades experience and may erode trust. The fairness concern is real: if the model has higher false-positive rates for non-English speakers or certain cultural speech styles, those communities bear a disproportionate burden. Stratify results by language and region before shipping broadly. A quasi-experimental fallback (interrupted time series on a gradual rollout) is available if a clean A/B test is infeasible due to the rarity of the event or concerns about holding back a safety intervention from a control group.