Indonesia FINE-TUNING INDOBERT USING FOCAL LOSS FOR IMBALANCED NEWS HEADLINE CLASSIFICATION

Nazla Dzaalika Ainaya, Netti Herawati, Misgiyati Subian SaidiNon-Scopus1 Januari 2026Afiliasi: ID

Abstrak

News headline classification plays an important role in identifying event-related information from large volumes of online news. However, performance often declines when datasets are imbalanced, as nonevent news dominates and causes models to favor the majority class, reducing minority detection accuracy. This study applied the IndoBERT model with two fine-tuning approaches, cross entropy loss and focal loss to classify Indonesian news headlines into event and non-event categories, aiming to evaluate the effectiveness of focal loss on imbalanced data. Using a supervised learning framework, the dataset was split into training, validation, and testing sets, and both models were trained with identical hyperparameters: learning rate 2×10⁻⁵, batch size 16, and 3 epochs. Evaluation employed accuracy, precision, recall, F1-score, confusion matrix, and ROC analysis. Results showed that cross entropy achieved 84% accuracy but lower minority-class recall, while focal loss improved performance to 95% accuracy with more balanced precision and recall. The findings indicate that focal loss helps the model focus on difficult samples, enhancing robustness and minority-class detection in imbalanced Indonesian news headline classification.

Identifier

Scroll to Top