# Comparative Analysis of Deep Learning Methods for Real-Time Estimation of Earthquake Magnitude
## 1 Introduction  
Earthquake early warning (EEW) systems integrate highly efficient monitoring technologies, fast data processing algorithms, and intelligent decision-making systems that can collect and analyze seismic wave first-arrival data in an instant, aiming to quickly determine the three elements of an earthquake (time, location, and magnitude) based on the monitoring signals before the arrival of the main motion and to conduct seismic damage assessment and activate emergency controls to mitigate the disaster [1, 2, 3]. The system includes at least functional modules such as earthquake localization, real-time magnitude calculation, intensity estimation in the warning target area, and informationdissemination, of which real-time magnitude calculation is the most critical and complex part. The core problem of the magnitude calculation is establishing a clear link between the limited information in the early stage and the final damage and ensuring that the error of the calculated magnitude is small enough. Although indicators early in the rupture cannot fully infer the final magnitude, previous research has found that accurate estimates within the first ten seconds are possible ([PERSON] et al., 2016; [PERSON] et al., 2016). However, there is a trade-off between achieving the earliest possible warning time and improving the estimate's accuracy ([PERSON] et al., 2016): waiting for additional data containing more information about the earthquake improves the magnitude and location estimates but delays the issuance of warnings. More importantly, the earlier the estimate, the worse it is to underestimate the final magnitude ([PERSON] et al., 2016). At this stage, three types of magnitude estimation methods exist: mathematical modeling, shallow machine learning, and deep learning algorithms. Mathematical modeling has been widely used to establish an empirical functional relationship between the initial P-waveform information and the magnitude of the earthquake, including a variety of period-like formulas: estimation of the magnitude of the earthquake based on the average excellence of the period \(\tau\) in the first-to-first P-wave over a period of 3-4 s ([PERSON] et al., 2016) and the sum of absolute displacements within the first second of arrival multiplied by the maximum dominant frequency \(\tau_{p}^{max}\) S\({}_{\mathrm{d}\tau}\)([PERSON] et al., 2016), the dominant period S\({}_{\mathrm{P}}\), the maximum superior period S\({}_{\mathrm{P}\text{-}\text{max}}\)([PERSON] et al., 2016; [PERSON] et al., 2016), the mean period S\({}_{\mathrm{c}}\)([PERSON] et al., 2016), and the peak displacement P\({}_{\mathrm{d}}\)([PERSON] et al., 2016), etc. Based on the above studies, new parameters have been continuously proposed in recent years, such as the logarithmic mean period \(\tau_{\mathrm{log}}\)([PERSON] et al., 2016), the deviation time of similar growth with P-wave T\({}_{\mathrm{d}\text{p}}\)([PERSON] et al., 2016), and the wavelet transform period \(\lambda_{\mathrm{log}}\)([PERSON] et al., 2016). However, with the increase in data volume and computational power, shallow machine learning, as a data-driven nonparametric method, has begun to gradually show its advantages on the basis of mathematical modeling. Shallow machine learning algorithms can automatically learn the relationship between feature parameters and magnitude without the need to manually construct complex empirical functions as in traditional mathematical modeling. Comparing the results of three machine learning methods (i.e., Random Forest, Extreme Gradient Boosting, and Support Vector Machine) with single-site, multi-feature inputs for estimating the epicentral distance, it was found that all three machine learning methods outperform the traditional mathematical modeling methods ([PERSON] et al., 2016). They have low generalization error rates and low computational overhead, but require manual feature extraction and are sensitive to parameter and kernel function selection.