Zero-shot Code-Mixed Offensive Span Identification through Rationale Extraction

Manikandan Ravikiran, Bharathi Raja ChakravarthiACL 2022

TL;DR

This paper explores how to identify specific offensive words or phrases within code-mixed Tamil-English text without needing explicit span annotations for training. They found that Integrated Gradients (IG) generally outperforms LIME for this "zero-shot" task, especially when combined with data augmentation and multilabel training, highlighting the importance of robust feature attribution for understanding model behavior.

What Problem Does This Paper Address?

Identifying offensive language is crucial for online safety, but pinpointing the exact offensive spans (words or phrases) is even more challenging than just classifying a whole sentence as offensive. This becomes particularly difficult with code-mixed languages like Tamil-English, where linguistic boundaries are blurred. Obtaining precise span annotations for such datasets is labor-intensive and expensive. This paper tackles the problem of performing offensive span identification in a zero-shot manner, meaning they aim to leverage models trained on sentence-level offensive classification to identify specific offensive spans, without requiring explicit span-level training data for the target task. They also investigate how to interpret these models' decisions using rationale extraction techniques.

Methods

The core of this work lies in using rationale extraction methods to adapt pre-trained transformer models (like BERT, RoBERTa, XLM-RoBERTa) that were initially trained for sentence-level offensive language classification into zero-shot offensive span identifiers.

  • LIME (Local Interpretable Model-Agnostic Explanations): This method works by perturbing the input sentence (e.g., by masking words) and training local surrogate models to understand which words contribute most to the model's prediction.
  • Integrated Gradients (IG): This technique attributes the model's prediction to its input features by integrating gradients along a path from a baseline input (e.g., a sentence with only start/end tokens) to the actual input.

The paper also explores two key strategies to improve performance:

  • Masked Data Augmentation: This involves taking non-offensive comments and replacing some words with offensive words from a curated lexicon, creating new offensive examples.
  • Multilabel Training: This approach encodes positional information of offensive words as labels, aiming to help models better understand the context and location of offensive content.

Datasets

  • Offensive Span Identification Dataset: This is the primary dataset used for evaluation, containing YouTube comments in code-mixed Tamil-English with annotated offensive spans. It has 4786 training and 876 testing examples.
  • Dravidian Code-Mix Dataset: A dataset of non-offensive code-mixed Tamil-English comments (25425 examples) used for data augmentation.
  • Mask Augmented Dataset: Created by augmenting the Dravidian Code-Mix dataset, resulting in 109961 comments, with a significant portion labeled as offensive.
  • Multilabel Dataset: Created from the Mask Augmented Dataset, where labels indicate the positional information of offensive words (start, middle, end).

Key Insights and Ideas

  • IG Outperforms LIME in Zero-Shot Span Identification: Integrated Gradients consistently showed better performance than LIME for identifying offensive spans in a zero-shot setting, suggesting its attribution method is more robust for this task.
  • Data Augmentation is Crucial for IG: While LIME's performance didn't drastically improve with data augmentation, IG, particularly with XLM-RoBERTa, saw significant gains, indicating its sensitivity to the quantity and quality of training data.
  • Positional Information Matters for LIME: Multilabel training, which encodes positional information, significantly boosted LIME's performance, suggesting it benefits from explicit cues about where offensive words are located. IG also improved, but LIME saw a more dramatic relative gain.
  • XLM-RoBERTa is a Strong Performer: This multilingual transformer model generally yielded the best results, especially when combined with data augmentation and positional information, likely due to its ability to handle cross-lingual relationships.
  • Comment Length Influences Performance: LIME struggled with longer comments, potentially due to surrogate model limitations or score dilution from random perturbations. IG, however, remained more consistent across different comment lengths.

Key Results

  • Baseline Performance: Without augmentation or multilabel training, LIME achieved a baseline F₁ of 26.35%, while IG achieved 44.83%.
  • Augmentation Boost: With Masked Data Augmentation and Multilabel Training, XLM-RoBERTa achieved an F₁ of 50.23% using LIME, and 47.38% using IG.
  • Comment Length Analysis: For comments shorter than 30 characters, LIME showed competitive results. However, IG consistently outperformed LIME on longer comments.
  • XLM-RoBERTa Advantage: XLM-RoBERTa with augmentation achieved an accuracy of 50.23%, outperforming benchmark models by an average of 12%.

Limitations and Future Work

  • LIME's Limitations: The paper notes that LIME's performance can be hampered by its reliance on surrogate models and random perturbation procedures, which might not accurately capture the underlying distribution. It also struggles with longer comments.
  • Unexplored Areas: The authors mention that the effect of random perturbations on overall results and methods for merging attributions from multilabel predictions were not fully explored and are planned for future work.
  • Future Directions: The paper suggests exploring how to merge attributions from multilabel predictions and investigating the impact of different perturbation strategies for LIME. They also aim to explore the effect of random perturbations on overall results.

Summary updated

BibTeX
@inproceedings{ravikiran2022zero,
  author = {Manikandan Ravikiran and Bharathi Raja Chakravarthi},
  title = {{Zero-shot Code-Mixed Offensive Span Identification through Rationale Extraction}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
}
Figure