## 2 Dataset and Feature Engineering  
The seismic catalog used in this study was obtained from the China Earthquake Data Center (CEDC, [[http://data.earthquake.cn/index.html](http://data.earthquake.cn/index.html)]([http://data.earthquake.cn/index.html](http://data.earthquake.cn/index.html)), last accessed on 23 May 2022) and includes earthquake events with a magnitude greater than 3.0 in the Sichuan-Yunnan region from 1970 to 2021. By means of feature engineering, seismic activity parameters were generated based on several statistical laws. These parameters were derived from the seismic catalog and were used as the input features for earthquake prediction, rather than the original catalog itself.  
To test these methods, the Chuandian region of Southwestern China (98.0\({}^{\circ}\) E-106.0\({}^{\circ}\) E, 24.0\({}^{\circ}\) N-32.0\({}^{\circ}\) N) was selected due to its abundant earthquakes. The time range for analysis was from 1 January 1970 to 23 May 2021. While there were several sudden large increases in earthquake activity due to large earthquakes during this time period, the complete  
Figure 1: Spatial distribution of seismicity in Chuandian region from 1970 to 2021. The black lines represent active faults [33]. The yellow circles represent earthquakes larger than 3.0, the purple circles show earthquakes larger than 6.0, and the red stars are earthquakes larger than 7.0.  
ness magnitude was estimated to be approximately 3.0 using the maximum curvature technique [34; 35] (Figure 2). Therefore, the cutoff magnitude was set at 3.0 for this study.  
Prior research has demonstrated that many seismic features derived from earthquake catalogs can be used to predict earthquakes [36; 37; 38]. These features include an 'a' value and a 'b' value in the Gutenberg-Richter law, the number and maximum/mean magnitude of past earthquakes, seismic energy release, magnitude deficit, seismic rate changes, and elapsed time since the last large earthquake. In addition, the standard deviation of the estimated b value, the deviation from the Gutenberg-Richter law, and the probability of earthquake occurrence are also calculated as seismic features. The formulas used to calculate these seismic features are listed in Table 1.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Seismic Features** & **Description** & **Mathematical Expressions** \\ \hline N.O. & Number of earthquakes in & \\  & observation window & \\ Mag\_max & Maximum magnitude in & \\  & observation window & \\ Mag\_mean & Mean magnitude in observation & \\  & window & \\ b\_lsq & b value using least square & \\  & regression analysis & \\ a\_lsq & a value using least square & \\  & regression analysis & \\ b\_std\_lsq & Standard deviation of b\_lsq & \\  & Deviation from & \\ std\_gr\_lsq & Gutenberg–Richter law (b\_lsq, & \\  & a\_lsq) & \\ b\_mlk & b value using maximum & \\  & likelihood method & \\ a\_mlk & a value using maximum & \\  & likelihood method & \\ b\_std\_mlk & Standard deviation of b\_mlk & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Details of seismic features and mathematical expressions.  
Figure 2: The temporal completeness magnitude from 1970 to 2021 in the Chuadian region based on the maximum curvature technique [34; 35].  
The temporal variations of all 22 seismic features listed in Table 1. were calculated for the Chuandian region from 1970 to 2021 using a sliding window process, similarly to previous studies [39]. To predict earthquakes on a mid-term basis, the observation window, the prediction window, and the sliding window were set to be 2 years, 1 year, and 30 days, respectively (Figure 3). This resulted in 591 time steps with 22 seismic features at each step. For earthquake classification, labels were marked with either 0 or 1, and observed magnitudes were used for earthquake magnitude prediction.