Sentiment Trend Forecasting in E-Commerce Reviews Using Transformer-Based Representations and Time-Series Modeling
Keywords:
Sentiment Trend Forecasting, Transformer Models, Time-Series Analysis, E-Commerce Reviews, Sentiment AnalysisAbstract
The rapid growth of e-commerce platforms has generated large-scale user-generated textual data, creating opportunities for modeling not only static sentiment polarity but also the temporal evolution of consumer opinion. This study formalizes Sentiment Trend Forecasting (STF) as a predictive time-series problem in which contextual sentiment representations extracted from transformer models are aggregated into temporal signals and used to forecast future sentiment trajectories. The dataset consists of Amazon product reviews spanning 2003–2012, resulting in more than 450 weekly observations after temporal aggregation. Aggregated contextual sentiment signals are constructed from review-level embeddings generated using pre-trained BERT and RoBERTa models across discrete time intervals. Weekly sentiment series are modeled using ARIMA and Long Short-Term Memory (LSTM) architectures under a rolling forecasting protocol with a 52-week hold-out horizon. Forecasting performance is evaluated using Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE). Experimental results show that BERT-based sentiment signals achieve MAE = 0.00041 and RMSE = 0.00052, outperforming VADER (MAE = 0.084, RMSE = 0.101) and rating-based baselines (MAE = 0.205, RMSE = 0.254). Although RoBERTa-based signals yield low error values (MAE = 0.00012, RMSE = 0.00015), their near-constant output results in weak correlation with ratings (r = 0.15), limiting their interpretability. Statistical validation includes stationarity testing (ADF), residual diagnostics (Ljung–Box), and Diebold–Mariano tests. The Diebold–Mariano test confirms the statistical superiority of BERT-based forecasts (p < 0.01). The results confirm that contextual embedding-based sentiment representations provide predictable temporal signals for proactive monitoring of consumer opinion.
References
Minqing Hu, Bing Liu, “Mining and summarizing customer reviews,” KDD-2004 - Proc. Tenth ACM SIGKDD Int. Conf. Knowl. Discov. Data Min., 2004, [Online]. Available: https://dl.acm.org/doi/10.1145/1014052.1014073
“E-commerce worldwide - statistics & facts | Statista.” Accessed: Mar. 23, 2026. [Online]. Available: https://www.statista.com/topics/871/online-shopping/?srsltid=AfmBOoqfF_gtks8LZeQAnFHEHNDN62rKAUQnYInLMq1AkhOmsWRqSrBL
“Data driven: Profiting from your most important business asset | Request PDF.” Accessed: Mar. 23, 2026. [Online]. Available: https://www.researchgate.net/publication/280645794_Data_driven_Profiting_from_your_most_important_business_asset
“(PDF) Data Science for Business.” Accessed: May 10, 2026. [Online]. Available: https://www.researchgate.net/publication/256438799_Data_Science_for_Business
Hai Ha Do, P. W.C. Prasad, “Deep Learning for Aspect-Based Sentiment Analysis: A Comparative Review,” Expert Syst. Appl., vol. 118, pp. 272–299, 2019, doi: https://doi.org/10.1016/j.eswa.2018.10.003.
J. Wang, B. Xu, and Y. Zu, “Deep learning for Aspect-based Sentiment Analysis,” Proc. - 2021 Int. Conf. Mach. Learn. Intell. Syst. Eng. MLISE 2021, pp. 267–271, 2021, doi: 10.1109/MLISE54096.2021.00056.
Yang Yu, Wenjing Duan, “The impact of social and conventional media on firm equity value: A sentiment analysis approach,” Decis. Support Syst., vol. 55, no. 4, pp. 919–926, 2013, doi: https://doi.org/10.1016/j.dss.2012.12.028.
“(PDF) Applying Supervised Opinion Mining Techniques on Online User Reviews.” Accessed: Mar. 23, 2026. [Online]. Available: https://www.researchgate.net/publication/266414611_Applying_Supervised_Opinion_Mining_Techniques_on_Online_User_Reviews
Y. Wang and X. J. Wang, “A new approach to feature selection in text classification,” 2005 Int. Conf. Mach. Learn. Cybern. ICMLC 2005, pp. 3814–3819, 2005, doi: 10.1109/icmlc.2005.1527604.
X. Ouyang, P. Zhou, C. H. Li, and L. Liu, “Sentiment analysis using convolutional neural network,” Proc. - 15th IEEE Int. Conf. Comput. Inf. Technol. CIT 2015, 14th IEEE Int. Conf. Ubiquitous Comput. Commun. IUCC 2015, 13th IEEE Int. Conf. Dependable, Auton. S…, pp. 2359–2364, Dec. 2015, doi: 10.1109/CIT/IUCC/DASC/PICOM.2015.349.
S. Kalbhor, D. Goyal, and K. Sankhla, “BERTConvNet: A Transformer-Based Framework for Aspect-Based Sentiment Analysis and Fake Review Detection on Self-Created YouTube Review Dataset,” Ing. des Syst. d’Information, vol. 30, no. 6, pp. 1639–1651, Jun. 2025, doi: 10.18280/isi.300622.
Alfredo Daza, Néstor Daniel González Rueda, “Sentiment Analysis on E-Commerce Product Reviews Using Machine Learning and Deep Learning Algorithms: A Bibliometric Analysis, Systematic Literature Review, Challenges and Future Works,” Int. J. Inf. Manag. Data Insights, vol. 4, no. 2, p. 100267, 2024, doi: https://doi.org/10.1016/j.jjimei.2024.100267.
J. Li, H. Bu, and J. Wu, “Sentiment-aware stock market prediction: A deep learning method,” 14th Int. Conf. Serv. Syst. Serv. Manag. ICSSSM 2017 - Proc., Jul. 2017, doi: 10.1109/ICSSSM.2017.7996306.
“(PDF) Sentiment Analysis of Social Media Data for Predicting Consumer Behavior Trends Using Machine Learning.” Accessed: Apr. 28, 2026. [Online]. Available: https://www.researchgate.net/publication/396790066_Sentiment_Analysis_of_Social_Media_Data_for_Predicting_Consumer_Behavior_Trends_Using_Machine_Learning
“(PDF) Evaluating Pre-Trained Transformers (BERT, RoBERTa) on Amazon Review Sentiment Tasks.” Accessed: Mar. 23, 2026. [Online]. Available: https://www.researchgate.net/publication/394528917_Evaluating_Pre-Trained_Transformers_BERT_RoBERTa_on_Amazon_Review_Sentiment_Tasks
L. Zhang, S. Wang, and B. Liu, “Deep learning for sentiment analysis: A survey,” Wiley Interdiscip. Rev. Data Min. Knowl. Discov., vol. 8, no. 4, p. e1253, Jul. 2018, doi: 10.1002/WIDM.1253.
Y. R. Devi, A. Bharthepudi, and A. Govindarajula, “A Review on Sentiment Analysis Using Transformers and Ensemble methods,” 6th IEEE Int. Conf. Recent Adv. Inf. Technol. RAIT 2025, 2025, doi: 10.1109/RAIT65068.2025.11089332.
E. Cambria, “Affective Computing and Sentiment Analysis,” IEEE Intell. Syst., vol. 31, no. 2, pp. 102–107, Mar. 2016, doi: 10.1109/MIS.2016.31.
A. Almalaq and G. Edwards, “A review of deep learning methods applied on load forecasting,” Proc. - 16th IEEE Int. Conf. Mach. Learn. Appl. ICMLA 2017, vol. 2017-December, pp. 511–516, 2017, doi: 10.1109/ICMLA.2017.0-110.
S. A. Bryan Lim, “Temporal Fusion Transformers for interpretable multi-horizon time series forecasting,” Int. J. Forecast., vol. 37, no. 4, pp. 1748–1764, 2021, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0169207021000637
Chi Sun, Luyao Huang, Xipeng Qiu, “Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence,” ACL Anthol., pp. 380–385, 2019, [Online]. Available: https://aclanthology.org/N19-1035/
Hu Xu, Bing Liu, “BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis,” Proc. 2019 Conf. North, 2019, [Online]. Available: https://aclanthology.org/N19-1242/
Hashir Ali, Ehtesham Hashmi, “Analyzing Amazon Products Sentiment: A Comparative Study of Machine and Deep Learning, and Transformer-Based Techniques,” Electronics, vol. 13, no. 7, p. 1305, 2024, doi: https://doi.org/10.3390/electronics13071305.
Kasun Bandara, Christoph Bergmeir, “Forecasting across time series databases using recurrent neural networks on groups of similar series: A clustering approach,” Expert Syst. Appl., vol. 140, p. 112896, 2020, doi: https://doi.org/10.1016/j.eswa.2019.112896.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 50sea

This work is licensed under a Creative Commons Attribution 4.0 International License.


















