Addressing Class Imbalance in Customer Review: Analysis Using Focal Loss and SVM with BERT
Zhenming Li, Kazutaka Shimada · 2024
In today's digital marketplace, customer reviews play a critical role in influencing consumer decisions and in-forming business improvements. Among these, "Request" and "Complaint" reviews provide direct insights into customer needs and areas of dissatisfaction. However, they often constitute a minority in review datasets, creating a class imbalance problem that hinders effective classification. In our research, we propose a novel approach to addressing class imbalance by incorporating Focal Loss into the fine-tuning of a BERT model for classifying customer reviews. Using a dataset with "Request", "Complaint", and other comment types, we demonstrate that Focal Loss significantly improves classification for the highly underrepresented "Request" class. Additionally, replacing BERT's fully connected layer with an SVM classifier further enhances performance on the "Request" class. However, we observed a slight decrease in classification effectiveness for the "Complaint" class, suggesting that complementary techniques may be necessary to achieve balanced performance. Our approach offers a robust solution for enhancing customer review analysis, enabling businesses to better capture and respond to critical customer insights.