A HYBRID BERT-CNN FRAMEWORK FOR THREAT DETECTION IN LOW-RESOURCE URDU TWEETS
Keywords:
Urdu tweets Threat detection social media Deep learning Transformer models, BERT.Abstract
The rapid rise of social media platforms has revolutionized global communication by enabling real-time information exchange and user interaction. However, this growth has also accelerated the spread of abusive, hateful, and threatening content, leading to significant societal and security concerns. Detecting such harmful material in low-resource languages like Urdu is particularly challenging due to its complex morphology, numerous dialects, frequent code-switching, and the lack of large annotated datasets. To address these issues, this study proposes a hybrid deep learning framework for threat detection in Urdu tweets, integrating transformer-based Bidirectional Encoder Representations from Transformers (BERT) embeddings with Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN). A custom Urdu Threat Dataset consisting of 6,060 tweets was manually created and pre-processed using tokenization, normalization, stop-word removal, padding, and stemming. Contextual embeddings generated by BERT were combined with CNN and RNN architectures to capture both semantic and sequential linguistic features. Model performance was evaluated using standard metrics: accuracy, precision, recall, and F1-score. Experimental results show that the CNN-based hybrid model achieved the best performance, with 96% accuracy and an F1-score of 0.98, surpassing the RNN model (95% accuracy) and the standalone BERT model (90% accuracy). The proposed approach also outperformed traditional machine learning methods such as Support Vector Machines (SVM) and Naïve Bayes (NB). These findings confirm that transformer-enhanced deep learning architectures are highly effective for detecting threatening content in morphologically rich, low-resource languages like Urdu.The proposed framework offers a scalable and interpretable solution for automated threat detection and social media moderation. Additionally, this research contributes a valuable Urdu Threat Dataset to the research community and highlights the importance of hybrid transformer-based models for multilingual content monitoring and cyber safety applications.












