IDEAS home Printed from https://ideas.repec.org/a/spr/jcsosc/v8y2025i1d10.1007_s42001-024-00349-5.html
   My bibliography  Save this article

Detecting toxic comments on social media: an extensive evaluation of machine learning techniques

Author

Listed:
  • Dharil Patel

    (Symbiosis Institute of Technology)

  • Pijush Kanti Dutta Pramanik

    (Galgotias University)

  • Chaitanya Suryawanshi

    (Symbiosis Institute of Technology)

  • Preksha Pareek

    (Thakur College of Engineering and Technology)

Abstract

The prevalence of toxic comments on social networking sites poses a significant threat to the freedom of speech and the psychological well-being of online users. To address this challenge, researchers have turned to machine learning algorithms as a means of categorizing and identifying toxic contents. This study presents a comprehensive comparison of multiple machine learning techniques for predicting toxic posts on a social media platform. The Jigsaw toxic comment classification dataset was used to test the performance of nine different machine learning models. Various evaluation metrics, including accuracy, precision, recall, and F1-score, were employed to assess the models' effectiveness. Additionally, hyperparameter tuning was performed for each algorithm, and the outcomes were compared to determine the optimal technique, while examining the effects of hyperparameter variations. The results demonstrate that the naive Bayes classifier is the most accurate among the proposed models, achieving an accuracy of 97.30% and a run-time complexity of 0.06. The second-highest accuracy score of 97.31% was recorded for the XGBoost algorithm, with a run-time complexity of 41.06. The findings of this study have important implications for the development of efficient online hate speech identification systems. By leveraging the insights gained from this comparative analysis, researchers and practitioners can design more effective strategies for managing and mitigating the prevalence of toxic comments in online communities, ultimately fostering a safer and more inclusive digital environment.

Suggested Citation

  • Dharil Patel & Pijush Kanti Dutta Pramanik & Chaitanya Suryawanshi & Preksha Pareek, 2025. "Detecting toxic comments on social media: an extensive evaluation of machine learning techniques," Journal of Computational Social Science, Springer, vol. 8(1), pages 1-18, February.
  • Handle: RePEc:spr:jcsosc:v:8:y:2025:i:1:d:10.1007_s42001-024-00349-5
    DOI: 10.1007/s42001-024-00349-5
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1007/s42001-024-00349-5
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1007/s42001-024-00349-5?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:jcsosc:v:8:y:2025:i:1:d:10.1007_s42001-024-00349-5. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.