Benchmarking Logistic Regression, SVM, Naive Bayes, and IndoBERT Fine-Tuning for Sentiment Analysis on Indonesian Product Reviews
This paper benchmarks traditional machine learning models against a fine-tuned IndoBERT transformer for three-class sentiment analysis on Indonesian product reviews, revealing that a Linear SVM outperformed the deep learning model with 97.60% accuracy due to the latter's restriction to a sampled subset of the data, while also demonstrating the practical deployment of the best model via a Gradio web application.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are the owner of a massive online marketplace in Indonesia, like a giant digital shopping mall. Every day, thousands of customers leave reviews for products. Some say, "Great!" (Positive), some say, "It's okay" (Neutral), and some say, "Terrible!" (Negative).
The problem? There are too many reviews to read one by one. You need a robot to read them all and sort them into three piles: Happy, Okay, and Sad.
This paper is a report card on four different "robots" (computer models) trying to do this job. The researchers wanted to see if the old-school, simple robots were better than the new, super-smart, expensive robots.
The Contestants
The Old-School Robots (Logistic Regression, SVM, Naive Bayes):
Think of these like a very fast, experienced librarian. They don't understand the deep meaning of a story, but they are experts at counting words. If they see the word "good" or "love," they know it's a happy review. If they see "bad" or "broken," they know it's a sad review. They use a system called TF-IDF, which is like a highlighter that marks the most important words in a sentence and ignores the boring ones (like "the" or "and").- The Catch: They treat every review as a bag of words. They don't really understand how words connect to each other in a sentence.
The New-School Robot (IndoBERT):
This is like a genius literature professor who has read millions of Indonesian books. It doesn't just count words; it understands context. It knows that "not good" means something different than just "good." It's a "Transformer" model, which is a fancy way of saying it looks at the whole sentence at once to understand the vibe.- The Catch: It's very hungry for data and takes a long time to learn.
The Big Problem: The Unbalanced Crowd
There was a major twist in this experiment. In real life, happy customers are much more likely to leave a review than unhappy ones.
- The Crowd: Imagine a room with 100 people. 90 are smiling (Positive), 5 are shrugging (Neutral), and 5 are frowning (Negative).
- The Trap: If a robot just guessed "Smiling" for everyone, it would be right 90% of the time! But it would be terrible at finding the 5 frowning people. The researchers had to teach the robots to pay extra attention to the quiet, unhappy minority.
The Race Results
The researchers ran a race to see which robot could sort the reviews best. They used two main ways to judge:
- Accuracy: How often was the robot right overall?
- Fairness (Macro F1-score): Did the robot do a good job on all three groups, or did it just ignore the unhappy people?
The Winner: The Linear SVC (one of the Old-School Librarians).
- It got 97.6% overall accuracy.
- It was also the fairest judge, scoring 0.551 on the fairness metric.
The Runner-Up: The IndoBERT (the Genius Professor).
- It got 88.7% overall accuracy.
- Its fairness score was 0.509.
Wait, what? The simple librarian beat the genius professor!
Why Did the Simple Robot Win?
The paper explains that this wasn't a fair fight in the way you might think. It's like comparing a marathon runner who ran the full 26 miles against a sprinter who only ran 1 mile because they were tired.
- The Data Discrepancy: The Old-School robots got to study the entire library of 65,000 reviews. The Genius Professor (IndoBERT) was only allowed to study a tiny sample of about 1,800 reviews because the computer running it was too slow to handle the whole thing.
- The Conclusion: The researchers found that the simple robots were so good at spotting keywords that they didn't need the "deep understanding" of the professor to win this specific race. However, the professor might have won if it had been allowed to study the whole library.
The Takeaway
- For speed and simplicity: If you need a quick, reliable way to sort Indonesian product reviews and you have a lot of data, the simple "word-counting" robots (specifically Linear SVC) are incredibly effective and fast.
- For deep understanding: The fancy AI (IndoBERT) has the potential to be better, but it needs more data and more computing power to show its true skills. In this specific test, it was held back by the small amount of data it was allowed to see.
The Final Product
To prove this works in the real world, the researchers built a live website (using a tool called Gradio). You can type in a review in Indonesian, and the robot will tell you if it's happy, neutral, or sad. They put this on the internet so anyone can try it out.
In short: Sometimes, the old, simple tools are still the best at the job, especially when the fancy new tools don't get enough practice time!
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.