Unidirectional and bidirectional LSTM for nonlinear synthetic time series forecasting

Nur Haizum Abd Rahman, Hani Syahida Zulkafli

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.

Keywords


Threshold autoregressive model; Self-exciting threshold autoregressive model; Time series; Hyperparameter tuning; Grid search

Full Text:

PDF


DOI: http://doi.org/10.11591/ijict.v15i4.pp1696-1705

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Nur Haizum Abd Rahman, Hani Syahida Zulkafli

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

The International Journal of Informatics and Communication Technology (IJ-ICT)
p-ISSN 2252-8776, e-ISSNĀ 2722-2616
This journal is published by theĀ Intelektual Pustaka Media Utama (IPMU).

Web Analytics View IJICT Stats