TL;DR
This paper introduces a neural character-based composition model designed to catch "obfuscated" abusive language (like fck or w0m3n*) that typically evades standard filters. By generating custom embeddings for unseen words based on their internal character structure and surrounding context, the authors achieved state-of-the-art results on Twitter and Wikipedia datasets.
What Problem Does This Paper Address?
Automated abuse detection is a cat-and-mouse game. While Recurrent Neural Networks (RNNs) are great at understanding sequence and intent, they struggle with "Out of Vocabulary" (OOV) words. When a user deliberately misspells a slur or concatenates words (e.g., stupidbitch) to bypass a filter, standard models usually map that word to a generic, static "OOV" token.
This creates a semantic black hole: the model can't distinguish between a rare, harmless technical term and a deliberately fudged insult. The authors argue that the internal structure of these words—the specific sequence of characters—contains the very information needed to identify them as abusive.
Methods
The researchers propose a two-pronged approach to bolster standard word-level RNNs:
- Character n-gram Features: They supplement word embeddings with counts of character n-grams (sequences of 1 to 5 characters). This provides a robust baseline for capturing structural similarities between words.
- Word Composition Model: Instead of using a generic OOV token, they built a model to compose an embedding for any unseen word.
- The Architecture: They used a 2-layer bi-directional LSTM (or a CNN) that takes a sequence of characters as input and outputs a $d$-dimensional vector.
- The "Mimicking" Process: The model is trained to minimize the mean squared error between the embeddings it generates and the "task-tuned" embeddings of known words in the training set.
- Context-Awareness: To handle ambiguous cases (e.g., "cnt" meaning "can't" vs. a slur), they introduced an encoder that looks at the characters of the entire sentence to create context-aware character representations before composing the word embedding.
Datasets
The authors evaluated their methods on three established benchmarks from two distinct domains:
- Twitter: A dataset of ~16k tweets annotated for racism, sexism, or neither (Waseem and Hovy, 2016).
- Wikipedia Talk Pages: Two large-scale datasets from the English Wikipedia: W-TOX (toxicity) and W-ATT (personal attacks), containing over 100k comments each.
Key Insights and Ideas
- OOV is not a Monolith: The core "aha moment" is that OOV words are highly informative in abusive contexts. In the Twitter dataset, 32% of tokens were not in the English dictionary, and many were concentrated in the racist/sexist classes.
- Task-Tuning Matters: Unlike previous subword models (like FastText), this model learns to mimic embeddings that have already been tuned for the specific task of abuse detection. This ensures the composed vectors carry the "flavor" of the domain.
- Context is King (Sometimes): The context-aware model performed significantly better on Wikipedia than on Twitter. The authors attribute this to the fact that Wikipedia comments are longer and provide more surrounding information, whereas the Twitter dataset was smaller and often used the same slurs across different contexts.
- Simplicity Wins: Interestingly, a 1-layer CNN performed comparably to a 2-layer LSTM for word composition while being much faster to train, likely because words are relatively short sequences.
Key Results
The proposed models consistently outperformed previous state-of-the-art (SOTA) methods across all datasets:
- Twitter: The "Augmented Word-Sum + CNG" model reached a macro $F_1$ of 79.80, a significant jump over the standard word-sum baseline of 75.93.
- Wikipedia: On the Personal Attack (W-ATT) dataset, the "Context HS + CNG" model achieved an $F_1$ of 87.44, surpassing the previous SOTA (86.28).
- Qualitative Success: The model successfully mapped obfuscated words to their clean counterparts in the embedding space. For example, the generated embedding for w0m3n was found to be highly similar to women, girls, and females.
Limitations and Future Work
- Data Sparsity: The context-aware model's performance was limited on Twitter due to the small dataset size. The authors suggest that more data is needed to truly leverage character-level context.
- Discourse and URLs: The model still struggles with abuse that is purely contextual (e.g., "Just 'her body' right?") or hidden within external links.
- Future Directions: The authors propose applying these character-based composition techniques to other fields, such as grammatical error detection and correction, where subword information is equally critical.
Summary updated