Activity Classification in E-Commerce Product Reviews Using Deep Learning and Transformer Models
Abstract
1. Introduction
2. Literature Review
2.1. Sentiment and Product Review Analysis
2.2. Usage Context and Activity Recognition
2.3. Neural Network-Based Text Classification
2.4. Feature Representation and Word Embedding Techniques
2.5. Research Gap Analysis
3. Activity Classification Methodology
3.1. Overview
3.2. Dataset Construction and Annotation
- The extensive dataset contains 5 million product reviews.
- The annotated activity subset was initially created by manually labelling 60,000 reviews extracted from the extensive dataset. Following manual quality inspection, reviews that were unsuitable for activity classification were removed. The remaining reviews were then balanced across the six activity classes where possible to minimise class imbalance during model training, resulting in a final annotated dataset of 50,843 reviews. This dataset was used to train and evaluate the classification models described in Section 3.4.
- The keyword-filtered activity subset contains 30,000 reviews in which the assigned activity label is explicitly referenced in the review text. This dataset was created to support an additional experiment investigating the impact of reduced label ambiguity on classification performance.
- The independent validation subset contains 1200 product reviews extracted from the extensive dataset as a subset reserved for independent model evaluation.
3.3. Text Pre-Processing
3.3.1. Pre-Processing for GloVe-Based Models
3.3.2. Pre-Processing for DistilBERT-Based Models
3.4. Classification Approaches
3.4.1. Experimental Setup
3.4.2. LSTM-CNN-GloVe Architecture
3.4.3. DistilBERT-CNN Architecture
4. Results and Analysis
4.1. Overall Model Performance
4.2. Ablation Study
4.3. Stability and Statistical Reliability
4.4. Per-Class Performance Analysis
4.5. Confusion Matrix Analysis
4.6. Experiments on Keyword-Filtered Dataset
4.7. Comparison with Related Work
4.8. E-Commerce Experience Evaluation
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Abou Setta, I.G.; Shehata, O.M.; Awad, M.A. Multivariate Prediction of Correct Lane for Autonomous Electric Vehicle Using Deep Learning Models. In Proceedings of the 2020 8th International Conference on Control, Mechatronics and Automation (ICCMA), Moscow, Russia, 6–8 November 2020; pp. 127–130. [Google Scholar] [CrossRef] [Scilit]
- Singh, S.N.; Sarraf, T. Sentiment analysis of a product based on user reviews using random forests algorithm. In Proceedings of the 2020 10th International Conference on Cloud Computing, Data Science & Engineering (Confluence), Noida, India, 29–31 January 2020; pp. 112–116. [Google Scholar] [CrossRef] [Scilit]
- Shrestha, N.; Nasoz, F. Deep learning sentiment analysis of amazon. com reviews and ratings. arXiv 2019, arXiv:1904.04096. [Google Scholar] [CrossRef] [Scilit]
- Rani, D.; Kumar, R.; Chauhan, N. Study and Comparision of Vectorization Techniques Used in Text Classification. In Proceedings of the 2022 13th International Conference on Computing Communication and Networking Technologies (ICCCNT), Kharagpur, India, 3–5 October 2022; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Sindhu, C.; Adak, S.; Tigga, S.C. Opinionated text classification for hindi tweets using deep learning. In Proceedings of the 2021 5th International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, 8–10 April 2021; pp. 1217–1222. [Google Scholar] [CrossRef] [Scilit]
- Chao, C.; Jiang, W. Study on the Subjective and Objective Text Classification and Pretreatment of Chinese Network Text. In Proceedings of the 2012 4th International Conference on Intelligent Human-Machine Systems and Cybernetics, Nanchang, China, 26–27 August 2012; Volume 2, pp. 25–29. [Google Scholar] [CrossRef] [Scilit]
- Ahmed, Z.; Wang, J. A fine-grained deep learning model using embedded-CNN with BiLSTM for exploiting product sentiments. Alex. Eng. J. 2023, 65, 731–747. [Google Scholar] [CrossRef] [Scilit]
- Ma, T.M.; Yamamori, K.; Thida, A. A comparative approach to Naïve Bayes classifier and support vector machine for email spam classification. In Proceedings of the 2020 IEEE 9th Global Conference on Consumer Electronics (GCCE), Kobe, Japan, 13–16 October 2020; pp. 324–326. [Google Scholar] [CrossRef] [Scilit]
- Kumar, S.; Sharma, A.; Reddy, B.K.; Sachan, S.; Jain, V.; Singh, J. An intelligent model based on integrated inverse document frequency and multinomial Naive Bayes for current affairs news categorisation. Int. J. Syst. Assur. Eng. Manag. 2021, 13, 1341–1355. [Google Scholar] [CrossRef] [Scilit]
- Wu, S.H.; Wang, J.W. Integrating neural and syntactic features on the helpfulness analysis of the online customer reviews. In Proceedings of the 2019 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, Vancouver, BC, Canada, 27–30 August 2019; pp. 1013–1017. [Google Scholar] [CrossRef] [Scilit]
- Sun, X.; Han, M.; Feng, J. Helpfulness of online reviews: Examining review informativeness and classification thresholds by search products and experience products. Decis. Support Syst. 2019, 124, 113099. [Google Scholar] [CrossRef] [Scilit]
- Wu, S.H.; Chen, Y.K. Cross-domain helpfulness prediction of online consumer reviews by deep learning model. In Proceedings of the 2020 IEEE 21st International Conference on Information Reuse and Integration for Data Science (IRI), Las Vegas, NV, USA, 11–13 August 2020; pp. 412–418. [Google Scholar] [CrossRef] [Scilit]
- Elmurngi, E.I.; Gherbi, A. Unfair reviews detection on amazon reviews using sentiment analysis with supervised learning techniques. J. Comput. Sci. 2018, 14, 714–726. [Google Scholar] [CrossRef] [Scilit]
- Zhao, W.; Guan, Z.; Chen, L.; He, X.; Cai, D.; Wang, B.; Wang, Q. Weakly-supervised deep embedding for product review sentiment analysis. IEEE Trans. Knowl. Data Eng. 2017, 30, 185–197. [Google Scholar] [CrossRef] [Scilit]
- Sindhura, S.; Praveen, S.P.; Safali, M.A.; Rao, N. Sentiment analysis for product reviews based on weakly-supervised deep embedding. In Proceedings of the 2021 Third International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 2–4 September 2021; pp. 999–1004. [Google Scholar] [CrossRef] [Scilit]
- Sadhana, S.; SaiRamesh, L.; Sabena, S.; Ganapathy, S.; Kannan, A. Mining target opinions from online reviews using semi-supervised word alignment model. In Proceedings of the 2017 Second International Conference on Recent Trends and Challenges in Computational Models (ICRTCCM), Tindivanam, India, 3–4 February 2017; pp. 196–200. [Google Scholar] [CrossRef] [Scilit]
- Nasim, Z.; Rajput, Q.; Haider, S. Sentiment analysis of student feedback using machine learning and lexicon based approaches. In Proceedings of the 2017 International Conference on Research and Innovation in Information Systems (ICRIIS), Langkawi, Malaysia, 16–17 July 2017; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Yao, D.; Chatterjee, I.; Zhou, M. Conditioning Customers’ Product Reviews for Accurate Classification Performance. In Proceedings of the 2022 IEEE International Conference on Networking, Sensing and Control (ICNSC), Shanghai, China, 15–18 December 2022; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
- Wahyudi, E.; Kusumaningrum, R. Aspect based sentiment analysis in E-commerce user reviews using Latent Dirichlet Allocation (LDA) and Sentiment Lexicon. In Proceedings of the 2019 3rd International Conference on Informatics and Computational Sciences (ICICoS), Semarang, Indonesia, 29–30 October 2019; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Suryadi, D.; Kim, H.M. A data-driven approach to product usage context identification from online customer reviews. J. Mech. Des. 2019, 141, 121104. [Google Scholar] [CrossRef] [Scilit]
- Amirifar, T.; Lahmiri, S.; Zanjani, M.K. An NLP-Deep Learning Approach for Product Rating Prediction Based on Online Reviews and Product Features. IEEE Trans. Comput. Soc. Syst. 2024, 11, 8156–8168. [Google Scholar] [CrossRef] [Scilit]
- Hayatin, N.; Alias, S.; Hung, L.P. Trends and challenges in sentiment summarization: A systematic review of aspect extraction techniques. Knowl. Inf. Syst. 2024, 66, 3671–3717. [Google Scholar] [CrossRef] [Scilit]
- Krichen, M.; Mihoub, A. Long Short-Term Memory Networks: A Comprehensive Survey. AI 2025, 6, 215. [Google Scholar] [CrossRef] [Scilit]
- Xie, X.; Qin, B.; Wan, Z.; Nie, W. Text Aspect-Level Sentiment Analysis based on Multi-Task Joint Learning. In Proceedings of the 2021 2nd International Symposium on Computer Engineering and Intelligent Communications (ISCEIC), Nanjing, China, 6–8 August 2021; pp. 127–131. [Google Scholar] [CrossRef] [Scilit]
- Al-Garadi, M.A.; Yang, Y.C.; Cai, H.; Ruan, Y.; O’Connor, K.; Gonzalez-Hernandez, G.; Perrone, J.; Sarker, A. Text classification models for the automatic detection of nonmedical prescription medication use from social media. BMC Med. Inform. Decis. Mak. 2021, 21, 27. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ali, H.; Hashmi, E.; Yayilgan Yildirim, S.; Shaikh, S. Analyzing Amazon Products Sentiment: A Comparative Study of Machine and Deep Learning, and Transformer-Based Techniques. Electronics 2024, 13, 1305. [Google Scholar] [CrossRef] [Scilit]
- Xiaoyan, L.; Raga, R.C.; Xuemei, S. GloVe-CNN-BiLSTM Model for Sentiment Analysis on Text Reviews. J. Sens. 2022, 2022, 7212366. [Google Scholar] [CrossRef] [Scilit]
- Pimpalkar, A.; Raj R, J.R. MBiLSTMGloVe: Embedding GloVe knowledge into the corpus using multi-layer BiLSTM deep learning model for social media sentiment analysis. Expert Syst. Appl. 2022, 203, 117581. [Google Scholar] [CrossRef] [Scilit]
- Bellar, O.; Baina, A.; Ballafkih, M. Sentiment Analysis: Predicting Product Reviews for E-Commerce Recommendations Using Deep Learning and Transformers. Mathematics 2024, 12, 2403. [Google Scholar] [CrossRef] [Scilit]
- Alghaligah, A.; Alotaibi, A.; Abbas, Q.; Alhumoud, S. Optimized Hybrid Deep Learning for Enhanced Spam Review Detection in E-Commerce Platforms. Int. J. Adv. Comput. Sci. Appl. 2025, 16, 348–357. [Google Scholar] [CrossRef] [Scilit]
- Arthamevia, N.P.; Purbolaksono, M.D. Aspect-Based Sentiment Analysis in Beauty Product Reviews Using TF-IDF and SVM Algorithm. In Proceedings of the 2021 9th International Conference on Information and Communication Technology (ICoICT), Yogyakarta, Indonesia, 3–5 August 2021; pp. 197–201. [Google Scholar] [CrossRef] [Scilit]
- Pennington, J.; Socher, R.; Manning, C.D. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1532–1543. [Google Scholar] [CrossRef] [Scilit]
- Hasan, M.M.; Zaman, S.M.; Talukdar, M.A.; Siddika, A.; Alam, M.G.R. An Analysis of Machine Learning Algorithms and Deep Neural Networks for Email Spam Classification using Natural Language Processing. In Proceedings of the 2021 IEEE International Conference on Service Operations and Logistics, and Informatics (SOLI), Singapore, 11–12 December 2021; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Shrivastava, P.; Sharma, D.K. Fake Content Identification Using Pre-Trained Glove-Embedding. In Proceedings of the 2021 5th International Conference on Information Systems and Computer Networks (ISCON), Mathura, India, 22–23 October 2021; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Venkatesh; Hegde, S.U.; Zaiba, A.; Nagaraju, Y. Hybrid CNN-LSTM Model with GloVe Word Vector for Sentiment Analysis on Football Specific Tweets. In Proceedings of the 2021 International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT), Bhilai, India, 19–20 February 2021; pp. 1–8. [Google Scholar] [CrossRef] [Scilit]
- Rudkowsky, E.; Haselmayer, M.; Wastian, M.; Jenny, M.; Emrich, Š.; Sedlmair, M. More than bags of words: Sentiment analysis with word embeddings. Commun. Methods Meas. 2018, 12, 140–157. [Google Scholar] [CrossRef] [Scilit]
- Ahmed, F.; Akther, N.; Hasan, M.; Chowdhury, K.; Mukta, M.S.H. Word Embedding Based News Classification by Using CNN. In Proceedings of the 2021 International Conference on Software Engineering & Computer Systems and 4th International Conference on Computational Science and Information Management (ICSECS-ICOCSIM), Pekan, Malaysia, 24–26 August 2021; pp. 609–613. [Google Scholar] [CrossRef] [Scilit]
- Shelar, A.; Moharir, M. Predicting Outcomes of Court Judgments—A Machine Learning Approach. In Proceedings of the 2021 International Conference on Intelligent Technologies (CONIT), Hubli, India, 25–27 June 2021; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Kalaivani, K.; Uma, S.; Kanimozhiselvi, C. Comparison of Deep Learning Approaches for Sentiment Classification. In Proceedings of the 2021 6th International Conference on Inventive Computation Technologies (ICICT), Coimbatore, India, 20–22 January 2021; pp. 1043–1047. [Google Scholar] [CrossRef] [Scilit]
- Zhang, J.; Li, Y.; Tian, J.; Li, T. LSTM-CNN hybrid model for text classification. In Proceedings of the 2018 IEEE 3rd Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China, 12–14 October 2018; pp. 1675–1680. [Google Scholar] [CrossRef] [Scilit]
- Rasool, A.; Jiang, Q.; Qu, Q.; Ji, C. WRS: A novel word-embedding method for real-time sentiment with integrated LSTM-CNN model. In Proceedings of the 2021 IEEE International Conference on Real-Time Computing and Robotics (RCAR), Xining, China, 15–19 July 2021; pp. 590–595. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y. Research on Text Classification Method Based on LSTM Neural Network Model. In Proceedings of the 2021 IEEE Asia-Pacific Conference on Image Processing, Electronics and Computers (IPEC), Dalian, China, 14–16 April 2021; pp. 1019–1022. [Google Scholar] [CrossRef] [Scilit]
- Bai, X. Text classification based on LSTM and attention. In Proceedings of the 2018 Thirteenth International Conference on Digital Information Management (ICDIM), Berlin, Germany, 24–26 September 2018; pp. 29–32. [Google Scholar] [CrossRef] [Scilit]
- Sanh, V.; Debut, L.; Chaumond, J.; Wolf, T. DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv 2019, arXiv:1910.01108. [Google Scholar] [CrossRef] [Scilit]
- Parwez, M.A.; Abulaish, M.; Jahiruddin. Multi-label classification of microblogging texts using convolution neural network. IEEE Access 2019, 7, 68678–68691. [Google Scholar] [CrossRef] [Scilit]
- Suryana, N.; Basari, A. Generate Contextual Insight of Product Review Using Deep LSTM and Word Embedding. J. Phys. Conf. Ser. 2020, 1577, 012006. [Google Scholar] [CrossRef] [Scilit]





| Study | Task | Method | Focus | Limitation |
|---|---|---|---|---|
| Wu and Wang [10] | Helpfulness classification | CNN + syntactic features | Review usefulness | No usage context |
| Wu and Chen [12] | Helpfulness prediction | BERT Temporal | voting behaviour | No activity extraction |
| Sun et al. [11] | Review informativeness | ML classifiers | Helpful reviews | No context modelling |
| Elmurngi and Gherbi [13] | Sentiment classification | LR, SVM, NB | Detect unfair reviews | No usage insight |
| Suryadi and Kim [20] | Usage context detection | NLP + ML | Context & sentiment | No activity-level detail |
| Zhao et al. [14] | Sentiment classification | Weak supervision | Sentiment polarity | Relies on ratings |
| Ahmed and Wang [7] | Aspect sentiment | BERT + NGD | Semantic understanding | No usage activity |
| Ali et al. [26] | Sentiment classification | ML + DL models | Model comparison | Not task-focused |
| Amirifar et al. [21] | Feature impact analysis | DL + NER | Product features | Not usage behaviour |
| Activity | Description | Number of Reviews | Percentage |
|---|---|---|---|
| Run | Activities involving running | 8500 | 16.7% |
| Walk | Activities involving walking | 8500 | 16.7% |
| Hike | Hiking activities | 8500 | 16.7% |
| Swim | Activities involving swimming | 8500 | 16.7% |
| Climb | Climbing activities | 8343 | 16.4% |
| Unknown | No clear activity identified | 8500 | 16.7% |
| Review | Target Activity |
|---|---|
| “It is still quite stiff and not stretched so it hurts when I wear it to climb. I had to keep changing to another climbing shoe.” | Climb |
| “Love these fior swimming in weedy or rocky areas; also great for kayaking and canoeing” | Swim |
| “Extremely comfortable. No breaking in needed. Very light and not chunky at all. I use them on my mountain bike as they have a good strong sole and are great for when I have to jump off and cross deep rivers or climb up steep sand banks etc. Very, very happy I chose this shoe.” | Climb |
| “They are comfortable and all my friends comment how much they like them. Vegan shoes! Now my conscience feels a bit better and I joke that if I get lost in the woods l could eat them for dinner. They do not have the support of regular athletic shoes so I don’t walk all over town in them. For me they are good for most everything else.” | Walk |
| Parameter | LSTM-CNN-GloVe | DistilBERT-CNN |
|---|---|---|
| Embedding source | GloVe (glove.6B.100d) | DistilBERT-base |
| Embedding dimension | 100 | 768 (token-level) |
| Embedding trainability | Frozen | Frozen |
| Trainable parameters | 175,000 | 492,422 |
| Tokenizer | Keras | WordPiece |
| Sequence length | 100 tokens | 64 tokens |
| Conv1D filters/kernel | 128 filters, kernel = 5, ReLU | 128 filters, kernel = 5, ReLU |
| MaxPooling1D | pool size = 4 | pool size = 4 |
| GlobalMaxPooling1D | No | Yes |
| Dropout | None | 0.3 (×2) |
| Output layer | Dense (6, softmax) | Dense (6, softmax) |
| Loss function | Sparse categorical cross-entropy | Sparse categorical cross-entropy |
| Optimizer | Adam (lr = 0.001) | Adam (lr = ) |
| Batch size | 32 | 16 |
| Training epochs | Up to 10 | Up to 5 |
| Early stopping patience | 5 | 2 |
| Random seeds | 42, 123, 456, 789, 1011 | |
| Target classes | Run, Walk, Hike, Swim, Climb, Unknown | |
| Model | Accuracy (%) | Macro F1 (%) | Overfitting Gap (%) |
|---|---|---|---|
| LSTM-CNN-GloVe | 63.70 ± 0.49 | 59.29 ± 2.49 | 0.017 |
| DistilBERT | 65.77 ± 0.58 | 62.01 ± 0.97 | −0.005 |
| DistilBERT-CNN | 57.58 ± 0.46 | 56.63 ± 0.52 | 0.030 |
| Model Variant | Accuracy (%) | Macro F1 (%) |
|---|---|---|
| LSTM-CNN-GloVe | 64.85 | 57.04 |
| LSTM-only | 65.07 | 57.05 |
| CNN-only | 64.45 | 59.44 |
| GloVe-avg | 63.75 | 56.82 |
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Unknown | 0.240 | 0.183 | 0.208 |
| Run | 0.252 | 0.231 | 0.241 |
| Walk | 0.848 | 0.924 | 0.884 |
| Hike | 0.258 | 0.315 | 0.284 |
| Climb | 0.903 | 0.899 | 0.901 |
| Swim | 0.929 | 0.943 | 0.936 |
| Macro Average | 0.572 | 0.583 | 0.576 |
| Model | Accuracy (%) | Macro F1 (%) |
|---|---|---|
| LSTM-CNN-GloVe | 63.70 | 59.29 |
| LSTM-CNN-GloVe (filtered) | 95.52 | 76.61 |
| DistilBERT-CNN | 57.58 | 56.94 |
| DistilBERT-CNN (filtered) | 92.90 | 88.56 |
| Papers | Task | Technique | Relevance to Activity Classification |
|---|---|---|---|
| Sindhura et al. [15] | sentiment analysis | WDE-CNN-LSTM | does not capture product usage |
| Ahmed and Wang [7] | sentiment analysis | BiLSTM-BERT-CNN | no activity-related information |
| Ali et al. [26] | sentiment analysis | BiLSTM-BERT | focused on opinion, not usage |
| Suryana et al. [46] | review representation for recommendation | GloVe-LSTM | does not perform activity classification |
| Amirifar et al. [21] | product rating prediction | RBFNN and NER | no activity-related information |
| This study | activity classification | LSTM-CNN-GloVe, DistilBERT | identifies product usage activity |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wamambo, T.; Fatima, A.; Kiplagat, B.; Dar Oghaz, M.M.; Luca, C. Activity Classification in E-Commerce Product Reviews Using Deep Learning and Transformer Models. Informatics 2026, 13, 120. https://doi.org/10.3390/informatics13080120
Wamambo T, Fatima A, Kiplagat B, Dar Oghaz MM, Luca C. Activity Classification in E-Commerce Product Reviews Using Deep Learning and Transformer Models. Informatics. 2026; 13(8):120. https://doi.org/10.3390/informatics13080120
Chicago/Turabian StyleWamambo, Tinashe, Arooj Fatima, Bethwel Kiplagat, Mahdi Maktab Dar Oghaz, and Cristina Luca. 2026. "Activity Classification in E-Commerce Product Reviews Using Deep Learning and Transformer Models" Informatics 13, no. 8: 120. https://doi.org/10.3390/informatics13080120
APA StyleWamambo, T., Fatima, A., Kiplagat, B., Dar Oghaz, M. M., & Luca, C. (2026). Activity Classification in E-Commerce Product Reviews Using Deep Learning and Transformer Models. Informatics, 13(8), 120. https://doi.org/10.3390/informatics13080120

