UTAR Institutional Repository

Developing a deep learning model to detect social media hate speech texts

Loo, Bester Man Ting (2025) Developing a deep learning model to detect social media hate speech texts. Final Year Project, UTAR.

[img] PDF
Download (2489Kb)

    Abstract

    Hate speech detection on online social media (OSM) platforms remains a significant challenge due to the complexity of linguistic expression and inherent class imbalance in available datasets. This study proposes a hybrid deep learning framework that integrates DistilBERT with CNN and BiLSTM layers to perform multi-class classification, categorizing input text into hate speech, offensive language, or neutral classes. Five experimental configurations were conducted using the Davidson dataset, including baseline training, resampling, class weighting, combined imbalance mitigation, and an ablation study on preprocessing. DistilBERT was selected as the core architecture to balance computational efficiency with representational power. The baseline model achieved strong performance with 88.32% accuracy, a Cohen’s Kappa of 0.6805, and a macro-AUC of 0.9260. Class imbalance mitigation techniques demonstrated trade-offs: resampling and class weighting improved the minority class F1-score to above 0.40 but reduced overall accuracy. The ablation study confirmed the critical role of preprocessing, as the exclusion of data cleaning and tokenization degraded minority class F1-score to 0.2886 despite stable accuracy. Overall, results highlight the effectiveness of lightweight BERT-based architectures and produced comparable result in detecting underrepresented class of data for hate speech detection while emphasizing the importance of preprocessing and balanced training strategies for equitable classification performance.

    Item Type: Final Year Project / Dissertation / Thesis (Final Year Project)
    Subjects: T Technology > T Technology (General)
    T Technology > TD Environmental technology. Sanitary engineering
    Divisions: Faculty of Information and Communication Technology > Bachelor of Computer Science (Honours)
    Depositing User: ML Main Library
    Date Deposited: 28 Dec 2025 19:04
    Last Modified: 28 Dec 2025 19:04
    URI: http://eprints.utar.edu.my/id/eprint/6988

    Actions (login required)

    View Item