jhan014 at SemEval-2019 Task 6: Identifying and Categorizing Offensive Language in Social Media

Jiahui Han, Shengtan Wu, Xinyu Liu2019 · DOI

Abstract

In this paper, the team jhan014 presents two methods to identify and categorize offensive language on Twitter. The first method is a deep neural network consisting of bidirectional recurrent layers with Gated Recurrent Unit (GRU) cells and fully connected layers. The second method is a probabilistic model, Modified Sentence Offensiveness Calculation (MSOC), designed to evaluate sentence offensiveness and targeting levels. We evaluate the performance of each method based on F1 scores and analyze their respective strengths and weaknesses regarding Type I and Type II errors. Our findings indicate that while deep neural networks perform well across all subtasks, they suffer from higher Type I errors and struggle with minority classes. Conversely, the MSOC model excels in target categorization but exhibits more Type II errors in offensive language identification.

Introduction

Automated moderation on social media platforms like Twitter is a complex challenge due to the nuanced nature of "offensiveness." This study addresses three nested problems defined in the SemEval-2019 Task 6 (OffensEval) challenge:

  1. Task A (Identification): Distinguishing between offensive and non-offensive posts.
  2. Task B (Categorization): Determining if an offense is targeted (TIN) or untargeted (UNT).
  3. Task C (Targeting): Identifying the target as an individual (IND), a group (GRP), or another entity (OTH).

Methodology

The researchers implemented and compared two distinct philosophies:

  • Deep Neural Network (RNN): A bidirectional GRU model utilizing pre-trained GloVe embeddings (trained on 27 billion tweets). This model attempts to capture context by processing sequences in both directions.
  • Modified Sentence Offensiveness Calculation (MSOC): A rule-based probabilistic model using a human-defined dictionary. It assigns weights to offensive terms and utilizes "Syntactic Intensifiers"—social media markers like @ (mentions) and # (hashtags)—to determine if an offense is directed at a specific entity.

Results and Analysis

The "Majority Class" Trap in Identification

In Task A, the RNN achieved a slightly higher F1-score (0.6899) than the MSOC (0.6761). However, the RNN was prone to Type I errors (false positives). Because the dataset was unbalanced, the model struggled to learn the subtle structures of non-offensive sentences, often flagging them as offensive if they contained "suspicious" statistical patterns.

Confusion matrix for the RNN model in Task A, illustrating the high volume of false positives (Type I errors) where non-offensive tweets were misclassified as offensive.

The Minority Class Struggle in Targeting

Task C highlighted the limitations of purely statistical learning. The "Other" (OTH) category was significantly underrepresented in the training data. The RNN model completely failed to classify any sentences into this category, defaulting to the more frequent "Individual" or "Group" labels.

Confusion matrix for the RNN model in Task C, demonstrating its failure to predict the minority "OTH" class, resulting in zero successful classifications for that category.

In contrast, the MSOC model outperformed the RNN in Task C (F1 of 0.5149 vs 0.4630). By relying on linguistic cues like third-person pronouns and mentions rather than just frequency, the MSOC model successfully identified minority class instances that the RNN ignored.

Conclusion

The study reveals a clear trade-off: the RNN is an efficient generalist but falters on unbalanced data and nuanced minority classes. The rule-based MSOC model provides superior precision in categorization by leveraging human linguistic knowledge. The authors suggest that a hybrid approach, combining deep learning's pattern recognition with rule-based linguistic features, would likely yield the most robust moderation tool.

Summary updated

Abstract

In this paper, the team jhan014 presents two methods to identify and categorize the offensive language in Twitter. In the first method, we develop a deep neural network consisting of bidirectional recurrent layers with Gated Recurrent Unit (GRU) cells and fully connected layers. In the second method, we establish a probabilistic model, modified sentence offensiveness calculation (MSOC) to evaluate the sentence offensiveness level and target level according to different sub-tasks. Based on task results, We evaluate the performance of each method based on F1 score and analyze the advantages and disadvantages of these two methods with the type I error and type II error. In conclusion, deep neural network behaves well in all subtasks but has more type I error and fails to categorize subclasses with minor data or less character, while MSOC model does better in target categorizing but has more type II error in offensive identifying.
BibTeX
@misc{han2019jhan,
  author = {Jiahui Han and Shengtan Wu and Xinyu Liu},
  title = {{jhan014 at SemEval-2019 Task 6: Identifying and Categorizing Offensive Language in Social Media}},
  year = {2019},
  doi = {10.18653/v1/s19-2116},
}
Figure