In this paper, a novel PTS-GReLU-GRU classifier is proposed for the identification and classification of cyberbullying and cyberflashing content. In this system, image and text features are extracted, and the cyberbullying and cyberflashing content are classified from the extracted features. Finally, the harmfulness of the content is predicted. The proposed system’s block diagram is rendered below as Fig. 1.
Block diagram of the proposed methodology.
Image pre-processing
Image pre-processing is the process of enhancing the image quality and removing unwanted information from the input image. The input images \(\left( P \right)\) are obtained from a cyberflashing image data set. These input images \(\left( P \right)\) are pre-processed by using the contrast enhancement and noise removal technique.
Figure 1 shows the block diagram of the proposed multimodal framework for detecting cyberbullying and cyberflashing. The process begins with image preprocessing, where contrast enhancement and noise removal improve the quality of input images. Human subjects are then detected using YOLOv3, and skin regions are identified through the YCbCr color model. In parallel, text data is cleaned through tokenization, stopword removal, and stemming. From both image and text, relevant features are extracted and then refined using the I-CapSA algorithm, which filters out redundant information and retains the most useful patterns. The combined features are passed to the enhanced PTS-GReLU-GRU classifier for accurate detection, while harmfulness levels are finally predicted using LE-ANFIS. This figure illustrates how the proposed system integrates visual and textual information into a single, end-to-end pipeline.
Contrast enhancement
The contrast enhancement process enhances the luminous variation between the object and background of the input images by using the Histogram Equalization (HE) algorithm28. HE enhances the pixel brightness of the image. Intensity transformation is used to enhance the pixel of an image; thereafter, HE was applied. Initially, the histogram of the input image \(his\left( {P_{q} } \right)\) is calculated by,
$$his\left( {P_{q} } \right) = n_{q} \,\,\,\,\,\,for\,\,q = \,0,1,2,3,…Q – 1$$
(1)
where, \(P_{q}\) denotes the \(q^{th}\) intensity level of the pixel of the input image \(\left( {Q – 1} \right)\), and \(n_{q}\) represents the number of pixels in the \(q^{th}\) intensity level. The probability density function of the pixel \(\rho \left( {P_{q} } \right)\) is expressed as,
$$\rho \left( {P_{q} } \right) = \frac{{his\left( {P_{q} } \right)}}{n}$$
(2)
Here, \(n\) represents the number of pixels. Next, the cumulative distribution function \(C\left( {P_{q} } \right)\) is calculated by,
$$C\left( {P_{q} } \right)\, = \,\sum\limits_{q = 0}^{Q – 1} {\rho \left( {P_{q} } \right)}$$
(3)
After that, the HE transformation function \(TF\left( {P_{q} } \right)\) is determined by,
$$TF\left( {P_{q} } \right) = \,Q – 1\sum\limits_{q = 0}^{Q – 1} {C\left( {P_{q} } \right)}$$
(4)
Based on the transformation function \(TF\left( {P_{q} } \right)\), the contrast-enhanced images \(\chi_{en}\) are obtained, and it is expressed by,
$$\chi_{en} = \left\{ {\chi_{1} ,\chi_{2} ,\chi_{3} …..\chi_{a} } \right\}\,$$
(5)
where,\(\chi_{a}\) denotes the number of contrast-enhanced images.
Noise removal
In this phase, the noise is removed from the contrast-enhanced images \(\chi_{en}\) by using the median filter. The median filter is the non-linear filtering approach often utilized for removing salt and pepper noise from the image, and it preserves edges and loss of information in the image. The value of the noisy image is substituted by the median value of the neighborhood mask. The image’s median filter is calculated in the below equation29,
$$R\left( {s,t} \right) = M\left[ {\chi_{en}^{{}} \left( {s,t} \right)_{i,j} } \right]\,\,i,j \in W$$
(6)
Here, \(\chi_{en}^{{}} \left( {s,t} \right)\) and \(R\left( {s,t} \right)\) represent the number of real images and noise-removed images \(\left( {i,j} \right)\) at \(\left( {s,t} \right)\) coordinates. \(M\) represents the median value and \(W\) represents the neighborhood value of the 2D mask. Finally, the \(r\)-number of noise-removed images \(R_{img}\) is expressed as,
$$R_{img} = \left\{ {R_{1} ,R_{2} ,R_{3} ,…,R_{r} } \right\}$$
(7)
Human detection
In this section, human presence in the noise-removed images is detected by using the YOLOv3 model. YOLOv3 is a real-time object detection algorithm that effectively detects objects in images.This algorithm separates the image into grid cells, and each grid cell predicts information about the bounding box.Then, the objectness score of the bounding box is calculated by,
$$\alpha_{i}^{j} = obj\left( {i,j} \right)*\left( {IOU} \right)_{p}^{t}$$
(8)
where, \(\alpha_{i}^{j}\) represents the objectness score of the \(j^{th}\) bounding box of the \(i^{th}\) grid cell, \(obj\left( {i,j} \right)\) denotes the object function, and \(\left( {IOU} \right)_{p}^{t}\) signifies the intersection over the union betwixt the predicted bounding box \(\left( p \right)\) and truth bounding box \(\left( t \right)\). Then, each bounding box position is detected based on the prediction, and it is expressed in the below formula27.
$$bb_{x} = \,\sigma \left( {p_{x} } \right) + d_{x}$$
(9)
$$bb_{y} = \,\sigma \left( {p_{y} } \right) + d_{y}$$
(10)
where, \(bb_{x}\), \(bb_{y}\) represent the positions \(\left( {x,y} \right)\) of the bounding box,\(\sigma\) is the sigmoid function, and \(p_{x}\),\(p_{y}\) denote the predictions based on the grid cell’s top left corner of the image \(\left( {d_{x} ,d_{y} } \right)\). Then, the height \(\left( {\beta_{h} } \right)\) and width \(\left( {\beta_{w} } \right)\) of the predicted bounding box are calculated by,
$$bb_{h} = \beta_{h} e^{{p_{h} }}$$
(11)
$$bb_{w} = \beta_{w} e^{{p_{w} }}$$
(12)
where, \(p_{h}\) ,\(p_{w}\) denote the prediction parameters. Based on this objectness score, height, and width parameters, the model successfully determined the presence of a human in the image. The \(m\)-human-detected images \(\gamma_{H}\) are defined as,
$$\gamma_{H} = \gamma_{1} ,\gamma_{2} ,\gamma_{3} ,…,\gamma_{m}$$
(13)
Skin analysis
The amount of skin visible in the image is determined from \(\gamma_{H}\) by using the YCbCr color model. Here, Y represents the luminous component, and the two chrominance components are Cb and Cr, which represent the difference between the blue and the red components. The RGB consists of red, green, and blue components. RGB-based images are converted into YCbCr for detecting skin in the image. The conversion of RGB to YCbCr is determined in the equation below30.
$$Y\, = \,0.299R + 0.587G + 0.114B$$
(14)
Thereafter, a comparison is made between the standard skin pixel value and the pixel values obtained after converting the image to the YCbCr color space. Here, white pixels are identified as the skin pixels, and black pixels are identified as other pixels. Finally, the skin-analyzed images \(\left( {\lambda_{skin} } \right)\) are obtained, and it is represented by,
$$\lambda_{skin} = \left\{ {\lambda_{1} ,\lambda_{2} ,\lambda_{3} ,…,\lambda_{s} } \right\}$$
(17)
where, \(\lambda_{s}\) represents the number of skin analyzed images. Then, the image based on the pixel value \(\left( {AN} \right)\) is annotated and is expressed as,
$$AN = \left\{ \begin{gathered} CB\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,WP \ge 50\% \hfill \\ NCB\,\,\,\,\,\,\,\,\,\,\,\,WP < 50\% \hfill \\ \end{gathered} \right\}$$
(18)
Here, \(\,\,WP \ge 50\%\) represents that over 50% of the white pixels presented in the images are annotated as a Cyberbullying image, and \(WP < 50\%\) represents that under 50% of the white pixels presented in the images are annotated as a Non-Cyberbullying image.
Feature extraction
The features of the skin analyzed images \(\left( {\lambda_{skin} } \right)\), such as texture, haar, Region Of Interest, Grey Level Co-occurrence Matrix, Contrast, Correlation, energy, edge, mean, variance, skewness, kurtosis, and homogeneity are extracted by using feature extraction technique. The extracted features \(\delta_{ext}\) are expressed as,
$$\delta_{ext} = \left\{ {\delta_{1} ,\delta_{2} ,\delta_{3} ,…,\delta_{f} } \right\}$$
(19)
Here, \(\delta_{f}\) represents the number of features in \(\left( {\lambda_{skin} } \right)\).
Text pre-processing
The cyberbullying dataset, hate speech offensive language dataset, and multilingual hate speech dataset are input into the Text pre-processing Technique. Text preprocessing is the NLP technique that consists of tokenization, stop word removal, and stemming techniques to improve the classification.
Tokenization
Tokenization is the process of breaking the text into individual words or tokens31. These words are the basic unit of tokenization. Tokenization helps convert unstructured text into structured text, making it easier to understand.For example , “I Love India” is split into individual words like ‘I’, ‘Love’, and ‘India’. Therefore, the input texts are split into words, and the split words \(\left( {{\lambda\kern-8pt^{-}}_{Tok} } \right)\) are obtained.
Stop word removal
It is the process of removing commonly used words in all text and documents. The removal of stop words conveys only the main content of the text. The common stop words are ‘and’, ‘is’, ‘of’, etc. Here, stop words are removed from the tokenized text \({\lambda\kern-8pt^{-}}_{Tok}\). Finally, stop word removed texts \({\lambda\kern-8pt^{-}}_{SR}\) are obtained as,
$${\lambda\kern-8pt^{-}}_{Tok} \mathop{\longrightarrow}\limits^{removed\,SW}{\lambda\kern-8pt^{-}}_{SR}$$
(20)
Stemming
Stemming is one of the NLP techniques, which reduces the word to the root form of the text. It is used to normalize the text and retrieve the information and text mining applications. It removed suffixes like ‘ed’ and ‘ing’ from the text. From the \({\lambda\kern-8pt^{-}}_{SR}\) text, stemmed words \({\lambda\kern-8pt^{-}}_{St}\) are obtained.
$${\lambda\kern-8pt^{-}}_{Tok} \mathop{\longrightarrow}\limits^{Stemmed}{\lambda\kern-8pt^{-}}_{St}$$
(21)
Data grouping
In this phase, stemmed words \({\lambda\kern-8pt^{-}}_{St}\) from the Cyberbullying dataset, Hate speech offensive language data set, and multi-lingual hate speech dataset are merged by using Dice’s Coefficient String similarity technique. This technique is used to measure the similarity between the datasets. It is often used in comparing the similarity between two strings. The Dice’s Coefficient String similarity \(\Gamma\) is determined by the following equation,
$$\Gamma = \frac{{2*\left[ {CB\left( {\lambda\kern-8pt^{-}} \right) \cap OL\left( {\lambda\kern-8pt^{-}} \right) \cap ML\left( {\lambda\kern-8pt^{-}} \right)} \right]}}{{CB\left( {\lambda\kern-8pt^{-}} \right) + OL\left( {\lambda\kern-8pt^{-}} \right) + ML\left( {\lambda\kern-8pt^{-}} \right)}}$$
(22)
where, \(CB\left( {\lambda\kern-8pt^{-}} \right)\) represents the stemmed word in the cyber-bullying dataset, \(OL\left( {\lambda\kern-8pt^{-}} \right)\) is the stemmed word in the Hate speech offensive language dataset, and \(ML\left( {\lambda\kern-8pt^{-}} \right)\) implies the stemmed word in the multi-lingual hate speech dataset. Based on this score value, both data set words are merged. Finally, merged data \(\hbar_{mer}\) are obtained.
Feature extraction
In this section, text features are extracted from the merged data \(\hbar_{mer}\). The text features, such as Pragmatic features (Emoticons and Smileys), Hyperbolic features (Interjection, Punctuation marks, Quotes, Adjectives, and Adverbs), Lexical features (Unigram, Bigram, trigram, and Ngram), TF-IDF, POS, Information Gain, ChiSquare, and Pearson Correlation features are extracted. The extracted text features \(\phi_{ext}\) are expressed by,
$$\phi_{ext} = \left\{ {\phi_{1} ,\phi_{2} ,\phi_{3} ,…,\phi_{tf} } \right\}$$
(23)
Here, \(\phi_{tf}\) denotes the number of text features.
Feature selection
In this section, important features are selected from the extracted features \(\delta_{ext}\) and \(\phi_{ext}\) by using I-CapSA. The conventional CapSA is centered on the Capuchin monkey’s food-searching behavior. It can effectively search for food in global and local search spaces based on the jumping and swinging mechanism. Therefore, this algorithm is perfectly suited for selecting the best feature of the image. However, it only considers the difference between the velocity and time, which leads to local optima problems. To overcome this problem, the proposed methodology incorporates the Interpolation technique in the CapSA. The interpolation technique is well-suited for complex or high-dimensional problems. Furthermore, it makes the optimization process more efficient and cost-effective. Likewise, the interpolation technique provides smoother approximations, enhances exploration, and offers flexibility and improved analysis. Therefore, the interpolation technique is chosen to solve the local optima problems. The I-CapSA-based feature selection is derived by,
Step 1: Initialization
Initialize the population of Capuchin monkeys (image features \(\delta_{ext}\) and text features \(\phi_{ext}\)), and the position of each capuchin is allocated by,
$$\partial C^{u} = UB_{v} + \phi *\left[ {UB_{v} – LB_{v} } \right]$$
(24)
where, \(\partial C^{u}\) represents the position of the \(u^{th}\) capuchin, and \(UB_{v}\),\(LB_{v}\) denote the upper and lower bounds of the \(u^{th}\) capuchin in the \(v^{th}\) dimension, respectively.
Step 2: Fitness evaluation
The fitness function of each capuchin is deemed as high classification accuracy. The fitness function \(\left( {FF} \right)\) is defined as,
$$FF = \max \left[ {Acc} \right]$$
(25)
Here, \(\max \left[ {Acc} \right]\) represents the maximum classification accuracy.
Step 3: Update position
The Alpha capuchin (leader) jumps on trees from one branch to another branch of the tree. So, the position of the alpha capuchin and the balance betwixt exploration and exploitation during the search space are expressed as,
$$\partial C_{u}^{v} \, = \,\frac{{f_{v} + \psi_{PB} \left( {\vartheta_{u}^{v} } \right)^{2} {\text{Sin}} 2\theta }}{Gf}$$
(26)
$$\theta = \frac{3}{2}e$$
(27)
$$\eta = B_{0} \exp \left[ { – B_{1} \left( {\frac{T}{{T_{\max } }}} \right)^{{B_{2} }} } \right]$$
(28)
where, \(\partial C_{u}^{v}\) represents the position of the alpha capuchin, \(f_{v}\) is the position of the food, \(\psi_{PB}\) is the probability of balance rendered by the tail of the capuchin, \(\vartheta_{u}^{v}\) is the velocity of the capuchin, \(Gf\) denotes the gravitational force, \(\theta\) is the jumping angle of the capuchin, \(e\) represents the random number, \(\eta\) represents the lifetime exponential function, \(T\) represents the current iteration as the maximum iteration \(T_{\max }\), and \(B_{0}\),\(B_{1}\), and \(B_{2}\) represent the arbitrary vectors. After that, the velocity of the \(u^{th}\) capuchin in the \(v^{th}\) dimension is calculated by using the Interpolation technique, and it is expressed as,
$$\vartheta_{u}^{v} = \tau \vartheta_{u}^{v} + \eta Q_{1} \left[ {\frac{{\partial C_{best}^{u} – \,\,\partial C_{u}^{v} }}{{\partial C_{u}^{v} – \,\,\partial C_{best}^{u} }}} \right]z_{1} + \eta Q_{2} \left[ {\frac{{f_{v} – \partial C_{u}^{v} }}{{\partial C_{u}^{v} – f_{v} }}} \right]z_{2}$$
(29)
where, \(\partial C_{best}^{u}\) represents the best position of the \(u^{th}\) capuchin,\(Q_{1}\),\(Q_{2}\) denote the constant value, \(z_{1}\) \(z_{2}\) is the random number, and \(\tau\) represents the inertia co-efficient, which controls the influence of previous velocity. Then, the alpha capuchin jumps on the ground to search for food from one place to another, and the position of the alpha capuchin is updated as,
$$\partial C_{u}^{v} \, = \,\frac{{f_{v} + \psi_{PE} \psi_{PB} \left( {\vartheta_{u}^{v} } \right)^{2} {\text{Sin}} 2\theta }}{Gf}$$
(30)
Here, \(\psi_{PE}\) depicts the elasticity probability of the Capuchin movement. Then, the position is updated by using normal walking, and it is calculated in the below formula,
$$\partial C_{u}^{v} = \partial C_{u}^{v} + \vartheta_{u}^{v}$$
(31)
Then, the capuchin’s swinging motion is used to search for food on tree branches, and the position of the capuchin is updated by,
$$\partial C_{u}^{v} \, = \,f_{v} + \eta \psi_{PB} *{\text{Sin}} 2\theta$$
(32)
Alpha capuchin climbs the tree with other capuchins for foraging in local search. Then, the capuchins’ position is tracked by,
$$\partial C_{u}^{v} \, = \,f_{v} + \eta \psi_{PB} \left[ {\vartheta_{u}^{v} – \vartheta_{u}^{v – 1} } \right]$$
(33)
Here, \(\vartheta_{u}^{v – 1}\) represents the previous velocity of the \(u^{th}\) capuchin in the \(v^{th}\) dimension. After that, the position of the capuchin is randomly relocated to enhance the global search for food, and it is computed by,
$$\partial C_{u}^{v} \, = \,\eta *\left[ {LB_{v} + \varepsilon *\left( {UB_{v} – LB_{v} } \right)} \right]$$
(34)
where, \(\varepsilon\) represents the positive constant. Then, the position of follower capuchin is updated as per the position of alpha capuchin, and it is expressed by,
$$\partial C_{u}^{v} \, = \,\frac{1}{2}\left[ {\partial C_{u}^{v} \left( l \right) + \partial C_{u}^{v – 1} } \right]$$
(35)
where, \(\partial C_{u}^{v} \left( l \right)\) is the leader capuchin’s current position and \(\partial C_{u}^{v – 1}\) illustrates the previous position of the follower capuchin in the \(v – 1\) dimension. Finally, the position of the capuchin is updated until it reaches the maximum iteration. By repeating this process, the best features \(\left( {\delta_{best} } \right)\) are obtained.

Pseudocode for I-CapSA algorithm.
To further strengthen the feature selection stage, the proposed framework integrates textual and visual features into a unified representation. This integration, optimized through I-CapSA, is described in the following subsection.
Integration of textual and visual features
In this phase, the selected text features (pragmatic, hyperbolic, lexical) and the extracted image features (texture, Haar, GLCM, ROI, etc.) are combined for multimodal analysis. Dice’s Coefficient String similarity technique is first applied to align and merge textual and visual data, ensuring that the context is preserved across both modalities. Once integrated, I-CapSA is employed to optimize the feature space by selecting the most discriminative attributes. Unlike conventional CapSA, which depends primarily on velocity and time factors during the search process, I-CapSA incorporates an interpolation mechanism. This enhancement improves exploration in high-dimensional spaces, prevents the algorithm from getting trapped in local optima, and accelerates convergence. By doing so, I-CapSA ensures that the multimodal features fed into the classifier are both compact and highly representative, thereby strengthening the overall performance of cyberbullying and cyberflashing detection.
Word embedding
The optimized multimodal feature set obtained through the integration and I-CapSA process in Section “Integration of textual and visual features” is then forwarded to the embedding and classification stages for effective cyberbullying and cyberflashing detection.
In this section, the stemmed words \({\lambda\kern-8pt^{-}}_{St}\) are given as input to the Cell State-Cyber BERT (CS-Cyber BERT) word embedding process. Word embedding is the process of converting the text format of words into a vector format. The Cyber BERT is well known for the word embedding technique. Each word has a unique vector representation value, and it captures the meaning of the word. However, the encoding scheme in Cyber BERT may be less adaptable for rapidly evolving cybersecurity threats. To avoid this issue, the Cell State (CS) technique is employed in CyberBERT. Here, the cell state technique improved the contextual understanding and provided a more accurate encoding of data than the other techniques. The cell state technique encodes the word from the input text, and it is expressed by,
$${\lambda\kern-8pt^{-}}_{St} \mathop{\longrightarrow}\limits^{encode}{\lambda\kern-8pt^{-}}_{en}$$
(36)
Here, \({\lambda\kern-8pt^{-}}_{en}\) denotes the encoded text. After that, a similar word has a similar vector value. The vector representation of an encoded word is performed by using the Cyber BERT technique, and it is determined by,
$${\lambda\kern-8pt^{-}}_{vect} = \,BT\left( {{\lambda\kern-8pt^{-}}_{en} } \right)_{b}$$
(37)
where, \({\lambda\kern-8pt^{-}}_{vect}\) represents the vector representation of the words, \(BT\) is the Cyber BERT transformation function, and \(b\) denotes the word index.
Classifier
In this phase, the best features \(\left( {\delta_{best} } \right)\) and the vector representation of the words \(\left( {{\lambda\kern-8pt^{-}}_{vect} } \right)\) are inpu to the PTS-GReLU-GRU classifier for classifying the cyber flashing images and cyberbullying text. The GRU has 2 types of gating mechanisms (Update gate and reset gate) that control the flow of information in the network, and it solves the gradient vanishing problem32. However, it has an overfitting problem. To address this issue, the proposed model developed with PTS-GReLU-GRU, includes the Power Transform Scaling technique. Here, the Power Transform Scaling technique can stabilize the variance of input features. Also, this approach avoids the risk of overfitting problems by ensuring that the model does not highly rely on features with skewed distributions or varying scales that affect the model’s generalization performance. To improve the classification process, the proposed model utilizes the GReLU activation function. Here, the GReLU activation function reduces the dead neurons, improves the gradient flow, and effectively handles the input variability better than the other activation functions, thereby improving the classification process. The schematic diagram of PTS-GReLU-GRU is given below.
Figure 2 explains the architecture of the proposed PTS-GReLU-GRU classifier. This model builds on the standard GRU by introducing two enhancements: Power Transformer Scaling (PTS) and Gaussian ReLU (GReLU). The PTS layer normalizes and scales the input features, allowing the classifier to handle data variations more effectively. Meanwhile, GReLU enhances gradient flow and helps prevent vanishing gradient issues. Within the GRU, the update gate, reset gate, and candidate hidden state are shown, demonstrating how information is selectively retained or discarded across time steps. These modifications make the classifier more robust in learning sequential patterns from multimodal inputs, leading to improved detection accuracy.

Schematic diagram of PTS-GReLU-GRU.
Step 1: The features and vector representation of words at each time step are denoted as \(\left( {\delta_{best} } \right)_{t}\) and \(\left( {{\lambda\kern-8pt^{-}}_{vect} } \right)_{t}\).
Step 2: The reset gate determines how much information is transmitted to the next step. The reset gate at each time step \(RS_{t}\) is determined by,
$$RS_{t} = \sigma *\varphi \,\left[ {\omega \left( {RS} \right)*\left( {\delta_{best} } \right)_{t} *\left( {{\lambda\kern-8pt^{-}}_{vect} } \right)_{t} + \omega \left( {RS} \right)*HS_{t – 1} } \right]$$
(38)
where, \(\sigma\) is the sigmoid function, \(\omega\) is the weight parameter, \(HS_{t – 1}\) specifies the hidden state at the previous time step, and \(\varphi\) represents the power transformer scaling value, and it is determined by,
$$\begin{gathered} \varphi^{k} = \left\{ \begin{gathered} \frac{{\varphi^{k} – 1}}{{k\left( {M_{g} \left( \varphi \right)} \right)^{k – 1} }}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,if\,\,\,\,k \ne 0 \hfill \\ M_{g} \left( \varphi \right)\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,if\,\,\,k = 0 \hfill \\ \end{gathered} \right\} \hfill \\ \hfill \\ \end{gathered}$$
(39)
where, \(k\) denotes the power parameter, and \(M_{g}\) represents the geometric mean.
Step 3: The update gate determines how much information is merged with the previous information, and it eliminates the risk of the gradient vanishing problem. The update gate at each time step \(U_{t}\) is determined in the below equation,as determined in12
$$U_{t} = \sigma \left[ {\omega \left( U \right)*\left( {\delta_{best} } \right)_{t} *\left( {{\lambda\kern-8pt^{-}}_{vect} } \right)_{t} + \omega \left( U \right)*HS_{t – 1} } \right]$$
(40)
Step 4: Then, the candidate hidden state is computed by integrating the reset gate, update gate, and hidden state with the GReLU activation function. The candidate’s hidden state \(HS_{t} ^{\prime}\) is determined by,
$$HS_{t} ^{\prime} = \,\Re \left[ {\omega \left( {\delta_{best} } \right)_{t} *\left( {{\lambda\kern-8pt^{-}}_{vect} } \right)_{t} + RS_{t} \Theta \omega \left( U \right)*HS_{t – 1} } \right]$$
(41)
$$\Re \left( x \right) = \frac{1}{{\sqrt {2\pi \sigma } }}\max \left( {0,\exp \left[ {\frac{{\left( {x – \mu } \right)^{2} }}{{2\sigma^{2} }}} \right]} \right)$$
(42)
Here, \(\Re\) is the GReLu activation function, and \(\Theta\) denotes the element-wise product between the reset and update gate.
Step 5: Finally, the output sequence obtained from the hidden state \(HS_{t}\) is expressed by,
$$HS_{t} = U_{t} \Theta HS_{t – 1} + \left( {1 – U_{t} } \right)\Theta HS_{t} ^{\prime}$$
(43)
$$HS_{t} \, = \,\left\{ \begin{gathered} CF_{img} ,CB_{txt} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,U_{t} = 1 \hfill \\ NCF_{img} ,NCB_{txt} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,U_{t} \ne 1 \hfill \\ \end{gathered} \right\}$$
(44)
Here, if the update gate value is equal to one, then the image and text are classified as the cyber flashing image \(CF_{img}\) and cyberbullying text \(CB_{txt}\). But, if it is not equal to one, then the images and text are classified as non-cyber flashing images \(NCF_{img} \,\,\) and non-cyber bullying text \(NCB_{txt}\).

Pseudo code for PTS-GReLU-GRU.
Harmful level prediction
The harmful level of each cyber flashing image \(CF_{img}\) and cyberbullying text \(CB_{txt}\) is predicted by using the LE-ANFIS algorithm. ANFIS is a rule-based algorithm, and it knows both numerical and linguistic texts; so, the model easily identifies the patterns. However, it has a complexity in normalizing the firing strength used in the output layer. To tackle this issue, the proposed model incorporates the Log Entropy technique in the ANFIS algorithm. Here, the Log Entropy technique handles the variations in firing strengths more robustly. Also, it efficiently compresses a wide range of firing strengths into a more manageable scale, thereby reducing the complexity of normalizing the firing strength used in the output layer. The LE-ANFIS algorithm is derived by,
Layer 1
The LE-ANFIS model consists of two inputs (pixel value of \(CF_{img}\) and \(CB_{txt}\)), five layers, and one output \(\left( {HL} \right)\). Fuzzification is performed by using the membership function. The fuzzy membership grades of the input pixel are expressed by,
$$\begin{gathered} L_{1} = \upsilon \left( {Z_{CF} } \right)_{i,j} \,\,\,\,\,\,\,\,\, \hfill \\ L_{1} = \upsilon \left( {Z_{CB} } \right)_{i,j} \hfill \\ \end{gathered}$$
(45)
where, \(L_{1}\) represents the output of layer 1, \(\upsilon\) denotes the membership function, \(Z_{CF}\) is the pixel value of the cyber flashing image, \(Z_{CB}\) is the pixel value of the cyberbullying text, and \(i,j\) represents the pixel coordinates.
Layer 2
The second layer is the rule layer, which generates rules with weight parameters. The weight parameter is assigned with output of the layer 1. The output of the second layer \(L_{2}\) is defined by,
$$L_{2} = W_{{}} \left[ {\upsilon \left( {Z_{CF} } \right)_{i,j} *\upsilon \left( {Z_{CB} } \right)_{i,j} } \right]$$
(46)
$$W = J\left( {Z_{CF} } \right) + K\left( {Z_{CB} } \right)$$
(47)
where, \(W\) represents the weight value of the layer, \(J,K\) represent the design parameters, and \(\upsilon\) denotes the membership function.
Layer 3
The third layer normalizes the second layer’s output by dividing the weight values. The output of the third layer \(L_{3}\) is determined by,
$$L_{3} = \frac{W}{{W_{1} + W_{2} }}$$
(48)
Layer 4
The fourth layer comprises weight values, design parameters, and the output of the previous layer. The Log Entropy technique is applied in this layer. The output of the fourth layer \(L_{4}\) is expressed by,
$$L_{4} = \log \left( W \right) – \rho \left( {J_{1} \left( {Z_{CF} } \right) + K_{1} \left( {Z_{CB} } \right)*\log \left( {J_{1} \left( {Z_{CF} } \right) + K_{1} \left( {Z_{CB} } \right)} \right)} \right)$$
(49)
where, \(J_{1} ,K_{1}\) is the design parameter of the first-order polynomial.
Layer 5
The fifth layer computes all the four layers’ output by summing up all the inputs. The fifth layer’s output is expressed by,
$$L_{5} = \frac{{\sum\limits_{n = 1}^{2} {W_{n} L_{4} } }}{{\sum\limits_{n = 1}^{2} {W_{n} } }}$$
(50)
where, \(W_{n}\) represents the number of weight values. The harmful level is predicted centered on the output value of the fifth layer. The harmful level of each cyber flashing image \(CF_{img}\) and cyberbullying text \(CB_{txt}\) is predicted by the following conditions,
$$HL = \left\{ \begin{gathered} low\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,0 < L_{5} < 30 \hfill \\ medium\,\,\,\,\,\,\,\,\,\,\,\,\,30 < L_{5} < 65 \hfill \\ high\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,65 < L_{5} \le 100 \hfill \\ \end{gathered} \right\}$$
(51)
Finally, harmful levels of cyber flashing images \(CF_{img}\) and cyberbullying text \(CB_{txt}\) are predicted as low, medium, and high levels.
