Abstract. The rapid development of digital communication has led to an increase in the number of offensive postings on the Internet. Automatic detection of such content is one of the most pressing problems of our time. However, traditional approaches based on collecting data on a central server can compromise the privacy of personal information. One way to address this issue is to use federated learning. This method involves individual model training on each user’s device without sending data to a central server. In the course of the study, a literature review of scientific papers was conducted and experiences with the federated learning method were analyzed. A special corpus consisting of 73,572 recordings of aggressive and non-aggressive texts was used as a dataset. The DistilBERT model was used to train the model, and the dataset was divided among three clients, each of which trained only their own recordings separately. At the end of each round, the server uses the FedAvg algorithm to combine the model parameters provided by all of the clients on the server to create a common global model. Based on the results, it can be concluded that the federated learning method has two important advantages: first, it works with high accuracy, and second, it ensures the reliability and confidentiality of information.
Keywords: federated learning, natural language processing, DistilBERT, FedAvg, privacy, aggressive content, classification.