=Paper=
{{Paper
|id=Vol-2633/paper9
|storemode=property
|title=
Identification of Offensive Language in Social Media
|pdfUrl=https://ceur-ws.org/Vol-2633/paper9.pdf
|volume=Vol-2633
|authors=Lutfiye Seda Mut Altin
}}
==
Identification of Offensive Language in Social Media
==
Identification of Offensive Language in Social Media Lutfiye Seda Mut Altin LaSTUS-TALN Research Group, DTIC Universitat Pompeu Fabra C/Tànger 122-140, 08018 Barcelona, Spain (lutfiyeseda.mut01@estudiant.upf.edu) Abstract: Recent work shows that offensive language in social media is a serious problem that affects especially vulnerable groups. Therefore, systems designed to detect offensive language automatically have been the focus of attention of several works. Various Machine Learning approaches have been utilised for the classifica- tion of offensive text data. Within the scope of this research we aim to develop a neural network system that will effectively classify offensive text considering diffe- rent aspects of it. In addition, multilingual and multi-task learning experiments are planned. Keywords: Offensive language, Social media, Neural network, Bi-LSTM Resumen: El uso de lenguaje ofensivo en las redes sociales es un problema que afecta especialmente a las personas vulnerables. Es por esta razón que el desarro- llo de sistemas automáticos para la detección de lenguaje ofensivo es una tarea de considerable importancia social. En esta investigación nos proponemos desarrollar sistemas basados en técnicas recientes de aprendizaje de maquina tales como las re- des neuronales para la clasificación de lenguaje ofensivo. Ası́ mismo nos proponemos realizar experimentos con datos multilingües (español e inglés) y la aplicación de técnicas multitarea que estén relacionadas con este problema. Palabras clave: Identificación de lenguaje ofensivo, Redes sociales, Redes neuro- nales, Bi-LSTM 1 Motivation and Background cit expressions. Automatic identification of offensive lan- Social media has become one of the most guage is essentially considered as a classifi- important environments for communication cation task. Previous research on the topic among people. As user-generated content on include approaches from different perspecti- social media increases significantly, so does ves, utilizing different data sets and focusing the harmful content such as offensive langua- on various contents such as abusive language ge. Aggressiveness in social media is a pro- (Waseem et al., 2017) (Chu, Jue, and Wang, blem that especially affects vulnerable groups 2016), hate speech (Davidson et al., 2017) (Hamm et al., 2015), (Kowalski and Limber, (Schmidt and Wiegand, 2017) (Fortuna and 2013). Within this context, the need for au- Nunes, 2018) and cyberbullying (Van Hee et tomatic detection of offensive content gains a al., 2018). lot of attraction. Where machine learning approaches are Traditional methods to detect offensive of concern, (Davidson et al., 2017) indicated language include use of blacklisted keywords using certain terms and lexicons are useful. and phrases based on profane words, regular (Zhang, Robinson, and Tepper, 2018) com- expressions, guidelines and human modera- pared different approaches and pointed out tors to manually review and detect unwan- that a deep neural network model combi- ted content. However, these methods are not ning convolutional neural network and long sufficient, particularly considering the users short-term memory network, performed bet- that tend to use more obfuscated and impli- ter than state of the art, including classifiers Lloret, E.; Saquete, E.; Martı́nez-Barco, P.; Sepúlveda-Torres, R. (eds.) Proceedings of the Doctoral Symposium of the XXXV International Conference of the Spanish Society for Natural Language Processing (SEPLN 2019), p. 50–55 Bilbao, Spain, September 25th 2019. Copyright c 2019 his paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). such as SVM. to shared task which is called ‘Categorizing There are several previous shared tasks Offensive Language in Social Media (SemE- similar to offensive language detection. The val 2019 - Task 6)’, focusing on identification shared task on Aggression Identification ca- of offensive language by considering type and lled ’TRAC’ provided participants a data- target of the offense into account (Zampieri set containing annotated Facebook posts and et al., 2019b). comments in English and Hindi (Kumar et This model consists of a bidirectio- al., 2018). Aiming to classify the text among nal Long Short-Term Memory Networks three classes including nonaggressive, co- (biLSTM) model with an Attention layer on vertly aggressive, and overtly aggressive. The top. The model captures the most important best-performing systems in this task used semantic information in a tweet, including deep learning approaches based on convolu- emojis and hashtags. A simplified schema of tional neural networks (CNN), recurrent neu- our model can be seen in the following figure. ral networks and LSTM (Majumder, Mandl, and others, 2018). The Spanish language has also been considered. For example, in the recent shared task, MEX-A3T 2018, regar- ding aggression detection in Mexican Spa- nish; among the methodologies proposed by participants, there were content based (bag of words, word n-grams, dictionary words, slang words etc.) and stylistic-based features (fre- quencies, punctuations, POS etc.) as well as approaches based on neural networks (CNN, Figura 1: Schema of the model LSTM and others); baselines were outper- formed by the most participants (Álvarez- First, the tweets were tokenized removing Carmona et al., 2018). Furthermore, other punctuation marks and keeping emojis and shared tasks focusing on aggression in other full hashtags because can contribute to defi- languages include Italian, German (Bosco et ne the meaning of a tweet. Second, the em- al., 2018),(Wiegand, Siegel, and Ruppenho- bedding layer transforms each element in the fer, 2018). One of the most recent shared task tokenized tweet (such as words, emojis and on the topic is “Categorizing Offensive Lan- hashtags) into a low-dimension vector. The guage in Social Media” (SemEval 2019 - Task embedding layer, composed of the vocabulary 6) (Zampieri et al., 2019b). Referring to the of the task, was randomly initialized from a problem in a hierarchichal scheme including uniform distribution (between -0.8 and 0.8 the target type of the offense. To classify of- values and with 300 dimensions). Recent stu- fensive text, about 70 % of the participants dies have reported that pre-trained word em- used deep learning approaches. Among the beddings are far more satisfactory than the top-10 teams, seven used BERT (Devlin et randomly initialized embeddings (Erhan et al., 2018). al., 2010; Kim, 2014). For that reason, the initialized embedding layer was updated with 2 Methodology and Proposed the word vectors included in a pre-trained Experiments model based on all the tokens, emojis and After an extensive literature review, collec- hashtags from 20M English tweets (Barbieri tion of additional previous datasets related et al., 2016), which were updated during the to the topic and preliminary experiments; we training. started to experiments through shared tasks Then, a biLSTM layer gets high-level fea- as described below. tures from previous embeddings. The LSTM were introduced by Hochreiter and Schmid- 2.1 Participation to ‘Categorizing huber (1997) and were explicitly designed Offensive Language in Social to avoid the longterm dependency problem. Media (SemEval 2019-Task 6)’ LSTM systems keep relevant information of A bi-LSTM neural network model that has inputs by incorporating a loop enabling data been developed (Altin, Serrano, and Saggion, to flow from one step to the following. LSTM 2019) within the context of the participation gets a word embedding sequentially, left to 51 right, at each time step, produces a hidden del. As we believe that the tasks of humor step and keeps its hidden state through time. and sentiment analysis could help in detec- Whereas, biLSTM does the same process as ting aggressive language, we have selected th- standard LSTM, but processes the text in a ree additional task to train with MEX-A3T left to right as well as right-to-left order in at the same time. The other tasks were IroS- parallel. Therefore, gives two hidden state as va, that aims investigating the recognition output at each step and is able to capture of irony in Twitter messages in three diffe- backwards and longrange dependencies. rent Spanish variants (from Spain, Mexico, A critical and apparent disadvantage of and Cuba); HAHA which we used the classi- seq2seq models (such as LSTM) is that they fication task related to identify if a Spanish compress all information into a fixed-length tweet is a joke or not and TASS 2019 that vector, causing the incapability of remembe- focuses on the evaluation of polarity classifi- ring long tweets. Attention mechanism aims cation systems of tweets written in Spanish. to overcome the limitation of fixed-length We used the data related to this task, tweets vector keeping relevant information from long written in the Spanish language spoken in tweet sequences. In addition, attention tech- Spain, Peru, Costa Rica, Uruguay and Me- niques have been recently demonstrated suc- xico, which were annotated with 4 different cess in multiple areas of the Natural Lan- levels of opinion intensity (Positive, Negati- guage Processing such as question answering, ve, Neutral and Nothing). machine translations, speech recognition and relation extraction (Bahdanau et al., 2014; Hermann et al., 2015; Chorowski et al., 2015; Zhou et al., 2016). For that reason, we added an attention layer, which produces a weight vector and merge word-level features from each time step into a tweet-level feature vec- tor, by multiplying the weight vector. Finally, the tweet-level feature vector produced by the previous layers is used for classification task by a fully-connected layer. Furthermore, we applied dropout regularization in order to alleviate overfitting. Dropout operation sets Figura 2: Simplified schema of the multi- task randomly to zero a proportion of the hid- model den units during forward propagation, crea- ting more generalizable representations of da- In this scenario, we defined an Embed- ta. As in Zhou et al. (2016), we employ dro- ding layer for each Spanish variant in IroSva pout on the embedding layer, biLSTM layer task. Classification tasks with the same Spa- and before the output layer. The dropout ra- nish variant used the same Embedding layer te was set to 0.5 in all cases. during the training process. Furthermore, all task shared the biLSTM layer during trai- 2.2 Experimenting with ning. For the moment this approach was not Multi-task Learning: Initial very successful; however this may be due to Experiments on lack of data to train the different models. Aggressiveness detection In this work, we presented a bi-LSTM model 3 Current work with two dense layers at the end. We have de- Despite the progress in this shared task, the- veloped a system in the context of the shared re are potential issues for the future work. task: MEX-A3T: Authorship and aggressive- Future experiments were planned mainly in ness analysis in twitter. Specifically, the Ag- 2 groups: gressiveness Identification track, which focu- First, improvement areas will be investi- ses on the detection of aggressive comments gated for the efficiency of the classification in tweets from Mexican users and the other model developed for SemEval 2019 - Task 6 related IberLEF 2019 shared tasks. shared task, with the same dataset that is We have used data from different tasks called Offensive Language Identification Da- in order to train more examples in the mo- taset (OLID) (Zampieri et al., 2019a). 52 Initial experiments have been done taking (particularly tweets and short messages) da- only the words into account. Using additio- tasets. nal features such as WordNet synsets, Part There are several published datasets be- of Speech (POS) tags, frequencies, offensive longing previous researches that is annota- word dictionaries and so on, is expected to ted as Offensive or within the similar con- improve the precision of the results. text such as cyberbullying, hate speech re- Furthermore, changes in the methodology lated, misogyny 1,2,3 .According to the speci- such as applying ’Bidirectional Encoder Re- fic annotation scheme and the content, hand- presentations from Transformers’ (Devlin et. crafted features might have an important pa- al,2018) is also another option. rameter for the performance. Experimenting Secondly, in a later phase of the study, on these previous datasets will help unders- it is planned to obtain a new dataset using tanding the strengths and weaknesses of dif- Twitter’s streaming API and crowdannota- ferent design specifications and features and tion and using the new dataset for the expe- eventually help optimization of them. riments including the metadata such as user- II.Experiments to improve the perfor- session time, whether it is a reply or a ret- mance of the current system with fine-tuned weet. system design and feature engineering. For this purpose, first of all, a set of spe- The neural network system for the initial cific hashtags will be decided with a high experiments took only words into account. potential of being associated with offensive However, there is a potential to improve the tweets. results of this system with additional feature After pulling the data and deciding the extraction. Furthermore, detailed analysis on annotation scheme, the data will be presented integration of linguistic annotations into neu- for crowd annotation. ral network and other models like convolution After compilation of a corpus, model trai- can be considered to improve the performan- ning will be carried out with the system given ce. the most promising results for the OLID da- III.Creating a new dataset with crowd an- taset. notation. There are several crowd annotation Additional improvements for the system platforms such as: Mechanical Turk4 , crowd- design and other potential features will be flower5 , crowdtruth6 . By uploading the da- experimented considering the performance of ta and deciding the rules of annotation these the preliminary tests. platforms help annotating the data by human annotators. 4 Specific Issues of Investigation To crowd-annotate tweet data, first of all, The main research questions that are inten- the data will be pulled from Twitter API ac- ded to answer with this work are as the fo- cording to certain hashtags. Hashtags will be llowing: decided for certain contexts such as political •What algorithms are those that provide debate hashtags or hashtags related to sporti- us with greater accuracy to identify offensive ve rivalry. After that, annotation schema will language in a text? be decided. Annotation schema of previous •What characteristics should be taken in- datasets are usually in hierarchical order and to account in the process of analysing text in contains additional information such as tar- terms of aggressiveness? get or for instance if it contains aggression •What type of metadata would be useful whether it is cyberbullying or not. to increase the accuracy while analysing the IV.Experiments on the new dataset with text? various approaches on the system and featu- •Finally, how would be the overall system res. for this classification task that will bring the A new dataset can give the opportunity to highest accuracy? 1 https://www.kaggle.com/alternacx/hateoffensive- 5 Thesis Objectives speechdetection 2 https://www.amnesty.org/en/ The main objectives of the research can be 3 https://zenodo.org/record/1184178.XTBv2pMzaRt listed as follows: 4 https://www.mturk.com/ I.Executing preliminary experiments to 5 https://www.figure-eight.com/ classify offensive messages in social media 6 http://crowdtruth.org/ 53 reproduce previous well-performed systems text. ACM Computing Surveys (CSUR), designed. Moreover, majority of the related 51(4):85. datasets published do not include metada- Hamm, M. P., A. S. Newton, A. Chisholm, ta. With the new dataset collected through J. Shulhan, A. Milne, P. Sundar, H. En- Twitter API it will be possible to obtain me- nis, S. D. Scott, and L. Hartling. 2015. tadata, as well. Therefore, user-related featu- Prevalence and effect of cyberbullying on res such as the frequency of profanity in pre- children and young people: A scoping re- vious messages can be obtained and it would view of social media studies. JAMA pe- help understand the importance of metadata diatrics, 169(8):770–777. on the performance. Kowalski, R. M. and S. P. Limber. 2013. References Psychological, physical, and academic co- Altin, L. S. M., À. B. Serrano, and H. Sag- rrelates of cyberbullying and traditional gion. 2019. Lastus/taln at semeval-2019 bullying. Journal of Adolescent Health, task 6: Identification and categorization 53(1):S13–S20. of offensive language in social media with Kumar, R., A. K. Ojha, S. Malmasi, and attention-based bi-lstm model. In Procee- M. Zampieri. 2018. Benchmarking ag- dings of the 13th International Workshop gression identification in social media. on Semantic Evaluation, pages 672–677. In Proceedings of the First Workshop Álvarez-Carmona, M. Á., E. Guzmán-Falcón, on Trolling, Aggression and Cyberbullying M. Montes-y Gómez, H. J. Escalante, (TRAC-2018), pages 1–11. L. Villasenor-Pineda, V. Reyes-Meza, and Majumder, P., T. Mandl, et al. 2018. Filte- A. Rico-Sulayes. 2018. Overview of mex- ring aggression from the multilingual so- a3t at ibereval 2018: Authorship and ag- cial media feed. In Proceedings of the First gressiveness analysis in mexican spanish Workshop on Trolling, Aggression and Cy- tweets. In Notebook Papers of 3rd SEPLN berbullying (TRAC-2018), pages 199–207. Workshop on Evaluation of Human Lan- guage Technologies for Iberian Languages Schmidt, A. and M. Wiegand. 2017. A sur- (IBEREVAL), Seville, Spain, volume 6. vey on hate speech detection using natural language processing. In Proceedings of the Bosco, C., D. Felice, F. Poletto, M. Sangui- Fifth International Workshop on Natural netti, and T. Maurizio. 2018. Overview Language Processing for Social Media, pa- of the evalita 2018 hate speech detection ges 1–10. task. In EVALITA 2018-Sixth Evaluation Campaign of Natural Language Processing Van Hee, C., G. Jacobs, C. Emmery, and Speech Tools for Italian, volume 2263, B. Desmet, E. Lefever, B. Verhoeven, pages 1–9. CEUR. G. De Pauw, W. Daelemans, and V. Hos- Chu, T., K. Jue, and M. Wang. 2016. te. 2018. Automatic detection of cyber- Comment abuse classification with deep bullying in social media text. PloS one, learning. Von https://web. stanford. 13(10):e0203794. edu/class/cs224n/reports/2762092. pdf Waseem, Z., T. Davidson, D. Warmsley, abgerufen. and I. Weber. 2017. Understanding Davidson, T., D. Warmsley, M. Macy, and abuse: A typology of abusive language I. Weber. 2017. Automated hate speech detection subtasks. arXiv preprint ar- detection and the problem of offensive lan- Xiv:1705.09899. guage. In Eleventh international aaai con- Wiegand, M., M. Siegel, and J. Ruppenhofer. ference on web and social media. 2018. Overview of the germeval 2018 sha- Devlin, J., M.-W. Chang, K. Lee, and K. Tou- red task on the identification of offensive tanova. 2018. Bert: Pre-training of language. deep bidirectional transformers for lan- Zampieri, M., S. Malmasi, P. Nakov, S. Ro- guage understanding. arXiv preprint ar- senthal, N. Farra, and R. Kumar. 2019a. Xiv:1810.04805. Predicting the type and target of offensi- Fortuna, P. and S. Nunes. 2018. A survey ve posts in social media. arXiv preprint on automatic detection of hate speech in arXiv:1902.09666. 54 Zampieri, M., S. Malmasi, P. Nakov, S. Ro- senthal, N. Farra, and R. Kumar. 2019b. Semeval-2019 task 6: Identifying and ca- tegorizing offensive language in social media (offenseval). arXiv preprint ar- Xiv:1903.08983. Zhang, Z., D. Robinson, and J. Tepper. 2018. Detecting hate speech on twitter using a convolution-gru based deep neural net- work. In European Semantic Web Confe- rence, pages 745–760. Springer. 55