Optimization of an LSTM Network Using an Adaptive PSO Algorithm for Demand Forecasting in Supply Chain
Keywords:
Demand forecasting, Supply Chain, Adaptative PSO, Genetic Algorithm, RMSE, Retail forecasting SalesAbstract
Demand forecasting is essential for effective supply chain management, as accurate predictions improve inventory planning, reduce costs, and ensure product availability. This thesis proposes a hybrid PSO-LSTM approach that uses an Adaptive Particle Swarm Optimization algorithm to jointly optimize the LSTM architecture and hyperparameters for retail sales forecasting. The proposed PSO incorporates Latin Hypercube Sampling, diversity-based nonlinear inertia, adaptive cognitive/social coefficients, Lévy Flight, and Opposition-Based Learning to improve exploration and reduce premature convergence.
Experiments were conducted on the Brazilian retail sales dataset containing 937 daily observations from January 2014 to July 2016. The proposed PSO-LSTM achieved an RMSE of 76.000 units/day on the held-out test set, outperforming Genetic Algorithm optimization (80.180) and Grid Search (85.720). It also achieved competitive performance with the GA-GRU benchmark (73.027) while optimizing a larger hyperparameter space (10 versus 5 dimensions). Ablation and statistical analyses using Wilcoxon and Friedman tests over ten independent runs further confirmed the effectiveness of the proposed approach at the 0.05 significance level.
Downloads
References
[1] Kilimci, Z. H., Akyuz, A. O., Uysal, M., Akyokus, S., Uysal, M. O., Atak Bulbul, B., & Ekmis, M. A. (2019). An improved demand forecasting model using deep learning approach and proposed decision integration strategy for supply chain. Complexity, 2019, 9067367. https://doi.org/10.1155/2019/9067367
[2] Saraiva, F. A., & Yoshizaki, H. T. Y. (2024). Logistics demand forecasting: a literature review. Transportation Research Procedia, 79, 100107. https://doi.org/10.1016/j.trpro.2024.03.015
[3] Box, G. E. P., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time Series Analysis: Forecasting and Control (5th ed.). Wiley. https://doi.org/10.1002/9781118619193
[4] Makridakis, S., Spiliotis, E., & Assimakopoulos, V. (2018). Statistical and machine learning forecasting methods: Concerns and ways forward. PLOS ONE, 13(3), e0194889. https://doi.org/10.1371/journal.pone.0194889
[5] Noh, J., Park, H.J., Kim, J. S., & Hwang, S.J. (2020). Gated recurrent unit with genetic algorithm for product demand forecasting in supply chain management. Mathematics, 8(4), 565. https://doi.org/10.3390/math8040565
[6] Hochreiter, S., & Schmidhuber, J. (1997). Long shortterm memory. Neural Computation, 9(8), 17351780. https://doi.org/10.1162/neco.1997.9.8.1735
[7] Bandara, K., Shi, P., Bergmeir, C., Hewamalage, H., Tran, Q., & Seaman, B. (2019). Sales demand forecast in ecommerce using a long shortterm memory neural network. In Proceedings of ICONIP 2019 (pp. 462474). Springer. https://doi.org/10.1007/9783030368081_51
[8] Bergstra, J., & Bengio, Y. (2012). Random search for hyperparameter optimization. Journal of Machine Learning Research, 13, 281305.
[9] Bouktif, S., Fiaz, A., Ouni, A., & Serhani, M. A. (2018). Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm. Energies, 11(7), 1636. https://doi.org/10.3390/en11071636
[10] Sagheer, A., & Kotb, M. (2019). Time series forecasting of petroleum production using deep LSTM recurrent networks. Neurocomputing, 323, 203213. https://doi.org/10.1016/j.neucom.2018.09.082
[11] Peng, L., Liu, S., Liu, R., & Wang, L. (2018). Effective long shortterm memory with differential evolution algorithm for electricity price prediction. Energy, 162, 13011314. https://doi.org/10.1016/j.energy.2018.05.052
[12] Kennedy, J., & Eberhart, R. (1995). Particle swarm optimization. In Proceedings of ICNN'95 (Vol. 4, pp. 19421948). IEEE. https://doi.org/10.1109/ICNN.1995.488968
[13] Zhan, Z.H., Zhang, J., Li, Y., & Chung, H. S.H. (2009). Adaptive particle swarm optimization. IEEE Transactions on Systems, Man, and Cybernetics Part B, 39(6), 13621381. https://doi.org/10.1109/TSMCB.2009.2015956
[14] Yang, X.S., & Deb, S. (2010). Engineering optimisation by cuckoo search. International Journal of Mathematical Modelling and Numerical Optimisation, 1(4), 330343. https://doi.org/10.1504/IJMMNO.2010.035430
[15] Tizhoosh, H. R. (2005). Oppositionbased learning: A new scheme for machine intelligence. In Proceedings of CIMCA 2005 (pp. 695701). IEEE. https://doi.org/10.1109/CIMCA.2005.1631345
[16] Rahnamayan, S., Tizhoosh, H. R., & Salama, M. M. A. (2008). Oppositionbased differential evolution. IEEE Transactions on Evolutionary Computation, 12(1), 6479. https://doi.org/10.1109/TEVC.2007.894200
[17] Kaggle. (2014). Retail Sales Forecasting Brazilian Dataset. https://www.kaggle.com/tevecsystems/retailsalesforecasting
[18] Ioffe, S., & Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of ICML 2015 (pp. 448456). PMLR.
[19] Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., & Salakhutdinov, R. (2014). Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15, 19291958.
[20] Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. In Proceedings of ICLR 2015. arXiv:1412.6980. https://doi.org/10.48550/arXiv.1412.6980
[21] Mantegna, R. N. (1994). Fast, accurate algorithm for numerical simulation of Lévy stable stochastic processes. Physical Review E, 49(5), 46774683. https://doi.org/10.1103/PhysRevE.49.4677
[22] Shi, Y., & Eberhart, R. (1998). A modified particle swarm optimizer. In Proceedings of IEEE ICEC (pp. 6973). https://doi.org/10.1109/ICEC.1998.699146
[23] Clerc, M., & Kennedy, J. (2002). The particle swarm explosion, stability, and convergence in a multidimensional complex space. IEEE Transactions on Evolutionary Computation, 6(1), 5873. https://doi.org/10.1109/4235.985692
[24] Liang, J. J., Qin, A. K., Suganthan, P. N., & Baskar, S. (2006). Comprehensive learning particle swarm optimizer for global optimization of multimodal functions. IEEE Transactions on Evolutionary Computation, 10(3), 281295. https://doi.org/10.1109/TEVC.2005.857610
[25] Holland, J. H. (1992). Adaptation in Natural and Artificial Systems. MIT Press.
[26] Deb, K., & Agrawal, R. B. (1995). Simulated binary crossover for continuous search space. Complex Systems, 9(2), 115148.
[27] Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press.
[28] Cho, K., Van Merriënboer, B., Bahdanau, D., & Bengio, Y. (2014). Learning phrase representations using RNN encoderdecoder for statistical machine translation. arXiv:1406.1078. https://doi.org/10.48550/arXiv.1406.1078
[29] Elsken, T., Metzen, J. H., & Hutter, F. (2019). Neural architecture search: A survey. Journal of Machine Learning Research, 20(55), 121.
[30] Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6), 8083. https://doi.org/10.2307/3001968
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Hamza EL ALAMI, toufik mzili, morad bouzidi (Author)

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