Optimizing Turkish Hate Speech Detection With Optuna: a Comparison of Traditional and Attention-based Encoder-decoder Models
Year: 2026
Type: article
Abstract: This study evaluates the performance of machine learning and encoder-decoder architectures for Turkish hate speech detection, emphasizing the role of hyperparameter optimization and model design. Traditional classifiers, including Random Forest, eXtreme Gradient Boosting (XGBoost), Light Gradient-Boosting Machine (LightGBM), Naive Bayes, and Artificial Neural Networks (ANN) are compared with encoder-decoder models utilizing Long Short-Term Memory (LSTM), Bidirectional LSTM (BiLSTM), and Gated Recurrent Unit (GRU) architectures integrated with attention mechanisms (Bahdanau, Luong, and Scaled Dot Product), exploring various feature representation techniques. Hyperparameter optimization using Optuna, Genetic Algorithm (GA), and Particle Swarm Optimization (PSO) significantly improved model performance, with Optuna demonstrating superior efficiency due to its adaptive sampling and pruning strategies. Optuna was selected as a modern automated hyperparameter optimization framework due to its adaptive sampling and efficient pruning strategies. This enables a more systematic comparison and provides insights into how advanced hyperparameter optimization frameworks influence hate speech detection performance. An Optuna-optimized ANN, achieved the highest F1 score of 0.8723, outperforming more complex attention-based encoder-decoder models. These findings underscore the value of combining robust feature engineering with effective hyperparameter optimization, indicating that simpler, well-tuned models can surpass deeper architectures in detecting hate speech in Turkish social media content. This study offers critical insights for developing efficient and accurate hate speech classifiers for real-world applications.
Authors: Gözde Alp, Fatih Soygazi
Institution: Adnan Menderes University
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W7242534805
