DESIGNING OF SOFTWARE ARCHITECTURE BASED ON OBJECT-ORIENTED APPROACH FOR IMPLEMENTATION OF NEURAL NETWORK ALGORITHM FOR DETECTING ETHNIC HATE IN MESSAGES
DOI:
https://doi.org/10.35546/kntu2078-4481.2025.4.2.8Keywords:
ethnic hostility, FastForest, neural network algorithm for detecting ethnic hostility.Abstract
The article considers a modern approach to neural network detection of ethnic hatred in digital text content in conditions of large, constantly growing amounts of data. It is proposed to use machine learning and natural language processing technologies for automatic detection of ethnic hatred in digital texts. The algorithm developed in the work automates the process of analyzing publications on the network to detect ethnic hatred and conflicting statements between ethnic groups. It consists of two stages: pre-processing of the text (removing stop characters and emoticons) and prediction using the FastForest model, which converts the text into a numerical sequence for further analysis. The algorithm generates a percentage estimate of the probability of the presence of ethnic hatred in the text, which facilitates the process of detecting and examining such manifestations. A pipeline for processing and classifying text data is proposed, which includes converting text messages into numerical features and combining them into a vector of characteristics for further analysis. The target variable is converted into numeric keys, after which the OneVersusAll method and the FastForest algorithm are used to train the model on each class separately, using an ensemble of four decision trees, which increases accuracy and reduces the risk of overtraining. After training, the model classifies new content for the presence or absence of ethnic hatred. The software consists of several subsystems: data processing, ethnic hatred detection, data preprocessing, as well as auxiliary subsystems for forming the training sample and training the model. The subsystem forms a data set for training the classifier, and the model training subsystem is responsible for its configuration and storage. The subsystems were integrated into a single system to automate the detection of ethnic hatred in digital content. The algorithm’s effectiveness was assessed using metrics such as MicroAccuracy, MacroAccuracy, LogLoss, ConfusionMatrix, f1-measure, and Recall. The results showed a high level of accuracy: MicroAccuracy 0.9890, MacroAccuracy 0.9889, LogLoss 0.0463, with high Precision and Recall values for both classes. The model successfully classified the majority of cases, predicting 4,854 out of 4,918 cases with ethnic hatred. The results open up new opportunities for creating safer online environments, which is an important step in combating discrimination and hatred in the digital space.
References
Raza Ur Rehman H. M. Detecting hate in diversity: a survey of multilingual code-mixed image and video analysis / H. M. Raza Ur Rehman, M. Saleem, M. Z. Jhandir, E. S. Alvarado, H. Garay, I. Ashraf // Journal of Big Data. 2025. Vol. 12, No. 1. P. 109. https://doi.org/10.1186/s40537-025-01167-w.
Okpala E. Large Language Model Annotation Bias in Hate Speech Detection / E. Okpala, L. Cheng // Proceedings of the International AAAI Conference on Web and Social Media. 2025. Vol. 19. P. 1389–1418. https://doi.org/10.1609/icwsm.v19i1.35879.
Akram M. H. ISE-Hate: A benchmark corpus for inter-faith, sectarian, and ethnic hatred detection on social media in Urdu / M. H. Akram, K. Shahzad, M. Bashir // Information Processing & Management. 2023. Vol. 60, No. 3. P. 103270. https://doi.org/10.1016/j.ipm.2023.103270.
Guan T. Countering Ethnic Minority-Targeted Hate Speech in a Multicultural Society / T. Guan, Y. Yang, T. Liu // Race and Social Problems. 2025. Vol. 17, No. 3. P. 233–248. https://doi.org/10.1007/s12552-024-09426-w
Овчарук О.М. Нейромережеве діагностування проявів ПТСР у текстовому контенті з використанням помилко-орієнтованого навчального набору даних / О.М. Овчарук, О.В. Мазурець // Вісник Хмельницького національного університету. Серія: Технічні науки. 2024. № 6, Т. 1 (343). С. 195–200. http://doi.org/10.31891/2307-5732-2024-343-6-30.
Залуцька О.О. Метод інтелектуального аналізу емоційної тональності текстової інформації для визначення поведінкових намірів нейромережевими засобами / О.О. Залуцька, М.О. Молчанова, О.В. Мазурець, О.І. Мельник, Т.К. Скрипник // Вісник Хмельницького національного університету. Серія: Технічні науки. 2023. № 5 (325), Т. 1. С. 67–73. https://doi.org/10.31891/2307-5732-2023-325-5.
Молчанова М.О. Підхід до тестування об'єктно-орієнтованих систем керування в електронній комерції / М.О. Молчанова, О.В. Мазурець, П.О. Шевчук, В.І. Кліменко, О.О. Тищенко // Наука і техніка сьогодні. 2025. № 4 (45). С. 1273–1285. https://doi.org/10.52058/2786-6025-2025-4(45)-1273-1285.
Yin W. Towards generalisable hate speech detection: a review on obstacles and solutions / W. Yin, A. Zubiaga // PeerJ Computer Science. 2021. Vol. 7. P. e598. https://doi.org/10.7717/peerj-cs.598
Alsafari S. Hate and offensive speech detection on Arabic social media / S. Alsafari, S. Sadaoui, M. Mouhoub // Online Social Networks and Media. 2020. Vol. 19. P. 100096. https://doi.org/10.1016/j.osnem.2020.100096.
Firmino A. A. Improving hate speech detection using cross-lingual learning / A. A. Firmino, C. de Souza Baptista, A. C. de Paiva // Expert Systems with Applications. 2024. Vol. 235. P. 121115. https://doi.org/10.1016/j.eswa.2023.121115.
Мазурець О.В. Метод виявлення депресивного стану пов'язаного із навчанням у закладах освіти із використанням нейромережі дуальної архітектури / О.В. Мазурець, І.А. Тимофієв, В.І. Кліменко, О.О. Тищенко // Вісник Херсонського національного технічного університету. 2024. № 4 (91). С. 311–318. https://doi.org/10.35546/kntu2078-4481.2024.4.41.
Віт Р.В. Підхід до тематичної класифікації текстової інформації засобами обробки природної мови / Р.В. Віт, О.В. Мазурець // Наукові праці Донецького національного технічного університету. Серія: Проблеми моделювання та автоматизації проєктування. 2025. № 1 (21). С. 94–99. https://doi.org/10.31474/2074-7888.
Собко О.В. Особливості програмної інженерії та тестування програмного забезпечення для нейромережевого аналізу фотоданих залишків зруйнованих будівель із роботизованої техніки / О.В. Собко, В.І. Кліменко, О.В. Мазурець, О.О. Залуцька, О.В. Гладун // Наука і техніка сьогодні. 2025. № 4 (45). С. 1566–1581. https://doi.org/10.52058/2786-6025-2025-4(45)-1566-1581.
Молчанова М.О. Алгоритм виявлення аб’юзивного вмісту в україномовному аудіоконтенті для імплементації в об'єктно-орієнтовану інформаційну систему / М.О. Молчанова, О.В. Мазурець, О.В. Собко, Р.В. Віт, В.В. Назаров // Вісник Хмельницького національного університету. Серія: Технічні науки. 2024. № 1 (331). С. 101–106. https://doi.org/10.31891/2307-5732-2024-331-17.
Sathyanarayanan S. Confusion matrix-based performance evaluation metrics / S. Sathyanarayanan, B. R. Tantri // African Journal of Biomedical Research. 2024. Vol. 27, No. 4S. P. 4023–4031. https://doi.org/10.53555/AJBR.v27i4S.4345.







