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

Volume 9, Issue 1
Winter 2026
Pages 31-40

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