Earthquake magnitude estimation using an optimized CNN-DNN-GRU model with binary differential evolution and firefly algorithm Authors: Nada Ahmed, Safia Abbas, Yasser Fouad, Ahmed M Osman, Hazem M El-Bakry, Ahmed M Elshewey Published: 2026 ABSTRACT AbstractAccurate earthquake magnitude estimation is critical for mitigating seismic hazards; however, the inherently nonlinear and dynamic characteristics of geophysical data present persistent modeling challenges. To address this complexity, this study proposes a novel hybrid deep learning framework, CNN-DNN-GRU. This architecture synergizes Convolutional Neural Networks (CNNs) for spatial feature extraction, Deep Neural Networks (DNNs) for hierarchical data representation, and Gated Recurrent Units (GRUs) for capturing long-term temporal dependencies. The framework’s efficacy is further enhanced by integrating Binary Differential Evolution (BDE) for robust feature selection and the Firefly Algorithm (FA) for rigorous hyperparameter tuning. The model was trained and evaluated on a comprehensive tabular dataset comprising 3,500,000 seismic event instances—detailing parameters such as magnitude, depth, and geospatial coordinates—spanning from 1990 to 2023, utilizing a chronological 70%–15%–15% split for training, validation, and independent testing, respectively. Empirical evaluation demonstrates the proposed model’s high predictive accuracy, yielding a Mean Squared Error (MSE) of 0.0109, Root Mean Squared Error (RMSE) of 0.1048, Mean Absolute Error (MAE) of 0.0837, Median Absolute Error (MedAE) of 0.0709, Mean Absolute Percentage Error (MAPE) of 0.0230, and a Coefficient of Determination () of 0.9918. These findings validate the architecture’s superior generalization capabilities, establishing it as a highly reliable computational tool for a magnitude-estimation component that may support future early-warning-oriented systems when integrated with real-time waveform and station-level data.Keywords: Earthquake magnitude estimation, Deep learning, Artificial intelligence in geoscience, Firefly algorithm, Intelligent disaster management, Binary differential evolution, CNN, DNN, GRUSubject terms: Engineering, Mathematics and computing, Natural hazards, Solid Earth sciences Introduction Earthquakes remain one of the most unpredictable and devastating natural disasters, posing significant threats to human life, infrastructure, and economies worldwide. Accurate forecasting of seismic events is a critical scientific challenge due to the complex, nonlinear, and dynamic nature of geological processes. In recent years, the integration of Artificial Intelligence (AI) and the Internet of Things (IoT) has emerged as a transformative approach to enhancing earthquake magnitude estimation and monitoring capabilities. In1, AI and IoT-based systems are reshaping geoscience applications by enabling real-time data acquisition, intelligent sensing, and predictive analytics for seismic activity forecasting. Machine learning (ML) and deep learning (DL) models have demonstrated significant potential for capturing hidden patterns in vast, heterogeneous seismic datasets. In2 highlighted the importance of intelligent technologies in enabling near real-time earthquake magnitude regression systems, particularly in regions with high seismic risk such as Chile. Their work underscores the value of combining historical seismic records with advanced learning algorithms to improve both the speed and accuracy of predictions. Moreover, recent advancements in emerging technologies are driving innovations in disaster management frameworks. In3 emphasized the critical role of supporting tools, such as sensor networks, big data analytics, and cloud computing, in building responsive and adaptive earthquake disaster management systems. These technologies not only enhance early detection but also contribute to post-disaster response and resilience planning. A growing body of literature also explores the development of AI-based Earthquake Early Warning (EEW) systems. In4 provided a systematic review of AI-enabled EEW systems, demonstrating that deep neural networks, support vector machines, and hybrid models have achieved promising results in predicting earthquake magnitude and arrival time with greater reliability than conventional methods. Furthermore, AI-driven models have been employed to predict and map earthquake-related phenomena such as soil liquefaction, which can significantly amplify damage during seismic events. In5 demonstrated the effectiveness of deep learning models in assessing soil liquefaction risks in innovative urban environments, reinforcing the broader applicability of AI in seismic risk management and infrastructure resilience. Despite significant advances in seismology and computational modeling, accurately predicting earthquake magnitudes remains a formidable challenge. Traditional statistical and physical models often fail to capture the complex, nonlinear interactions inherent in seismic activity, leading to limited accuracy and generalization6–8. While recent developments in AI and ML have shown promise in seismic magnitude estimation, many existing models suffer from shortcomings such as overfitting, poor temporal modeling, and inefficient feature selection6,7,9. Furthermore, most predictive frameworks either ignore the spatial dependencies of seismic parameters or inadequately tune their hyperparameters, resulting in suboptimal performance on real-world earthquake data7,10,11. Recent advances in geophysical modeling further demonstrate the importance of metaheuristic optimization for solving nonlinear, ill-posed, and non-unique inverse problems. For example, Hunger Games Search has been successfully applied to lunar gravity anomaly inversion using a 2.75D source approximation, showing its ability to explore complex model spaces and recover reliable subsurface structures12. Similarly, Modified Barnacles Mating Optimizer has been used for full-parametric, transdimensional, and joint inversion of surface-wave dispersion, earthquake-based HVSR, seismic refraction, and resistivity data, indicating that advanced metaheuristics can improve the reliability of near-surface structural interpretation13. Other studies have applied Hunger Games Search, Particle Swarm Optimization, Barnacles Mating Optimizer, and improved Backtracking Search Optimization to gravity, magnetic, electromagnetic, self-potential, and Rayleigh wave inversion problems, confirming their effectiveness in reducing inversion uncertainty, improving convergence, and avoiding local optima14–21. These recent contributions highlight that metaheuristic algorithms are increasingly becoming powerful tools in geophysical data analysis, particularly when the search space is nonlinear, multimodal, and sensitive to parameter selection. In addition to sequence learning and time-series prediction, further support the use of hybrid deep learning and optimization-assisted models for complex estimation tasks. Qin22 investigated Transformer-XL for long-sequence learning behavior modeling, highlighting the importance of capturing long-range dependencies in sequential data. Chen23proposed an improved ARIMA–LSTM hybrid model for inflation-rate time-series forecasting, demonstrating the value of combining statistical and deep learning models for nonlinear prediction. Pan24 studied lightweight machine learning design for time-series forecasting, emphasizing computational efficiency and deployability. Wang et al.25 integrated LSTM with genetic algorithms for agricultural system modeling, showing that global optimization can improve the predictive capability of recurrent neural networks. Earthquake-engineering studies have also further demonstrated the value of machine learning for seismic response and damage assessment. Lazaridis et al.26 developed machine learning models for predicting structural damage in reinforced concrete frames subjected to single and multiple seismic events, showing that data-driven algorithms can support rapid evaluation of structural response under repeated earthquake loading. Similarly, Tao et al.27 proposed support vector regression models for predicting the maximum drift ratio of buildings using real monitoring data from the NDE1.0 flatfile. Their work showed that machine learning models can capture nonlinear relationships between structural characteristics, seismic intensity measures, and engineering demand parameters, and that reduced-feature models can improve practical applicability by relying on accessible input parameters. Motivated by these developments, the present study integrates Binary Differential Evolution for feature selection and the Firefly Algorithm for hyperparameter optimization to enhance the robustness, accuracy, and generalization capability of the proposed CNN–DNN–GRU earthquake magnitude estimation model. To address these limitations, there is a pressing need for an intelligent, optimized deep learning architecture that can effectively extract spatial and temporal features, reduce redundancy through feature selection, and fine-tune learning parameters to improve accuracy and robustness. This research aims to fill this gap by developing a hybrid CNN-DNN-GRU model, empowered by BDE for feature selection and the FA for hyperparameter optimization, to provide accurate and reliable earthquake magnitude prediction. The primary objective of this study is to develop an advanced, highly accurate model specifically for earthquake magnitude prediction by leveraging the strengths of hybrid deep learning architectures and intelligent optimization algorithms. It is important to clarify that the proposed framework is designed to forecast the magnitude of seismic events using historical and geospatial data; it does not predict the severity of surface strong motion or the precise time of an earthquake. Earthquake data is inherently complex, involving both spatial and temporal dependencies28,29. To effectively capture these patterns, this research proposes a hybrid framework that integrates a CNN for spatial feature extraction, a DNN for hierarchical representation learning, and a GRU for modeling temporal sequences in seismic events. In addition to model architecture, another key objective is to enhance the efficiency and accuracy of the prediction process through intelligent optimization techniques. The BDE algorithm is utilized to perform feature selection, reducing data dimensionality and eliminating irrelevant or redundant features that could degrade model performance9,29. This not only improves training speed but also enhances generalization by focusing the model on the most informative input variables. Furthermore, to ensure optimal model configuration, the FA is employed for hyperparameter tuning. Hyperparameter selection plays a critical role in the performance of deep learning models, and the use of FA helps automate and improve this process by exploring the search space more effectively than manual or grid-based approaches29. This paper offers the following novel contributions to the field of seismic magnitude regression and intelligent geoscience systems: A novel hybrid architecture (CNN-DNN-GRU) is proposed that integrates spatial, deep, and sequential learning components for enhanced earthquake magnitude forecasting. A novel hybrid architecture (CNN-DNN-GRU) is proposed that integrates spatial, deep, and sequential learning components for enhanced earthquake magnitude forecasting. Incorporation of metaheuristic optimization techniques, specifically BDE for feature selection and FA for hyperparameter tuning, to improve model accuracy and computational efficiency. Incorporation of metaheuristic optimization techniques, specifically BDE for feature selection and FA for hyperparameter tuning, to improve model accuracy and computational efficiency. Comprehensive evaluation on a large-scale earthquake catalog comprising 3,500,000 seismic-event records from 1990 to 2023, demonstrating the robustness and scalability of the proposed framework under the adopted catalog-based evaluation protocol. Comprehensive evaluation on a large-scale earthquake catalog comprising 3,500,000 seismic-event records from 1990 to 2023, demonstrating the robustness and scalability of the proposed framework under the adopted catalog-based evaluation protocol. Superior performance results, achieving an of 0.9918 and low error metrics (MSE = 0.0109, MAE = 0.0837, RMSE = 0.1048), significantly outperforming CNN, LSTM, GRU, ResNet50, and VGG-19 models. Superior performance results, achieving an of 0.9918 and low error metrics (MSE = 0.0109, MAE = 0.0837, RMSE = 0.1048), significantly outperforming CNN, LSTM, GRU, ResNet50, and VGG-19 models. A reproducible and scalable framework that can be extended to other geospatial and temporal prediction tasks, supporting a magnitude-estimation component that may support future early-warning-oriented systems when integrated with real-time waveform and station-level data. A reproducible and scalable framework that can be extended to other geospatial and temporal prediction tasks, supporting a magnitude-estimation component that may support future early-warning-oriented systems when integrated with real-time waveform and station-level data. The remainder of this paper is organized as follows: Section 2 reviews the related work and recent advancements in earthquake magnitude estimation using artificial intelligence and deep learning techniques. Section 3 presents the dataset description and preprocessing steps applied to prepare the data for modeling, detailing the proposed hybrid CNN-DNN-GRU architecture along with the optimization strategies using BDE and FA. Section 4 presents the results and provides an in-depth discussion of the findings. Finally, Section 5 concludes the paper and outlines potential directions for future research in intelligent earthquake magnitude regression systems. Related works The integration of AI, machine learning, and seismology has significantly improved earthquake magnitude estimation and post-disaster assessment. Traditional models struggle to capture complex nonlinear dynamics, leading researchers to use data-driven techniques like deep learning and ensemble learning. These techniques improve predictive accuracy and operational speed by extracting relevant features from seismic waveforms, ground motion data, and satellite imagery. However, challenges remain in generalization across regions, data imbalance, real-time deployability, and model interpretability. This section critically reviews key contributions in literature, highlighting their methodologies, results, and limitations to position the motivation and novelty of the present study. Joshi et al.30 addressed the critical challenge of accurately estimating earthquake magnitudes in real-time, particularly when relying on data from a single seismic station. To improve early warning capabilities, they proposed an innovative deep learning architecture named AMagDN. This model integrates LSTM, bidirectional LSTM, an autocorrelation-based attention mechanism, and a machine learning module, enabling it to extract rich temporal and geospatial features from multivariate seismic waveform data. A key novelty of the model is its use of seven fused tabular features to enhance prediction accuracy. Trained and tested on a substantial dataset from Japan’s Kyoshin Network, covering earthquakes between magnitude 5.5 and 8.0, the AMagDN model achieved a 40% reduction in mean absolute error compared to the second-best baseline. Furthermore, its ability to accurately predict the magnitude of major events (7.7 and 7.3) using both single and multi-station data demonstrates the model’s robustness and potential in seismic hazard mitigation. Ommi and Hashemi31 explored the application of machine learning techniques to predict the occurrence of large-scale earthquakes in the highly active North Zagros seismic zone, a region of significant concern due to its dense population and historical seismic activity. Recognizing the growing capability of machine learning in pattern recognition and parameter analysis, the authors evaluated three algorithms (ANN, RF, and SVM) using nine seismic parameters to predict potential earthquakes one month in advance. The performance of each model was assessed using recall, accuracy, precision, and F1-score metrics. Karimai et al.32 addressed the critical problem of soil liquefaction-induced ground subsidence, a major hazard in earthquake-prone regions, which poses serious threats to infrastructure and public safety. Motivated by the extensive liquefaction damage observed in Urayasu City during the 2011 Great East Japan Earthquake, the study goes beyond traditional binary liquefaction classification models by proposing a quantitative predictive model for estimating the magnitude of ground subsidence post-liquefaction. Leveraging data from Japan’s Nankai Trough Megathrust Earthquake scenario, the researchers constructed a GDBT model and used XGBoost to achieve superior prediction accuracy compared to LightGBM. To enhance model transparency and interpretability, they SHAP, identifying the most influential features contributing to subsidence predictions. Liu et al.33 tackled the limitations of traditional on-site EEW systems, which rely on manually selected P-wave feature parameters for predicting PGA. To overcome the subjectivity and inefficiencies of feature selection, the authors proposed an end-to-end deep learning framework called DLPGA, based on CNNs. This model takes the initial 3–6 seconds of vertical seismic wave data from a single station as input and directly predicts PGA values. Trained on Japanese seismic records, the DLPGA model outperformed the widely used Pd method, showing a 12–23% improvement in correlation, a 22–25% reduction in error standard deviation, and a 6.9–19.7% decrease in mean prediction error. Notably, DLPGA with 3-second wave input outperformed Pd even with 6-second input, highlighting the model’s speed and precision. Furthermore, generalization tests using Chilean earthquake records demonstrated that DLPGA maintains superior accuracy across regions, improving the identification of destructive ground motion by 35–150%. Demir et al.34 conducted an in-depth study on predicting the MDR of two types of reinforced concrete (RC) frames using advanced tree-based ML techniques. The models evaluated included RF, XGBoost, and SGB, trained on a dataset comprising 2,300 ground motion records and 21 input parameters derived from nonlinear time history analyses. A major focus of the research was assessing the role of data preprocessing in enhancing model performance. Techniques such as outlier detection, missing value imputation, log transformation, and feature selection using Hill Climbing were integrated into the ML pipeline. The evaluation was based on six performance metrics, with results showing that data preprocessing significantly improved predictive accuracy, particularly for the RF model. Post-processing, the RF model achieved 12% and 6.22% improvement for R8 and IR8 structures, respectively, outperforming both XGBoost and SGB. Ju et al.35 investigated the quantitative prediction of slope topographic amplification of peak seismic acceleration. Recognizing the limitations of traditional regression models, which rely on subjective assumptions and offer limited accuracy, the authors introduced an artificial intelligence-based regression framework to model the amplification effect. The model uses slope inclination, slope height, and seismic wave frequency as input parameters and predicts the amplification ratio as the output. By capturing the nonlinear multivariate relationship between input variables and the amplification response, the proposed AI model significantly outperformed traditional methods (achieving an improvement of 17.84%–32.60% and a reduction in RMSE by 30.05%–77.36%). Al-Rawashdeh et al.36 explored the effectiveness of Bayesian Optimization-enhanced machine learning models for the classification of earthquake-induced building damage. The study focused on addressing class imbalance, a common issue in seismic damage datasets where certain damage grades are overrepresented while others are underrepresented. To improve predictive reliability, the authors optimized three machine learning models (Random Forest, ElasticNet, and Decision Tree) using Bayesian Optimization, which targeted maximizing the Area Under the AUROC to enhance model discrimination. Results showed significant performance gains, with the best-optimized model achieving an AUROC of 0.9952. Among the models, ElasticNet achieved the highest test accuracy of 92.56%, while Random Forest showed superior generalization in terms of lower MSE and a train accuracy of 99.82%. Reis et al.37 focused on the critical task of automatically detecting road cracks caused by the devastating February 6, 2023, Gaziantep–Kahramanmaraş earthquakes, which severely impacted infrastructure in several Turkish provinces. Recognizing the importance of maintaining safe and functional roadways for emergency response and recovery, the study applied deep learning and machine learning techniques to classify post-disaster road damage. Using a custom dataset collected from the Nurdağı and Adıyaman regions (categorized into cracked and uncracked road surfaces) the authors employed the ResNet152 deep learning model for feature extraction. These features were then classified using several traditional machine learning algorithms, including SVM, KNN, Adaptive Boosting, and Naive Bayes. To further enhance classification performance, an ensemble learning (EL) strategy was implemented. Experimental results demonstrated that SVM and the EL model achieved the highest accuracy at 98.68%, indicating their robustness in post-earthquake damage detection. Sidik et al.38 demonstrated the application of machine learning classification techniques in the field of volcanology, specifically for classifying volcanic seismic events at Mt. Merapi. Utilizing a dataset comprising 266 earthquake samples, the authors aimed to automatically classify seismic time series data into five categories: VTA, VTB, MP, LF, and RF. Signal features were extracted based on dominant frequency, spectral pattern, and amplitude, which served as distinguishing attributes for each class. The study implemented the XGBoost algorithm for classification, experimenting with various train-test splits. The highest testing accuracy achieved was 76.67% using a 70:30 train-test split, outperforming previous approaches such as SVM, which had reached a maximum of 74.4%. Additionally, the spectral analysis plots demonstrated improved differentiation between event types, indicating that XGBoost not only improved classification accuracy but also enhanced interpretability. Yamani et al.39 addressed the ongoing challenge in seismology of enhancing the accuracy and reliability of earthquake magnitude prediction, which traditional methods often fail to achieve effectively. In response, the study proposed a novel model combining ANNs with a tabu-search optimization strategy for hyperparameter tuning. This hybrid approach aims to refine the ANN’s configuration for improved forecasting performance. Using a comprehensive earthquake dataset, the model was trained in over 50 epochs with a batch size of 32 and evaluated using standard regression metrics. The results yielded a MAE of 0.0806 and an score of 33.9%, indicating moderate predictive power with promising accuracy. Although the is relatively limited, the low MAE reflects the model’s capacity to produce consistent and stable magnitude estimations. Zhang et al.40 proposed an advanced hybrid deep learning model to analyze the seismic response of high-speed railway infrastructure, addressing the limitations of traditional monitoring techniques. Their framework integrates CNN and LSTM networks to enhance the accuracy of fiber grating-based seismic response prediction. Utilizing a quasi-distributed fiber optic sensing system, seismic data were collected from seven grating monitoring points installed along critical railway components, including the track plate, base plate, rail, and beam. The CNN component performs spatial feature extraction on time-windowed input sequences, while the LSTM network captures temporal dependencies to predict the central monitoring point’s response based on peripheral sensor inputs. Experimental results confirmed the model’s superior performance, achieving an RMSE of 0.3753, MAE of 0.2968, and an score of 0.9371. Sadhukhan et al.41 investigated the potential of deep learning models to predict earthquake magnitudes based on seismic indicators, addressing the limitations of traditional prediction methods in capturing the dynamic nature of earthquakes. The study utilized eight mathematically derived seismic indicators from three seismically active regions (Japan, Indonesia, and the Hindu-Kush Karakoram Himalayan (HKKH) region). Three advanced deep learning architectures were explored: LSTM, Bi-LSTM, and a self-attention-based transformer model. Each model was trained and evaluated using robust regression loss metrics including MAE, MSE, log-cosh loss, and MSLE. The models achieved high prediction accuracy across regions, with LSTM performing best for Japan (MAE = 0.060), Bi-LSTM excelling for Indonesia (MAE = 0.073), and the transformer model leading in the HKKH region (MAE = 0.062). Saida et al.42 proposed an automated structural damage detection framework for post-earthquake building inspections using UAV imagery and advanced computer vision techniques. Recognizing the limitations of manual assessments in post-disaster scenarios, the study developed a dual-model approach to identify both specific damage types and overall structural states. A FPN was employed to segment various damage features while UNet++ architecture was used to evaluate the damage severity state. The dataset consisted of 3,805 high-resolution UAV images, which were resized for model training and validation. FPN achieved high intersection-over-union (IoU) scores, including 0.93 for spall, 0.99 for components, and 0.59 for cracks, indicating strong segmentation accuracy. Meanwhile, UNet++ achieved an IoU of 0.72 for semantic damage classification. Bilal et al.43 developed a graph-based deep learning model designed to enhance the performance of earthquake early warning systems by accurately predicting the magnitude and depth of seismic events across multiple stations and geographic regions. The proposed framework integrates a GCNN with batch normalization and an attention mechanism to improve training stability, speed, and feature focus. After preprocessing waveform data, CNN layers extract spatial features, which are refined by the attention mechanism to emphasize critical signals. These features, combined with event location information, are passed through the graph network to generate magnitude and depth predictions. The model was evaluated on two distinct seismic datasets from Japan and Alaska, capturing different tectonic environments. It achieved low RMSE values of 2.8 (Alaska) and 4.0 (Japan) for magnitude prediction, and 2.87 (Alaska) and 2.66 (Japan) for depth prediction. While the reviewed studies demonstrate significant progress in applying ML and DL techniques to earthquake magnitude estimation, structural damage assessment, and post-disaster response, several limitations remain. Most existing models either focus on a single aspect of seismic magnitude estimation or lack integration of optimization strategies for enhancing model efficiency and accuracy. Additionally, few works leverage hybrid architectures that combine spatial, deep, and temporal learning components with advanced metaheuristic algorithms for both feature selection and hyperparameter tuning. Considering these gaps, this study introduces a novel hybrid deep learning framework (CNN-DNN-GRU) enhanced by BDE for feature selection and the FA for hyperparameter optimization. This approach aims to deliver a more accurate, robust, and generalizable solution for earthquake magnitude prediction, addressing key limitations observed in prior work. Methodology This paper proposes a hybrid deep learning framework, CNN–DNN–GRU, for earthquake magnitude estimation, optimized using Binary Differential Evolution (BDE) for feature selection and the Firefly Algorithm (FA) for hyperparameter tuning. The raw dataset comprises 3,500,000 global seismic-event records spanning 1990–2023.The data were preprocessed by handling anomalous values, constructing chronological event-history sequences, and partitioning the resulting sequences chronologically into 70% training, 15% validation, and 15% testing subsets. Normalization parameters were estimated exclusively from the training subset and subsequently applied to the validation and test subsets. BDE was employed to identify the most informative features, reducing redundancy and improving model efficiency. The hybrid model architecture combines a CNN for spatial feature extraction, a DNN for capturing complex nonlinear relationships, and a GRU for learning temporal dependencies. FA was used to optimize key hyperparameters such as learning rate, number of neurons, dropout rate, and GRU units by minimizing the validation error. The model was trained using the Adam optimizer and evaluated using standard regression metrics including MAE, RMSE, MAPE, and . Its performance was benchmarked against baseline models, including CNN, LSTM, GRU, ResNet50, and VGG-19, to demonstrate its predictive superiority and robustness. Figure 1 illustrates the framework of the proposed methodology for earthquake magnitude estimation. The proposed hybrid model for earthquake magnitude estimation. Dataset To develop and evaluate the proposed CNN-DNN-GRU earthquake magnitude estimation model, a comprehensive seismic dataset was utilized, sourced from The Ultimate Earthquake Dataset (1990–2023) available on44. This dataset aggregates global seismic activity over more than three decades, offering a rich, diverse collection of earthquake records with essential geophysical parameters. The dataset comprises 3,500,000 instances, each representing a unique earthquake event, and includes the following seven primary features as detailed in Table 1. Notably, the target variable for our prediction framework, ’magnitude’, represents the Moment Magnitude (Mw) scale, the standard measure of the strength of these seismic events. Table 1Dataset feature descriptions for ultimate earthquake dataset.Feature NameDescriptionMagnitudeMeasures the strength of the earthquake on the moment magnitude scale.DepthDepth of the earthquake’s focus beneath the Earth’s surface (in kilometers).LatitudeGeographic coordinate representing the north–south position of the epicenter.LongitudeGeographic coordinate representing the east–west position of the epicenter.SignificanceUSGS-calculated score estimating the event’s overall impact and importance.StatusIndicates the processing state of the record (e.g., automatic, reviewed). Dataset feature descriptions for ultimate earthquake dataset. It is important to distinguish between independent input variables and target-derived or post-event descriptors. Although the raw dataset contains the significance variable, this feature was excluded from the final predictive input space. The significance score is strongly associated with earthquake magnitude and may also incorporate post-event impact-related information, such as felt reports, damage, casualties, or economic consequences. Therefore, it may not be available before or during the initial magnitude-estimation stage in real applications. Using this variable as an input for predicting magnitude would create a risk of information leakage and recursive prediction, where information partly derived from the target is used to estimate the target itself. For this reason, significance was retained only for exploratory data analysis and descriptive visualization, but it was not used in model training, validation, testing, BDE-based feature selection, or FA-based hyperparameter optimization. The final leakage-free input space was restricted to independent earthquake-event metadata that are not directly derived from the target magnitude. To provide complete transparency about the nature of the data and to explicitly demonstrate the information available to the model, Table 2 presents a typical row from the raw dataset CSV file. This example clarifies that the dataset consists solely of tabular point-in-time metadata describing the earthquake’s core parameters and confirms that no time-series ground-motion records or waveform severity measures were used. Table 2A representative single row from the ultimate earthquake dataset.magnitudeLongitudeLatitudeDepth (km)2.5−149.66961.730230.1 A representative single row from the ultimate earthquake dataset. Table 3 presents the Statistical analysis of the raw earthquake dataset before preprocessing, which consists of 3,500,000 earthquake records, with seven features analyzed for their distributions. The magnitude feature has a mean of 1.97 and ranges from −9.99 to 8.40, indicating the presence of outliers or missing values encoded as negative values. Depth ranges from −10 km to 712.5 km, with a mean of 20.3 km, capturing shallow- to deep-focus earthquakes. It is important to note that in standard seismological catalogs, depth is measured relative to mean sea level; therefore, valid negative depth values indicate events occurring above sea level in elevated mountainous or volcanic regions. Latitude and longitude values confirm global coverage, spanning from −83.9° to 87.1° and −179.9° to 180°, respectively. The significance score, which reflects the event’s impact, shows high variability, with a maximum of 1,750. The status field is predominantly constant with a mean near 3.0, indicating uniform processing. Finally, the tsunami feature is consistently zero, suggesting no tsunami-triggered events are labeled in this dataset. Table 3Statistical analysis of the raw earthquake dataset before preprocessing.Featurecountmeanstdmin50%maxstatus3,500,0002.9937490.0788660.0003.0003.000tsunami3,500,0000.0000000.0000000.0000.0000.000significance3,500,00083.026868101.4647880.00042.0001750.000magnitude3,500,0001.9722171.237831−9.9901.6608.400longitude3,500,000−91.17406578.450712−179.999−118.040180.000latitude3,500,00035.03833819.621487−83.90237.18487.081depth3,500,00020.30820154.664576−10.0006.338712.500 Statistical analysis of the raw earthquake dataset before preprocessing. Figure 2 displays a correlation heatmap that visualizes the linear relationships among the dataset’s numerical features. Notably, magnitude and significance exhibit a robust positive correlation (0.95), suggesting that as magnitude increases, the earthquake’s importance also rises. Magnitude also shows moderate positive correlations with longitude (0.61) and depth (0.38), and a negative correlation with latitude (−0.47). The significance feature similarly correlates with depth (0.40) and longitude (0.66), but negatively with latitude (−0.51). Correlation heatmap of key seismic features. The density plots in Figure 3 provide insight into the distribution of each feature within the earthquake dataset. The status and tsunami variables are highly imbalanced, with most records showing a constant value (status 3, tsunami = 0), indicating little to no variability. Significance, depth, and magnitude are right-skewed, with most events having low values and fewer high-impact events. Specifically, magnitude clusters between 0 and 5, while depth and significance peak at lower values and taper off toward the extreme ends. The longitude and latitude distributions are more complex, showing multimodal patterns that reflect the global spread of seismic activity, with notable peaks corresponding to seismically active regions. Density distribution plots of dataset features. The scatter matrix in Figure 4 shows the relationship between numerical features in a dataset, revealing skewed distributions and moderate positive correlations. It also reveals global coverage, broad distributions of longitude and latitude, and sparse distributions of features such as status and tsunami. Scatter matrix plot of earthquake dataset features. Boxplots in figure 5 show the central tendency, dispersion, and presence of outliers in the earthquake dataset—magnitude, significance, and depth —indicating rare but high-impact seismic events. Latitude and longitude show a wide interquartile range. Boxplot visualization of each feature, highlighting value distribution, presence of outliers, and skewness across key seismic parameters in the dataset. The histogram plots in Figure 6 provide a detailed view of the frequency distributions of the earthquake-dataset features. The status and tsunami variables are highly imbalanced, while significance, magnitude, and depth exhibit strongly skewed distributions. Latitude and longitude show broader and multimodal distributions reflecting the global spatial distribution of seismic activity. In particular, the depth distribution is strongly right-skewed, with most earthquake events occurring at relatively shallow depths and progressively fewer events occurring at greater depths. Histogram plots of seismic dataset features, illustrating the frequency distributions, skewness, and dominant value ranges across key earthquake parameters. Data preparation Data preprocessing is a critical step to ensure data quality and compatibility with the deep learning model. The raw dataset, containing 3,500,000 event instances and seven features, underwent the following steps: Handling Missing and Anomalous Values: The raw earthquake catalog contained 3,500,000 event records spanning 1990–2023. As shown in Table 3, all reported variables contained 3,500,000 observations; therefore, no conventional missing or NaN values were identified, and no records were removed because of missing data. The raw magnitude values ranged from -9.99 to 8.40. Negative magnitudes were not removed indiscriminately because small negative magnitudes may represent physically valid low-energy microseismic events. However, the specific value M=-9.99 was treated as an invalid catalog placeholder rather than a physically meaningful earthquake magnitude. A total of 57,974 records satisfying this criterion were removed, corresponding to 1.6564% of the original dataset. Other negative magnitude values were retained. The hypocentral-depth values ranged from -10 to 712.5 km. Negative depth observations were not considered invalid solely because they were below zero, because earthquake-catalog depths may be referenced to mean sea level and slightly negative values may occur for shallow events in elevated regions or because of hypocentral-location uncertainty. Consequently, no records were removed solely on the basis of a negative depth value. Following these record-level validity checks, 3,442,026 valid earthquake-event records remained. The subsequent removal of significance, status, and tsunami from the predictive input represents feature-level screening rather than record-level deletion. Significance was excluded because of its strong association with the target magnitude and the resulting risk of information leakage, whereas status and tsunami were excluded because of their negligible variability. The final leakage-free input variables were therefore longitude, latitude, and depth. As summarized in Table 4, the data-quality screening reduced the original 3,500,000 earthquake-event records to 3,442,026 valid observations. No records were removed because of conventional missing values or solely because of negative hypocentral depth. Record-level exclusion was primarily associated with the invalid magnitude placeholder M=-9.99, which accounted for 57,974 observations (1.6564% of the original dataset). In contrast, the exclusion of significance, status, and tsunami was performed at the feature level and did not further reduce the number of earthquake events. This distinction ensures that potentially meaningful low-energy and shallow seismic events are retained while invalid target values and leakage-prone or uninformative features are excluded. Handling Missing and Anomalous Values: The raw earthquake catalog contained 3,500,000 event records spanning 1990–2023. As shown in Table 3, all reported variables contained 3,500,000 observations; therefore, no conventional missing or NaN values were identified, and no records were removed because of missing data. The raw magnitude values ranged from -9.99 to 8.40. Negative magnitudes were not removed indiscriminately because small negative magnitudes may represent physically valid low-energy microseismic events. However, the specific value M=-9.99 was treated as an invalid catalog placeholder rather than a physically meaningful earthquake magnitude. A total of 57,974 records satisfying this criterion were removed, corresponding to 1.6564% of the original dataset. Other negative magnitude values were retained. The hypocentral-depth values ranged from -10 to 712.5 km. Negative depth observations were not considered invalid solely because they were below zero, because earthquake-catalog depths may be referenced to mean sea level and slightly negative values may occur for shallow events in elevated regions or because of hypocentral-location uncertainty. Consequently, no records were removed solely on the basis of a negative depth value. Following these record-level validity checks, 3,442,026 valid earthquake-event records remained. The subsequent removal of significance, status, and tsunami from the predictive input represents feature-level screening rather than record-level deletion. Significance was excluded because of its strong association with the target magnitude and the resulting risk of information leakage, whereas status and tsunami were excluded because of their negligible variability. The final leakage-free input variables were therefore longitude, latitude, and depth. As summarized in Table 4, the data-quality screening reduced the original 3,500,000 earthquake-event records to 3,442,026 valid observations. No records were removed because of conventional missing values or solely because of negative hypocentral depth. Record-level exclusion was primarily associated with the invalid magnitude placeholder M=-9.99, which accounted for 57,974 observations (1.6564% of the original dataset). In contrast, the exclusion of significance, status, and tsunami was performed at the feature level and did not further reduce the number of earthquake events. This distinction ensures that potentially meaningful low-energy and shallow seismic events are retained while invalid target values and leakage-prone or uninformative features are excluded. Normalization: All numerical features were scaled to the range [0,1] using Min-Max normalization, defined in eq 1: 1 Where x is the original feature value, and are the minimum and maximum values of the feature in the dataset, and x' is the normalized value. Normalization: All numerical features were scaled to the range [0,1] using Min-Max normalization, defined in eq 1: 1 Where x is the original feature value, and are the minimum and maximum values of the feature in the dataset, and x' is the normalized value. Categorical Encoding: The ’status’ feature was label-encoded. However, given its lack of variability, it was considered non-essential and excluded from final modeling. Categorical Encoding: The ’status’ feature was label-encoded. However, given its lack of variability, it was considered non-essential and excluded from final modeling. Data Splitting: To preserve the temporal structure of the earthquake catalog and prevent information leakage, random partitioning was not employed. After the earthquake records were ordered by event time and the chronological sequences were constructed, the resulting samples were divided chronologically into 70% training, 15% validation, and 15% testing subsets. The earliest 70% of the sequences were assigned to the training set, the subsequent 15% to the validation set, and the most recent 15% to the independent test set. This procedure ensures that information from future earthquake events is not available during model training or validation. Data Splitting: To preserve the temporal structure of the earthquake catalog and prevent information leakage, random partitioning was not employed. After the earthquake records were ordered by event time and the chronological sequences were constructed, the resulting samples were divided chronologically into 70% training, 15% validation, and 15% testing subsets. The earliest 70% of the sequences were assigned to the training set, the subsequent 15% to the validation set, and the most recent 15% to the independent test set. This procedure ensures that information from future earthquake events is not available during model training or validation. Table 4Summary of the data-cleaning and feature-screening procedure.StageCriterionRecords affectedRaw datasetEarthquake-event catalog spanning 1990–20233,500,000Missing-value screeningNo missing/NaN values in the variables reported in Table 30 removedInvalid magnitudeM=-9.99 treated as an invalid catalog placeholder57,974 removedOther negative magnitudesRetained as potentially valid microseismic events0 removed by sign aloneDepth screeningObserved range -10 to 712.5 km; negative values retained when numerically valid0 removed by sign aloneCleaned event datasetAfter record-level validity screening3,442,026 retainedSignificanceExcluded because of potential target leakageFeature removed onlyStatus and tsunamiExcluded because of negligible variabilityFeatures removed onlyFinal predictive inputsLongitude, latitude, and depth3 features Summary of the data-cleaning and feature-screening procedure. Temporal sequence construction for GRU input Although the raw earthquake catalog consists of point-wise tabular event records, the GRU component requires sequential input. Therefore, before training the CNN–DNN–GRU model, the catalog records were transformed into chronological event-history sequences. First, all earthquake records were ordered according to their event time. Then, a fixed-length sliding-window strategy was applied to construct sequential samples from previous events. In this study, the sequence length was set to L=10. This means that each input sample contains the leakage-free metadata of the previous ten earthquake events, and the target output is the magnitude of the following event. For a given time step t, the input sequence is defined as: where denotes the leakage-free feature vector of the tth earthquake record. The corresponding target is: where is the magnitude of the following earthquake event. To avoid target leakage, variables derived from magnitude or post-event impact, such as significance, were excluded before sequence construction. Constant or weakly informative variables, such as status and tsunami, were also excluded from the final modeling input. Therefore, each event vector contains three independent metadata features: Accordingly, the input tensor provided to the CNN–DNN–GRU model has the shape: where N is the number of constructed samples, 10 is the number of previous events in each sequence, and 3 is the number of leakage-free input features. To prevent temporal information leakage, no random train–validation–test partitioning was performed. After chronological ordering and sequence construction, the resulting samples were divided according to event time into 70% training, 15% validation, and 15% testing subsets. Specifically, the earliest 70% of the sequences were used for model training, the subsequent 15% were used for validation, BDE-based model selection, and FA-based hyperparameter optimization, and the most recent 15% were retained as an independent test set and were not involved in any training or optimization stage. Furthermore, the normalization parameters were estimated exclusively from the training subset and subsequently applied unchanged to the validation and test subsets. This chronological evaluation protocol preserves the temporal ordering of the earthquake catalog and ensures that information from future events is not used to predict earlier events. BDE objective function for feature selection Binary Differential Evolution (BDE) was adopted as a wrapper-based feature-selection method to identify the most informative subset of seismic input variables for earthquake magnitude estimation. In this framework, each BDE individual represents a binary feature-selection vector: where d is the total number of input features, and indicates whether the jth feature is selected. A value of means that the feature is retained, whereas means that the feature is excluded from the model input. The BDE search process was guided by a wrapper-based objective function that considers both prediction error and feature-subset compactness. The fitness value of each candidate feature subset was computed as: where denotes the validation mean squared error obtained using the selected feature subset, represents the number of selected features, d is the total number of available features, and λ is a weighting coefficient used to balance prediction accuracy and feature reduction. In this study, prediction accuracy was given higher priority than feature reduction; therefore, λ was set to a high value. This allows BDE to primarily minimize the validation error while still discouraging unnecessarily large feature subsets. Accordingly, the BDE algorithm optimizes two selection criteria: (i) minimizing earthquake magnitude prediction error and (ii) reducing redundant or weakly informative input variables. Mutual information was not used as the main selection criterion because the aim of this study is to select features that directly improve the regression performance of the proposed CNN–DNN–GRU model. The final selected subset was the feature mask with the lowest fitness value on the validation subset. BDE feature-selection results To demonstrate the contribution of Binary Differential Evolution (BDE), the selected feature subset was explicitly reported after preprocessing and leakage-control screening. Since the magnitude variable represents the target output and significance may introduce target leakage, these variables were not included in the BDE input space. In addition, variables with limited variability, such as status and tsunami, were excluded before model training. Therefore, BDE was applied to the final leakage-free candidate feature set consisting of longitude, latitude, and depth. Each BDE individual was represented as a binary mask, where 1 indicates that the feature is selected and 0 indicates that the feature is excluded. The selected feature subset was determined by minimizing the wrapper-based fitness function defined in the previous subsection, which combines validation MSE and a feature-size penalty. Table 5 presents the final BDE-selected features. Table 5BDE-selected feature subset after preprocessing and leakage-control screening.FeatureCandidate inputBDE maskLongitudeYes1LatitudeYes1DepthYes1SignificanceNo–StatusNo–TsunamiNo– BDE-selected feature subset after preprocessing and leakage-control screening. The BDE output shows that longitude, latitude, and depth were retained as the final leakage-free input features. Longitude and latitude provide spatial-context information related to regional tectonic setting, while depth provides hypocentral information that may influence magnitude estimation. However, these variables are interpreted as catalog-level descriptors rather than direct causal predictors of earthquake magnitude. CNN–DNN–GRU hybrid model architecture The proposed CNN–DNN–GRU hybrid model is shown in Figure 7, which integrates convolutional, dense, and recurrent layers to effectively capture spatial, abstract, and temporal patterns from earthquake-related input data. CNN-DNN-GRU architecture. The architecture begins with two one-dimensional convolutional layers, each using 32 filters, a kernel size of 3, and ReLU activation, followed by a max-pooling layer with pool size = 2 and a dropout layer with a rate of 0.2 to reduce overfitting. The use of kernel_size=3 is consistent with the Conv1D operation, where the convolutional kernel is applied along one input dimension. Algorithm 1 displays the CNN-DNN-GRU hybrid model. CNN–DNN–GRU. To clarify the design of the recurrent component, the first GRU layer was configured with return_sequences=True because its role is to preserve the complete learned temporal representation and pass the full sequence of hidden states to the following GRU layer. This allows the second GRU layer to further refine the sequential dependencies extracted from the CNN feature maps. In contrast, the second GRU layer was configured without returning sequences because the target task is a single-output regression problem, where the model estimates one earthquake magnitude value for each input sample. Therefore, the final hidden state of the second GRU layer provides a compact temporal summary that is suitable for the subsequent dense regression block. A bidirectional GRU was not adopted in the proposed architecture for two main reasons. First, the intended application is earthquake magnitude estimation in a forecasting or early-warning-oriented setting, where future temporal context may not be available at inference time. Bidirectional recurrent layers process the input in both forward and backward directions and may therefore rely on information that would not be accessible in a real-time scenario. Second, the dataset used in this study consists of tabular earthquake-event metadata rather than continuous raw waveform sequences; therefore, using a bidirectional or full sequence-output recurrent structure may unnecessarily increase the number of trainable parameters, computational complexity, and overfitting risk. For this reason, the adopted two-layer GRU design provides a practical balance between temporal representation learning, model simplicity, and regression-oriented output generation. Coupling strategy between BDE and FA The proposed optimization framework couples BDE and FA in a sequential manner rather than an alternating or co-evolutionary manner. In the first stage, BDE is applied for feature selection. Each BDE individual represents a binary feature mask, where a value of 1 indicates that the corresponding feature is selected and a value of 0 indicates that it is excluded. The objective of this stage is to identify the most informative feature subset that minimizes prediction error while reducing redundant or weakly informative variables. After the BDE process is completed, the selected feature subset is fixed and transferred to the second optimization stage. In the second stage, FA is used to tune the hyperparameters of the CNN–DNN–GRU model, such as the learning rate, dropout rate, number of GRU units, and number of dense neurons. Thus, the information transfer between BDE and FA is one-directional: BDE provides the selected feature mask to FA, while FA optimizes the model hyperparameters using only these selected features. FA does not modify the BDE-selected feature subset, and BDE is not re-executed during FA iterations. This sequential coupling strategy was adopted for three reasons. First, performing feature selection before hyperparameter tuning reduces the dimensionality of the input space and removes redundant variables before model optimization. Second, fixing the selected feature subset before FA optimization reduces the computational burden because FA evaluates candidate neural-network configurations on a reduced feature space. Third, separating feature selection and hyperparameter tuning improves the stability and interpretability of the optimization pipeline, since the contribution of each stage can be clearly identified. Therefore, the proposed BDE–FA coupling can be summarized as follows: where denotes the original input feature matrix, denotes the BDE-selected feature subset, represents the optimal hyperparameter configuration obtained by FA, and is the predicted earthquake magnitude. Firefly algorithm for hyperparameter optimization In the proposed CNN–DNN–GRU model, the Firefly Algorithm (FA) is adopted as a metaheuristic strategy to optimize critical hyperparameters and enhance model performance. The FA simulates the natural flashing behavior of fireflies, in which less-bright fireflies move toward brighter ones, based on an attractiveness function that decreases with distance and is modulated by a light-absorption coefficient. Each firefly in the population encodes a candidate solution representing a combination of hyperparameters such as learning rate, dropout rate, and the number of units in GRU and dense layers. The brightness of each firefly is determined by the validation loss (e.g., mean squared error) obtained during training with the corresponding configuration. Through iterative updates influenced by attractiveness and random perturbations, the FA effectively explores the search space to locate optimal configurations. This approach significantly improves the convergence rate, generalization, and predictive accuracy of the proposed model for earthquake magnitude forecasting. Algorithm 2 displays the FA hyperparameter optimization method. FA for Hyperparameter Optimization. To avoid ambiguity regarding the role of the validation set during FA optimization, the data partitioning strategy was strictly fixed before the optimization process. The dataset was first divided into three mutually exclusive subsets: training, validation, and testing. For each firefly, the encoded hyperparameter configuration was used to train the CNN–DNN–GRU model only on the training subset. The validation subset was then used to compute the fitness value, defined as the validation mean squared error (MSE), as follows in eq 4: where denotes the hyperparameter vector represented by the ith firefly, is the number of validation samples, is the actual magnitude, and is the predicted magnitude. The validation subset was used only for model selection and was not used for gradient-based weight updates. The independent test subset was kept completely unseen during training, BDE-based feature selection, and FA-based hyperparameter optimization, and it was used only once for the final evaluation of the selected model. Nevertheless, using the same validation subset repeatedly during the FA search may still introduce validation-set selection bias, particularly when the number of evaluated configurations is large. To reduce this risk, the search space was constrained to a limited number of meaningful hyperparameter ranges, and the final model was evaluated on an independent test set that did not participate in any optimization step. In future work, nested cross-validation and repeated independent train–validation–test splits will be adopted to further reduce optimizer-induced overfitting and provide a more robust estimate of generalization performance. Although the FA is used to optimize the hyperparameters of the proposed CNN–DNN–GRU model, it is important to note that the FA itself contains several control parameters, including the population size, maximum number of generations, randomization factor α, base attractiveness , and light absorption coefficient γ. These parameters affect the balance between exploration and exploitation during the optimization process. In this study, the FA control parameters were selected based on commonly adopted ranges in previous metaheuristic optimization studies and refined through preliminary validation experiments. The final configuration was chosen according to the lowest validation MSE, while the independent test set was kept unseen until the final evaluation stage. Therefore, the selected optimizer parameters are not claimed to be universally optimal; rather, they represent empirically effective settings for the present earthquake magnitude estimation task. This validation-based selection strategy reduces the risk of test-set bias and provides a practical balance between optimization performance and computational cost. Similarly, the BDE parameters used for feature selection were selected to maintain sufficient population diversity while ensuring convergence within a reasonable computational budget. Since metaheuristic algorithms are stochastic by nature, their performance may vary depending on initialization and control-parameter settings. To reduce this effect, the optimization process was repeated, and the best feature subset was selected based on validation performance rather than final test performance. This procedure ensures that feature selection is guided by generalization behavior instead of direct fitting to the test set. Implementation details and reproducibility Table 6 displays Implementation and reproducibility details such as The deep learning models were developed using TensorFlow 2.10 and Keras 2.10, while the machine learning baselines were implemented using Scikit-learn 1.1.3. Table 6Implementation and reproducibility details.ItemDescriptionProgramming languagePython 3.8Notebook environmentJupyter Notebook 6.4.6Deep learning frameworkTensorFlow 2.10, Keras 2.10Machine learning libraryScikit-learn 1.1.3Gradient boosting librariesXGBoost 1.7.6, LightGBM 3.3.5, CatBoost 1.2Numerical librariesNumPy 1.23.5, Pandas 1.5.3Visualization librariesMatplotlib 3.7.1, Seaborn 0.12.2Random seed42Operating systemWindows 11ProcessorIntel Core i9RAM64 GBGPUNVIDIA CUDA-enabled GPUTraining epochs15Batch size32OptimizerAdamLoss functionMSESequence lengthL=10 previous eventsTrain/validation/test split70%/15%/15% chronological splitAverage training time28–35 minutes per runFA optimization timeApproximately 8–10 hoursBaseline model timeApproximately 5–25 minutes per model Implementation and reproducibility details. Results and discussion This section presents and analyzes the experimental results from the proposed CNN-DNN-GRU hybrid model for earthquake magnitude prediction, along with comparisons with baseline models. The evaluation was conducted on a test set representing 15% of the total dataset, ensuring the generalizability of the results. Performance was assessed using multiple metrics: MAE, RMSE, MSE, MedAE, MAPE, and the . Results analysis Our experiments were executed with Jupyter version 6.4.6. It improves the development and execution of Python code. It is a web-based application compatible with Python 3.8. The experiment was conducted on a system with an Intel Core i9 CPU, 64GB of RAM, and Windows 11. To assess the performance of the proposed CNN-DNN-GRU model and the other models in this study, we employed several evaluation metrics. The mathematical formulas for each of these metrics are presented in equations (5, 6, 7, 8, 9): Table 7 presents the comparison between the proposed model and several baseline models. To provide a more appropriate evaluation for catalog-based earthquake metadata, strong tabular regression models such as Random Forest, XGBoost, LightGBM, CatBoost, SVR, and MLP were added. ResNet50 and VGG-19 were retained only as secondary deep-learning references for completeness, although they are not the most suitable baselines for tabular regression data. Among the tabular models, CatBoost and XGBoost achieved the strongest baseline performance. However, the proposed CNN–DNN–GRU model optimized with BDE and FA achieved the lowest MSE, MAE, MedAE, and RMSE, as well as the highest , demonstrating superior predictive performance under the same evaluation setting. Table 7Performance comparison between the proposed model and baseline models.ModelMSEMAEMedAERMSERandom Forest0.01960.10940.09180.14000.9851XGBoost0.01680.10120.08550.12960.9873LightGBM0.01750.10360.08790.13230.9868CatBoost0.01590.09780.08240.12610.9880SVR0.02670.12850.10720.16340.9798MLP0.01890.10670.08960.13750.9857CNN0.04090.16130.13610.20230.9702LSTM0.05870.19340.16330.24230.9726GRU0.11710.27310.23100.34220.9467ResNet500.17000.32940.27880.41230.9239VGG-190.20320.35960.30340.45080.9110Proposed CNN–DNN–GRU + BDE–FA0.01090.08370.07090.10480.9918 Performance comparison between the proposed model and baseline models. The performance comparison clearly demonstrates the superior performance of the proposed CNN–DNN–GRU model across all evaluation metrics. It achieves the MSE of 0.0109, MAE of 0.0837, MedAE of 0.0709, and RMSE of 0.1048, significantly outperforming the other deep learning models. Moreover, it attains the highest score of 0.9918, indicating exceptional goodness-of-fit and variance explanation in earthquake magnitude prediction. In contrast, traditional models like CNN, LSTM, and GRU display higher error rates, with CNN yielding an MSE of 0.0409 and of 0.9702, while GRU performs notably worse (MSE = 0.1171, = 0.9467). Transfer learning models, ResNet50 and VGG-19, also lag behind, with VGG-19 exhibiting the weakest results (MSE = 0.2032, RMSE = 0.4508, = 0.9110). These findings confirm that the hybrid integration of convolutional, dense, and recurrent layers—optimized via the FA — enables more accurate, stable, and generalized predictions than conventional and state-of-the-art architectures. Although the proposed model achieved a high value of 0.9918 on the independent chronological test subset. It represents the statistical goodness-of-fit of a catalog-based magnitude regression model under the specific dataset, preprocessing, feature-selection, and evaluation protocol adopted in this study. It should not be interpreted as evidence of deterministic physical prediction of earthquake occurrence, earthquake rupture processes, surface ground-motion severity, or operational early-warning performance. Since the proposed model uses catalog-level metadata rather than real-time waveform recordings or station-level seismic signals, its predictions mainly reflect learnable statistical regularities in the historical catalog, including regional, depth-related, and magnitude-distribution patterns. To reduce the possibility of inflated performance caused by information leakage, target-derived or post-event variables such as significance were excluded from model training, validation, testing, BDE-based feature selection, and FA-based hyperparameter optimization. Constant or weakly informative variables, such as status and tsunami, were also removed from the final input space. The final model was trained using only longitude, latitude, and depth from previous chronological earthquake events, and normalization parameters were fitted on the training subset only before being applied to the validation and test subsets. Therefore, the reported value should be understood as evidence that the model fits the statistical structure of the available catalog well, rather than as proof that earthquake magnitudes are physically predictable with near-perfect accuracy. Nevertheless, the high remains dataset-dependent and may be influenced by the density of repeated regional observations, the dominance of low-to-moderate magnitude events, and spatial-temporal autocorrelation within the historical earthquake records. Table 8 presents the ablation analysis used to evaluate the contribution of BDE-based feature selection. The CNN–DNN–GRU model without BDE achieved an MSE of 0.0136, MAE of 0.0915, RMSE of 0.1166, and of 0.9897. After applying BDE feature selection, the proposed model improved to an MSE of 0.0109, MAE of 0.0837, RMSE of 0.1048, and of 0.9918. This corresponds to a 19.85% reduction in MSE, an 8.52% reduction in MAE, and a 10.12% reduction in RMSE. These results indicate that BDE contributes to improving prediction accuracy by reducing redundant or weakly informative inputs before model training. Table 8Ablation analysis of the proposed CNN–DNN–GRU model with and without BDE feature selection.Model configurationInput settingMSEMAEMedAERMSECNN–DNN–GRU without BDEFull input features0.01360.09150.07840.11660.9897CNN–DNN–GRU with BDEBDE-selected features0.01090.08370.07090.10480.9918Improvement with BDE–19.85%8.52%9.57%10.12%+0.0021 Ablation analysis of the proposed CNN–DNN–GRU model with and without BDE feature selection. Table 9 shows that the complete leakage-free input configuration, consisting of longitude, latitude, and depth, achieved the best performance with an MSE of 0.0109, RMSE of 0.1048, and of 0.9918. Adding status and tsunami did not improve the model performance, confirming that these weak metadata variables provide little useful information for magnitude estimation. Removing longitude or latitude individually caused a noticeable performance reduction, while removing both spatial variables produced a larger degradation, with the RMSE increasing to 0.2674 and decreasing to 0.9462. Similarly, removing depth and using only longitude and latitude reduced the predictive performance compared with the full model. Table 9Input-feature ablation analysis of the proposed CNN–DNN–GRU model.Input configurationMSEMAEMedAERMSELongitude + latitude + depth0.01090.08370.07090.10480.9918Longitude + latitude + depth + status + tsunami0.01110.08430.07140.10540.9916Latitude + depth, without longitude0.01960.10980.09260.14000.9853Longitude + depth, without latitude0.02480.12470.10430.15750.9813Depth only, without longitude and latitude0.07150.21460.18420.26740.9462Longitude + latitude, without depth0.03520.14610.12380.18760.9735Status + tsunami only1.32970.88940.74281.1531−0.0003 Input-feature ablation analysis of the proposed CNN–DNN–GRU model. Table 10 presents the sensitivity analysis conducted to examine the effect of latitude and longitude on the proposed model. The full-input configuration, which uses longitude, latitude, and depth, achieved the best performance with an MSE of 0.0109, RMSE of 0.1048, and of 0.9918. When only geographic coordinates were used, the model still achieved reasonable performance with an of 0.9735, indicating that latitude and longitude contain strong spatial-context information related to regional seismicity patterns. However, the depth-only configuration showed a clear performance decrease, with the RMSE increasing to 0.2674 and decreasing to 0.9462. Moreover, when latitude and longitude were randomly shuffled in the test subset, the performance degraded substantially, with the RMSE increasing to 0.3359 and decreasing to 0.9151. Table 10Latitude–longitude sensitivity analysis of the proposed CNN–DNN–GRU model.Input configurationMSEMAEMedAERMSEFull input: longitude + latitude + depth0.01090.08370.07090.10480.9918Coordinate-only: longitude + latitude0.03520.14610.12380.18760.9735Depth-only: depth without coordinates0.07150.21460.18420.26740.9462Shuffled-coordinate test0.11280.27640.23850.33590.9151 Latitude–longitude sensitivity analysis of the proposed CNN–DNN–GRU model. The training and testing behavior of all evaluated models in Figure 8 reveals distinct patterns in learning dynamics and generalization capabilities. The proposed CNN-DNN-GRU model demonstrated the most stable and consistent performance, with both training and test errors (MAE and MSE) converging quickly and fluctuating minimally, reflecting strong generalization and robust learning. In contrast, the CNN model, while capable of learning spatial features effectively, showed greater variance in testing performance, particularly in MAE, indicating sensitivity to input variability and a lack of temporal modeling. Similarly, the LSTM and GRU models exhibited reasonable convergence. Still, they were prone to overfitting in some cases, with testing errors occasionally diverging from training losses, suggesting challenges in handling long-range dependencies or imbalanced data. Transfer learning models like ResNet50 and VGG-19 underperformed, with higher training and testing errors, likely because they were optimized for image classification rather than numerical time-series data. Overall, the results affirm that hybrid architectures incorporating spatial, deep, and temporal components—especially when coupled with intelligent optimization—are better suited for earthquake magnitude prediction tasks. MAE and MSE curve for all models during training and testing over 15 epochs. Figure 9 displays the prediction performance of all models, which was evaluated by plotting actual versus predicted earthquake magnitudes, along with fitted regression lines and corresponding scores. The CNN-DNN-GRU hybrid model achieved the most accurate fit, with an of 99.18%, indicating a near-perfect correlation between predicted and actual values and demonstrating the model’s superior ability to capture both spatial and temporal patterns. The LSTM (97.26%) and CNN (97.02%) models also demonstrated strong performance but showed slightly wider scatter around the fitted line, reflecting minor prediction deviations. The GRU model achieved an of 94.67%, while the ResNet50 and VGG-19 models lagged at 92.39% and 91.10%, respectively, highlighting the limitations of transfer learning on non-visual time-series data. Actual versus predicted earthquake magnitudes of all suggested models. Although the proposed CNN–DNN–GRU model achieved the best overall regression performance, the error behavior should be interpreted in relation to the distribution of the earthquake catalog. As shown in the exploratory analysis, the dataset is dominated by low-to-moderate magnitude events, while high-magnitude events, very deep earthquakes, and samples from less frequent geographic regions are relatively underrepresented. Therefore, the global error metrics may mainly reflect performance on the dominant magnitude range. Accordingly, the magnitude-stratified analysis presented in Table 11 was conducted to explicitly examine the prediction error and systematic bias across the earthquake-magnitude distribution, with particular emphasis on the comparatively rare high-magnitude events. Table 11Magnitude-stratified performance of the proposed CNN–DNN–GRU + BDE–FA model on the independent chronological test set.Magnitude rangeSamples (N)MAERMSEBiasM<3.0421,6450.07690.09390.00683.0łe M<4.059,8910.09900.1220−0.01174.0łe M<5.023,7500.12300.1510−0.02845.0łe M<6.08,2610.15900.1950−0.0615M\ge 6.02,7560.22200.2710−0.1186Overall test set516,3030.08370.10480.0013 Magnitude-stratified performance of the proposed CNN–DNN–GRU + BDE–FA model on the independent chronological test set. Because the earthquake catalog is dominated by low-to-moderate magnitude events, the aggregate error metrics may disproportionately reflect model performance for the most frequently represented magnitude range. Therefore, an additional magnitude-stratified analysis was conducted using only the independent chronological test subset. Following the preprocessing and sequence-construction procedure, the test set contained 516,303 input–target samples. The test samples were divided into five magnitude intervals: M<3.0, 3.0łe M<4.0, 4.0łe M<5.0, 5.0łe M<6.0, and M\ge 6.0. For each interval, the sample count, MAE, RMSE, and mean signed prediction bias were calculated. Prediction bias was defined as where and denote the observed and predicted magnitudes, respectively. A negative bias indicates systematic underestimation, whereas a positive bias indicates systematic overestimation. As shown in Table 11, the magnitude distribution of the independent test set is strongly imbalanced. A total of 421,645 samples (81.67%) belong to the M<3.0 category, whereas only 2,756 samples (0.53%) correspond to events with M\ge 6.0. This confirms that aggregate error metrics are primarily influenced by the large population of low-magnitude events. The proposed model achieved its lowest prediction errors for the dominant M<3.0 interval, with an MAE of 0.0769 and an RMSE of 0.0939. Both error measures increased gradually with earthquake magnitude. For 5.0łe M<6.0, the MAE and RMSE increased to 0.1590 and 0.1950, respectively, while the relatively rare M\ge 6.0 events exhibited an MAE of 0.2220 and an RMSE of 0.2710. Nevertheless, these errors remain small relative to the corresponding earthquake magnitudes. The signed bias also reveals a magnitude-dependent trend. The bias is close to zero for the dominant low-magnitude events but becomes increasingly negative as magnitude increases. In particular, the M\ge 6.0 group has a bias of -0.1186, indicating a moderate tendency of the model to underestimate rare large earthquakes. This behavior is consistent with the substantially lower representation of high-magnitude events in the historical catalog. The weighted performance across all magnitude intervals produces an overall MAE of approximately 0.0837 and RMSE of approximately 0.1048, consistent with the aggregate results reported for the proposed model. Table 12 displays Combined hyperparameter configuration of the CNN–DNN–GRU model used for earthquake magnitude prediction. The CNN block uses 32 filters, ReLU activation, and a dropout rate of 0.2 for feature learning. The GRU block uses 64 units and a dropout rate of 0.2 for temporal dependencies. The DNN block uses 64 neurons and the ReLU activation function. Table 12Combined hyperparameter configuration of the CNN–DNN–GRU model used for earthquake magnitude prediction.BlockHyperparameterValue CNN BlockNumber of Conv Layers2Filters per Layer32Kernel Size3Activation FunctionReLUPooling Layerpool_size = 2Dropout Rate0.2GRU BlockGRU Layers2Units per Layer64Dropout Rate0.2DNN BlockHidden Dense Layers2Neurons per Layer64Activation FunctionReLUDropout Rate0.3 Combined hyperparameter configuration of the CNN–DNN–GRU model used for earthquake magnitude prediction. The CNN–DNN–GRU model was trained using the Adam optimizer for learning stability and convergence. The (MSE) loss function was chosen for continuous regression tasks. Training was conducted over 15 epochs with 32 batches, ensuring stable gradient updates and computational efficiency. Table 13 displays the summary of standard model hyperparameters. Additionally, table 14 displays the FA hyperparameter optimization in the proposed CNN–DNN–GRU model, aiming to enhance convergence and prediction accuracy. Table 13Common model hyperparameters.HyperparameterValueOptimizerAdamLearning Rate0.001Loss FunctionMSEBatch Size32Epochs15Validation Split0.15 Common model hyperparameters. Table 14FA hyperparameter optimization in the proposed CNN–DNN–GRU model.HyperparameterValuePopulation Size50Max Generations50Alpha (α)0.2Beta ()1.0Gamma (γ)1.0Randomization FactorUniform (0,1)Distance MeasureEuclidean FA hyperparameter optimization in the proposed CNN–DNN–GRU model. Effectiveness of FA-based hyperparameter optimization To experimentally validate the contribution of the FA, the hyperparameter search space, the best configuration obtained by FA, the convergence behavior, and a comparison with manual tuning and grid search were reported. The FA optimization process used the validation MSE as the fitness function. Each candidate solution represented a complete CNN–DNN–GRU hyperparameter configuration, and the configuration with the minimum validation MSE was selected for final model training and testing. Table 15 presents the hyperparameter search space used by FA. The search ranges were selected to cover compact and moderately complex configurations suitable for the size of the input tensor and the computational cost of repeated model training. Table 15FA hyperparameter search space for the CNN–DNN–GRU model.HyperparameterSearch spaceTypeLearning rateDiscreteCNN filtersDiscreteKernel sizeDiscreteGRU unitsDiscreteDense neuronsDiscreteCNN dropout rate[0.10, 0.30]ContinuousGRU dropout rate[0.10, 0.30]ContinuousDNN dropout rate[0.20, 0.50]ContinuousBatch sizeDiscreteOptimizerAdamFixedLoss functionMSEFixedEpochs15Fixed FA hyperparameter search space for the CNN–DNN–GRU model. Table 16 shows the best hyperparameter configuration obtained by FA. This configuration was used to train the final optimized CNN–DNN–GRU model. Table 16Best CNN–DNN–GRU hyperparameters obtained by FA.HyperparameterBest value selected by FALearning rate0.001CNN filters32Kernel size3GRU units64Dense neurons64CNN dropout rate0.20GRU dropout rate0.20DNN dropout rate0.30Batch size32OptimizerAdamLoss functionMSEEpochs15 Best CNN–DNN–GRU hyperparameters obtained by FA. The FA convergence behavior was monitored by recording the best validation MSE at each generation. As shown in Figure 10, the validation MSE decreased rapidly during the early generations and then gradually stabilized, indicating that FA successfully improved the model configuration and converged toward a stable solution. Convergence curve of the Firefly Algorithm based on the best validation MSE across generations. Table 17 shows that FA achieved the best overall performance among the evaluated optimization strategies, with an MSE of 0.0109, RMSE of 0.1048, and of 0.9918. Bayesian optimization was the closest alternative, achieving an MSE of 0.0116 and of 0.9913. Random search and grid search improved over manual tuning but remained less accurate than FA. These results indicate that FA provided a more effective exploration of the hyperparameter space for the proposed CNN–DNN–GRU architecture under the adopted validation-based optimization protocol. Table 17Comparison of hyperparameter-optimization strategies for the CNN–DNN–GRU model.Optimization strategyMSEMAEMedAERMSEManual tuning0.01480.09890.08410.12170.9889Random search0.01390.09540.08120.11790.9895Grid search0.01270.09120.07750.11270.9904Bayesian optimization0.01160.08660.07380.10770.9913Firefly Algorithm0.01090.08370.07090.10480.9918 Comparison of hyperparameter-optimization strategies for the CNN–DNN–GRU model. Comparative analysis The comparative analysis in Table 18 highlights key distinctions among recent earthquake-related prediction models across domains such as magnitude regression, time-to-failure estimation, and damage classification. The proposed CNN–DNN–GRU hybrid model, optimized via BDE and the FA, achieved the highest predictive performance with an of 0.9918, MAE of 0.0837, and RMSE of 0.1048, outperforming all listed approaches. In contrast, the study45 CRNN model, while innovative with residual connections and seismic signal imaging, achieved a lower (0.7977) and higher error metrics. The study46 used LSTM with K-means preprocessing for earthquake occurrence forecasting, showing moderate results. while study47 achieved competitive MAE (0.0825) but in a controlled lab setup using CatBoost–SVR. For damage classification, the study48 integrated stacking with CELS-WOA and SHAP to reach 90.4% accuracy, while another study49 utilized classic ML with PSO-based feature selection to enhance RF accuracy to 72.98 Table 18Comparative analysis of earthquake magnitude estimation models.StudyDomainModel ArchitectureOptimization/Feature StrategyPrediction TargetPerformanceThis StudyMagnitude Regression (Global)CNN + DNN + GRU HybridBDE + Firefly AlgorithmEarthquake MagnitudeR2 = 0.9918, MAE = 0.0837, RMSE = 0.104845Magnitude Regression (Signal Image)CRNN (CNN + LSTM + Residual + Regression Layer)Manual hyperparameter tuningEarthquake Magnitude = 0.7977, MSE = 0.1090, RMSE = 0.4369, Corr = 0.998046Earthquake Occurrence Forecasting4-layer LSTMManual tuning + K-means preprocessingEarthquake OccurrenceMSE = 0.3798, RMSE = 0.6163, MAE = 0.414647Time to Failure (Lab Data)Hybrid CatBoost + SVRManual feature engineeringTime-to-Failure PredictionMAE = 0.082548Building Damage ClassificationStacking + CELS-WOACELS-WOA + SHAPBuilding Damage ClassificationAccuracy = 90.4%49Damage Classification (Post-Quake)KNN, DT, RF, NBPhasor PSODamage ClassificationAccuracy = 72.98% (RF) Comparative analysis of earthquake magnitude estimation models. Explainability analysis Figure 11 presents the SHAP summary plot for the final leakage-free input features used by the proposed CNN–DNN–GRU model. It shows that depth has the widest SHAP-value distribution and therefore the largest contribution to the predicted earthquake magnitude. Latitude shows the second-highest contribution, while longitude has a comparatively smaller but still visible effect on the model output. This ranking is consistent with the feature-contribution analysis, where depth provided the strongest explanatory signal, followed by latitude and longitude. However, these SHAP values should be interpreted as model-based statistical contributions rather than direct causal effects. In particular, latitude and longitude may reflect regional tectonic setting, catalog density, and repeated historical seismicity patterns, while depth provides hypocentral context. Therefore, the SHAP analysis improves the transparency of the proposed model and supports the conclusion that the model learns catalog-level spatial and depth-related patterns for magnitude estimation. SHAP summary plot for the final leakage-free input features of the proposed CNN–DNN–GRU model. Figure 12 presents the SHAP-based feature importance analysis for the final leakage-free input variables used by the proposed CNN–DNN–GRU model. The results show that depth has the highest mean absolute SHAP contribution, accounting for 43.0% of the total feature contribution. Latitude ranks second with 32.0%, while longitude contributes 25.0%. This indicates that the model relies primarily on hypocentral-depth information, while also using spatial-context information from latitude and longitude to estimate earthquake magnitude. SHAP-based feature importance for the final leakage-free input variables of the proposed CNN–DNN–GRU model. Statistical analysis To provide a more rigorous assessment of the reliability of the reported results, repeated-run statistical validation was conducted. Each compared model was trained and evaluated over n=10 independent runs using different random initializations, while keeping the same chronological train/validation/test split, preprocessing pipeline, sequence length, evaluation metrics, and test subset. The MSE was selected as the primary statistical variable because it was the optimization loss function and directly reflects the magnitude of the regression error. For each model, the mean, standard deviation, and 95% confidence interval (CI) were calculated across the ten runs. The 95% CI was computed as: where is the mean MSE, s is the standard deviation, n=10 is the number of runs, and is the critical value of the t distribution with n-1 degrees of freedom. Table 19 shows that the proposed CNN–DNN–GRU + BDE–FA model achieved the lowest mean MSE and the narrowest confidence interval across ten independent runs. This indicates that the reported performance is stable. Table 19Repeated-run MSE results with 95% confidence intervals over 10 independent runs.ModelRunsMean MSE ± SD95% CI lower95% CI upperCNN–DNN–GRU + BDE–FA100.0109 ± 0.00060.01050.0113CNN100.0409 ± 0.01080.03320.0486LSTM100.0587 ± 0.01460.04830.0691GRU100.1171 ± 0.02520.09910.1351ResNet50100.1700 ± 0.03110.14780.1922VGG-19100.2032 ± 0.03430.17870.2277 Repeated-run MSE results with 95% confidence intervals over 10 independent runs. Before applying parametric statistical tests, the normality assumption was examined using the Shapiro–Wilk test. The null hypothesis of the Shapiro–Wilk test is that the repeated-run MSE values are normally distributed. A p-value greater than 0.05 indicates that normality is not rejected. Homogeneity of variance was examined using Levene’s test. Since Levene’s test indicated unequal variance across model groups, Welch’s ANOVA was also reported in addition to the standard one-way ANOVA. Non-parametric tests were further included as robustness checks. As shown in Table 20, the Shapiro–Wilk results did not reject the normality assumption for the repeated-run MSE values of any model. However, Levene’s test suggested that the homogeneity-of-variance assumption was not fully satisfied. Therefore, Welch’s ANOVA was reported as a variance-robust alternative to standard one-way ANOVA. In addition, the Kruskal–Wallis test was used as a non-parametric omnibus test. All omnibus tests produced statistically significant results, indicating that the compared models do not have equal MSE performance. Table 20Normality, variance-homogeneity, and omnibus statistical tests.TestStatisticp-valueInterpretationShapiro–Wilk: Proposed model0.9580.768Normality not rejectedShapiro–Wilk: CNN0.9430.612Normality not rejectedShapiro–Wilk: LSTM0.9360.544Normality not rejectedShapiro–Wilk: GRU0.9290.489Normality not rejectedShapiro–Wilk: ResNet500.9120.351Normality not rejectedShapiro–Wilk: VGG-190.9030.297Normality not rejectedLevene’s test2.710.032Variance homogeneity not fully satisfiedOne-way ANOVAF(5,54)=111.86<0.0001Significant difference among modelsWelch’s ANOVAF(5,19.7)=64.12<0.0001Significant under unequal variancesKruskal–Wallis testH(5)=52.46<0.0001Non-parametric confirmation Normality, variance-homogeneity, and omnibus statistical tests. After the omnibus tests, paired two-tailed t-tests were conducted to compare the proposed CNN–DNN–GRU + BDE–FA model against each baseline model. Pairing was applied because each model was evaluated using the same chronological split and corresponding run index. The paired difference was computed as: where i denotes the run index. The paired t-statistic was calculated as: where is the mean paired difference, is the standard deviation of the paired differences, and n=10 is the number of repeated runs. The degrees of freedom for each paired t-test were therefore df=9. Because five pairwise comparisons were conducted, a Bonferroni-corrected significance threshold of α = 0.05/5 = 0.01 was used. The Wilcoxon signed-rank test was also reported as a non-parametric paired alternative. Table 21 shows that the proposed model achieved significantly lower MSE than all baseline models. The negative mean MSE differences indicate that the proposed CNN–DNN–GRU + BDE–FA model produced smaller prediction errors than each baseline. All paired t-test p-values remained below the Bonferroni-corrected threshold of 0.01. The Wilcoxon signed-rank test also confirmed the same conclusion under a non-parametric setting. Therefore, the statistical validation supports that the performance improvement of the proposed model is not due to random initialization or a single favorable run. Table 21Paired statistical comparison between the proposed model and baseline models.ComparisonMean MSE diff.95% CI of diff.t-valuet-test pWilcoxon pProposed vs CNN−0.02994[−0.03759, −0.02229]−8.85<0.00010.0020Proposed vs LSTM−0.04773[−0.05811, −0.03735]−10.40<0.00010.0020Proposed vs GRU−0.10614[−0.12406, −0.08822]−13.40<0.00010.0020Proposed vs ResNet50−0.15901[−0.18114, −0.13688]−16.25<0.00010.0020Proposed vs VGG-19−0.19220[−0.21662, −0.16778]−17.80<0.00010.0020 Paired statistical comparison between the proposed model and baseline models. Although the repeated-run statistical analysis improves the reliability of the comparison, the results should still be interpreted within the limits of the adopted experimental protocol. The repeated runs evaluate stability under different random initializations using the same dataset and chronological split. They do not replace external validation on independent earthquake catalogs or region-blocked testing. Future work will therefore extend the statistical validation using repeated chronological splits, tectonic-zone holdout testing, and independent external datasets. Conclusions and recommendations In this study, we proposed a hybrid deep learning framework (CNN-DNN-GRU) exclusively for earthquake magnitude prediction, enhanced by two powerful metaheuristic techniques: BDE for feature selection and FA for hyperparameter optimization. We emphasize that the scope of this model is limited to estimating the magnitude of an impending event and is not intended to forecast the precise time of occurrence or the resulting severity of surface strong motion. By integrating convolutional, dense, and recurrent layers, the model effectively captures spatial, hierarchical, and temporal dependencies in seismic data. The experimental results, based on a large-scale global earthquake dataset, demonstrate that the proposed model significantly outperforms conventional models and recent state-of-the-art approaches. It achieved () of 0.9918, (MAE) of 0.0837, and (RMSE) of 0.1048, reflecting its high precision, low error rate, and strong generalization capability. Comparative analysis further confirmed the superiority of our approach over existing models, including CRNNs, LSTMs, stacking ensembles, and hybrid machine learning frameworks, particularly in terms of prediction accuracy and optimization efficiency. Despite the strong predictive performance achieved by the proposed CNN–DNN–GRU model, several limitations in this methodology. First, although the use of BDE and FA improved feature selection and hyperparameter tuning, the control parameters of these metaheuristic optimizers were selected empirically. As with most global optimizer-assisted deep learning frameworks, parameters such as population size, number of generations, mutation strategy, attractiveness coefficient, light absorption coefficient, and randomization factor may influence convergence behavior and final model performance. Therefore, the selected optimizer settings should be interpreted as validation-effective configurations for the current dataset rather than universally optimal values. Second, the present study did not perform an exhaustive sensitivity analysis of the optimizer control parameters. Such an analysis would be valuable for determining how robust the proposed model is under different optimization settings and for identifying whether performance gains are mainly due to the hybrid architecture, the feature-selection stage, or the optimizer configuration. Third, the dataset used in this study is based on tabular earthquake-event metadata; therefore, the model estimates earthquake magnitude from historical and geospatial attributes but does not directly process raw seismic waveforms or real-time sensor streams. This limits its immediate applicability to operational earthquake magnitude-estimation components that may support future early-warning-oriented systems when integrated with real-time waveform and station-level data, where waveform arrival information, station-specific signals, and real-time latency constraints are critical. Future work will focus on four main directions. First, systematic sensitivity analysis will be conducted for BDE and FA parameters to evaluate the stability of the proposed framework under different optimizer configurations. Second, nested cross-validation and repeated independent optimization runs will be adopted to reduce optimizer-selection bias and provide more statistically robust estimates of generalization performance. Third, adaptive or self-tuning metaheuristic algorithms will be explored so that optimizer parameters can be dynamically adjusted during the search process instead of being fixed manually. Finally, future versions of the model will integrate real-time seismic waveform data, station-level information, and explainable artificial intelligence techniques to improve operational applicability, interpretability, and reliability in practical seismic monitoring and earthquake early warning environments. It also extends the proposed framework beyond catalog-metadata-based magnitude regression by incorporating broader earthquake-related data-driven applications. First, waveform-level and seismological signal features will be integrated to support more physically meaningful earthquake detection and magnitude-estimation tasks, inspired by recent automated earthquake detection frameworks based on advanced seismological signal analysis50. Second, the proposed model can be extended toward earthquake-engineering applications by linking seismic-event characteristics with structural response and optimization tasks, such as AI-driven seismic optimization of high-rise building systems in earthquake-prone regions51. Third, future studies may consider post-earthquake impact assessment by integrating social, psychological, and disaster-response indicators, particularly for evaluating the wider consequences of major seismic events52. These directions would allow the framework to evolve from catalogue-based magnitude regression into a more comprehensive earthquake intelligence system that supports seismic-event analysis, structural resilience evaluation, and post-disaster impact assessment. Author contributions Yasser Fouad provided resources, curated the data, contributed to visualization, and participated in review and editing. Safia Abbas provided resources, curated the data, contributed to visualization, and participated in review and editing. Hazem M. El-Bakry conceived and designed the study; developed the methodology; contributed to review and editing; and prepared the visualizations. Nada Ahmed designed the study; developed the methodology; contributed to review and editing; and prepared the visualizations. Ahmed M. Elshewey conceived and designed the study; contributed to the methodology; implemented the software; performed validation and formal analysis; conducted the investigation; curated the data; wrote the original draft; conducted the investigation; reviewed and edited the manuscript. Ahmed M. Osman contributed to the methodology, performed validation and formal analysis, and participated in review and editing. All authors read and approved the final manuscript. Funding Princess Nourah bint Abdulrahman University Researchers Supporting Project Number (PNURSP2026R756), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. Data availability The data that support the findings of this study are available at www.kaggle.com/datasets/alessandrolobello/the-ultimate-earthquake-dataset-from-1990-2023. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher's note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The data that support the findings of this study are available at www.kaggle.com/datasets/alessandrolobello/the-ultimate-earthquake-dataset-from-1990-2023.