# Nature-Inspired-Based Approach for Automated Cyberbullying Classification on Multimedia Social Networking

Authors: N. Yuvaraj; K. Srihari; Gaurav Dhiman; K. Somasundaram; Ashutosh Sharma; S. Rajeskannan; Mukesh Soni; Gurjot Singh Gaba; Mohammed A. AlZain; Mehedi Masud
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

In the modern era, the cyberbullying (CB) is an intentional and aggressive action of an individual or a group against a victim via electronic media. The consequence of CB is increasing alarmingly, affecting the victim either physically or psychologically. This allows the use of automated detection tools, but research on such automated tools is limited due to poor datasets or elimination of wide features during the CB detection. In this paper, an integrated model is proposed that combines both the feature extraction engine and classification engine from the input raw text datasets from a social media engine. The feature extraction engine extracts the psychological features, user comments, and the context into consideration for CB detection. The classification engine using artificial neural network (ANN) classifies the results, and it is provided with an evaluation system that either rewards or penalizes the classified output. The evaluation is carried out using Deep Reinforcement Learning (DRL) that improves the performance of classification. The simulation is carried out to validate the efficacy of the ANN-DRL model against various metrics that include accuracy, precision, recall, and f-measure. The results of the simulation show that the ANN-DRL has higher classification results than conventional machine learning classifiers.


---

## Body

## 1. Introduction

Cyberbullying (CB) is considered as a new or electronic form of traditional bullying [1]. CB is defined as a repetitive, intentional, and aggressive reaction committed by a group or an individual against another group or an individual, which is made by the utilization of Information Communication Technology (ICT) tools such as social media, Internet, and mobile phones [2]. The entire CB incidents are carried out virtually in Internet media rather than in physical form. The CB consists of hatred messages transmitted via social networking, e-mails, etc. through personal or public computers or through personal mobile phones. This has aroused as a serious threat among nations [1]. Various privacy-preserving tools are adopted in the Internet arena to protect the data; however, most mechanisms are challenged by the process of traffic classification [3], which is a vital workhorse for network management, where it becomes a key factor in assigning the privacy level to classify malign and benign standpoints [4]. This is true in case of testing the methods with a selected dataset on the Dark Web Forum Portal [5]. The CB consists of hatred messages transmitted via social networking, e-mails, etc. through personal or public computers or through personal mobile phones. This has aroused as a serious threat among nations [1].The research on previous studies considers CB as a distinct variant from the traditional bullying [2, 6]. The suggested variances between the CB and traditional bullying reveal the inadequacy of CB findings from conventional bullying [7]. Evidences found in [8] reveal that there exist several features of CB that vary between its prevalence rates, protective and risk factors, rick outcomes, and strategies adopted for its prevention. The CB features are partially related and partially distinct with conventional bullying [2, 9]. CB, on other hand, has impacted the victims psychologically and physically with its increasing prevalence, where most vulnerability is reported among youths [2].Hence, it is vital to detect the CB context and its applications to reduce the vulnerability. However, from the view of the cyber world, the application involving CB involves difficulties associated with ignorance of aggressors and their identity, lack of direct communication, and relating consequences over others [10–15].The failure to direct communication causes partial interpretation of the significance or the nature of the message, and it leads to confusion over the individual’s intentionality with exchange or interaction messages. In spite of the problems while identifying the behavioral intent of an individual, the major factor that creates transition from aggression to CB is the intention of harming oneself [16].In the current scenario, an automated behavior of social network platforms alerts the moderators to review the reported CB contents. However, most of the frameworks lacks an automated intelligent system that alerts the moderators and detects the contents in an automated way faster than the traditional reporting system. This enables the moderator to respond on the alert and take required action on reporting the user or removing the content [17].The major constraint existing on existing detection systems with CB research is the lack of input data. The existing research is carried out conventionally on available datasets or the surveyed data, where the perpetrators or the victims are allowed to report the impressions [18]. The other issue associated with automated CB detection is the proper operationalization on CB contents that considers only the available literatures in the CB detection field for achieving the aim of automated detection to accurately identify the events of CB. The other issue associated with automated CB detection is the proper operationalization on CB contents that considers only the available literature in the CB detection field for achieving the aim of automated detection to accurately identify the events of CB. This creates complexity in identifying the events, and hence, well-developed tools are essential in integrating the features with an automated decision model [19].Various research studies on automated cyberbullying detection with intelligent systems are reported in [8, 18, 20–28]. These studies utilized machine learning algorithms for automated detection of CB contents utilizing several common and psychological features. These intelligent systems on CB detection are reported to be low, and it is principally limited with the comment of an individual leaving the context. An existing study has reported utilization of the user context in action that involves the characteristics of users and history of user comments to improve the performance of CB detection/classification [17].In this paper, we utilize an integrated feature model that collects and trains the system with taking psychological features, user comments, and the context into consideration for CB detection. A classification engine using an artificial neural network (ANN) as impacted from [22] enables CB classification, and the operation on each classification is monitored by the reward-penalty model of a Deep Reinforcement Learning (DRL) engine.The study contributes to the following in the field of CB detection:(a)
The authors develop a series of frameworks that extracts the CB contexts from raw input messages. The study considers utilizing wide varied features to train the feature extraction module, and this involves the psychological traits, user comments, and context.(b)
The authors develop an integrated classification engine that combines an ANN with DRL to classify the CB contents and improve the results after each iteration based on the feedback obtained from the DRL mechanism. Here, the entire classification is carried out by the ANN algorithm, and the DRL provides state-action-reward for each classified results.The outline of the study is given as follows: Section2 discusses the related works. Section 3 provides the proposed classification engine. Section 4 evaluates the entire work. Section 5 concludes the work with possible directions of future scope;CBCyberbullyingANNArtificial Neural NetworkDRLDeep Reinforcement LearningSVMSupport Vector MachineNBNaïve BayesKNNk-nearest neighborRFRandom ForestLRLogistic Regression


## 2. Related Works

Nandhini and Sheeba [20] presented a detection technique to combat CB on social media. The study extracts features such as the noun, pronoun, and adjective obtained from the text and frequency of words occurrences. These features are used to classify various activities such as Harassment, Flaming, Terrorism, and Racism using a Fuzzy logic-based genetic algorithm. The relevant data are retrieved using the Fuzzy rule for classification, and the genetic algorithm increases the accuracy of classification by parametric optimization.Potha et al. [21] employed a Support Vector Machine (SVM) classifier to classify the CB based on various features such as local, sentimental, contextual, and gender-specific language features. The SVM classifier combined with a tf-idf measure and linear kernel identifies the online harassment.Kumar and Sachdeva [28] reviewed various studies and found both direct and indirect CB features have higher impacts on machine learning classification. The results of classification show that the SVM classifier has higher classification rate than other supervised/unsupervised learning methods.Al-garadi et al. [8] used the SVM [21, 28], naïve Bayes (NB) [25, 28], k-nearest neighbor (KNN), and random forest (RF) [25] classifier with various features extracted from the Twitter data that include network, activity and user information, and tweet content. The features are selected using the information gain, c2 test, and Pearson correlation. Furthermore, the classified results are optimized using a synthetic minority oversampling approach, and classes are balanced with weight adjustment in the dataset. The result shows that the RF has higher classification accuracy.Balakrishnan et al. [25] developed an automated detection model with Big Five and Dark Triad models for user personality determination. The classification is carried out with various machine learning classifiers, NB, RF, and J48, to detect bully, spammer, aggressor, and normal. The psychological features are selected from the twitter data for better tweet classification. The study confirmed that the user personalities on classification have higher impacts on detection than other traits.Murnion et al. [18] developed an Artificial Intelligence-based CB detection from an automated data collection system from the chat data of online multiplayer games. The sentiment text analytics system is supported with a scoring scheme for optimal classification. The study is assigned with eight descriptive attributes including IsAbusive, IsPositive, IsNegative, HasBadLanguage, IsRacist, NoobRelated, SpecificTarget, and FilteredText for potential identification of CB. The estimation of the CB score found that the both Twinword- and Microsoft-aware sentimental analysis were poor with less classification score.Ho et al. [27] used 90 features categorized into 10 classes and utilized it for classification using a logistic regression model. The detection is improved by training the model with 14 abusive words for reducing the false classification rate.Balakrishnan et al. [24] used an RF classifier with multiple decision trees, where classification is finally determined based on majority of votes. The study selects 15 twitter features [23] using Big Five and Dark Triad models to find the user personalities.Sánchez-Medina et al. [26] used ensemble classification trees with Dark Triad for identifying the personality trait. The study used psychopathy, narcissism, and abusive words and then n-grams, blacklists, and edit-distance metrics for the detection of obfuscated words. A three-layered neural network model is used finally for classification, which acts as an unsupervised learning model. The misclassification is reduced by employing a 1.5 million nonabusive words dataset which improves the classification using neural network.The abovementioned research used minimal features to classify the datasets, and furthermore, the CB word is treated as the seed word for DB detection. However, the CB word is a distinctive vocabulary that fails to cover all cases.Machiavellianism for potentially detecting the CB sexual assaults in social media: Lee et al. [22] used an embedded vector representation such as skip-gram word2vec that represents the words as vectors. The cosine similarity detects the new one.Balakrishnan et al. [24] used an RF classifier with multiple decision trees, where classification is finally determined based on majority of votes. The study selects 15 twitter features [23] using Big Five and Dark Triad models to find the user personalities.Sánchez-Medina, et al. [26] used ensemble classification trees with Dark Triad for identifying the personality trait. The study used psychopathy, narcissism, and machiavellianism for potentially detecting the CB sexual assaults in social media.Lee et al. [22] used an embedded vector representation such as skip-gram word2vec that represents the words as vectors. The cosine similarity detects the new abusive words and then n-grams, blacklists, and edit-distance metrics for the detection of obfuscated words. A three-layered neural network model is used finally for classification, which acts as an unsupervised learning model. The misclassification is reduced by employing a 1.5 million nonabusive words dataset which improves the classification using neural network.The abovementioned research used minimal features to classify the datasets, and furthermore, the CB word is treated as the seed word for DB detection. However, the CB word is a distinctive vocabulary that fails to cover all cases.


## 3. Proposed Method

In the present research, the entire focus is not on a specific CB word, but the vulgarity is determined based on weight score calculation and harmfulness index estimation for the entire word sequence (optimal words chosen by the feature selection method) of the collected tweets. This reduces well the cost of training data construction and further with the dependency between the phrases. The architecture of the proposed classification model is given in Figure1.Figure 1
Overview of the proposed system.We consider an annotated datasetD = {(xi, ∼ci)}, where xi are the twitter CB datasets and without label ∼ci. The datasets are divided into smaller subset L⊂D. The aim is to detect the CB instances from the twitter data that may vary from long to short paragraphs.


### 3.1. Preprocessing

The preprocessing method uses a lexical normalization method [29] that uses various components to clean the input tweet data. It further converts the numerical variables into an equivalent text data. The spell corrector component helps to reduce the outbound vocabulary terms, and in prior, the entire redundant or missing variables are cleaned that involve spelling errors, wrong punctuations, etc.


### 3.2. Feature Selection

The selection of features (given in Table1) from the input twitter datasets involves three different methods including Information Gain [30], chi-square χ2 [31], and Pearson correlation [32]. These methods are employed to select the features from the preprocessed datasets.Table 1
Selected attributes to classify the Tweets.
AttributesClassFormatNounCB/non-CBTextPronounCB/non-CBTextAdjectiveCB/non-CBTextLocal featuresThe basic features extracted from a tweetTextContextual featuresProfessional, religious, family, legal, and financial factors specific to CBTextSentiment featuresPositive or negative (foul words specific to CB) or direct or indirect CBTextEmotion featuresPolite words, modal words, unknown words, number of insults and hateful blacklisted words, harming with detailed description, power differential, any form of aggression, targeting a person, targeting two or more persons, intent, repetition, one-time CB, harm, perception, reasonable person/witness, and racist sentimentsTextGender-specific languageMale/femaleTextUser featureNetwork information, user information, his/her activity information, tweet content, account creation time, and verified account timeText/numericTwitter basic featuresNumber of followers, number of mentions, and number of following, favorite count, popularity, number of hash tags, and status countNumericLinguistic featuresOther languages words, punctuation marks, and abbreviated words rather than abusive sentence judgmentsText


#### 3.2.1. Information Gain

Decision tree algorithm is utilized to implement the feature extraction using information gain. The information gain is defined as the measure of entropy that is used widely in the machine learning domain. It acts as a statistical method that assigns the weights of features based on the correlation between the categories and the features. We consider a datasetS (s1, s2, …, sn), which is regarded as the collection of varying instances, say n s. t. A (A1, A2,…, Ap) is the attributes set for p, where C (c1, c2,…, cm) is regarded as the collection of different label categories m. p (ci) represents the ith-class label proportion with ci (i = 1, 2, …, m) in S. The dataset entropy is, thus, represented as(1)HC=−∑i=1mpcilog2pci.The information gain on each feature is defined used for classification of input data, whereAq (aq1, aq2,…, aqk) represents the qth attribute (q = 1, 2, …, p). The conditional entropy for an attribute Aq (aq1, aq2,…, aqk) is, thus, represented as(2)HC|Aq=−∑j=1kpaqj∑i=1mpci|aqjlog2pci|aqj,where aqj-Aq is the attribute value with a k value, p (aqj) is the probability of categorical variable C, and p (ci|aqj) is the conditional probability of C after the value of Aq is fixed.Then, information gain is estimated as the difference between the valueH (C) and H (C|Aq), and this offers the attribute value Aq as stated below:(3)IGAq=HC−HC|Aq.Usually, the higher the information gain is, the more vital the feature is then considered for classification.If the value of information gain is high, the feature is considered to be vital for the purpose of classification.


#### 3.2.2. Chi-Squareχ2

The chi-square statistics is used in feature extraction as an information theory function that helps in extraction of elements, saytk over a class ci. These elements are considered to be distributed widely and differently in sets of negative and positive examples of ci.(4)χ2tk,ci=NAD−CB2A+CB+DA+BC+D,where N- total documents; A- total documents in ci containing tk; B- total documents containing tk other than ci; C- total documents in ci without tk; and D- total documents without tk other than ci.The next step is the assignment of scores for eachci as discussed in the abovementioned equation, and the collective scores are summed into a single final score. The final score helps in classification of attributes, and the top score is selected.


#### 3.2.3. Pearson Correlation

The Pearson correlation coefficient in the present study is used for the estimation of optimal features by calculating the degree of linear correlation between the extracted class and original class.(5)simi=∑j=1NXj−X¯Yij−Y¯∑j=1NXj−X¯2∑j=1NYij−Y¯2,where simi- similarity between the ith class and original class of a dataset; Xj and Yij- selected attribute data to be tested on the ith class, X- and Y-average value of selected attribute data, and with the original class of a dataset, and finally, the entire attribute data are normalized.


### 3.3. ANN

Artificial neural networks [33] are trained with weights of input features as in Figure 2(a), and furthermore, it is trained by proper reduction of an error function. The selection of a reduced error function helps in classification in terms of reduced cross-entropy error as follows:(6)E=∑i=1nylogoN+1−ylog1−oN.Figure 2
(a) ANN architecture. (b) 3-layered ANN architecture
(a)(b)The size of the input twitter datasetD, for an ANN classification model P (y|x) is influenced by the selection of CB from D. The challenge of model building is to summarize the underlying distribution from the specific instance D of the samples. The problem with the memory of the dataset is known as overfitting rather than identifying the dataset distribution.An activation feature is considered as a real function that determines the value of the neuron returned. The present study uses inverse trigonometric functions as the activation function.Multilayer perceptron is the most frequent architecture of a feedforward neural network. The input layer, output layer, and hidden layer consist of at least three layers (Figure2(b)). The deep neural network (DNN) is a multilayered MLP. More precisely using fewer neurons, additional layers and, therefore, connections enable the modelling of rare dependencies in the training data [4]. Nevertheless, the DNN learning process can result in overfitting and declining performance [5].In the theory of ANN, the universal approximation theorem says that a single hidden layer of MLP is enough to estimate, with a certain accuracy, all compactly supported continuous real functions. In many cases, however, DNN predictions are more exact, as research shows [3], compared to those obtained by ANN networks.ANN changes weights depending on the degree of an error function during the training process to minimize the error. There are several different algorithms for training purposes. Depending on a particular problem, the algorithms may vary in performance [34].


### 3.4. DRL Algorithm for Reward-Penalty Decision

DRL [35, 36] consists of agents that access its actions and observations at a time to either reward or penalize the actions, i.e., the classification. The detailed steps are given in Algorithm 1, where DRL compares the classified results of the ANN with features extracted in the repository. If the observed and the original class are the same, then the classifier is rewarded, and vice versa.Algorithm 1:DRL algorithm.
Input: Eligibility trace decay term λ, learning rate α, number of objectives n, discounting term γ, a ⟵ action (r = reward or p = penalty), s ⟵ state, o ⟵ observerInitialize PopulationFor all states s, actions a and objectives o doInitialize Q (s, a, o)EndforEvaluate each member of the PopulationFor each epoch doFor all states s and actions a doe (s, a) = 0EndforObserve initial state stSelect action at based on an exploratory policy derived from Q (st))For each step of the episode doExecute action at, observe s′ find the vector as reward r or penalty sSelect action a∗ based on a greedy policy derived from Q (s′)Select action a′ based on an exploratory policy derived from Q (s′)For each objective o doδo = ro + γQ (s0, a∗, o) − Q (st, at, o)End forSet e (st, at) = 1For each state s and action a doFor each objective o dosetQ (s, a, o) = Q (s, a, o) +αδoe (s, a)End forIfa′ = a∗ thensete (s, a) =γλe (s, a)Elsesete (s, a) = 0EndifEndforst = s′, at = a′EndforThe executions of Algorithm1 are sent to the ANN that determines whether the unsupervised learning at each iteration is of a reward or a penalty one. This ensures that the classification of ANN-DRL is accurate and precise. Finally, the estimation of the harmfulness index [37] helps in the estimation of the CB detection as accurate or not.


## 3.1. Preprocessing

The preprocessing method uses a lexical normalization method [29] that uses various components to clean the input tweet data. It further converts the numerical variables into an equivalent text data. The spell corrector component helps to reduce the outbound vocabulary terms, and in prior, the entire redundant or missing variables are cleaned that involve spelling errors, wrong punctuations, etc.


## 3.2. Feature Selection

The selection of features (given in Table1) from the input twitter datasets involves three different methods including Information Gain [30], chi-square χ2 [31], and Pearson correlation [32]. These methods are employed to select the features from the preprocessed datasets.Table 1
Selected attributes to classify the Tweets.
AttributesClassFormatNounCB/non-CBTextPronounCB/non-CBTextAdjectiveCB/non-CBTextLocal featuresThe basic features extracted from a tweetTextContextual featuresProfessional, religious, family, legal, and financial factors specific to CBTextSentiment featuresPositive or negative (foul words specific to CB) or direct or indirect CBTextEmotion featuresPolite words, modal words, unknown words, number of insults and hateful blacklisted words, harming with detailed description, power differential, any form of aggression, targeting a person, targeting two or more persons, intent, repetition, one-time CB, harm, perception, reasonable person/witness, and racist sentimentsTextGender-specific languageMale/femaleTextUser featureNetwork information, user information, his/her activity information, tweet content, account creation time, and verified account timeText/numericTwitter basic featuresNumber of followers, number of mentions, and number of following, favorite count, popularity, number of hash tags, and status countNumericLinguistic featuresOther languages words, punctuation marks, and abbreviated words rather than abusive sentence judgmentsText


### 3.2.1. Information Gain

Decision tree algorithm is utilized to implement the feature extraction using information gain. The information gain is defined as the measure of entropy that is used widely in the machine learning domain. It acts as a statistical method that assigns the weights of features based on the correlation between the categories and the features. We consider a datasetS (s1, s2, …, sn), which is regarded as the collection of varying instances, say n s. t. A (A1, A2,…, Ap) is the attributes set for p, where C (c1, c2,…, cm) is regarded as the collection of different label categories m. p (ci) represents the ith-class label proportion with ci (i = 1, 2, …, m) in S. The dataset entropy is, thus, represented as(1)HC=−∑i=1mpcilog2pci.The information gain on each feature is defined used for classification of input data, whereAq (aq1, aq2,…, aqk) represents the qth attribute (q = 1, 2, …, p). The conditional entropy for an attribute Aq (aq1, aq2,…, aqk) is, thus, represented as(2)HC|Aq=−∑j=1kpaqj∑i=1mpci|aqjlog2pci|aqj,where aqj-Aq is the attribute value with a k value, p (aqj) is the probability of categorical variable C, and p (ci|aqj) is the conditional probability of C after the value of Aq is fixed.Then, information gain is estimated as the difference between the valueH (C) and H (C|Aq), and this offers the attribute value Aq as stated below:(3)IGAq=HC−HC|Aq.Usually, the higher the information gain is, the more vital the feature is then considered for classification.If the value of information gain is high, the feature is considered to be vital for the purpose of classification.


### 3.2.2. Chi-Squareχ2

The chi-square statistics is used in feature extraction as an information theory function that helps in extraction of elements, saytk over a class ci. These elements are considered to be distributed widely and differently in sets of negative and positive examples of ci.(4)χ2tk,ci=NAD−CB2A+CB+DA+BC+D,where N- total documents; A- total documents in ci containing tk; B- total documents containing tk other than ci; C- total documents in ci without tk; and D- total documents without tk other than ci.The next step is the assignment of scores for eachci as discussed in the abovementioned equation, and the collective scores are summed into a single final score. The final score helps in classification of attributes, and the top score is selected.


### 3.2.3. Pearson Correlation

The Pearson correlation coefficient in the present study is used for the estimation of optimal features by calculating the degree of linear correlation between the extracted class and original class.(5)simi=∑j=1NXj−X¯Yij−Y¯∑j=1NXj−X¯2∑j=1NYij−Y¯2,where simi- similarity between the ith class and original class of a dataset; Xj and Yij- selected attribute data to be tested on the ith class, X- and Y-average value of selected attribute data, and with the original class of a dataset, and finally, the entire attribute data are normalized.


## 3.2.1. Information Gain

Decision tree algorithm is utilized to implement the feature extraction using information gain. The information gain is defined as the measure of entropy that is used widely in the machine learning domain. It acts as a statistical method that assigns the weights of features based on the correlation between the categories and the features. We consider a datasetS (s1, s2, …, sn), which is regarded as the collection of varying instances, say n s. t. A (A1, A2,…, Ap) is the attributes set for p, where C (c1, c2,…, cm) is regarded as the collection of different label categories m. p (ci) represents the ith-class label proportion with ci (i = 1, 2, …, m) in S. The dataset entropy is, thus, represented as(1)HC=−∑i=1mpcilog2pci.The information gain on each feature is defined used for classification of input data, whereAq (aq1, aq2,…, aqk) represents the qth attribute (q = 1, 2, …, p). The conditional entropy for an attribute Aq (aq1, aq2,…, aqk) is, thus, represented as(2)HC|Aq=−∑j=1kpaqj∑i=1mpci|aqjlog2pci|aqj,where aqj-Aq is the attribute value with a k value, p (aqj) is the probability of categorical variable C, and p (ci|aqj) is the conditional probability of C after the value of Aq is fixed.Then, information gain is estimated as the difference between the valueH (C) and H (C|Aq), and this offers the attribute value Aq as stated below:(3)IGAq=HC−HC|Aq.Usually, the higher the information gain is, the more vital the feature is then considered for classification.If the value of information gain is high, the feature is considered to be vital for the purpose of classification.


## 3.2.2. Chi-Squareχ2

The chi-square statistics is used in feature extraction as an information theory function that helps in extraction of elements, saytk over a class ci. These elements are considered to be distributed widely and differently in sets of negative and positive examples of ci.(4)χ2tk,ci=NAD−CB2A+CB+DA+BC+D,where N- total documents; A- total documents in ci containing tk; B- total documents containing tk other than ci; C- total documents in ci without tk; and D- total documents without tk other than ci.The next step is the assignment of scores for eachci as discussed in the abovementioned equation, and the collective scores are summed into a single final score. The final score helps in classification of attributes, and the top score is selected.


## 3.2.3. Pearson Correlation

The Pearson correlation coefficient in the present study is used for the estimation of optimal features by calculating the degree of linear correlation between the extracted class and original class.(5)simi=∑j=1NXj−X¯Yij−Y¯∑j=1NXj−X¯2∑j=1NYij−Y¯2,where simi- similarity between the ith class and original class of a dataset; Xj and Yij- selected attribute data to be tested on the ith class, X- and Y-average value of selected attribute data, and with the original class of a dataset, and finally, the entire attribute data are normalized.


## 3.3. ANN

Artificial neural networks [33] are trained with weights of input features as in Figure 2(a), and furthermore, it is trained by proper reduction of an error function. The selection of a reduced error function helps in classification in terms of reduced cross-entropy error as follows:(6)E=∑i=1nylogoN+1−ylog1−oN.Figure 2
(a) ANN architecture. (b) 3-layered ANN architecture
(a)(b)The size of the input twitter datasetD, for an ANN classification model P (y|x) is influenced by the selection of CB from D. The challenge of model building is to summarize the underlying distribution from the specific instance D of the samples. The problem with the memory of the dataset is known as overfitting rather than identifying the dataset distribution.An activation feature is considered as a real function that determines the value of the neuron returned. The present study uses inverse trigonometric functions as the activation function.Multilayer perceptron is the most frequent architecture of a feedforward neural network. The input layer, output layer, and hidden layer consist of at least three layers (Figure2(b)). The deep neural network (DNN) is a multilayered MLP. More precisely using fewer neurons, additional layers and, therefore, connections enable the modelling of rare dependencies in the training data [4]. Nevertheless, the DNN learning process can result in overfitting and declining performance [5].In the theory of ANN, the universal approximation theorem says that a single hidden layer of MLP is enough to estimate, with a certain accuracy, all compactly supported continuous real functions. In many cases, however, DNN predictions are more exact, as research shows [3], compared to those obtained by ANN networks.ANN changes weights depending on the degree of an error function during the training process to minimize the error. There are several different algorithms for training purposes. Depending on a particular problem, the algorithms may vary in performance [34].


## 3.4. DRL Algorithm for Reward-Penalty Decision

DRL [35, 36] consists of agents that access its actions and observations at a time to either reward or penalize the actions, i.e., the classification. The detailed steps are given in Algorithm 1, where DRL compares the classified results of the ANN with features extracted in the repository. If the observed and the original class are the same, then the classifier is rewarded, and vice versa.Algorithm 1:DRL algorithm.
Input: Eligibility trace decay term λ, learning rate α, number of objectives n, discounting term γ, a ⟵ action (r = reward or p = penalty), s ⟵ state, o ⟵ observerInitialize PopulationFor all states s, actions a and objectives o doInitialize Q (s, a, o)EndforEvaluate each member of the PopulationFor each epoch doFor all states s and actions a doe (s, a) = 0EndforObserve initial state stSelect action at based on an exploratory policy derived from Q (st))For each step of the episode doExecute action at, observe s′ find the vector as reward r or penalty sSelect action a∗ based on a greedy policy derived from Q (s′)Select action a′ based on an exploratory policy derived from Q (s′)For each objective o doδo = ro + γQ (s0, a∗, o) − Q (st, at, o)End forSet e (st, at) = 1For each state s and action a doFor each objective o dosetQ (s, a, o) = Q (s, a, o) +αδoe (s, a)End forIfa′ = a∗ thensete (s, a) =γλe (s, a)Elsesete (s, a) = 0EndifEndforst = s′, at = a′EndforThe executions of Algorithm1 are sent to the ANN that determines whether the unsupervised learning at each iteration is of a reward or a penalty one. This ensures that the classification of ANN-DRL is accurate and precise. Finally, the estimation of the harmfulness index [37] helps in the estimation of the CB detection as accurate or not.


## 4. Results

In this section, we present the details of the experiments using the collected datasets and the performance metrics. The study has selected 30,384 tweets collected from the twitter datasets [4]. The tweets contain both CB and non-CB tweets, where automated labelling or tagging is carried out using feature selection methods. The tagging of CB and non-CB is made based on various attributes as mentioned in Table 1, which is a common trait used in online communication over social networks. The input tweet data are, hence, classified as CB and non-CB, where the former indicates the vulnerable behavior and the latter indicates genuine behavior. Out of 30,384, more than 1252 tweets are classified as CB datasets; however, the labelled data are not used to train the classifier. These labelled data act as an input for the DRL method, which rewards or penalizes the ANN mechanism. The entire datasets have more imbalanced classes that penalize the unsupervised ANN with inaccurate results in identifying the relevant instances. The ANN, on other hand, with imbalanced classes, ignores minor classes, and it performs well with major classes.The weight adjustment approach helps to avoid oversampling of the minority class, i.e., abnormal class and undersampling the majority class, i.e., the normal class. The entire set of experiments is conducted with the topmost algorithms performed well in existing methods that include the ANN, SVM, RF, and LR. These existing methods are compared with ANN-DRL to find the classification accuracy. As in [8], the present study utilized three feature selection methods, namely, information gain, χ2, and Pearson correlation techniques. A 10-fold cross validation is conducted, and the proposed classifier is tested individually with all three feature selection methods.The performance is estimated against various metrics that include accuracy, F-measure, geometric mean (G-mean), percentage error, precision, sensitivity, and specificity. The details of the metrics are given below.Accuracy is defined as the total number of predictions required to ensure that the system works correctly. It is estimated as the ratio of the total number of correct predictions and the total predictions; .(7)Accuracy=TP+TNTP+TN+FP+FN.Here, TP is the true positive cases, where the model classifies the CB classes correctly. TN is the true negative cases, where the model classifies the non-CB classes correctly. FP is the false positive cases, where the model wrongly classifies the CB classes correctly. FN is the false negative cases, where the model wrongly classifies the non-CB classes correctly.F-measure is the weighted harmonic mean of the recall and precision values, which ranges between zero and one. Higher value of F-measure refers to higher classification performance.(8)F−measure=2TP2TP+FP+FN.G-mean is defined as the aggregation of sensitivity and specificity measure, which intends to maintain the trade-off between them, especially when the dataset is found to be imbalanced. This is measured as follows:(9)G−mean=TPTP+FN×TNTN+FP.Mean Absolute Percentage error (MAPE) is defined as the measure of prediction accuracy that measures the total loss while predicting the actual classes. It is measured as the ratio of the difference between the actual (At) and predicted class (Ft), and the actual class. The entire value is multiplied by 100% and divided by the fitted points (n). The formula for the percentage error is defined as follows:(10)MAPE=100n∑t=1nAt−FtAt.Sensitivity is defined as the ability of the deep learning model to identify correctly the true positive rate.(11)Sensitivity=TPTP+FN.Specificity is defined as the ability of the deep learning model to identify correctly the true negative rate.(12)Specificity=TNTN+FP.


### 4.1. Analysis

This section provides the results of classification as in following tables. The proposed ANN-DRL is validated and compared with existing methods, namely, the ANN, SVM, RF, LR, and NB. The results of predicting the CB are validated against 60%, 75%, and 90% training data with various feature extraction methods: information gain,χ2, and Pearson correlation techniques.Figures3–5 show the results of training the feature selection method with 60%, 75%, and 90% of training data and presenting the classification accuracy of the proposed classifier. The result shows that the Pearson correlation has the highest classification accuracy than information gain and χ2. The result further shows that, at some point, with increasing the number of residuals, the classification accuracy using information gain as a feature selection tool drops the most compared with chi-squared and Pearson correlation. Therefore, the class of CB is determined accurately with Pearson correlation and ANN-DRL as the classifier;Figure 3
Comparison of feature selection methods with 60% training data.Figure 4
Comparison of feature selection methods with 75% training data.Figure 5
Comparison of feature selection methods with 90% training data.Tables2–4 show the results of predicting the CB over 60%, 75%, and 90% of training data with information gain as a feature selection tool. Tables 5–7 show the results of predicting the CB over 60%, 75%, and 90% of training data with χ2 tool. Tables 8–10 show the results of predicting the CB over 60%, 75%, and 90% of training data with Pearson correlation tool. The results of simulation show that the proposed method has higher classification accuracy than the existing classifiers. It is further inferred that the Pearson correlation has optimal selection of features that has boosted the classification accuracy with 90% training data than 75% or 60% datasets. The other metrics show optimal performance for Pearson correlation than the other feature selection tools. Furthermore, the MAPE of the ANN-DRL is lesser than that of the other methods (Table 11).Table 2
Results of predicting the CB with 60% training data with information gain.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy56.89057.19059.28059.54160.90181.688F-measure39.61441.71452.94853.10855.47984.869G-mean73.75573.98675.48675.52675.93686.790MAPE29.55026.60925.20922.62822.04817.346Sensitivity62.96266.47374.37686.76087.42097.464Specificity75.39675.58679.09779.11780.48881.328Table 3
Results of predicting the CB with 75% training data with information gain.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy97.67498.39498.42498.50498.51498.644F-measure53.58870.94471.26574.14677.37780.578G-mean83.09983.94985.57087.13092.17293.692MAPE28.13026.73923.96821.29711.83491.332Sensitivity69.91471.30574.07676.75686.21089.811Specificity97.74498.53498.73498.81498.83498.894Table 4
Results of predicting the CB with 90% training data with information gain.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy97.12497.14497.15497.24497.26497.324F-measure78.59778.72779.24780.32881.00881.298G-mean80.64880.88881.15882.15882.47882.669MAPE32.37132.01131.49129.88029.38029.060Sensitivity65.67366.03366.55368.16468.66468.984Specificity95.93395.99396.03397.26497.67498.024Table 5
Results of predicting the CB with 60% training data withχ2.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy57.48060.09162.45263.82267.06385.900F-measure67.96368.01368.90470.02475.05680.618G-mean44.72557.65060.68145.92677.30787.200MAPE20.59717.92617.83612.98411.65410.504Sensitivity77.44780.12880.21885.05986.40087.550Specificity74.60677.48778.42781.58883.58985.680Table 6
Results of predicting the CB with 75% training data withχ2.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy98.94498.96498.98498.98498.99498.994F-measure90.41191.84291.99292.50292.71293.352G-mean94.48397.88498.43498.73498.87498.874MAPE87.86028.24021.47710.50455.84922.228Sensitivity90.16196.79397.89498.47498.75498.764Specificity97.97497.99497.99497.99497.99498.634Table 7
Results of predicting the CB with 90% training data withχ2.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy98.58498.58498.66498.66498.68498.734F-measure87.10087.22089.16189.19190.55190.561G-mean95.24395.24395.61395.68396.01396.053MAPE72.01571.83563.94262.61255.25954.579Sensitivity91.74291.74292.55292.68293.42293.492Specificity98.67498.68498.77498.77498.86498.864Table 8
Results of predicting the CB with 60% training data with Pearson correlation.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy60.29167.07370.09475.30679.14783.629F-measure70.90471.15571.32571.50576.06681.608G-mean71.20571.43573.15575.21677.67780.428MAPE69.33465.69358.97040.85437.99336.142Sensitivity78.73772.36573.08574.85675.05681.908Specificity71.61573.49576.56681.79883.10983.519Table 9
Results of predicting the CB with 75% training data with Pearson correlation.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy95.18395.33395.41395.46395.64395.653F-measure59.47161.26161.60162.06163.59263.732G-mean80.35880.86881.39881.62882.73983.199MAPE31.13130.40029.51029.16027.32926.509Sensitivity66.91367.64368.53468.89470.71471.545Specificity96.46396.62396.63396.68396.72396.773Table 10
Results of predicting the CB with 90% training data with Pearson Correlation.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy98.65398.65398.73398.73398.75398.803F-measure87.16187.28189.22389.25390.61490.625G-mean95.30995.30995.68095.75096.08096.120MAPE72.06571.88563.98762.65655.29854.617Sensitivity91.80691.80692.61792.74793.48793.558Specificity98.74398.75398.84398.84398.93398.933Table 11
Summary of various methods on cyberbullying.
AuthorsFeatures usedClassifierNandhini and Sheeba [20]Noun, pronoun, and adjectiveFuzzy logic-based genetic algorithmPotha et al. [21]Local, sentimental, contextual, and gender-specific language featuresSVMKumar and Sachdeva [28]Direct and indirect CB featuresSVMAl-garadi et al. [8]Network, activity and user information, and tweet contentSVM[28]Network, activity and user information, and tweet contentNaïve Bayes (NB)[25]Network, activity and user information, and tweet contentk-nearest neighbor (KNN) and random forest (RF)Balakrishnan et al. [25]Psychological featuresNB, RF, and J48Murnion et al. [18]IsAbusive, IsPositive, IsNegative, HasBadLanguage, IsRacist, NoobRelated, SpecificTarget, and FilteredTextSentiment text analytics system is supported with a scoring schemeHo et al. [27]Abusive wordsLogistic regression modelBalakrishnan et al. [24]15 twitter features [23]RF classifierSánchez-Medina et al. [26]Psychopathy, narcissism, and machiavellianismEnsemble classification treesLee et al. [22]New abusive wordsThree-layered neural network modelTo test the efficacy of ANN algorithm in the proposed method, we validate the algorithm with a 3000 test dataset and present a confusion matrix. Here, the 3000 test samples are picked randomly from the overall datasets, which is not native to the trained datasets. A 10-fold cross validation is conducted to test the ANN with the DRL scheme. The result shows that the classified results have 1740 TP cases, 1030 TN cases, 160 FN, and 70 FP cases, which is evident from Table12.Table 12
Confusion matrix on a 3000 test dataset.
ActualPredicted CBPresentAbsentTotalPresentTP (1740)FN (160)1900AbsentFP (70)TN (1030)1100Predicted CB181011903000Depending on the execution results, we found the computational complexity of the ANN-DRL is lesser than that of the existing machine learning methods on detecting the cyberbullying contents. However, the complexity increases with increased layers of the neural network and increased iterations on DRL. It is found that the ANN-DRL is O (nl + en + n3 + nlayers) for training and O (l + en + n3 + nlayers) for testing, where n is the training samples, l is the features, and +nlayersis the total number of hidden layers with n neurons. The ANN has O (nl + nlayers) for training and O (l + nlayers) for testing, and SVM has O (n2l + n3) for training and O (nsvl) for testing, where nsv is the support vectors. RF has O (n2√l ntrees) for training and O (lntrees) for testing, where ntrees is the total trees in random forest. LR has O (l2n + l3) for training and O (l) for testing, and NB has O (nl) for training and O (l) for testing.However, researchers are now trying to apply their proposed methods on this problem [38–49].


## 4.1. Analysis

This section provides the results of classification as in following tables. The proposed ANN-DRL is validated and compared with existing methods, namely, the ANN, SVM, RF, LR, and NB. The results of predicting the CB are validated against 60%, 75%, and 90% training data with various feature extraction methods: information gain,χ2, and Pearson correlation techniques.Figures3–5 show the results of training the feature selection method with 60%, 75%, and 90% of training data and presenting the classification accuracy of the proposed classifier. The result shows that the Pearson correlation has the highest classification accuracy than information gain and χ2. The result further shows that, at some point, with increasing the number of residuals, the classification accuracy using information gain as a feature selection tool drops the most compared with chi-squared and Pearson correlation. Therefore, the class of CB is determined accurately with Pearson correlation and ANN-DRL as the classifier;Figure 3
Comparison of feature selection methods with 60% training data.Figure 4
Comparison of feature selection methods with 75% training data.Figure 5
Comparison of feature selection methods with 90% training data.Tables2–4 show the results of predicting the CB over 60%, 75%, and 90% of training data with information gain as a feature selection tool. Tables 5–7 show the results of predicting the CB over 60%, 75%, and 90% of training data with χ2 tool. Tables 8–10 show the results of predicting the CB over 60%, 75%, and 90% of training data with Pearson correlation tool. The results of simulation show that the proposed method has higher classification accuracy than the existing classifiers. It is further inferred that the Pearson correlation has optimal selection of features that has boosted the classification accuracy with 90% training data than 75% or 60% datasets. The other metrics show optimal performance for Pearson correlation than the other feature selection tools. Furthermore, the MAPE of the ANN-DRL is lesser than that of the other methods (Table 11).Table 2
Results of predicting the CB with 60% training data with information gain.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy56.89057.19059.28059.54160.90181.688F-measure39.61441.71452.94853.10855.47984.869G-mean73.75573.98675.48675.52675.93686.790MAPE29.55026.60925.20922.62822.04817.346Sensitivity62.96266.47374.37686.76087.42097.464Specificity75.39675.58679.09779.11780.48881.328Table 3
Results of predicting the CB with 75% training data with information gain.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy97.67498.39498.42498.50498.51498.644F-measure53.58870.94471.26574.14677.37780.578G-mean83.09983.94985.57087.13092.17293.692MAPE28.13026.73923.96821.29711.83491.332Sensitivity69.91471.30574.07676.75686.21089.811Specificity97.74498.53498.73498.81498.83498.894Table 4
Results of predicting the CB with 90% training data with information gain.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy97.12497.14497.15497.24497.26497.324F-measure78.59778.72779.24780.32881.00881.298G-mean80.64880.88881.15882.15882.47882.669MAPE32.37132.01131.49129.88029.38029.060Sensitivity65.67366.03366.55368.16468.66468.984Specificity95.93395.99396.03397.26497.67498.024Table 5
Results of predicting the CB with 60% training data withχ2.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy57.48060.09162.45263.82267.06385.900F-measure67.96368.01368.90470.02475.05680.618G-mean44.72557.65060.68145.92677.30787.200MAPE20.59717.92617.83612.98411.65410.504Sensitivity77.44780.12880.21885.05986.40087.550Specificity74.60677.48778.42781.58883.58985.680Table 6
Results of predicting the CB with 75% training data withχ2.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy98.94498.96498.98498.98498.99498.994F-measure90.41191.84291.99292.50292.71293.352G-mean94.48397.88498.43498.73498.87498.874MAPE87.86028.24021.47710.50455.84922.228Sensitivity90.16196.79397.89498.47498.75498.764Specificity97.97497.99497.99497.99497.99498.634Table 7
Results of predicting the CB with 90% training data withχ2.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy98.58498.58498.66498.66498.68498.734F-measure87.10087.22089.16189.19190.55190.561G-mean95.24395.24395.61395.68396.01396.053MAPE72.01571.83563.94262.61255.25954.579Sensitivity91.74291.74292.55292.68293.42293.492Specificity98.67498.68498.77498.77498.86498.864Table 8
Results of predicting the CB with 60% training data with Pearson correlation.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy60.29167.07370.09475.30679.14783.629F-measure70.90471.15571.32571.50576.06681.608G-mean71.20571.43573.15575.21677.67780.428MAPE69.33465.69358.97040.85437.99336.142Sensitivity78.73772.36573.08574.85675.05681.908Specificity71.61573.49576.56681.79883.10983.519Table 9
Results of predicting the CB with 75% training data with Pearson correlation.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy95.18395.33395.41395.46395.64395.653F-measure59.47161.26161.60162.06163.59263.732G-mean80.35880.86881.39881.62882.73983.199MAPE31.13130.40029.51029.16027.32926.509Sensitivity66.91367.64368.53468.89470.71471.545Specificity96.46396.62396.63396.68396.72396.773Table 10
Results of predicting the CB with 90% training data with Pearson Correlation.
Statistical parametersNBLRRFSVMANNANN-DRLAccuracy98.65398.65398.73398.73398.75398.803F-measure87.16187.28189.22389.25390.61490.625G-mean95.30995.30995.68095.75096.08096.120MAPE72.06571.88563.98762.65655.29854.617Sensitivity91.80691.80692.61792.74793.48793.558Specificity98.74398.75398.84398.84398.93398.933Table 11
Summary of various methods on cyberbullying.
AuthorsFeatures usedClassifierNandhini and Sheeba [20]Noun, pronoun, and adjectiveFuzzy logic-based genetic algorithmPotha et al. [21]Local, sentimental, contextual, and gender-specific language featuresSVMKumar and Sachdeva [28]Direct and indirect CB featuresSVMAl-garadi et al. [8]Network, activity and user information, and tweet contentSVM[28]Network, activity and user information, and tweet contentNaïve Bayes (NB)[25]Network, activity and user information, and tweet contentk-nearest neighbor (KNN) and random forest (RF)Balakrishnan et al. [25]Psychological featuresNB, RF, and J48Murnion et al. [18]IsAbusive, IsPositive, IsNegative, HasBadLanguage, IsRacist, NoobRelated, SpecificTarget, and FilteredTextSentiment text analytics system is supported with a scoring schemeHo et al. [27]Abusive wordsLogistic regression modelBalakrishnan et al. [24]15 twitter features [23]RF classifierSánchez-Medina et al. [26]Psychopathy, narcissism, and machiavellianismEnsemble classification treesLee et al. [22]New abusive wordsThree-layered neural network modelTo test the efficacy of ANN algorithm in the proposed method, we validate the algorithm with a 3000 test dataset and present a confusion matrix. Here, the 3000 test samples are picked randomly from the overall datasets, which is not native to the trained datasets. A 10-fold cross validation is conducted to test the ANN with the DRL scheme. The result shows that the classified results have 1740 TP cases, 1030 TN cases, 160 FN, and 70 FP cases, which is evident from Table12.Table 12
Confusion matrix on a 3000 test dataset.
ActualPredicted CBPresentAbsentTotalPresentTP (1740)FN (160)1900AbsentFP (70)TN (1030)1100Predicted CB181011903000Depending on the execution results, we found the computational complexity of the ANN-DRL is lesser than that of the existing machine learning methods on detecting the cyberbullying contents. However, the complexity increases with increased layers of the neural network and increased iterations on DRL. It is found that the ANN-DRL is O (nl + en + n3 + nlayers) for training and O (l + en + n3 + nlayers) for testing, where n is the training samples, l is the features, and +nlayersis the total number of hidden layers with n neurons. The ANN has O (nl + nlayers) for training and O (l + nlayers) for testing, and SVM has O (n2l + n3) for training and O (nsvl) for testing, where nsv is the support vectors. RF has O (n2√l ntrees) for training and O (lntrees) for testing, where ntrees is the total trees in random forest. LR has O (l2n + l3) for training and O (l) for testing, and NB has O (nl) for training and O (l) for testing.However, researchers are now trying to apply their proposed methods on this problem [38–49].


## 5. Conclusions

In this paper, an integrated model using an ANN and DRL is designed for the classification of CB from raw text datasets of a social media engine. The extraction of psychological features, user comments, and the context has enabled better classification performance, where an ANN at the initial stage performs with improved classification results. The addition of a reward-penalty system using DRL has enhanced the classification to a much greater level than the ANN model. The simulation results illustrate the improved average classification accuracy of 80.69% using ANN-DRL than existing three-layered ANN (77.40%), SVM (75.44%), RF (75.55%), LR (75.10%), and NB (75.19%). In future, the convolutional neural network can be applied on image datasets to extract the information to serve the purpose on reducing the cyberbullying. [50] [49]



---

*Source: 6644652-2021-02-23.xml*