Improving Earthquake Signal Detection Model Based on Transfer Learning ()
1. Introduction
Seismic data processing and seismic phase identification are core research focuses on seismology. In general, the seismic data processing workflow consists of several steps: seismic event detection, arrival-time picking, seismic phase association, earthquake location and magnitude calculation, which ultimately generate a complete earthquake catalog for each seismic event. Among these steps, seismic detection and arrival-time picking are the preliminary and most critical procedures, whose accuracy drastically affects the reliability of earthquake catalogs [1] [2]. Traditional seismic phase detection algorithms (including STA/LTA, AIC, improved Coppens method, high-order statistics, Filter Picker, etc.) each have their own merits and drawbacks. Although numerous algorithms are available, accurate arrival-time picking remains challenging, primarily due to the simplicity of conventional calculation frameworks [3]-[6]. Computer technologies represented by machine learning offer innovative solutions for seismic event detection. Introducing target detection techniques originally developed for audio recognition, computer vision and other booming fields into seismology helps advance seismic detection algorithms. Unlike traditional methods that require manually setting thresholds according to variations in seismic waveform energy or amplitude, most machine learning algorithms require minimal human intervention and deliver superior performance for big data processing, enabling rapid analysis of massive seismic datasets. Ross et al. [7] proposed GPD, a deep learning-based seismic phase detection method. The model employs convolutional neural networks to learn generalized representations of millions of P-wave, S-wave and noise seismic waveforms for phase detection and picking. Its key advantage lies in fully automatic seismic wave detection, which reduces manual workload while boosting detection accuracy and efficiency. Zhu and Beroza [8] were the first to apply the U-Net architecture, originally designed for medical image segmentation, to seismic phase picking. Wang et al. [9] put forward a deep learning method named PickNet, which automatically picks P- and S-wave arrival times of abundant local earthquakes with precision comparable to human experts, and can be directly applied to seismic tomography. Mousavi et al. [10] constructed the EQTransformer model by integrating the attention mechanism and residual neural networks (ResNet). The model was trained on more than one million global seismic samples and validated with Japanese seismic data. This network features strong anti-noise performance and a low false identification rate, yet it exhibits weaker generalization and detection capacity compared with PhaseNet [11]. All the above models achieve accuracy close to manual interpretation on their respective training datasets. Nevertheless, seismic signals are characterized by prominent regional variations; waveforms differ significantly across regions due to disparate geological conditions and observation instruments [12]. To evaluate the applicability of mainstream seismic detection models in Gansu Province and develop a region-specific seismic detection model for local use, we constructed a Gansu seismic dataset formatted consistently with the STEAD dataset (hereafter referred to as the Gansu Dataset). We only extract waveform records with complete manually labeled P and S phases from years of continuous monitoring data to test the generalization performance of different models for the study area. Comparative experiments on the Gansu Dataset reveal that PhaseNet achieves the best overall performance, yet its recognition precision and anti-noise capability still require further improvement. To further enhance the detection accuracy of deep learning models and realize automatic seismic data analysis for Gansu, this paper conducts transfer learning based on PhaseNet—the top-performing baseline model—and improves its regional generalization ability via model fine-tuning.
2. Dataset Construction and Preprocessing
2.1. Dataset Overview
Figure 1. Spatial distribution of seismic stations used in this study and waveform samples of the dataset. Subplot (a) shows station distribution; subplot (b) displays noise waveform and seismic event waveform samples.
We collected waveform data recorded by 47 seismic stations of the Gansu Seismic Network from 2009 to 2021 and extracted manually labeled seismic signals with a sampling rate of 100 Hz. The spatial distribution of these stations is shown in Figure 1(a). Examples of noise and earthquake event waveforms from our dataset are illustrated in Figure 1(b). Each signal contains three-component records, namely the east-west (E-W), north-south (N-S) and vertical (Z) components. The raw data are stored in mseed format. In accordance with the seismic phase reports released by the Gansu Seismic Network, we selected records containing both clear P-wave and S-wave arrival times and segmented waveforms from the mseed files. Each time window spans 10 seconds before the P-wave arrival to 50 seconds after, covering a total duration of 60 seconds (6000 sampling points). Combined with the three components, the dimension of each sample is 1 × 3 × 6000. Nevertheless, not all waveforms are of high quality as displayed in Figure 2. Some stations suffer from various interferences, resulting in low signal-to-noise ratio (SNR) and strong background noise. Such noisy data will reduce the detection accuracy of deep learning models, so filtering is implemented to eliminate low-frequency and high-frequency noise components. In this study, mean removal and band-pass filtering are adopted for preprocessing. Mean removal centralizes all three-component input data around zero, which facilitates model fitting and mitigates the risk of gradient vanishing. A band-pass filter with a low cut-off frequency of 1 Hz and a high cut-off frequency of 20 Hz is applied to suppress noise in seismic waveforms. Ultimately, we obtained 283,467 seismic event samples with complete P and S phase labels recorded by the 47 stations across Gansu from 2009 to 2021. In the label vectors, sampling points corresponding to P-wave and S-wave arrivals are marked as 1 and 2 respectively, while all other sampling points are labeled 0. To evaluate the model’s ability to identify noise events, we additionally randomly selected 100,000 noise records from the same stations and time period with identical preprocessing operations; all labels of noise samples are set to 0. The Gansu dataset is partitioned into three subsets at a ratio of 60% training set, 20% validation set and 20% test set.
2.2. Data Augmentation
To improve the performance and generalization ability of the deep learning model, we adopt data augmentation to expand the dataset and increase the total sample size. Within a 60-second time window, we amplify data volume by randomly shifting valid seismic signals. We also add Gaussian noise at random different ratios to original seismic waveforms to enrich the diversity of positive samples. The formula for adding Gaussian noise to seismic signals is expressed as follows:
(1)
where
denotes the raw seismic signal,
is the noise weighting coefficient,
is the mean of Gaussian distribution, and
represents the variance of Gaussian distribution.
Figure 2. Original seismicwaveform and examples of data augmentation.
The original time series data and the results obtained through various data augmentation techniques are exhibited. Subfigure (a) portrays the original time series data, highlighting its intrinsic fluctuation patterns. Subfigure (b) demonstrates the enhanced data acquired by incorporating Gaussian noise into the original data. By calculating the noise amplitude based on the original data’s maximum value and generating a Gaussian noise set of commensurate amplitude and length, we were able to simulate real-world environmental factors that may impact the signal, thereby bolstering the model’s robustness to such influences. Subfigure (c) reveals the augmented data produced by performing time shifts on the original data. By displacing data points along the temporal axis, we emulated signal time offsets, enabling the model to discern analogous patterns at varying time instances. This method can assist the model in adapting to temporal variations of signals within practical scenarios.
3. Methodology
3.1. Baseline Detection Model: PhaseNet
PhaseNet is a deep neural network algorithm built on a modified U-Net architecture optimized for one-dimensional time-series data. The original U-Net framework was designed for biomedical image segmentation to localize local features within images. PhaseNet adapts this architecture to seismic waveform data to realize the classification and localization of three categories: P-waves, S-waves and noise.
The input of PhaseNet consists of three-component seismograms of known earthquakes, and its output corresponds to probability distributions of P-wave, S-wave and noise at each sampling point. In our experiments, both input and output sequences contain 3001 data points per component (30 seconds in duration with a sampling rate of 100 Hz). The network contains four downsampling stages and four upsampling stages. Within each stage, one-dimensional convolution and Rectified Linear Unit (ReLU) activation functions are adopted. The downsampling process extracts and compresses effective information from raw seismic data, enabling each neuron in the deepest layer to possess a broad receptive field. The upsampling process reconstructs the compressed features into probability distributions of P-waves, S-waves and noise for every time step. To accelerate convergence during training, skip connections are introduced at every network depth, directly connecting feature outputs from the encoding path to layers in the decoding path and avoiding information loss through deep stacked layers.For the PhaseNet model, the 1D convolution kernel size is set to 7 data points, and the downsampling stride equals 4 data points. After each downsampling operation, the channel length is reduced to one quarter of its original size. Meanwhile, transposed convolution (also referred to as deconvolution) is applied for the upsampling procedure [13], expanding compressed feature maps by four times to restore their original length. Padding is added before and after each convolution layer to ensure identical lengths of input and output sequences. The final layer employs the softmax activation function to normalize outputs into probability values.
Numerous studies have proven that PhaseNet achieves high accuracy and robustness in seismic waveform processing, providing powerful support for seismological research [2] [11] [14].
3.2. Transfer Learning Strategy
Transfer Learning is a machine learning technique that improves model performance by sharing knowledge and feature representations across different tasks. Fine-tuning is one of the most widely adopted transfer learning strategies for neural networks. Generally, the top several layers of a deep neural network are fine-tuned, while the remaining shallow layers are frozen with their pre-trained weights unchanged. This strategy originates from the constraints of limited dataset size and empirical research findings: the shallow bottom layers of deep neural networks capture abstract, universal features applicable to a wide range of tasks, whereas the top layers extract task-specific characteristic features [15]. To boost the recognition accuracy of the PhaseNet model on the Gansu dataset, this paper adopts the fine-tuning strategy of transfer learning. After multiple comparative trials, we select the last two layers of PhaseNet as the tunable weight layers, as illustrated in Figure 3. The transfer learning improved model proposed in this paper is named PhaseNet-TL.
![]()
Figure 3. The conceptual diagram of transfer learning technique in this paper. (Subfigure a represents the original PhaseNet model; subfigure b represents the transfer improvement on the target domain Gansu dataset; subfigure c represents the transfer learning based PhaseNet-TL model.)
First, we load the pre-trained weights of the PhaseNet model into the network. All layers except the final two layers are frozen during fine-tuning to moderately boost the model’s performance on the Gansu dataset. Since transfer learning provides a much higher initial performance baseline, we adopt a decaying learning rate schedule with an initial learning rate of 0.001; the learning rate will be reduced when the model’s performance on the validation set stops improving or declines. Binary Cross-Entropy is used as the loss function:
(2)
where
denotes the probability that the current sampling point corresponds to a seismic event, and N stands for the total number of data samples. This network is a multi-task architecture designed to separately pick the arrival times of P-waves and S-waves. In practical training, we observe that the P-wave detection branch converges far earlier than the S-wave branch, which indicates that the P-wave picking task is simpler for the model compared with the S-wave task. Therefore, we assign independent weight coefficients to the two branch loss functions
and
and the final combined loss function is defined as follows:
(3)
Fixed constant weights are applied without dynamic adjustment in this study. Based on the difference in convergence speed between two branches, we set
for P-wave loss and
for S-wave loss.
4. Result Analysis and Discussion
4.1. Evaluation Metrics
In this paper, we compare the performance of various detection algorithms and deep learning models on the Gansu dataset, and record three evaluation metrics for each method, namely Precision (abbreviated as pr), Recall (abbreviated as re), and Error.
Precision represents the proportion of true positive samples among all samples predicted as positive by the model, which is defined as:
(4)
where TP stands for True Positive. Following the criterion set by Zhu and Beroza, a prediction is counted as TP when the picking error is less than 0.1 s [8]; FP denotes False Positive, and FN denotes False Negative. Recall is a classifier performance metric commonly used to evaluate the coverage capability of a classifier. It is calculated as the ratio of samples correctly classified as positive to the total number of actual positive samples. Recall is also known as the True Positive Rate (TPR) or sensitivity. The formula for calculating Recall is given below:
(5)
The calculation formula for the customized evaluation metric Error is defined as follows:
(6)
where X represents seismic signal sequence, and N is the total number of sampling points. A negative Error value means the predicted arrival time lags behind the real labeled arrival time.
4.2. Experimental Results and Analysis
During transfer learning training, an early stopping strategy was adopted, with a batch size of 128 and a maximum of 100 training epochs. The training procedure was visualized via the loss curves of P-waves and S-waves recorded throughout iterations, and the detailed results are displayed in Figure 4. We observe that the loss curve of S-waves declines far more slowly than that of P-waves. This indicates that the model learns the signal features of P-waves more rapidly than those of S-waves. Such a phenomenon can be attributed to the higher complexity and poorer distinguishability of S-wave signals compared with P-waves. Due to the intricate waveform and low signal-to-noise ratio of S-waves, the model requires more training time and computational resources to capture discriminative S-wave features during optimization. As a result, the convergence speed of the S-wave loss is slower than that of the P-wave loss.
Figure 4. Loss function curve during transfer learning iterations.
After constructing the new transfer learning model, we carry out comparative detection experiments on the Gansu dataset using mainstream deep learning seismic detection models including PhaseNet, EQTransformer, PickNet and GPD, together with the transfer-learning optimized PhaseNet-TL. The experimental results are summarized in Table 1 and visualized in Figure 5.
Generally speaking, Recall (re) reflects the overall detection capacity of a model. It can be seen from Table 1 that PhaseNet and PhaseNet-TL exhibit far stronger detection performance than the other models. EQTransformer achieves excellent Precision for both P-wave and S-wave detection; specifically, its S-wave picking error differs from that of PhaseNet-TL by only around 5 sampling points. Nevertheless, its Recall is lower than PhaseNet, meaning EQTransformer fails to identify a large number of positive seismic events and suffers severe event omission. This observation is consistent with the comparative study conducted by Jiang et al. [11]. PickNet delivers low Precision and Recall values for both P and S phase detection. GPD underperforms all other algorithms in P-wave and S-wave identification, with particularly large picking errors, which may be caused by mismatches between its training data and the inherent characteristics of the Gansu dataset.
When deployed on the Gansu dataset, the original PhaseNet outperforms the remaining models in seismic event detection and arrival-time picking. For P-wave detection, PhaseNet-TL surpasses the other four algorithms across all three metrics: Precision (pr), Recall (re) and Error. PhaseNet-TL attains a Precision of 0.99 and a Recall of 0.92, with an Error value of merely −12.4. By contrast, the other four models produce much larger picking errors; the original PhaseNet has an Error of −121.2, approximately ten times that of PhaseNet-TL. PhaseNet-TL also achieves remarkable performance on S-wave detection, with Precision = 0.99, Recall = 0.90 and Error = −18.7. All four alternative models show inferior S-wave detection performance compared with PhaseNet-TL. For instance, the Error of the original PhaseNet is −137, nearly seven times the error magnitude of PhaseNet-TL.
Table 1. Performance of various earthquake detection model approaches on the Gansu region test dataset (a negative value of Error indicates that the predicted seismic phase arrival time is later than the actual arrival time).
Method |
P-wave |
S-wave |
Precision |
Recall |
Error |
Precision |
Recall |
Error |
EQtransformer |
0.99 |
0.78 |
−192.8 |
0.99 |
0.74 |
23.4 |
PickNet |
0.72 |
0.32 |
−654.2 |
0.58 |
0.43 |
810.5 |
GPD |
0.70 |
0.66 |
−752.4 |
0.63 |
0.59 |
−855.7 |
PhaseNet |
0.91 |
0.88 |
−121.2 |
0.87 |
0.84 |
−137 |
PhaseNet-TL |
0.99 |
0.92 |
−12.4 |
0.99 |
0.90 |
−18.7 |
Figure 5. Performance comparison of different models in P-wave and S-wave detection tasks. The figure is divided into two main parts: the left is for P-waves and the right is for S-waves. Each part includes three subgraphs, (a), (b), (c), showing the performance of each method in terms of precision (pr), recall (re), and error values (Error).
Experimental results demonstrate that the transfer learning optimized PhaseNet-TL achieves remarkably superior performance in both P-wave and S-wave detection, and such superiority can be attributed to the strong generalization capability of transfer learning. Transfer learning enables us to take pre-trained neural networks as the base model, so as to boost the learning speed and performance on new tasks. In this study, PhaseNet-TL effectively improves its performance on regional seismic wave detection tasks by learning feature knowledge from the Gansu dataset. The advantages of PhaseNet-TL in Precision (pr), Recall (re) and Error over other methods prove that it possesses higher accuracy, stability and robustness for seismic wave detection. This superiority stems from the capacity of transfer learning to capture waveform features and distinguish different types of seismic waves, making PhaseNet-TL more efficient and accurate in processing seismic data.
5. Conclusions
This study adopts a transfer learning method to improve the seismic phase picking accuracy for seismic data from the Gansu region. After multiple trials, we obtained a relatively optimal solution: expanding the sample size via data augmentation, fine-tuning the pre-trained model by loading its weights and retraining the network to adapt it to regional seismic data. By comparing five algorithms, namely EQTransformer, PickNet, GPD, PhaseNet and the proposed PhaseNet-TL, we draw the following conclusions:
(1) EQTransformer achieves certain advantages in Precision over the original PhaseNet and the other two models, with higher Precision specifically for S-wave detection; however, its generalization ability is inferior to that of PhaseNet.
(2) PhaseNet-TL fine-tuned through transfer learning delivers outstanding performance for seismic wave detection in the Gansu region. In particular, its picking error is drastically reduced, demonstrating high accuracy and stability. This indicates that PhaseNet-TL is more suitable for seismic monitoring and early warning tasks in Gansu Province.
(3) This research further verifies the great potential of transfer learning in seismology. Fine-tuning the pre-trained PhaseNet yields remarkable performance gains for regional seismic wave detection in Gansu, offering a valuable reference for seismological research.
Despite the prominent advantages of PhaseNet-TL, several inherent limitations remain to be noted. For one thing, the effectiveness of transfer learning depends on the similarity between the source task and the target task. If there is a huge discrepancy between the source and target tasks, transfer learning may fail to bring obvious performance improvement. Furthermore, transfer learning relies on pre-trained models, and the selected pre-trained model largely determines the final transfer performance. Therefore, selecting an appropriate pre-trained model is one of the critical prerequisites for a successful transfer learning application.
Future research can improve and extend the PhaseNet-TL method from the following two perspectives. First, more source tasks and pre-trained models can be tested to implement sufficient transfer learning on diverse seismic datasets. This will enhance the generalization performance of PhaseNet-TL and enable it to achieve reliable detection results under various seismic scenarios. Second, we can explore the integration of transfer learning with other state-of-the-art deep learning techniques such as self-supervised learning and multi-task learning, so as to further boost the overall performance of seismic wave detection.
Funding
Special Project for Earthquake Monitoring, Prediction and Early Warning (202602015), Gansu Provincial Science and Technology Program (23YFFA0015).