Research

  • Research
  • Exploring ModernBERT for the Classification of Hateful Social Media T...
Article

Exploring ModernBERT for the Classification of Hateful Social Media Texts

Dec 12, 2025

DOI:

Published in: Conference

Nowadays, social media has been embedded in all aspects of life all over the world. Between standard users taking advantage of convenient communication and content sharing, and organizations leveraging the exposure for marketing and client outreach, the traffic that social platforms have seen in the last decade has spiked. However, as the number of users, and thus the content shared, continues to grow, the amount of potentially harmful material being posted to the public web has also risen. Previous works have explored the potential use of language models to improve the quality of content moderation. This study focuses on ModernBERT, a newer iteration of the BERT model, and compares its performance with handling textual content from various social media platforms to that of DistilBERT, a previously studied model. Across all datasets used within this study, DistilBERT slightly outperformed ModernBERT in terms of precision, recall, F1-score, accuracy, and training/validation time. For Twitter/X, Facebook, and Instagram, DistilBERT achieved accuracies of 90%, 81%, and 75%, respectively , compared to ModernBERT’s 91%, 79%, and 73%. The higher accuracy with the Twitter/X dataset may be attributed to the size of the dataset. These findings highlight the importance of dataset characteristics in model performance and pave the way for future studies across other online platforms and virtual communities, such as online games.

Best-Fit Major?
Call Now
Chat Now

Copyright © 2026 Al Ain University. All Rights Reserved.