This study presents a comprehensive evaluation of various machine learning and deep learning models for detecting hate speech in online social media tweets. We compared traditional classifiers such as Logistic Regression, Decision Trees, Support Vector Machines (SVM), Naive Bayes, and Random Forests, as well as deep learning architectures like Long Short Term Memory (LSTM) and Bidirectional LSTM (BiLSTM), with and without attention mechanisms. Our results show that deep learning models, particularly BiLSTM with attention mechanism, significantly outperformed traditional models, achieving a classification accuracy of 97.77%. This model demonstrated strong precision and recall across all content categories, especially in classifying hate speech, which is typically underrepresented and more challenging to detect. The study highlights that traditional models like Logistic Regression and SVM also performed reasonably well for detecting offensive and neutral content. In contrast, deep learning models with attention mechanisms exhibit superior performance by effectively capturing complex patterns and contextual relationships in the data. We also explored the impact of the attention mechanism on the learning process, noting significant improvements in both training and validation accuracy over time. These findings suggest that the attention mechanism enables the models to focus on critical input features, leading to more accurate classification outcomes.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Advancing Hate Speech Detection: A Comparative Study of Machine Learning Models and Deep Learning Architectures with Attention Mechanisms

  • Nirmal Gaud,
  • S. Poonkuntran

摘要

This study presents a comprehensive evaluation of various machine learning and deep learning models for detecting hate speech in online social media tweets. We compared traditional classifiers such as Logistic Regression, Decision Trees, Support Vector Machines (SVM), Naive Bayes, and Random Forests, as well as deep learning architectures like Long Short Term Memory (LSTM) and Bidirectional LSTM (BiLSTM), with and without attention mechanisms. Our results show that deep learning models, particularly BiLSTM with attention mechanism, significantly outperformed traditional models, achieving a classification accuracy of 97.77%. This model demonstrated strong precision and recall across all content categories, especially in classifying hate speech, which is typically underrepresented and more challenging to detect. The study highlights that traditional models like Logistic Regression and SVM also performed reasonably well for detecting offensive and neutral content. In contrast, deep learning models with attention mechanisms exhibit superior performance by effectively capturing complex patterns and contextual relationships in the data. We also explored the impact of the attention mechanism on the learning process, noting significant improvements in both training and validation accuracy over time. These findings suggest that the attention mechanism enables the models to focus on critical input features, leading to more accurate classification outcomes.