arXiv:2605.03439cs.CL2026-05被引 1

对比传统模型与IndoBERT在印尼电商评论情感分析中的表现,发现线性SVM更优。

Benchmarking Logistic Regression, SVM, Naive Bayes, and IndoBERT Fine-Tuning for Sentiment Analysis on Indonesian Product Reviews

论文配图:Benchmarking Logistic Regression, SVM, Naive Bayes, and IndoBERT Fine-Tuning for Sentiment Analysis on Indonesian Product Reviews
图 1 · 摘自论文原文
  • 用TF-IDF+线性SVM、Logistic回归、朴素贝叶斯作基线,Fine-tuneIndoBERT做对比
  • 线性SVM准确率97.60%,宏F1为0.5510,优于IndoBERT的88.70%和0.5088
  • 性能差异主要源于数据采样不一致,适合关注实际部署的开发者

印度尼西亚电商平台的用户生成评论量激增,情感分析对衡量客户满意度和识别产品问题至关重要。本文针对Tokopedia Product Reviews 2025数据集,对传统机器学习方法与基于Transformer的深度学习模型进行三分类情感分析(正面、中性、负面)对比。采用TF-IDF特征提取,结合逻辑回归、线性支持向量机(SVM)和多项式朴素贝叶斯作为基线模型;随后微调IndoBERT模型(indobenchmark/indobert-base-p1)进行上下文序列分类。为缓解电商反馈中严重的类别不平衡问题,基线模型使用平衡类别权重,IndoBERT训练中引入自定义加权交叉熵损失函数。综合评估显示,线性SVC模型显著优于IndoBERT,准确率为97.60%,宏F1得分为0.5510,而IndoBERT分别为88.70%和0.5088。详细分析表明,性能差距主要源于数据采样策略不同:基线使用全语料库,而Transformer仅在采样子集上训练。最后,我们通过Gradio部署了可交互的预测应用,验证了该流程的实际可行性。

原文摘要 · Abstract (English)

The exponential growth of e-commerce platforms in Indonesia has generated a massive volume of user-generated product reviews. Analyzing the sentiment of these reviews is critical for measuring customer satisfaction and identifying product issues at scale. This paper benchmarks traditional Machine Learning (ML) approaches against a Transformer-based Deep Learning model for a three-class sentiment analysis task (positive, neutral, negative) on the Tokopedia Product Reviews 2025 dataset. We implemented Term Frequency-Inverse Document Frequency (TF-IDF) feature extraction coupled with three algorithms: Logistic Regression, Linear Support Vector Machine (SVM), and Multinomial Naive Bayes as robust baselines. Subsequently, we fine-tuned the IndoBERT model (indobenchmark/indobert-base-p1) for contextual sequence classification. To computationally address the severe class imbalance inherent in e-commerce feedback, we applied balanced class weights for the baseline models and engineered a custom weighted cross-entropy loss function within the IndoBERT training loop, following the broader motivation of imbalanced-learning research. Our comprehensive evaluation using Accuracy, Macro F1-score, and Weighted F1-score revealed that the traditional Linear SVC model significantly outperformed the IndoBERT model in our experimental setup, achieving an Accuracy of 97.60% and a Macro F1-score of 0.5510, compared to IndoBERT's 88.70% and 0.5088. Detailed analysis indicates that this performance gap was primarily driven by discrepancies in the data sampling regimes, where baselines utilized the full corpus while the Transformer was constrained to a sampled subset. Finally, we demonstrate the practical viability of our pipeline by deploying the final sentiment classification model as an interactive Gradio web application.

情感分析IndoBERT机器学习电商评论

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。