CPL-NoViD: Context-Aware Prompt-Based Learning for Norm Violation Detection in Online Communities

Zihao He, Jonathan May, Kristina Lerman

Abstract

Moderating online communities requires understanding nuanced, community-specific norms that often elude general-purpose toxicity detectors. We present CPL-NoViD, a framework that leverages prompt-based learning and conversation context to detect rule violations. By framing moderation as a natural language inference task, CPL-NoViD achieves state-of-the-art performance, particularly in complex categories like trolling, while demonstrating high data efficiency in few-shot scenarios.

Introduction

Online moderation is a "long-tail" challenge. While AI tools effectively identify blatant hate speech, they frequently fail to recognize violations of community-specific norms, such as "low-effort posts" or "off-topic content." Existing context-aware models often rely on complex architectures like LSTMs, which are difficult to tune and prone to vanishing gradient problems. Furthermore, these models typically require extensive labeled data—a resource many smaller or newer communities lack.

Methodology: Context-Aware Prompting

CPL-NoViD (Context-aware Prompt-based Learning for Norm Violation Detection) redefines moderation as a language modeling task rather than a standard binary classification. The framework utilizes a generative T5 model fed with a natural language prompt that includes the subreddit name, the specific rule in question, and the preceding conversation history.

The CPL-NoViD framework treats norm violation detection as a natural language prompting task, incorporating subreddit rules and conversation history directly into the input.

By integrating context directly into the prompt, the model leverages the pre-trained transformer's inherent ability to understand long-range dependencies without the need for specialized encoders. The model is trained to predict specific tokens ("Yes" or "No") at a designated mask position to indicate a violation.

Dataset and Evaluation

The framework was evaluated using the NORMVIO dataset, comprising 52,000 conversation threads from 2,310 subreddits. The dataset includes 20,000 confirmed rule violations across nine categories: incivility, harassment, spam, format, content, off-topic, hate speech, trolling, and meta-rules. While general categories like incivility are prevalent, the dataset also captures the difficulty of moderating niche community norms.

Experimental Results

CPL-NoViD established a new state-of-the-art (SOTA) with a Macro-F1 score of 78.2%, outperforming the previous best model, BERT-LSTM (76.5%).

Performance comparison of CPL-NoViD against baseline models across various rule categories, showing state-of-the-art results in Macro-F1 and specific difficult categories like trolling.

Key findings from the results include:

  • Superior Nuance Detection: The model showed significant gains in difficult categories, such as "trolling" (+6.0% improvement) and "meta-rules" (+2.1%).
  • Context Sensitivity: Performance improvements were most pronounced for rules where context is critical, such as "spam" or "off-topic" content, whereas "incivility" often stood alone.
  • Few-Shot Efficiency: CPL-NoViD significantly outperformed traditional baselines when trained on as few as 10 to 100 examples, making it highly practical for emerging communities.
  • Generalization: The model successfully identified "unseen" rules during cross-domain testing, indicating a conceptual understanding of norm violations rather than simple keyword memorization.

Discussion and Limitations

While CPL-NoViD shows remarkable stability and performance, it faces challenges with highly subjective "Content" rules (e.g., quality assessments) and "Meta-rules" (e.g., voting behavior). Additionally, performance may degrade in exceptionally long conversation threads where relevant context becomes diluted. Future research may explore "soft prompts" or the integration of external community-specific knowledge bases to further refine the model's cultural awareness.

Summary updated

BibTeX
@inproceedings{he2024cpl,
  author = {Zihao He and Jonathan May and Kristina Lerman},
  title = {{CPL-NoViD: Context-Aware Prompt-Based Learning for Norm Violation Detection in Online Communities}},
  booktitle = {ICWSM},
  year = {2024},
  doi = {10.1609/icwsm.v18i1.31335},
}
Figure