Transactions on Machine Intelligence

Transactions on Machine Intelligence

Earthquake Prediction and Early Warning System Using Hybrid Random Forest and Time-Series Transformer Deep Learning Algorithms

Document Type : Original Article

Authors
1 Master of Information Technology, Computer, Faculty of Electrical, Computer and Mechanical Engineering, University of Eyvanakey, Semnan, Iran
2 Assistant Professor, Computer, Faculty of Electrical, Computer and Mechanical Engineering, University of Eyvanakey, Semnan, Iran,
Abstract
Earthquakes pose a catastrophic threat to human life and critical infrastructure, necessitating the development of highly accurate early warning systems. The primary objective of this research is to design an earthquake early warning framework capable of predicting both seismic magnitude and occurrence timing by integrating machine learning and deep learning architectures. In this study, a Random Forest Regression model is employed to estimate earthquake magnitudes, while a time-series Transformer algorithm is utilized to forecast occurrence times. The underlying dataset, sourced from seismic networks in Japan, underwent comprehensive preprocessing, normalization, and train-test partitioning. To predict timing, data was converted into a sequential time-series format before feeding it into the Transformer network. The designed Transformer model incorporates multi-head self-attention mechanisms, layer normalization, and aggregation modules, significantly enhancing its temporal forecasting capacity. Operationally, the Random Forest algorithm first identifies seismic events exceeding a magnitude of 5.0, after which the time-series Transformer predicts the exact occurrence window down to the minute. By combining these predictive outputs, the system dynamically generates visual warning alerts based on the forecasted severity and timeline. Empirical evaluations demonstrate strong predictive proficiency. The magnitude estimation model achieved a Mean Squared Error (MSE) of 0.0261, a Mean Absolute Error (MAE) of 0.0883, a Root Mean Squared Error (RMSE) of 0.1615, and a Coefficient of Determination (R^2) of 0.7737. For earthquake timing forecasting, the system yielded an MSE of 0.0007, an MAE of 0.0265, and an RMSE of 0.0264. Implementing this hybrid early warning system offers a vital tool for effective disaster risk management and mitigation strategies in seismically active regions.
Keywords

[1]      Shidik, G. F., et al. (2024). LUTanh activation function to optimize BI-LSTM in earthquake forecasting. International Journal of Intelligent Engineering & Systems, 17(1). https://doi.org/10.22266/ijies2024.0229.48
[2]      Wang, K., Johnson, C. W., Bennett, K. C., & Johnson, P. A. (2022). Predicting future laboratory fault friction through deep learning transformer models. Geophysical Research Letters, 49(19), e2022GL098233. https://doi.org/10.1029/2022GL098233
[3]      Wang, Q., Guo, Y., Yu, L., & Li, P. (2017). Earthquake prediction based on spatio-temporal data mining: An LSTM network approach. IEEE Transactions on Emerging Topics in Computing, 8(1), 148–158. https://doi.org/10.1109/TETC.2017.2699169
[4]      Borup, D., Christensen, B. J., Mühlbach, N. S., & Nielsen, M. S. (2023). Targeting predictors in random forest regression. International Journal of Forecasting, 39(2), 841–868. https://doi.org/10.1016/j.ijforecast.2022.02.010
[5]      Apriani, M., & Wijaya, S. (2021). Earthquake magnitude estimation based on machine learning: Application to earthquake early warning system. In Journal of Physics: Conference Series (Vol. 1951, No. 1, Article 012057). IOP Publishing. https://doi.org/10.1088/1742-6596/1951/1/012057
[6]      Münchmeyer, J., Bindi, D., Leser, U., & Tilmann, F. (2021). Earthquake magnitude and location estimation from real-time seismic waveforms with a transformer network. Geophysical Journal International, 226(2), 1086–1104. https://doi.org/10.1093/gji/ggab139
[7]      Saad, O. M., Hafez, A. G., & Soliman, M. S. (2020). Deep learning approach for earthquake parameters classification in earthquake early warning system. IEEE Geoscience and Remote Sensing Letters, 18(7), 1293–1297. https://doi.org/10.1109/LGRS.2020.2998580
[8]      Mukherjee, T., Singh, C., & Biswas, P. K. (2021). A novel approach for earthquake early warning system design using deep learning techniques (arXiv Preprint arXiv:2101.06517). https://arxiv.org/abs/2101.06517
[9]      Saad, O. M., Chen, Y., Savvaidis, A., Fomel, S., & Chen, Y. (2022). Real-time earthquake detection and magnitude estimation using vision transformer. Journal of Geophysical Research: Solid Earth, 127(5), e2021JB023657. https://doi.org/10.1029/2021JB023657
[10]   Zhang, Z., & Wang, Y. (2023). A spatiotemporal model for global earthquake prediction based on convolutional LSTM. IEEE Transactions on Geoscience and Remote Sensing, 61, 1–12. https://doi.org/10.1109/TGRS.2023.3302316
[11]   Abebe, E., Kebede, H., Kevin, M., & Demissie, Z. (2023). Earthquakes magnitude prediction using deep learning for the Horn of Africa. Soil Dynamics and Earthquake Engineering, 170, 107913. https://doi.org/10.1016/j.soildyn.2023.107913
[12]   Sadhukhan, B., Chakraborty, S., & Mukherjee, S. (2023). Predicting the magnitude of an impending earthquake using deep learning techniques. Earth Science Informatics, 16(1), 803–823. https://doi.org/10.1007/s12145-022-00916-2
[13]   Puthran, R. (2024). Spatio-temporal analysis of hybrid CNN-GRU model for prediction of earthquake for disaster management. International Journal of Intelligent Systems and Applications in Engineering, 12(3s), 270–281.
[14]   Alshdaifat, E., Alshdaifat, D. A., Alsarhan, A., Hussein, F., & El-Salhi, S. M. F. S. (2021). The effect of preprocessing techniques, applied to numeric features, on classification algorithms' performance. Data, 6(2), 11. https://doi.org/10.3390/data6020011
[15]   Umar, M. A., Chen, Z., Shuaib, K., & Liu, Y. (2025). Effects of feature selection and normalization on network intrusion detection. Data Science and Management, 8(1), 23–39. https://doi.org/10.1016/j.dsm.2024.08.001
[16]   Liu, L., Liu, J., & Han, J. (2021). Multi-head or single-head? An empirical comparison for transformer training (arXiv Preprint arXiv:2106.09650). https://arxiv.org/abs/2106.09650
[17]   Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., & Zhang, W. (2021). Informer: Beyond efficient transformer for long sequence time-series forecasting. Proceedings of the AAAI Conference on Artificial Intelligence, 35(12), 11106–11115. https://doi.org/10.1609/aaai.v35i12.17325
[18]   Liao, L., Li, H., Shang, W., & Ma, L. (2022). An empirical study of the impact of hyperparameter tuning and model optimization on the performance properties of deep neural networks. ACM Transactions on Software Engineering and Methodology, 31(3), 1–40. https://doi.org/10.1145/3506695
[19]   Du, D., & Cui, Z. (2022). An evolutionary model for earthquake prediction considering time-series evolution and feature extraction and its application. In Journal of Physics: Conference Series (Vol. 2333, No. 1, Article 012013). IOP Publishing. https://doi.org/10.1088/1742-6596/2333/1/012013
Volume 9, Issue 1
Winter 2026
Pages 48-64

  • Receive Date 27 December 2025
  • Revise Date 17 January 2026
  • Accept Date 02 March 2026