NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Facilitating Fine-grained Detection of Chinese Toxic Language: Hierarchical Taxonomy, Resources, and Benchmarks

Junyu Lu, Bo Xu, Xiaokun Zhang, Changrong Min, Liang Yang, Hongfei Lin

TL;DR

This paper addresses the lag in Chinese toxic language detection by introducing MONITOR TOXIC FRAME, a hierarchical taxonomy, and ToxiCN, a fine-grained dataset of 12,011 comments that explicitly separates hate speech from general offensive language. To boost model performance on subtle, indirect toxicity, the authors also propose Toxic Knowledge Enhancement (TKE), a plug-and-play method that injects a specialized implicit insult lexicon directly into pre-trained language models.

What Problem Does This Paper Address?

Online toxicity detection has advanced significantly in English, but Chinese toxic language detection has historically lagged behind. The authors identify two major blind spots in existing Chinese datasets and models:

  1. Conflating general offensive language with hate speech: Standard tools often flag any post containing a swear word as toxic, ignoring the fact that profanity is frequently used simply as an exclamation or modal particle (e.g., "What the fuck! I can't believe we lost!") rather than a targeted attack on a minority group.
  2. Overlooking indirect toxicity: Existing resources focus heavily on explicit abuse, completely missing implicit hatred (such as irony, sarcasm, and microaggressions) or posts that are merely reporting experiences of discrimination.

Furthermore, Chinese internet culture relies heavily on creative variants of profanity—using homophones, character splitting, or ironic metaphors (like using the positive word "fairy" to implicitly demean women)—making it incredibly easy to bypass standard keyword filters.

Methods

To tackle these challenges, the authors developed a comprehensive framework consisting of three core components:

  • MONITOR TOXIC FRAME: A hierarchical taxonomy that progressively filters text through four layers: (I) Binary Toxicity, (II) Toxic Type (General Offensive vs. Hate Speech), (III) Targeted Group, and (IV) Expression Category (Explicit, Implicit, Reporting).

    Figure 1: MONITOR TOXIC FRAME illustration. The framework introduces four questions to determine whether a comment is general offensive language or hate speech, and further analyzes the attacked group and expression type.
  • Insult Lexicon Construction: A dictionary of 1,032 terms categorized by target groups (sexism, racism, regional bias, anti-LGBTQ, and general swearwords). It maps out the linguistic derivation rules used by netizens, such as character deformation, homophones, and code-mixing.

  • Toxic Knowledge Enhancement (TKE): A model-agnostic embedding layer designed to inject lexical knowledge into any pre-trained language model (PLM). If an n-gram matches a category in the insult lexicon, it generates a toxic category embedding ($t_i$) which is added element-wise to the standard word embedding ($w_i$) via a weighting coefficient $\lambda$: $$w'_i = w_i + \lambda t_i$$

    TKE Architecture

Datasets

The paper introduces ToxiCN, a fine-grained dataset containing 12,011 comments crawled from Zhihu and Tieba. The data targets four highly debated topics: gender, race, region, and LGBTQ.

Unlike prior Chinese toxicity datasets, ToxiCN includes detailed annotations for toxic types and expression categories, maintaining a realistic distribution where general offensive language is a small minority (6.8%) compared to targeted hate speech.

Comparison of Chinese Toxic Language Datasets

Key Insights and Ideas

  • The Implicit Drop-Off: Models are highly capable of catching explicit toxicity, but their accuracy plummets by roughly 10% when faced with implicit expressions. Without explicit swear words, models struggle to grasp the underlying semantic malice.
  • Contextual "Reporting" is Easier to Catch: Interestingly, models perform better at identifying posts that report discrimination than posts containing implicit hate. This is because reporting posts frequently use explicit structural cues like "he said..." or "she said...".
  • Lexical Knowledge Doesn't Help with Intent: While injecting the insult lexicon (via TKE) significantly helps models identify how toxicity is expressed (explicit vs. implicit), it provides virtually no benefit in distinguishing general offensive language from hate speech. This suggests that separating general profanity from hate speech requires pragmatic, contextual understanding rather than just vocabulary knowledge.

Key Results

The authors evaluated their TKE framework against standard baselines (BiLSTM, BERT, RoBERTa) and a commercial API (Baidu Text Censor).

  • Pre-trained Models Outperform Commercial APIs: Keyword-reliant commercial APIs fail drastically on indirect toxicity. Baidu Text Censor achieved a meager 45.9% F1-score on binary toxic identification, whereas deep learning models scored around 80%.
  • TKE Consistently Improves Performance: Integrating TKE yielded the highest performance gains when detecting the Expression Category, providing an average 2.7% improvement across all baselines.
  • Top Performer: RoBERTa enhanced with TKE ($\text{RoBERTa}^*$) achieved the best overall results, securing an 80.6% F1-score for Toxic Identification and a 77.7% F1-score for Toxic Type discrimination.
Figure 3: Accuracy towards samples with different expressions, containing non-toxicity (N-Tox.), explicit- ness (Exp.), implicitness (Imp.), and reporting (Rep.).

Limitations and Future Work

The authors note several limitations in their current work:

  • Lack of Conversational Context: The dataset evaluates comments in isolation. Because they only captured the text of individual comments and not full conversational threads, some contextual semantics are lost.
  • Text-Only Modality: The framework completely ignores non-textual features such as images, emojis within images, or publisher metadata.
  • Subjectivity: Despite rigorous training and demographic balancing of the annotators, toxic language annotation remains inherently subjective.

Future Directions: The team plans to expand this research into span-level toxicity localization and multi-modal toxic language detection to account for images and broader context.

Summary updated

BibTeX
@inproceedings{lu2023facilitating,
  author = {Junyu Lu and Bo Xu and Xiaokun Zhang and Changrong Min and Liang Yang and Hongfei Lin},
  title = {{Facilitating Fine-grained Detection of Chinese Toxic Language: Hierarchical Taxonomy, Resources, and Benchmarks}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.898},
}
Figure