1. INTRODUCTION
supporting the development of improved seismic analysis and warning systems [3].
Earthquakes are among the most unpredictable natural hazards, threatening human life, infrastructure, and economic activity. Their sudden release of energy can cause fatalities, extensive structural damage, and substantial financial losses. Events such as the 2004 Indian Ocean tsunami, the 2011 Japan earthquake, and the 2023 Turkey–Syria earthquake demonstrate the need for improved disaster preparedness [1, 2]. Machine-learning methods are increasingly applied to earthquake monitoring and other seismological tasks,
Reliable forecasts can help emergency responders act quickly, support warnings to vulnerable communities, and guide decisions about critical infrastructure such as transport systems and nuclear facilities. Governments may also use forecasts to plan sustainable development in seismic areas and to prioritize infrastructure investments and post-disaster logistics. The global reach of seismic activity and the continued growth of cities in tectonically active regions make these capabilities increasingly important.
Traditional physical and statistical seismological methods have advanced understanding of seismic behavior, but can struggle to represent its nonlinear spatial and temporal dynamics. Machine-learning (ML) methods can learn complex patterns from data without relying on predefined physical constraints and have therefore become increasingly prominent in seismic analysis [4, 5]. Their application nevertheless presents challenges: high-dimensional data can increase computational and memory demands and encourage overfitting, while redundant features can reduce model reliability [6, 7]. Model performance also depends on selecting suitable learning rates, tree depths, regularization terms, and kernel settings; automated methods such as randomized search and Bayesian optimization can help tune these parameters [8]. Generalization across datasets, noisy measurements, and limited ground-truth labels remains an active concern [9].
Earthquake-prediction datasets may combine geospatial coordinates, seismic-wave characteristics, distances to fault lines, and environmental measurements. As the number of variables grows, the dimensionality curse can increase computationalresource and memory requirements, and make models more susceptible to overfitting. Feature selection and dimensionality reduction are therefore important for retaining informative signals without sacrificing efficiency. Redundant variables require data validation and careful handling so that repeated information does not distort model fitting. Hyperparameter choice is similarly consequential: learning rates, tree depth, regularization strength, and kernel configuration can determine whether a model underfits or overfits. Automated search strategies help compare configurations over different training folds, but performance under noise and across geographic areas remains a central generalization challenge.
This study develops a data-driven system for predicting earthquake magnitude from an open global dataset and compares model accuracy, computational efficiency, and geographic and temporal generalization. Light Gradient Boosting Machine (LightGBM) is selected for its ability to process tabular data efficiently using histogram-based, leaf-wise decisiontree learning, including data with missing and categorical values [10]. Randomized hyperparameter search with crossvalidation is used to identify a model configuration while limiting overfitting [11]. The comparative evaluation uses standardized regression metrics and considers the influence of preprocessing, feature selection, and tuning on predictive performance [12, 13]. By documenting the use of public seismic data and the modeling procedure, the work aims to provide a reproducible basis for regional prediction studies, stressanomaly analysis, and real-time early-warning research.
The main contributions are: (i) an optimized LightGBM model using randomized hyperparameter tuning; (ii) a systematic comparison of five ML algorithms for earthquakemagnitude prediction; (iii) an analysis of dimensionality, redundant features, and model generalization in seismic data; and (iv) a reproducible framework based on open-access data and transparent modeling practices to support seismic risk research and decision-making.
2. LITERATURE REVIEW
Earthquake prediction is an important disaster-prevention problem because seismic events occur abruptly and can have severe effects on people and infrastructure. Researchers have applied Random Forest regression and neural networks to magnitude and depth prediction using historical seismic activity, location, and event-time features. Statistical models combined with geographic-information-system data have been used to detect patterns that conventional seismological analysis may not capture [14]. Comparative investigations have also examined alternative prediction methods. In the Horn of Africa, transformer-based magnitude prediction was compared with LSTM, BiLSTM, and attention-based recurrent models; the transformer reported lower MAE, MSE, RMSE, and MAPE and was designed to capture spatial and temporal relationships [15, 16].
Hybrid work combines geological domain knowledge with machine learning. A Random Forest connected to geological models has been studied for short-term prediction along the Pacific Ring of Fire, with the integrated approach reported to provide greater predictive accuracy and reliability than either component alone. In Southern California, two hybrid models combined the Flower Pollination Algorithm (FPA) with Extreme Learning Machines (ELM) and least-squares support vector machines (LS-SVM). Seven seismic indicators were used to forecast events up to 15 days in advance; FPA–LSSVM showed favorable RMSE, MAE, SMAPE, and PMRE results [16, 17]. For early warning, the Ensemble Earthquake Early Warning System (E3WS) uses machine-learning algorithms to detect, locate, and estimate earthquake magnitude from as little as three seconds of P-wave data recorded at a single station. Its training data include records from Peru, Chile, Japan, and the STEAD global dataset [18].
Bayesian ML with wavelet analysis has been used to identify seismic cycles in five global zones over records spanning 1900–2021. The cited study reported periodicities from 3.7 to 55 years, discussed elevated earthquake potential in Japan for 2024–2026 and South America for 2026–2031, and used the method to examine the timing of the Parkfield earthquake [19]. In India, seven supervised approaches were evaluated for earthquake-severity classification across six datasets; Simple Logistic and Logistic Model Tree classifiers were reported to perform well [20]. GPS satellite total electron content has also been studied as a possible precursor. An LSTM model trained on measurements from preceding days reportedly achieved 0.82 accuracy, exceeding SVM, LDA, and Random Forest classifiers [21].
Other studies applied artificial neural networks and LSTM to Himalayan earthquake data, reporting useful detection for medium-scale events but difficulty identifying highmagnitude earthquakes [22]. In Iran, fault density calculated using kernel-density estimation and bivariate Moran’s I was incorporated with spatial features; SVM, decision-tree, shallow-neural-network, and deep-neural-network models were evaluated, with spatial variables improving prediction of larger magnitudes [23]. For earthquake-induced landslides, high-resolution satellite imagery and digital elevation models have been combined with stacked autoencoders, with reported improvements over logistic regression and Random Forest [24]. Satellite infrared and hyperspectral data for 1,371 strong earthquakes have also been analyzed using Inverse Boosting Pruning Trees and compared with six alternative ML methods [25].
A systematic review of deep learning for earthquake disaster assessment analyzed 204 articles and classified research by assessment objects, data, models, and application stages, while discussing challenges and opportunities [26]. In Indonesia, four-second raw-seismogram data were used to train regression and classification deep neural networks for earthquake early warning. The classification network was reported to have a lower final loss than Random Forest for real-time magnitude estimation [27]. This body of work points to deep architectures, ionospheric and remote-sensing observations, spatial features, hybrid models, and ensembles as continuing directions for seismic risk research.
3. DATASET
3.1 Dataset Description
The study uses the Earthquakes 2023 Global dataset, an openaccess collection of global seismic events recorded during 2023 [28]. It contains 26,642 events and 22 descriptive fields spanning time, location, seismological measurements, and measurement uncertainty. The fields include:
- Time, Latitude, Longitude, Depth, and Mag: event timestamp, epicenter coordinates, depth in kilometers, and the target magnitude.
- MagType, Nst, Gap, and Dmin: magnitude scale, number of recording stations, azimuthal station gap, and distance to the nearest station.
- Rms, HorizontalError, DepthError, MagError, and MagNst: signal root-mean-square, location/depth/magnitude errors, and the number of stations used for magnitude estimation.
- Net, Id, Updated, Place, Type, Status, LocationSource, and MagSource: event identifiers, contextual descriptions, review status, and data-source metadata.
The temporal, spatial, geophysical, and uncertainty fields support event clustering, map construction, and predictive modeling of magnitude and depth. Figure 1 shows the reported correlations among horizontal, depth, and magnitude errors and the main magnitude and depth features; horizontal error has a moderate association with event magnitude and depth. The error distributions also provide an assessment of measurement quality. Depth errors are positively skewed toward smaller values, most magnitude errors fall within a restricted range, and horizontal errors show a wider dispersion. The latter may reflect variations in seismic-station coverage or local terrain (Figures 2–4). Together, the visual summaries and descriptive fields provide a basis for examining dataset reliability and for statistical tests of magnitude- and depthprediction performance.
3.2 Data Preprocessing
Preprocessing addressed missing values, outliers, categorical variables, feature scales, and timestamps [29, 30]. Missing values in MagError, DepthError, HorizontalError, and MagNst were imputed with the median because it is less sensitive to outliers; categorical fields were imputed with their mode or removed when too sparse to be useful. Interquartilerange analysis and boxplot inspection were used for outlier detection. Records with impossible values, including negative depths or magnitudes below 1.0, were excluded to retain seismically meaningful observations.
MagType, Type, and Status were one-hot encoded so that categorical information could be used by the learning algorithms. Id, Updated, and Net were removed as non-predictive identifiers. Depth, Mag, Gap, and Dmin were standardized for scale-sensitive models, and latitude and longitude were normalized to a uniform scale. The Time field was transformed into cyclic sine and cosine features to represent daily and seasonal patterns. Pearson correlation analysis identified a strong relationship between Rms and MagNst; both fields were removed to reduce multicollinearity. The data were split into training and test sets at an 80:20 ratio before preprocessing, and k-fold cross-validation was used during model development to assess generalization while limiting train-test bias.
4. RESULTS AND DISCUSSION
4.1 Machine Learning Models
Five regression models were compared because they provide different approaches to linear and nonlinear relationships in structured, high-dimensional seismic data. LightGBM builds trees leaf-wise rather than levelwise, selecting the leaf that produces the greatest loss reduction. This can yield deeper trees and faster convergence. Parallel computation, histogram-based learning, and GPU support are intended to make the method efficient on large datasets; its regularization controls overfitting in data with irregular distributions. Light-GBM adds weak learners sequentially to reduce the loss; its prediction at iteration t is represented as:
Xt(f) = Xt−1(f)+η yt(f), (1) where η is the learning rate and yt(f) is the decision tree added at iteration t. Randomized search and five-fold crossvalidation were used to tune LightGBM. The final hyperparameters are listed in Table 1.
Support Vector Regression (SVR). SVR models nonlinear relationships by fitting a function within a tolerance ε:
Its optimization objective and constraints are:
1 2∥h∥2 +C n ∑ i=1
i ) (3)

k-Nearest Neighbors (KNN). KNN predicts an output from the average of the k nearest observations:
bE(y) = 1
i∈Nk(y)
Ridge Regression. L2 regularization is added to the leastsquares objective to reduce coefficient magnitudes and address multicollinearity:
n ∑ i=1 bβ = argmin
Extra Trees Regressor. The ensemble averages predictions from T randomized trees:
T ∑ t=1 bv(i) = 1 bt(i). (9)
The algorithms were evaluated on the same dataset split to enable direct comparison of predictive performance. Their different assumptions and ensemble structures provide a basis for assessing both regression accuracy and the potential use of these approaches in seismic monitoring.
4.2 Evaluation Metrics
Reliable assessment requires multiple measures because a single score cannot describe error size, bias, correlation, and agreement with observed values. MSE penalizes larger deviations more heavily; RMSE returns the error to the target’s scale, while MAE gives an intuitive average absolute deviation. MBE indicates the direction of systematic error. Correlation and coefficient-of-determination measures characterize association and explained variance, while NSE compares residual variation with a mean-value baseline. WI measures agreement on a normalized scale, and RRMSE facilitates comparisons across different value ranges. Table 2 gives the metrics and formal definitions used in the study. Here, yi is the observed value, byi is the predicted value, and ¯y and by are their respective means.
n ∑ i=1
MSE = 1
(yi −byi)2
Root Mean Squared Error (RMSE) Square root of MSE, expressed in the target variable’s units.
n ∑ i=1
(yi −byi)2
RMSE =
Mean Absolute Error (MAE) Mean absolute difference between predicted and actual values.
n ∑ i=1
MAE = 1
Mean Bias Error (MBE) Mean signed difference; with the definition shown, positive values indicate underprediction.
n ∑ i=1
MBE = 1
(yi −byi)
Pearson Correlation (r) Linear association between predicted and observed values.
r = ∑i(yi −¯y)(byi −by) p
∑i(yi −¯y)2
Coefficient of Determination (R2) Proportion of target variance explained by the model.
R2 = 1−∑n i=1(yi −byi)2 i=1(yi −¯y)2 Relative RMSE (RRMSE) RMSE normalized by the range of observed values.
RRMSE = RMSE max(y)−min(y) Nash–Sutcliffe Efficiency (NSE) Predictive efficiency relative to the mean-observation baseline.
NSE = 1−∑n i=1(yi −byi)2 i=1(yi −¯y)2 Willmott Index (WI) Agreement between predicted and observed values; 1 indicates perfect agreement.

WI = 1− ∑n
4.3 Results
The five models were evaluated using MSE, RMSE, MAE, MBE, Pearson correlation, R2, RRMSE, NSE, and WI. These nine measures provide complementary views of predictive error, correlation with observations, and the capacity to retain patterns in the seismic data. Table 3 summarizes their reported values. LightGBM (Tuned) achieved the lowest errors and the strongest overall agreement with observed magnitudes.
LightGBM obtained an MSE of 0.0474, RMSE of 0.2176, and MAE of 0.1619. Its MBE was 0.0018, with Pearson correlation r = 0.9613, R2 = 0.9241, NSE = 0.9241, RRMSE = 0.0538, and WI = 0.9799. Extra Trees performed comparably (MSE = 0.0490, R2 = 0.9216, WI = 0.9791), while Ridge Regression and KNN had larger errors. The negative MBE reported for SVR indicates a positive signed difference under the definition in Table 2; the result is retained as reported.
The high correlation and R2 scores show that LightGBM captured a large share of the variation in observed magnitudes. Its NSE and WI values also indicate close agreement with the observations, and the low RRMSE suggests that its errors remain small relative to the observed range. The leaf-wise construction and regularization of LightGBM may help explain its results on nonlinear, high-dimensional data. Extra Trees was the closest alternative on several measures. Ridge Regression and KNN showed larger RMSE and MAE, while SVR’s MBE was negative as reported.
Figures 5–8 compare models by MAE, RMSE, R2, and NSE. LightGBM has the lowest MAE (0.1619), indicating the smallest average absolute difference between predictions and observations; Extra Trees is close, and Ridge Regression has the largest MAE. The RMSE comparison likewise places
LightGBM first at 0.2176, followed by Extra Trees and SVR, which is relevant because RMSE gives greater weight to larger residuals. For R2, LightGBM (0.9241) and Extra Trees (0.9216) lead the alternatives. NSE shows a similar pattern, with the ensemble models ahead of Ridge Regression and KNN. The WI values likewise favor LightGBM, although the source study did not include a WI plot. Taken together, the metrics indicate that the tuned LightGBM model provided the strongest results in this comparison and merits further assessment for seismic risk analysis and early-warning applications.
5. CONCLUSION
This study analyzed ML models for earthquake-magnitude prediction using globally collected data from 2023. Light-GBM, SVR, KNN, Ridge Regression, and Extra Trees were compared using geographic coordinates, seismic depth, and magnitude-related features. LightGBM yielded the strongest overall reported performance, with R2 = 0.9241 and MSE = 0.0474, together with favorable results across the other statistical measures. Its regularization and scalability make it a promising approach for modeling nonlinear patterns in seismic data. The results support further investigation of ensemble ML methods for seismic risk analysis and earlywarning applications, while the open dataset and documented evaluation framework provide a reproducible and extensible basis for research.
Future work will incorporate additional earthquake records to improve temporal coverage and long-term prediction, combine seismic observations with satellite ionospheric measurements, tectonic-plate velocities, and historical fault data, and examine explainable AI (XAI) methods to make model decisions more interpretable and trustworthy. Deployment of the models in a real-time earthquake early-warning framework should also be evaluated with operational data and seismic events. Continued collaboration among seismologists, AI researchers, and geoinformatics specialists will be important for assessing these systems in practice.