LIDA: Lexical-Based Imbalanced Data Augmentation for Content Moderation

Guangming Huang, Yunfei Long, Cunjin Luo, Yingya LiPACLIC 2023 · OpenReview

TL;DR

This paper introduces LIDA, a novel data augmentation technique for content moderation that addresses the challenge of imbalanced datasets by strategically inserting sensitive lexical features into negative samples to create positive ones. LIDA offers a simple, explainable, and computationally efficient method that significantly improves model performance on imbalanced content moderation tasks, outperforming existing rule-based augmentation methods.

What Problem Does This Paper Address?

Content moderation is crucial for maintaining healthy online communities, but it faces significant challenges. Firstly, the data for content moderation is often highly imbalanced, with a vast majority of content being benign (negative samples) and only a small fraction being harmful (positive samples). This imbalance makes it difficult for machine learning models to learn effectively, often leading to a bias towards the majority class and poor detection of harmful content. Secondly, obtaining high-quality, annotated data for content moderation is expensive and time-consuming, especially given the sensitive nature of the content. Traditional data augmentation (DA) techniques, while helpful, often struggle with domain-specific imbalanced data or introduce noise that can degrade performance. Existing DA methods are also often complex, computationally expensive, or rely on soft labels, making them less practical for real-world applications.

Methods

The paper proposes LIDA (Lexical-Based Imbalanced Data Augmentation), a straightforward yet effective DA approach for content moderation. LIDA operates by leveraging a curated list of sensitive lexical features (swear words and hate speech terms). The core idea is to transform negative samples (benign content) into positive samples (harmful content) by inserting these sensitive words.

The process involves:

  1. Lexicon Creation: A list of 104 sensitive English words was compiled from Wiktionary and Hatebase, then reviewed and filtered by native English speakers to mitigate ambiguity.
  2. Augmentation Strategy: For each negative sample, LIDA randomly selects a small number (1, 2, or 3) of these sensitive lexical features. These features are then inserted into the original sentence. The insertion of these words is designed to inherently change the classification of the sentence from negative to positive, as these terms are indicative of harmful content.
  3. Balancing the Dataset: By converting negative samples into positive ones, LIDA effectively increases the number of positive samples, thereby creating a more balanced dataset for training content moderation models. This approach avoids the need for additional human annotation or reliance on soft labels.

Datasets

The proposed LIDA method was evaluated on two publicly available datasets:

  • Wiki-TOX: Derived from the Wikipedia Toxic Comment Classification Challenge.
  • Wiki-ATT: Derived from the Wikipedia Personal Attack dataset.

These datasets are noted for their significant class imbalance, with positive samples constituting approximately 10.1% for Wiki-TOX and 7.5% for Wiki-ATT. The authors highlight that these datasets are more imbalanced than those used in some prior studies, making them a more challenging and realistic testbed for their method.

Key Insights and Ideas

  • Targeted Augmentation for Imbalance: The core insight is that for imbalanced tasks like content moderation, simply augmenting data might not be enough. The augmentation needs to be targeted to address the specific imbalance, which LIDA achieves by converting negative to positive samples using sensitive lexicons.
  • Simplicity and Explainability: LIDA's strength lies in its simplicity. It's easy to implement and understand, making it accessible for researchers and practitioners. The mechanism of inserting known harmful words is inherently explainable.
  • Effectiveness of Lexical Features: The paper demonstrates that leveraging specific lexical features, even in a rule-based manner, can be highly effective for content moderation augmentation, a direction that was previously underexplored.
  • Model Architecture Matters: The study observed that LIDA's performance gains were more pronounced on complex models like CNN and BERT compared to a simpler RNN. This suggests that the effectiveness of DA techniques can be influenced by the underlying model's capacity to leverage the augmented information.

Key Results

  • Significant Performance Boost: LIDA consistently improved the F1-score and AUC across various models (CNN, RNN, BERT) on both Wiki-TOX and Wiki-ATT datasets when compared to models trained without any augmentation. For instance, LIDA achieved an average F1-score improvement of 4.62 on Wiki-TOX and 2.55 on Wiki-ATT.
  • Outperforms Rule-Based Baselines: LIDA significantly outperformed established rule-based DA methods like Easy Data Augmentation (EDA) and An Easier Data Augmentation (AEDA). On Wiki-TOX, LIDA showed an average improvement of 3.40 F1-score over EDA and 1.17 F1-score over AEDA. Statistical significance was confirmed with p-values less than 0.05.
  • Competitive with Generative Models (with caveats): While LIDA did not surpass the performance of a state-of-the-art generative model like GPT3Mix, it offered a compelling trade-off. GPT3Mix achieved higher scores but at a substantial computational cost, requiring extensive pre-training and fine-tuning. LIDA, in contrast, is computationally efficient and easier to deploy.

Limitations and Future Work

The authors acknowledge several limitations and suggest future research directions:

  • Generative Model Performance Gap: LIDA's performance is lower than that of large-scale generative models like GPT3Mix. However, the paper argues that LIDA's computational efficiency, explainability, and lower resource requirements make it a practical alternative.
  • Augmentation Proportion Sensitivity: The augmentation proportion is identified as a critical hyperparameter. While an optimal interval was suggested (around 50-60%), an exact determination requires further investigation.
  • Lexicon and Strategy Dependence: The performance of LIDA is influenced by the choice of sensitive lexicons and the insertion strategy. The ambiguity of certain words (e.g., "northern monkey") can impact results, suggesting the need for careful lexicon curation and potentially more sophisticated insertion strategies.
  • Binary Classification Focus: The current LIDA algorithm is designed for binary classification tasks. Future work could extend it to multi-classification tasks by developing multi-category sensitive lexicons.

Summary updated

BibTeX
@inproceedings{huang2023lida,
  author = {Guangming Huang and Yunfei Long and Cunjin Luo and Yingya Li},
  title = {{LIDA: Lexical-Based Imbalanced Data Augmentation for Content Moderation}},
  booktitle = {PACLIC},
  year = {2023},
  url = {https://openreview.net/forum?id=tb10MFqOaF},
}
Figure