Fine-grained Categorization of�Aggressive Texts on Social Media using Weighted�Ensemble of Transformers
Presented By
Omar Sharif
ID No.: 18MCSE001P
Supervised By
Dr. Mohammed Moshiul Hoque
Professor, Dept. of CSE
CUET
1
Department of CSE, CUET
Contents
2
Department of CSE, CUET
Introduction
Aggressive Text Classification: Task of assigning potential texts into predefined aggression categories such as religious, political, verbal, gendered etc.
Necessity,
3
Department of CSE, CUET
Introduction
Impractical to manually monitor and moderate,
Solution,
4
Department of CSE, CUET
Motivation
5
Department of CSE, CUET
Challenges
6
Department of CSE, CUET
Related Work
7
Department of CSE, CUET
Related Work
8
Department of CSE, CUET
Summary of the Existing Works in Bengali
Method | Task | Limitations | Dataset |
BERT variants [Karim et al . 2021] | 4 hatred classes (political, personal, geopolitical, religious) | - Fails during overlap of hatred classes | - 3000 Bengali texts |
XLM-R [ Ranasinghe et al. 2020] | 3 aggressive classes (overt, covert, non-aggressive) | - Do not able to capture semantics of the Bengali | - 4000 Bengali texts |
CNN [ Emon et al. 2019] | Classify texts into one of 7 abusive classes | - Could not hold the information of long texts | - 7200 Bengali texts |
SVM [Chakraborty et al. 2019] | Detect threat and abusive texts | - Loss of semantic information - Suffers from OOV words | |
9
Department of CSE, CUET
Research Gap
10
Department of CSE, CUET
Contributions
11
Department of CSE, CUET
Contribution 1
Development of Novel Bengali Aggressive Text Dataset
12
Department of CSE, CUET
Definition of the Task
[9] Sharif, O. and Hoque, M.M., “Identification and Classification of Textual Aggression in Social Media: Resource Creation and Evaluation”. Combating Online Hostile Posts in Regional Languages during Emergency Situation, pp.9-20, 2021
13
Department of CSE, CUET
Definition of the Task
[9] Sharif, O. and Hoque, M.M., “Identification and Classification of Textual Aggression in Social Media: Resource Creation and Evaluation”. Combating Online Hostile Posts in Regional Languages during Emergency Situation, pp.9-20, 2021
14
Department of CSE, CUET
Dataset Development Steps
Fig 1. Bengali Aggressive Text Dataset development steps
[7] B. Vidgen, L. Derczynski,: Directions in abusive language training data, a systematic review: Garbage in, garbage out, PLOS ONE 15 (12) (2021) 1–32.
15
Department of CSE, CUET
Dataset Development Steps
Table 1. Statistics of few sources from where data were gathered
16
Department of CSE, CUET
Dataset Development Steps
Fig 2. Annotation guidelines
17
Department of CSE, CUET
Dataset Development Steps
18
Department of CSE, CUET
Dataset Statistics
Table 2. Kappa score on each level of annotation
19
Department of CSE, CUET
Dataset Statistics
Table 3. Summary of the train, validation and test set
20
Department of CSE, CUET
Dataset Statistics
Table 4. Statistics of the training set. Here MTL, ANW, ANUW stands for maximum text length, average number of words and average number of unique words respectively
21
Department of CSE, CUET
Dataset Statistics
Table 5:Some examples of BAD. Level-A and level-B indicates coarse and fine-grained class labels.
[9] Sharif, O. and Hoque, M.M., “Identification and Classification of Textual Aggression in Social Media: Resource Creation and Evaluation”. Combating Online Hostile Posts in Regional Languages during Emergency Situation, pp.9-20, 2021.
[16] Sharif, O. and Hoque, M.M., “Tackling Cyber-Aggression: Identification and Fine-Grained Categorization of Aggressive Texts on Social Media using Weighted Ensemble of Transformers”. Neurocomputing, vol 474, pp. 82-102, 2021.
22
Department of CSE, CUET
Contribution 2
Development of Computational Models to Perform Fine-grained Categorization
23
Department of CSE, CUET
Baseline Methods
Fig 3. Abstract process diagram of Bengali aggressive text identification and categorization system.
BAD
24
Department of CSE, CUET
Baseline Methods
Fig 4. Schematic Diagram of Baseline Systems
Processed Texts
Input Texts
Feature Extraction
Preprocessing
LR (‘lbfgs’, ‘l2’, c=1.0)
RF (100, ‘gini’)
NB ( x=1.0)
SVM (c=0.5)
Classifier Model
Prediction
Approach 1
Approach 2
Approach 3
(Uni, Bigram)+Tf-idf
CNN
🡪 2 layer
🡪 Filters = 128, 64
🡪 Kernel size = 3
🡪 Pooling type = max
🡪 Window size = 3
Approach 4
BiLSTM
🡪 2 layers
🡪 LSTM cell = 128, 64
🡪 Dropout rate = 0.2
Approach 5
CNN+BiLSTM
🡪 1 layer CNN
🡪 Filters 128, Kernel = 3
🡪 2 LSTM Layer= 64, 32
🡪 Dropout rate = 0.2
Transformers
(4 BERT models)
🡪 learning rate 2e-5
🡪 epochs(20)
🡪 batch size 12
🡪auto_fit method
25
Department of CSE, CUET
Hyperparameters
Table 6. Parameter summary of machine learning models
26
Department of CSE, CUET
Hyperparameters
Table 7. Hyperparameter summary of deep learning models
27
Department of CSE, CUET
Hyperparameters
Table 8. Fine-tuned parameter values of transformers
28
Department of CSE, CUET
Ensemble Approach
29
Department of CSE, CUET
A-Ensemble
Compute the average of the softmax prob
Output: Class with max prob
BAD
30
Department of CSE, CUET
Contribution 3
Proposed Weighted Ensemble Approach
31
Department of CSE, CUET
W-Ensemble
Offer additional weights to the participating models based on prior results
*
*
*
*
Readdressed probability
BAD
32
Department of CSE, CUET
W-Ensemble
Classifier 1
Classifier 2
0.17 |
0.20 |
0.20 |
0.16 |
0.37 |
0.36 |
c1
c1
c2
c2
Softmax Probabilities
Class 1
Output
(Acc. 90%)
(Acc. 86%)
33
Department of CSE, CUET
W-Ensemble
Classifier 1
Classifier 2
0.51 |
0.60 |
0.40 |
0.32 |
0.91 |
0.92 |
c1
c1
c2
c2
Readdressed Prob.
Class 2
Output
(Acc. 90%)
(Acc. 86%)
0.17 |
0.20 |
0.20 |
0.16 |
c1
c1
c2
c2
3
2
*
*
Sample weights
Softmax Prob.
34
Department of CSE, CUET
W-Ensemble
Output Class
Softmax Probabilities
Weights
Normalization
Output: Class with max prob
Probability aggregation
35
Department of CSE, CUET
W-Ensemble
36
Department of CSE, CUET
Experiments and Results
37
Department of CSE, CUET
Experiments and Results
38
Department of CSE, CUET
Experiments and Results
Table 9. Evaluation results of base classifiers for coarse-grained classification
39
Department of CSE, CUET
Experiments and Results
Table 10. Evaluation results of ensemble models for coarse-grained classification
40
Department of CSE, CUET
Experiments and Results
Table 11. Evaluation results of base classifiers for fine-grained classification
41
Department of CSE, CUET
Experiments and Results
Table 12. Evaluation results of ensemble models for fine-grained classification
42
Department of CSE, CUET
Error Analysis
Fig. 4. Confusion matrix of the proposed model for coarse and fine-grained classes
43
Department of CSE, CUET
Error Analysis
Table 13. Few examples that are incorrectly classified by the proposed weighted ensemble model
Possible reasons of misclassification,
44
Department of CSE, CUET
�Comparison with Existing Works �
Study | Technique | Coarse-grained f1-score(%) | Fine-grained f1-score(%) |
Kumari et al. (2020) | LSTM and FastText embedding | 90.54 | 81.20 |
Ranasinghe et al. (2020) | Cross Lingual BERT | 92.71 | 91.45 |
Baruah et al. (2020) | BERT, RoBERT, SVM | 89.31 | 84.01 |
Nayel et al. (2020) | SVM+TF-IDF | 89.89 | 85.95 |
Proposed | Weighted ensemble of Transformers | 93.43 | 93.11 |
45
Department of CSE, CUET
Implications of Proposed W-Ensemble
Implemented on 3 different domains
46
Department of CSE, CUET
Emotion Categorization
[4] Tanzia, P., Sharif, O. and Hoque, M.M., “Multi-class Textual Emotion Categorization using Ensemble of Convolutional and Recurrent Neural Network”. SN Computer Science, Vol 3, pp. 1-10, 2021
Table 14. Comparison with existing technique on that work
47
Department of CSE, CUET
Sentiment Analysis
[5] Mamun, M.M., P., Sharif, O. and Hoque, M.M., “Classification of Textual Sentiment using Ensemble Technique”. SN Computer Science, Vol 3, pp. 1-13, 2021.
Table 15. Comparison with existing technique on that work
48
Department of CSE, CUET
Multimodal Meme Detection
Table 16. Comparison with existing technique on that work
49
Department of CSE, CUET
Conclusion
Further improvements:
50
Department of CSE, CUET
Acknowledgement
This work is supported by ICT Innovation Fund, ICT Division and Directorate of Research and Extension (DRE), Chittagong University of Engineering & Technology.
51
Department of CSE, CUET
References
52
Department of CSE, CUET
References
53
Department of CSE, CUET
Related Publications
54
Department of CSE, CUET
Related Publications
55
Department of CSE, CUET
Q & A
56
Department of CSE, CUET