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:
- Task A (Identification): Distinguishing between offensive and non-offensive posts.
- Task B (Categorization): Determining if an offense is targeted (TIN) or untargeted (UNT).
- 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.
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.
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