Recurrent Neural Network Parallelization for Hate Messages Detection
摘要
Hate speech is a threat to democratic values, because it stimulates incitement to discrimination, which international law prohibits. To limit the harmful effects of this scourge, scientists often integrate into social network platforms models provided by deep learning algorithms allowing to detect and react automatically to a message with a hateful nature. One of the particularities of these algorithms is that they are so efficient as the amount of data used is large. However, sequential execution of these algorithms on large amounts of data can take a very long time. In this paper we first compared three variants of Recurrent Neural Network (RNN) to detect hate messages. We have shown that Long Short Time Memory (LSTM) provides better metric performance, but implies more important execution time in comparison with Gated Recurrent Unit (GRU) and standard RNN. To have both good metric performance and reduced execution time, we proceeded to a parallel implementation of the training algorithms. We proposed a parallel implementation based on an implicit aggregation strategy in comparison to the existing approach which is based on a strategy with an aggregation function. The experimental results on an 8-core machine at 2.20 GHz show that better results are obtained with the parallelization strategy that we proposed. For the parallel implementation of an LSTM using the dataset obtained on kaggle, we obtained an f-measure of 0.70 and a speedup of 2.2 with our approach, compared to a f-measure of 0.65 and a speedup of 2.19 with an explicit aggregation strategy between workers.