Sentiment Classification of Consumer Reviews of Amazon Products Under Severe Class Imbalance: A Reproducible Comparison of Convolutional Neural Networks and Sparse Linear Baselines
Sentiment models that determine the sentiment of online reviews, i.e., programs that can automatically distinguish whether a user’s review is praising or criticizing a product, often need to process data with an extremely large gap between positive and negative samples. The positive and negative samples mentioned here are pre-labeled positive reviews and negative reviews. If the training data for a model has far more positive reviews than negative reviews, with an especially stark imbalance, a major problem emerges: even if the model cannot identify negative reviews at all, it can still achieve a decent overall accuracy rate by random guessing. The small proportion of negative reviews is easily overlooked by conventional performance evaluation systems, and the model’s poor ability to identify negative reviews often goes undetected. For this study, we specifically selected a dataset that fits this extreme imbalance scenario, the Consumer Reviews of Amazon Products dataset, to test the real-world performance of two commonly used sentiment recognition models—CNNs and sparse linear classifiers. This dataset contains 32,252 positive reviews and only 810 negative reviews, with an extremely disparate number of positive and negative reviews, which is perfectly suited to measure the true capability of models under extreme sample imbalance. Instead of randomly splitting the data, we conducted a stratified split at ratios of 70%, 15%, and 15%. In each of the three resulting subsets, the ratio of positive to negative reviews is consistent with that of the full dataset, eliminating the risk of an unexpected increase or decrease in the number of negative reviews in any single subset. These three parts are the training set, which is used to teach the model to learn patterns; the validation set, which is used to adjust the model’s parameters during training; and the test set, which is used for the final assessment of the model’s capabilities. At no point did the model gain prior access to the content of the test set. We tested a total of four distinct models: The first is the most basic reference, a baseline model that only predicts the majority class. This model learns nothing and uniformly predicts all reviews as the more numerous positive reviews, to anchor the minimum passing threshold for the models. The second model uses TF-IDF to convert text into features that the model can interpret, then uses a logistic regression algorithm to make judgments. The third model also extracts features with TF-IDF but uses a linear support vector machine algorithm to make judgments. The final model is a CNN. In the final assessment of all models using the reserved test set that the models had never encountered before, the linear support vector machine achieved the most outstanding balanced performance. The macro-averaged F1 score used here is a fair metric specifically designed for sample imbalance scenarios, which will not inflate the total score simply because one class has more samples, and can truly reflect the model’s comprehensive ability to identify both positive and negative reviews. Its macro-averaged F1 score reached 0.832, and the logistic regression model that followed closely behind had a nearly comparable score. In contrast, the CNNs performed far worse, with a macro-averaged F1 score of only 0.620, which is significantly lower than the first two types of sparse linear models. To rule out the possibility that the single test result was a coincidence, we additionally conducted multiple rounds of stability verification, and repeated tests all produced consistent results: sparse linear models consistently held an advantage. These conclusions prove that CNNs are not the optimal choice for all comment sentiment classification tasks with imbalanced samples, and also remind relevant researchers that they must attach importance to three matters: they must use evaluation metrics adapted to sample imbalance scenarios, adjust the classification threshold based on the performance of the validation set, and list high-performing sparse linear models as a baseline reference that must be included for comparison.
Palit, S., K., P. V., Sudarsan, D., F., A. E. T., Jimy, & Sedhumadhavan, S. (2026). Sentiment Classification of Consumer Reviews of Amazon Products Under Severe Class Imbalance: A Reproducible Comparison of Convolutional Neural Networks and Sparse Linear Baselines. International Journal of Advanced Computer Science and Applications, 17(10). https://doi.org/10.14569/IJACSA.2026.0171031
Palit, Shamik, et al.. "Sentiment Classification of Consumer Reviews of Amazon Products Under Severe Class Imbalance: A Reproducible Comparison of Convolutional Neural Networks and Sparse Linear Baselines." International Journal of Advanced Computer Science and Applications, vol. 17, no. 10, 2026, https://doi.org/10.14569/IJACSA.2026.0171031.
@article{Palit2026,
title = {Sentiment Classification of Consumer Reviews of Amazon Products Under Severe Class Imbalance: A Reproducible Comparison of Convolutional Neural Networks and Sparse Linear Baselines},
journal = {International Journal of Advanced Computer Science and Applications},
volume = {17},
number = {10},
year = {2026},
publisher = {The Science and Information Organization},
author = {Shamik Palit and Preetha V. K. and Dhanya Sudarsan and Annie Edwis Threse F. and Jimy and Santhuana Sedhumadhavan},
doi = {10.14569/IJACSA.2026.0171031},
url = {https://doi.org/10.14569/IJACSA.2026.0171031}
}
Open Access — licensed under a
Creative Commons Attribution 4.0 International License.
Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.