Skip to main content
Log in

Modern Approaches to Detecting and Classifying Toxic Comments Using Neural Networks

  • Published:
Automatic Control and Computer Sciences Aims and scope Submit manuscript

Abstract—

The rising popularity of online platforms on which users communicate with each other, share opinions about various events, and leave comments has spurred on the development of natural language processing algorithms. Content moderation requires analyzing tens of millions of messages published by users of a given social network daily in real time, in order to prevent the spread of various illegal or offensive information, threats, and other types of toxic comments. Of course, such a large amount of data can be processed quickly enough only automatically. That leads to the problem of teaching computers to “understand” human written speech, which is nontrivial even if understand here means nothing more than classify. The rapid evolution of machine learning technologies has led to ubiquitous implementation of new algorithms. With the use of deep learning technologies, we are now able to quite successfully solve many problems that had for years been considered almost impossible. This article considers algorithms constructed using deep learning technologies and neural networks that solve the problem of detecting and classifying toxic comments. In addition, the article presents the results of testing both the developed algorithms and an ensemble of all considered algorithms on a large training set collected and tagged by Google and Jigsaw.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.
Fig. 9.

Similar content being viewed by others

Notes

  1. It was eventually decided to forgo this operation due to the excessive processing time required to perform it on a corpus of this size.

REFERENCES

  1. Toxic Comment Classification Challenge. https://www.kaggle.com/c/jigsaw-toxiccomment-classification-challenge/overview.

  2. Georgakopoulos, S.V., Tasoulis, S.K., Vrahatis, A.G., and Plagianakos, V.P., Convolutional neural networks for toxic comment classification, Proceedings of the 10th Hellenic Conference on Artificial Intelligence, 2018, pp. 1–6. https://arxiv.org/pdf/1802.09957.pdf.

  3. Kohli, M., Kuehler, E., and Palowitch, J., Paying attention to toxic comments online. https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1184/reports/6856482.pdf.

  4. Chu, T., Jue, K., and Wang, M., Comment abuse classification with deep learning. https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1174/reports/2762092.pdf.

  5. Khieu, K. and Narwal, N., Detecting and classifying toxic comments. https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1184/reports/6837517.pdf.

  6. Hochreiter, S. and Schmidhuber, J., Long short-term memory, Neural Comput., 1997, vol. 9, no. 8, pp. 1735–1780.

    Article  Google Scholar 

  7. Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., and Bengio, Y., Learning phrase representations using RNN encoder-decoder for statistical machine translation, arXiv preprint, 2014. arXiv:1406.1078

  8. Pennington, J., Socher, R., and Manning, C., Glove: Global vectors for word representation, Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2014, pp. 1532–1543.

  9. Joulin, A., Grave, E., Bojanowski, P., and Mikolov, T., Bag of tricks for efficient text classification, Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, 2017, vol. 2, pp. 427–431.

  10. Chung, J., Gulcehre, C., Cho, K., and Bengio, Y., Empirical evaluation of gated recurrent neural networks on sequence modeling, arXiv preprint, 2014. arXiv:1412.3555

  11. Bahdanau, D., Cho, K., and Bengio, Y., Neural machine translation by jointly learning to align and translate, arXiv preprint, 2014. arXiv:1409.0473

  12. Yang, Z., Yang, D., Dyer, C., He, X., Smola, A., and Hovy, E., Hierarchical attention networks for document classification, Proceedings of NAACL-HLT, 2016, pp. 1480–1489. https://www.cs.cmu.edu/%5C%20./hovy/ papers/16HLT-hierarchical-attention-networks.pdf.

  13. Hughes, M., Li, I., Kotoulas, S., and Suzumura, T., Medical text classification using convolutional neural networks, Stud. Health Technol. Inf., 2017, vol. 235, pp. 246–250.

    Google Scholar 

  14. Kowsari, K., Jafari Meimandi, K., Heidarysafa, M., Mendu, S., Barnes, L., and Brown, D., Text classification algorithms: A survey, Information, 2019, vol. 10, no. 4, p. 150.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to S. V. Morzhov.

Ethics declarations

The author declares that he has no conflicts of interest.

Additional information

Translated by A. Ovchinnikova

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Morzhov, S.V. Modern Approaches to Detecting and Classifying Toxic Comments Using Neural Networks. Aut. Control Comp. Sci. 55, 607–616 (2021). https://doi.org/10.3103/S0146411621070117

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.3103/S0146411621070117

Keywords:

Navigation