The Effectiveness of Dropout Layers in LSTM Architecture for Reducing Overfitting in Sony Stock Prediction

Authors

  • Roni Saputra STMIK IKMI Cirebon
  • Dian Ade Kurnia STMIK IKMI Cirebon
  • Yudhistira Arie Wijaya STMIK IKMI Cirebon

DOI:

https://doi.org/10.24076/intechnojournal.2025v7i2.2369

Keywords:

Long Short-Term Memory, Dropout, Stock Prediction, Overfitting, Financial Time Series

Abstract

This study investigates the effectiveness of dropout layers in reducing overfitting within Long Short-Term Memory (LSTM) neural networks for Sony stock price prediction. Financial time series forecasting presents significant challenges due to market volatility and noise, often leading to models that overfit historical data while failing to generalize to unseen market conditions. We implemented two LSTM models: one without dropout layers and another with dropout layers (rate=0.2) applied after each LSTM layer. Using historical Sony stock data from 2015-2025, we evaluated both models using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE) metrics. The model with dropout demonstrated superior performance on testing data, achieving RMSE of 0.5971, MAE of 0.4411, and MAPE of 2.1502%, compared to the model without dropout which obtained RMSE of 0.7124, MAE of 0.5636, and MAPE of 2.6684%. Furthermore, the dropout model exhibited significantly reduced overfitting, with smaller performance gaps between training and testing datasets across all metrics, particularly in MAPE where the difference approached zero (0.0509%). This research provides empirical evidence that dropout regularization effectively enhances LSTM model generalization for stock prediction, offering practical value for developing more reliable financial forecasting models. Future research could explore optimal dropout rates for different market conditions and investigate combinations of dropout with other regularization techniques.

References

[1] W. Chen, W. Hussain, F. Cauteruccio, and X. Zhang, “Deep Learning for Financial Time Series Prediction: A State-of-the-Art Review of Standalone and Hybrid Models,” C. - Comput. Model. Eng. Sci., vol. 139, no. 1, pp. 187–224, 2023, doi: 10.32604/cmes.2023.031388.

[2] I. Botunac, J. Bosna, and M. Matetic, “Optimization of Traditional Stock Market Strategies Using the LSTM Hybrid Approach,” Inf., vol. 15, no. 3, 2024, doi: 10.3390/info15030136.

[3] B. W. Rauf, “Forecasting A Major Banking Corporation Stock Prices Using LSTM Neural Networks,” Intechno J. (Information Technol. Journal), vol. 6, no. 2, pp. 108–113, Dec. 2024, doi: 10.24076/intechnojournal.2024v6i2.1888.

[4] V. DeMiguel, J. Gil-Bazo, F. J. Nogales, and A. A. P. Santos, “Machine learning and fund characteristics help to select mutual funds with positive alpha,” J. Financ. Econ., vol. 150, no. 3, p. 103737, 2023, doi: 10.1016/j.jfineco.2023.103737.

[5] V. Chang, Q. A. Xu, A. Chidozie, and H. Wang, “Predicting Economic Trends and Stock Market Prices with Deep Learning and Advanced Machine Learning Techniques,” Electron., vol. 13, no. 17, 2024, doi: 10.3390/electronics13173396.

[6] S. Jin, “Sentiment-Driven Forecasting LSTM Neural Networks for Stock Prediction-Case of China Bank Sector,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 11, pp. 1–7, 2023, doi: 10.14569/IJACSA.2023.0141101.

[7] A. Li, “Volatility Forecasting in Global Financial Markets Using TimeMixer,” pp. 1–20, 2024, [Online]. Available: http://arxiv.org/abs/2410.09062

[8] H. Zheng, Z. Zhou, and J. Chen, “RLSTM: A New Framework of Stock Prediction by Using Random Noise for Overfitting Prevention,” Comput. Intell. Neurosci., vol. 2021, 2021, doi: 10.1155/2021/8865816.

[9] D. Sidak, J. Schwarzerova, W. Weckwerth, and S. Waldherr, “Interpretable machine learning methods for predictions in systems biology from omics data,” 2022, doi: 10.3389/fmolb.2022.926623.

[10] W. Yang, C. Jia, and R. Liu, “Construction and Simulation of the Enterprise Financial Risk Diagnosis Model by Using Dropout and BN to Improve LSTM,” Secur. Commun. Networks, vol. 2022, 2022, doi: 10.1155/2022/4767980.

[11] N. Patel, H. Shah, and K. Mewada, “Enhancing Financial Data Visualization for Investment Decision-Making,” 2023, [Online]. Available: https://arxiv.org/pdf/2403.18822

[12] J. Xie et al., “Advanced Dropout: A Model-Free Methodology for Bayesian Dropout Optimization,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 44, no. 9, pp. 4605–4625, 2022, doi: 10.1109/TPAMI.2021.3083089.

[13] A. Yaqoob and S. M. Abdullah, “Predictive Performance of LSTM Networks on Sectoral Stocks in an Emerging Market: A Case Study of the Pakistan Stock Exchange,” pp. 1–11, 2025, [Online]. Available: http://arxiv.org/abs/2509.14401

[14] W. JiaJie and L. LiLi, “Portfolio Optimization through a Multi-modal Deep Reinforcement Learning Framework,” Eng. Open Access, vol. 3, no. 4, pp. 01–08, 2025, doi: 10.33140/eoa.03.04.a03.

[15] R. Chaudhary, “Advanced Stock Market Prediction Using Long Short-Term Memory Networks: A Comprehensive Deep Learning Framework,” 2025, [Online]. Available: http://arxiv.org/abs/2505.05325

[16] J. K. Meena, “Incorporating an attention layer in deep learning models to enhance short-term stock price predictions models to enhance short-term stock price predictions,” pp. 0–22, 2024.

[17] M. Sarikoc and M. Celik, PCA-ICA-LSTM: A Hybrid Deep Learning Model Based on Dimension Reduction Methods to Predict S & P 500 Index, vol. 65, no. 4, Springer US, 2025, doi: 10.1007/s10614-024-10629-x.

[18] N. N. Phien and J. Platos, “The PSR-Transformer Nexus: A Deep Dive into Stock Time Series Forecasting,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 12, pp. 917–924, 2023, doi: 10.14569/IJACSA.2023.0141292.

[19] M. K. Paul and P. Das, “A Comparative Study of Deep Learning Algorithms for Forecasting Indian Stock Market Trends,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 10, pp. 932–941, 2023, doi: 10.14569/IJACSA.2023.0141098.

[20] M. A. Jahin, A. Shahriar, and M. Al Amin, “MCDFN: supply chain demand forecasting via an explainable multi-channel data fusion network model,” Evol. Intell., vol. 18, no. 3, 2025, doi: 10.1007/s12065-025-01053-7.

Downloads

Published

2025-12-31

Issue

Section

Articles