Unidirectional and bidirectional LSTM for nonlinear synthetic time series forecasting
International Journal of Informatics and Communication Technology
Abstract
Deep learning models are sensitive to architecture choice and hyperparameter tuning. This study evaluates the forecasting performance of unidirectional long short-term memory (LSTM) and bidirectional LSTM (BiLSTM) networks using synthetic nonlinear time series data. Synthetic data were used to provide a controlled experimental setting in which the nonlinear data-generating process, sample size, and hyperparameter effects could be systematically examined. Threshold autoregressive (TAR) and self exciting threshold autoregressive (SETAR) models were simulated with sample sizes, 1000 and 3000. Each series was partitioned into training and testing sets using an 80:20 split. Both networks were trained using grid search by varying the number of hidden neurons (32, 64, 128) and training epochs (20, 50, 100). Forecast accuracy was evaluated using mean squared error (MSE) and mean absolute error (MAE), averaged across 30 replications. The results show that increasing epochs and hidden neurons improves accuracy, but the improvements decline at higher settings. BiLSTM achieves lower forecasting errors than LSTM for both TAR and SETAR datasets, and the Wilcoxon test confirms that the differences are statistically significant. The main contribution of this study is a controlled empirical framework that links the architecture, sample size, and hyperparameter settings to nonlinear regime-switching forecasting performance. The findings suggest that BiLSTM is preferable when higher accuracy is required, while LSTM remains a practical alternative for smoother nonlinear series or resource-constrained applications.
Discover Our Library
Embark on a journey through our expansive collection of articles and let curiosity lead your path to innovation.





