Can Attention-based Transformers Explain or Interpret Cyberbullying Detection? (2022)

Abstract: Automated textual cyberbullying detection is known to be a challenging task. It is sometimes expected that messages associated with bullying will either be a) abusive, b) targeted at a specific individual or group, or c) have a negative sentiment. Transfer learning by fine-tuning pre-trained attention-based transformer language models (LMs) has achieved near state-of-the-art (SOA) precision in identifying textual fragments as being bullying-related or not. This study looks closely at two SOA LMs, BERT and HateBERT, fine-tuned on real-life cyberbullying datasets from multiple social networking platforms. We intend to determine whether these finely calibrated pre-trained LMs learn textual cyberbullying attributes or syntactical features in the text. The results of our comprehensive experiments show that despite the fact that attention weights are drawn more strongly to syntactical features of the text at every layer, attention weights cannot completely account for the decision-making of such attention-based transformers.

## introduction repeated hostile and aggressive online behaviour to intentionally hurt or embarrass someone through digital communication technologies are generally understood as cyberbullying. @xcite . recent research findings by @xcite and @xcite , indicate that 44% children in 11 european countries and nearly 50% children in ireland have reported an increase in cyberbullying during the covid-19 lockdown restrictions across multiple social networking sites (sns) and multiplayer online gaming (mog) platforms. this growing amount of cyberbullying content emerging across multiple sns and mog platforms is alarming and necessitates more effective content moderation, as earlier studied by @xcite @xcite . therefore, one crucial step toward efficient and effective content moderation is the ability to recognize and define the basis for automated cyberbullying detection systems to classify a textual expression or phrase as cyberbullying. recent computational cyberbullying research claim to have outstanding accuracy and precision in automating the identification of cyberbullying using state-of-the-art (soa) deep learning algorithms like attention-based transformers, gated recurrent units (grus), long-short term memory (lstms). however, upon close examination of such research, including those by @xcite @xcite @xcite among others, reveal that they rely on datasets for hate-speech or personal-attacks by @xcite @xcite for cyberbullying identification. in reality, despite their inventive attempts, these studies can only determine whether a text is abusive or hateful. we consider it a poor decision to detect cyberbullying using such out-of-domain datasets. additionally, work by @xcite @xcite has demonstrated the efficacy of transfer learning by fine-tuning pre-trained deep layered language models (lms) for a variety of natural language processing (nlp) tasks, such as text classification, thereby yielding impressive results. @xcite , have demonstrated that fine-tuning lms like bert base-uncased by @xcite , and hate -bert base-uncased by @xcite outperform traditional machine learning algorithms and aid in more accurate detection of textual cyberbullying across multiple sns platforms. research by @xcite demonstrates that the attention-based mechanisms within the deeply layered architecture of such pre-trained lms can display dependencies between input and output. high attention weights for inputs (such as words) are frequently referred to be accountable for the output, which provides the model's interpretability @xcite @xcite @xcite . to our knowledge, these assertions and presumptions have not undergone a formal evaluation for usergenerated content (ugc) datasets collected from various sns and mog platforms categorically labelled for cyberbullying. hence, we hypothesize that if attention-based lms fine-tuned on real-life cyberbullying datasets learn textual cyberbullying traits for detecting cyberbullying; they would have higher attention weights for a) parts-of-speech (pos) tags like adjectives, nouns, proper nouns, pronouns, and b) words with more negative sentiment. we also hypothesize that this assumption will be valid for text samples categorically annotated as cyberbullying across different datasets sourced from varied sns and mog platforms. content warning: this article contains examples of abusive language in section 5.4. all examples are taken from existing datasets (section 3) to illustrate its composition. ## datasets to overcome current dataset-related gaps in cyberbullying research, we select datasets that are a) annotated by either cyberbullying domain experts or b) clear and precise annotation guidelines aided the annotation for cyberbullying. to our knowledge, there are only seven real-life datasets in english language that have been devised for cyberbullying markers with such annotations. we categorise the seven datasets into four groups based on a) type of sns or mog platform and b) average length of tokens observed from each of the seven platforms (see figure 1 ). these groups include, as seen in ## experiment setup tasks depicted in the first block of figure 7 (see appendix a.3) are described in detail in sections 4.1 and 4.3. as depicted in other two blocks of the figure 7 , we discuss the strategies for fine-tuning, hyper-parameter optimization strategies, and the attention-weight and gradient-based feature importance score at each layer for both bullying and nonbullying sentences in sections 4.2 and 4.4. the code repository for reproducing this study can be found online foot_10 . ## conclusion & future work our comprehensive experiments using two lms and four grouped real-life cyberbullying datasets from various sns and mog platforms revealed that: a) a fine-tuned hatebert is better at classifying cyberbullying samples as cyberbullying; b) figure 5: attention per layer for negative sentiment words figure 6: attention per layer for positive sentiment words