mlsanityData to 7 Oct 2026

Offensive Language Detection with BERT-based models, By Customizing Attention Probabilities

arXiv 2110.05133 ↗First posted 11 Oct 2021cs.CL cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

This paper describes a novel study on using `Attention Mask' input in transformers and using this approach for detecting offensive content in both English and Persian languages. The paper's principal focus is to suggest a methodology to enhance the performance of the BERT-based models on the `Offensive Language Detection' task. Therefore, we customize attention probabilities by changing the `Attention Mask' input to create more efficacious word embeddings. To do this, we firstly tokenize the training set of the exploited datasets (by BERT tokenizer). Then, we apply Multinomial Naive Bayes to map these tokens to two probabilities. These probabilities indicate the likelihood of making a text non-offensive or offensive, provided that it contains that token. Afterwards, we use these probabilities to define a new term, namely Offensive Score. Next, we create two separate (because of the differences in the types of the employed datasets) equations based on Offensive Scores for each language to re-distribute the `Attention Mask' input for paying more attention to more offensive phrases. Eventually, we put the F1-macro score as our evaluation metric and fine-tune several combinations of BERT with ANNs, CNNs and RNNs to examine the effect of using this methodology on various combinations. The results indicate that all models will enhance with this methodology. The most improvement was 2% and 10% for English and Persian languages, respectively.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 21 of its 41 references that are in the map. First posted on arXiv 11 Oct 2021.

Builds on

21 of 41 references.

References · 21

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2019Unsupervised Cross-lingual Representation Learning at Scalecited by 3,907
  4. 2014Convolutional Neural Networks for Sentence Classificationcited by 1,124
  5. 2018Universal Sentence Encodercited by 485
  6. 2019Predicting the Type and Target of Offensive Posts in Social Mediacited by 268
  7. 2019SemEval-2019 Task 6: Identifying and Categorizing Offensive Language in Social Media (OffensEval)cited by 206
  8. 2017Deep Learning for Hate Speech Detection in Tweetscited by 180
  9. 2020SemEval-2020 Task 12: Multilingual Offensive Language Identification in Social Media (OffensEval 2020)cited by 138
  10. 2020ParsBERT: Transformer-based Model for Persian Language Understandingcited by 92
  11. 2020KUISAIL at SemEval-2020 Task 12: BERT-CNN for Offensive Speech Identification in Social Mediacited by 84
  12. 2017One-step and Two-step Classification for Abusive Language Detection on Twittercited by 46
9 more
  1. 2017Detecting Hate Speech in Social Mediacited by 42
  2. 2018Aggression-annotated Corpus of Hindi-English Code-mixed Datacited by 40
  3. 2020Developing a Multilingual Annotated Corpus of Misogyny and Aggressioncited by 31
  4. 2017Medical Text Classification using Convolutional Neural Networkscited by 19
  5. 2020Kungfupanda at SemEval-2020 Task 12: BERT-Based Multi-Task Learning for Offensive Language Detectioncited by 12
  6. 2020Galileo at SemEval-2020 Task 12: Multi-lingual Learning for Offensive Language Identification using Pre-trained Language Modelscited by 11
  7. 2020BRUMS at SemEval-2020 Task 12 : Transformer based Multilingual Offensive Language Identification in Social Mediacited by 10
  8. 2019UM-IU@LING at SemEval-2019 Task 6: Identifying Offensive Tweets Using BERT and SVMscited by 7
  9. 2020GUIR at SemEval-2020 Task 12: Domain-Tuned Contextualized Models for Offensive Language Detectioncited by 6

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 1.

2 papers.