Reliable Decision from Multiple Subtasks through Threshold Optimization: Content Moderation in the Wild

Donghyun Son, Byounggyu Lew, Kwanghee Choi, Yongsu Baek, Seungwoo Choi, Beomjun Shin, Sungjoo Ha, Buru Chang

TL;DR

The paper introduces TruSThresh, a fast threshold optimization method that allows content moderation systems to adapt to new policies in seconds without retraining expensive machine learning models. By optimizing thresholds across multiple granular subtasks (like "weapon" or "rude gesture") using surrogate gradients with learnable width truncation, it maximizes the amount of automatically moderated content while strictly adhering to high-precision reliability targets.

What Problem Does This Paper Address?

Social media platforms face a "policy churn" problem. Content moderation rules change constantly due to new laws, cultural shifts, or product updates. Traditionally, this requires relabeling massive datasets and retraining monolithic "harmful vs. harmless" models—a process that is slow, expensive, and inefficient.

To cope, many platforms use a multiple subtask approach. Instead of one giant model, they use granular models that detect specific elements (e.g., blood, drugs, hate speech). These scores are then combined using a logical "decision function" (e.g., "Mark as harmful if (Weapon > $\tau_1$) OR (Violence > $\tau_2$)").

The core challenge is finding the optimal thresholds ($\tau$) for these subtasks. Because model scores are often uncalibrated and distributions vary wildly between tasks, simple heuristics or uniform thresholds fail to provide the high precision required for automated decisions. Platforms need a way to maximize recall (how much content is automatically handled) while guaranteeing precision (ensuring the machine isn't making wrong calls that expose users to harm).

An example of the multiple subtask approach where granular scores are combined to meet different policies.

Methods

The authors propose TruSThresh (Truncated Surrogate gradient for Threshold optimization), which treats threshold selection as a constrained optimization problem. Its key innovations include:

  1. Score Normalization (SN): Subtask scores are often skewed. TruSThresh uses rank-based normalization to map all scores to a uniform [0, 1] range. This makes the optimization process robust and agnostic to the underlying score distributions.
  2. Surrogate Gradient Learning (SGL) with Width Truncation: Thresholding is inherently non-differentiable (a step function). TruSThresh uses a sinusoidal surrogate function to allow for gradient-based optimization. Crucially, it introduces a learnable width parameter ($w_i$) that acts as a sliding window. It truncates gradients for samples far from the threshold, focusing the model's "attention" only on the ambiguous samples near the decision boundary.
  3. Penalty Method: To ensure the system meets strict reliability targets, the authors use a relaxed loss function that heavily penalizes any drop below the target precision while pushing for maximum recall.
The TruSThresh architecture using surrogate gradients and learnable width truncation to update thresholds.

Datasets

The method was evaluated across diverse modalities and real-world scenarios:

  • UnSmile: A Korean hate speech dataset with 9 subtasks, used to simulate "filtering" (OR-logic) and "skipping" (AND-logic) use cases.
  • Azar Real-World Data: A proprietary dataset of 23,596 samples from a live social discovery platform, annotated by professional moderators across 10 subtasks.
  • Standard Benchmarks: DCASE17/19 (audio event detection), CelebA (image attributes), and EurLex (legal text classification) to test generalizability for multi-label F1 optimization.

Key Insights and Ideas

  • Decoupling Policy from Modeling: The biggest "aha" moment is that you don't need to touch the ML models to change the moderation policy. By just tuning thresholds on top of fixed subtask detectors, you can pivot a platform's safety stance in seconds.
  • The Importance of the "Window": Standard surrogate gradients can be distracted by "easy" samples far from the threshold. The Width Truncation (Figure 4) ensures that only the samples that actually matter for the decision boundary drive the optimization, leading to faster convergence and better stability.
  • Handling Logic Complexity: The paper notes that policies involving "AND" logic (e.g., "Skip review only if NO subtasks are triggered") are significantly harder to optimize for high precision than "OR" logic. TruSThresh proves particularly effective in these challenging, high-constraint scenarios.

Key Results

  • State-of-the-Art Performance: On the real-world Azar dataset, TruSThresh achieved the highest recall across all precision targets. At a strict 0.985 precision target, it improved recall by 5.6% over existing SGL methods and 6.5% over expert-designed heuristics.
  • Reliability: Unlike baseline methods, TruSThresh consistently met high-precision targets (e.g., >0.985) where others failed to converge or satisfy the constraint.
  • Speed: The optimization process finishes in seconds, making it practical for production environments where policies might need to be adjusted rapidly in response to emerging trends.

Limitations and Future Work

  • Manual Logic Design: While TruSThresh optimizes the thresholds, the logical structure of the decision function (the ANDs and ORs) is still designed by human experts. Automating the discovery of the optimal decision logic is a logical next step.
  • Subtask Dependency: The system is only as good as its subtasks. If a new policy requires detecting a concept not covered by existing granular models, new models must still be trained.
  • Cold Start: The method requires a small set of annotated data for the target policy to perform the optimization, though this is significantly less than what is needed for full model retraining.

Summary updated

Abstract

Social media platforms struggle to protect users from harmful content through content moderation. These platforms have recently leveraged machine learning models to cope with the vast amount of user-generated content daily. Since moderation policies vary depending on countries and types of products, it is common to train and deploy the models per policy. However, this approach is highly inefficient, especially when the policies change, requiring dataset re-labeling and model re-training on the shifted data distribution. To alleviate this cost inefficiency, social media platforms often employ third-party content moderation services that provide prediction scores of multiple subtasks, such as predicting the existence of underage personnel, rude gestures, or weapons, instead of directly providing final moderation decisions. However, making a reliable automated moderation decision from the prediction scores of the multiple subtasks for a specific target policy has not been widely explored yet. In this study, we formulate real-world scenarios of content moderation and introduce a simple yet effective threshold optimization method that searches the optimal thresholds of the multiple subtasks to make a reliable moderation decision in a cost-effective way. Extensive experiments demonstrate that our approach shows better performance in content moderation compared to existing threshold optimization methods and heuristics.
BibTeX
@inproceedings{son2023reliable,
  author = {Donghyun Son and Byounggyu Lew and Kwanghee Choi and Yongsu Baek and Seungwoo Choi and Beomjun Shin and Sungjoo Ha and Buru Chang},
  title = {{Reliable Decision from Multiple Subtasks through Threshold Optimization: Content Moderation in the Wild}},
  booktitle = {WSDM},
  year = {2023},
  url = {https://openreview.net/forum?id=YTRjhwEJQb},
}
Figure