Analisis Komparatif Konfigurasi Multilayer Perceptron pada Classifier Head RoBERTa untuk Klasifikasi Ujaran Kebencian - Ikhwan Habibi; Surya Agustian; Jasril Jasril; Muhammad Affandes (Forum Kerjasama Pendidikan Tinggi (FKPT), 2026)
The widespread dissemination of hate speech and offensive language on social media has increased the demand for accurate automated text classification systems. Although RoBERTaForSequenceClassification has been widely used for various for text classification task, the effect of its default classifier head configuration on classification performance has not yet been systematically evaluated. As the main contribution, this study conducts a controlled evaluation of 32 multilayer perceptron (MLP)-based classifier head configurations, varying the number of hidden layers, activation functions, and dropout rates, against the default classifier head on the English HASOC 2021 dataset for two subtasks: binary and multiclass classification. Each configuration was evaluated using Stratified 5-Fold Cross-Validation with Macro-F1 as the evaluation metric, after which the best-performing configuration was further evaluated on an independent test set. For the binary task, the best configuration achieved a test Macro-F1 of 80.90%, about 0.3 percentage points higher than the baseline's 80.59%. For the multiclass task, the configuration with the highest validation performance instead achieved a test Macro-F1 of 65.68%, about 0.4 percentage points lower than the baseline's 66.11%, showing that an advantage observed during cross-validation does not always hold on the test set. Further analysis revealed that excessively deep hidden layers combined with aggressive dimensional compression can sharply degrade performance on the multiclass task. These findings indicate that the effect of classifier head configuration is small and task-dependent, so systematic evaluation remains necessary before adopting a given configuration in place of the default classifier head when fine-tuning RoBERTa-based models.