A seismic phase identification method and system fusing meta-learning and transfer learning
By integrating meta-learning and transfer learning methods, and using a model pre-trained on a large-scale earthquake dataset, combined with a two-stream knowledge injection and self-learning weighted fusion strategy, the cross-domain adaptation problem in earthquake phase identification was solved, enabling efficient deployment and high-precision identification in newly built stations and remote areas.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INSTITUTE OF PETROCHEMICAL TECHNOLOGY
- Filing Date
- 2026-01-22
- Publication Date
- 2026-07-31
AI Technical Summary
Existing transfer learning methods suffer from negative transfer and catastrophic forgetting problems in seismic phase identification. Especially when the target domain sample is extremely small, the model is prone to overfitting and is difficult to deploy efficiently in newly built stations or remote areas.
We adopt a method that combines meta-learning and transfer learning. We pre-train the model using a large-scale earthquake dataset, and then perform meta-training using a global support set and a regional auxiliary support set. We use a two-stream knowledge injection and self-learning weighted fusion strategy to dynamically balance knowledge contributions and build a cross-domain robust model.
Achieving rapid model adaptation with limited labeled data in the target area improves the deployment efficiency and identification accuracy of the earthquake monitoring system in new stations and remote areas, while reducing reliance on labeled data.
Smart Images

Figure CN121956119B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of earthquake phase recognition technology, and particularly relates to an earthquake phase recognition method and system that integrates meta-learning and transfer learning. Background Technology
[0002] Seismic phase identification is a fundamental task in earthquake monitoring and early warning systems. Its core mission is to extract P-waves and S-waves from seismic waveforms and distinguish seismic events from background noise. The accuracy of phase arrival directly impacts the reliability of earthquake location and magnitude estimation. In recent years, deep learning methods have made significant progress on large-scale datasets from global seismic networks. However, these methods require a large number of labeled samples, typically tens or even hundreds of thousands of high-quality labeled data points. In practical deployments, newly built stations or remote areas often face difficulties such as a lack of labeled data and distributional offsets between regional waveform characteristics and training data.
[0003] Existing transfer learning methods still have shortcomings in the application of seismic phase recognition. When the data distributions of the source and target domains differ significantly, parameter fine-tuning may introduce negative transfer; when fine-tuning is performed under conditions of extremely limited samples in the target domain, the model is prone to overfitting, and the general features learned from the source domain are gradually overwritten, i.e., a catastrophic forgetting problem. These problems are particularly prominent in scenarios with few samples. Therefore, this invention proposes a seismic phase recognition method and system that integrates meta-learning and transfer learning. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a seismic phase recognition method that integrates meta-learning and transfer learning, thereby resolving the issues present in the existing technologies.
[0005] To achieve the above objectives, this invention provides a seismic phase recognition method and system that integrates meta-learning and transfer learning, comprising:
[0006] A pre-trained model is obtained by training a neural network based on a large-scale earthquake dataset.
[0007] Based on the pre-trained model, the model is meta-trained using episodic samples containing a global support set, a regional auxiliary support set, and a query set. Specifically, based on the global support set and the regional auxiliary support set, a fusion loss is obtained by using dual-stream knowledge injection and self-learning weighted fusion. The fast weights are updated based on the fusion loss, and the meta-loss is calculated based on the query set to update the meta-parameters, thus obtaining the meta-trained model.
[0008] The meta-trained model is transferred to the target region and fine-tuned based on the labeled waveform of the target region to obtain the adapted model.
[0009] The earthquake waveform to be identified is input into the adapted model, which outputs the arrival probability sequences of P-waves and S-waves.
[0010] Optionally, the process of training a neural network based on a large-scale earthquake dataset includes:
[0011] Using a three-component seismic waveform as input, the three-component seismic waveform is processed based on a channel attention module to obtain weighted fused waveform features;
[0012] The weighted fused waveform features are processed using a feature extractor that includes an encoder and a decoder to obtain multi-scale depth features;
[0013] Based on the detection head, the multi-scale depth features are processed to obtain P-wave probability sequences, S-wave probability sequences, and event classification results.
[0014] Optionally, the process of obtaining the fusion loss by employing a two-stream knowledge injection and self-learning weighted fusion includes:
[0015] The general feature loss is calculated based on the global support set, and the region-specific feature loss is calculated based on the region-auxiliary support set.
[0016] Based on learnable prior knowledge weight parameters and auxiliary knowledge weight parameters, the Sigmoid function is used to map the general feature loss and the region-specific feature loss to obtain normalized fusion weights.
[0017] The fusion loss is obtained by weighting and summing the general feature loss and the region-specific feature loss based on the normalized fusion weights.
[0018] Optionally, after obtaining the normalized fusion weights, the method further includes: performing multiple forward propagations on the waveforms of the global support set and the regional auxiliary support set based on the Monte Carlo Dropout method to obtain multiple prediction results; calculating the uncertainty of each knowledge flow based on the multiple prediction results; calculating an uncertainty adjustment factor based on the uncertainty; adjusting the normalized fusion weights using the uncertainty adjustment factor to obtain uncertainty-aware fusion weights; and performing a weighted summation of the general feature loss and the regional specific feature loss based on the uncertainty-aware fusion weights to obtain the uncertainty-aware fusion loss.
[0019] Optionally, the expression for calculating the uncertainty adjustment factor is:
[0020] ;
[0021] ;
[0022] In the formula, For uncertainty sensitivity hyperparameter, As a global support set uncertainty adjustment factor, As an uncertainty adjustment factor for regional auxiliary support sets, To provide a global support set uncertainty measure This serves as a measure of uncertainty in the regional auxiliary support set.
[0023] Optionally, the expression for calculating the uncertainty-aware fusion weights is:
[0024] ;
[0025] ;
[0026] In the formula, For the normalized global weights, For the normalized region weights, These are the weight values for the original global scope information. The weight values are the original regional range information.
[0027] Optionally, the process of fine-tuning the model based on the labeled waveform of the target region to obtain the adapted model includes: copying the parameters of the meta-trained model as initial parameters; updating the detection head parameters with multi-step gradient descent based on the initial parameters using the target region support set, while keeping the feature extractor parameters unchanged; and obtaining the adapted model parameters.
[0028] The present invention also provides an earthquake phase recognition system that integrates meta-learning and transfer learning, for implementing the method, the system comprising:
[0029] The preprocessing module is used to train a neural network based on a large-scale earthquake dataset to obtain a pre-trained model;
[0030] The meta-training module is used to perform meta-training on the model based on the pre-trained model using episodic samples containing a global support set, a regional auxiliary support set, and a query set, to obtain a meta-trained model.
[0031] The migration and deployment module is used to migrate the meta-trained model to the target region and fine-tune it based on the labeled waveform of the target region to obtain the adapted model.
[0032] The phase recognition module is used to input the seismic waveform to be identified into the adapted model and output the arrival probability sequences of P-wave and S-wave.
[0033] Compared with the prior art, the present invention has the following advantages and technical effects:
[0034] This invention integrates meta-learning and transfer learning to construct a three-stage framework of pre-training, meta-training, and fine-tuning, effectively solving the problem of cross-domain adaptation with few samples in seismic phase identification. A general model pre-trained on a large-scale dataset is combined with a two-stream knowledge injection mechanism to simultaneously utilize global and region-specific features during meta-training, enhancing the model's cross-domain robustness. A self-learning weighted fusion strategy dynamically balances the contributions of the two types of knowledge, avoiding negative transfer and catastrophic forgetting in traditional transfer learning. Ultimately, this method requires only a small amount of labeled data in the target area to quickly complete model adaptation, significantly reducing dependence on labeled data and improving the deployment efficiency and identification accuracy of seismic monitoring systems in low-sample scenarios such as new stations and remote areas. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0036] Figure 1 This is a flowchart illustrating the overall technical solution of an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of a deep neural network architecture according to an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of the dual-stream knowledge injection mechanism in an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the uncertainty perception fusion mechanism in an embodiment of the present invention. Detailed Implementation
[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0041] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0042] Example 1
[0043] To address the aforementioned shortcomings, this invention proposes a seismic phase recognition method that integrates meta-learning and transfer learning. The overall technical solution sequentially includes a pre-training stage, a meta-training stage, and a meta-testing stage, with a dual-stream knowledge injection mechanism and a self-learning weighted fusion strategy introduced as core technical means in the meta-training stage.
[0044] I. Pre-training stage: Train the basic neural network on a large-scale earthquake dataset to obtain general earthquake waveform feature extraction capabilities and phase recognition prior knowledge, and obtain pre-trained model parameters.
[0045] II. Meta-training stage: A dual-stream knowledge injection mechanism is adopted, which integrates the general features of the global support set (prior knowledge stream) and the region-specific features of the regional auxiliary support set (auxiliary knowledge stream). The contribution of the two types of knowledge is dynamically balanced through a self-learning weighted fusion strategy, thereby training a meta-learner with rapid cross-regional adaptability.
[0046] III. Meta-testing phase: Using the model obtained from meta-training, rapid adaptation is performed on a small number of labeled seismic events at new stations or in new regions to achieve cross-domain seismic phase identification with a small number of samples.
[0047] This embodiment provides a seismic phase recognition method that integrates meta-learning and transfer learning, specifically including the following steps:
[0048] I. Pre-training Phase: A neural network is trained on a large-scale earthquake dataset to obtain a pre-trained model. The goal of the pre-training phase is to train the base network on the large-scale earthquake dataset, enabling it to learn general prior knowledge of seismic waveform feature representation and phase recognition. Let the large-scale earthquake waveform annotation dataset be... ,in It is a three-component seismic waveform (vertical component Z, north-south component N, and east-west component E). For sequence length, It includes P-wave arrival time labels, S-wave arrival time labels, and event type labels. A deep neural network based on an encoder-decoder structure is constructed. ,in The network parameters are defined as follows: the network input is a three-component seismic waveform of fixed duration (e.g., 30 seconds or 60 seconds), and the output is a point-by-point phase probability prediction. The network architecture includes the following main components: the input layer receives signals with a dimension of... The three-component waveform tensor, where The batch size is specified; the channel attention fusion module performs adaptive weighted fusion of the three-component waveforms and learns the importance weight of each component; the feature extractor uses multi-scale convolution or Transformer architecture to extract waveform features and capture multi-granular features from the sampling point level to the waveform level; the detection head includes a P-wave detection branch, an S-wave detection branch and an event detection branch, which output the P-wave arrival probability, the S-wave arrival probability and the event type prediction, respectively.
[0049] II. Meta-training Phase: Based on the pre-trained model, the model is meta-trained using episodic samples containing a global support set, regional auxiliary support sets, and a query set. Specifically, based on the global and regional auxiliary support sets, a fusion loss is obtained using two-stream knowledge injection and self-learning weighted fusion. The fusion loss is then used to update the fast weights, and the meta-loss is calculated based on the query set to update the meta-parameters, resulting in the meta-trained model. The goal of the meta-training phase is to train a meta-learner with rapid cross-regional adaptability through a two-stream knowledge injection mechanism and a self-learning weighted fusion strategy. Meta-training employs an episodic training mechanism, with each training episode containing the following dataset: global support set... Sampling is performed from large-scale earthquake datasets, i.e., the source domain (such as the STEAD dataset, which contains 1.2 million earthquakes and 300,000 noise records). =100,000 labeled waveforms to provide monitoring signals for general seismic characteristics; regional auxiliary support set Sample data from regions with similar geological conditions to the area the model will migrate to, i.e., the target domain. =5000 labeled waveforms, used to provide supervisory signals for region-specific features; query set From and Central sampling of the same large-scale dataset =2000 labeled waveforms, and ensure and The samples do not overlap and are used to evaluate the generalization performance of the model after it has adapted to the support set.
[0050] The dual-stream knowledge injection mechanism utilizes two types of knowledge sources simultaneously: prior knowledge streams from the global support set. The monitoring signal, representing general seismic waveform characteristics, is extracted from this support set, and the loss is calculated on this support set. The model is guided to learn general characteristics of seismic waveforms, such as the sharpness of P-wave initial motion, the high amplitude of S-waves, and the distinguishing features between seismic signals and noise; the auxiliary knowledge flow comes from the regional auxiliary support set. The supervision signal is extracted from this support set, representing the region-specific waveform features. The loss is then calculated on this support set. This guides the model to learn the specific characteristics of the target region, such as waveform propagation characteristics caused by specific geological structures and regional noise patterns. The core idea of dual-stream knowledge injection is that prior knowledge provides robust basic recognition capabilities, while auxiliary knowledge provides targeted adaptive guidance. The two work together to achieve efficient cross-domain transfer.
[0051] The self-learning weighted fusion strategy adopts a decoupled two-parameter design, defining two independent learnable scalar parameters: These are the original parameters for the weights of prior knowledge. The original parameters for auxiliary knowledge weights are normalized using the Sigmoid function, and an adjustable temperature parameter is introduced. Controlling the hardness or softness of weights:
[0052]
[0053]
[0054] Temperature parameters The mechanism of action is as follows: high temperature ( At low temperatures, the Sigmoid curve flattens out, the weight outputs tend to be at the middle value, and it is highly exploratory, making it suitable for allowing the model to fully explore different knowledge fusion strategies in the early stages of training; When the Sigmoid curve becomes steeper, the weight distribution becomes more deterministic, making it more usable and suitable for locking the optimal fusion strategy in the later stages of training. The formula for calculating the fusion loss on the support set is:
[0055]
[0056] This invention further proposes a dynamic weight adjustment mechanism based on uncertainty estimation, enabling the fusion weights to adaptively adjust according to the predictive reliability of each knowledge source. Uncertainty estimation employs the Monte Carlo Dropout method: maintaining the activation state of the Dropout layer in the network's feature extractor, and performing calculations on the same input waveform... The second forward propagation yields... Groups of different phase probability predictions; for each knowledge source, calculate The variance of the predictions serves as a measure of uncertainty.
[0057]
[0058]
[0059] in, and They are respectively The mean of the predictions. Define the uncertainty adjustment factor:
[0060]
[0061]
[0062] in, For uncertainty sensitivity hyperparameter, As a global support set uncertainty adjustment factor, As an uncertainty adjustment factor for regional auxiliary support sets, To provide a global support set uncertainty measure To measure uncertainty in the regional auxiliary support set, the influence of uncertainty on the weights is controlled. The final uncertainty-aware fusion weights are:
[0063]
[0064]
[0065] The formula for calculating the fusion loss of uncertainty perception is:
[0066]
[0067] In the formula, For the normalized global weights, For the normalized region weights, These are the weight values for the original global scope information. The weight values are the original regional range information.
[0068] This involves coupling the original weights with uncertainty. This process is calculated once per training episode, not by calculating weights individually for each sample in the support set, but by calculating uniform weights for the entire support set. Before updating the inner loop of each training episode, uncertainty is estimated for the support set. Specifically, the process involves first using the current parameter θ to... and Perform T Monte Carlo Dropout forward propagations respectively, and calculate their respective uncertainties. and Then calculate the uncertainty perception weight. and Finally, these weights are used to calculate the fusion loss. Perform an internal loop update.
[0069] The advantage of this mechanism is that when global knowledge exhibits high uncertainty on the current sample, the model will automatically increase the weight of regional knowledge; conversely, when there are too few regional samples, making regional knowledge unreliable, the model will rely more on robust global knowledge.
[0070] Meta-training employs a dual-loop optimization structure. The inner loop rapidly adapts to the support set, simulating the few-shot learning process during meta-testing: it updates the network parameters of the current meta-learner. Cloning as fast weights Calculate the fusion loss and perform a gradient descent update in one step:
[0071]
[0072] in The inner loop sets the learning rate. The outer loop evaluates the generalization performance of the updated model on the query set and updates the meta-parameters accordingly. The waveform input is used to apply the updated fast weights. In the network, the phase recognition loss is calculated as the meta-loss:
[0073]
[0074] in The true labels for the query set. Calculate the meta-loss against the network parameters. and weight parameters , The gradient is calculated and parameters are updated, while the temperature parameters are updated according to the annealing strategy. The meta-training process is as follows: Load the pre-trained model parameters. Initialize weight parameters and Set the initial value of the temperature parameter. Iteratively execute plot sampling, inner loop update, and outer loop update until convergence, saving the meta-trained model parameters. .
[0075] Third, in the meta-testing stage, the meta-trained model is transferred to the target area and fine-tuned based on the labeled waveforms in the target area to obtain the adapted model; the seismic waveform to be identified is input into the adapted model, and the arrival probability sequences of P-waves and S-waves are output.
[0076] The meta-testing phase utilizes the model obtained from meta-training to rapidly adapt to a small number of labeled seismic events at new stations or in new regions, achieving cross-domain seismic phase identification with a limited number of samples. The specific steps are: copying the model parameters after meta-training. New model instances are used as initialization parameters for target domain adaptation; support sets for target stations or target regions are collected. It includes a small number of labeled seismic event waveforms; the model is fine-tuned using the target domain support set; during inference, the seismic waveform to be identified is input into the model to obtain the P-wave probability sequence. and S-wave probability sequence .
[0077] This invention introduces a meta-learning paradigm and a dual-stream knowledge injection mechanism to achieve flexible integration of earthquake prior knowledge and region-specific knowledge, effectively solving the problems of negative transfer and catastrophic forgetting in traditional transfer learning. This method requires only a small number of labeled events in the target area to achieve high-precision phase recognition, significantly reducing labeling costs and model deployment cycle. The decoupled dual-parameter design and uncertainty-aware weight adjustment mechanism enable the model to automatically adjust the knowledge fusion strategy according to regional characteristics and prediction reliability, making it robust in complex geological environments and easy to integrate with various mainstream earthquake phase recognition networks. It is suitable for practical application scenarios such as newly built stations, emergency monitoring, and remote areas.
[0078] Example 2
[0079] This embodiment uses a proprietary dataset as the source domain and a newly built seismic station as the target domain to fully illustrate the entire process of the method of the present invention from pre-training to actual deployment.
[0080] The technical solution of this invention sequentially executes three stages: pre-training, meta-training, and meta-testing, as follows: Figure 1 As shown, the pre-training stage trains the base network on a large-scale seismic dataset, enabling it to learn general seismic waveform feature representations. The meta-training stage, based on the pre-trained model, uses episodic training and a two-stream knowledge injection mechanism to give the model the ability to quickly adapt across regions. The meta-testing stage transfers the meta-trained model to the target station, requiring only a small amount of labeled data to adapt and be put into use. The outputs of the three stages are sequentially used as inputs for the next stage, forming a complete knowledge transfer chain.
[0081] Before inputting the data into the network, all three-component seismic waveforms undergo a unified preprocessing procedure: 1. Resampling: The original waveforms are uniformly resampled to a sampling rate of 100Hz to ensure consistent time resolution across waveforms recorded by different stations. 2. Mean and Detrending: The mean of each component is subtracted and the linear trend is removed to eliminate the effects of instrument drift and DC components. 3. Bandpass Filtering: A 1-45Hz Butterworth bandpass filter (4th order) is applied to retain the main frequency components of the seismic signal and suppress high-frequency noise and low-frequency interference. 4. Normalization: Each component is independently normalized to its maximum absolute value, scaling the amplitude range to the [-1, 1] interval to eliminate the influence of differences in instrument response between different stations. The normalization formula is: x_norm = x / max(|x|), where x is the waveform sequence of a single component. 5. Time window truncation: A fixed time window of 60 seconds (6000 sampling points) is truncated from the waveform. If the original waveform length is insufficient, zero padding is performed. If it exceeds the length, the truncation is centered on the arrival time of the marked P wave.
[0082] The deep neural network used in this embodiment The encoder-decoder architecture can be divided into four parts: input layer, channel attention module, feature extractor, and detection head. Figure 2 As shown. The network input is a dimension. The three-component seismic waveform tensor, of which For batch size, this embodiment takes... ;3 corresponds to the three channels: vertical component Z, north-south component N, and east-west component E; For the sequence length, this embodiment uses a waveform with a sampling rate of 100Hz and a duration of 60 seconds. The waveform first undergoes adaptive fusion via a channel attention module: global average pooling is performed on each of the three components to obtain a 3D feature vector. This vector is then transformed nonlinearly through two fully connected layers, outputting the attention weights for each component: The first layer (dimensionality reduction layer) has r=1 or 2 neurons (compression ratio) and uses the ReLU activation function to learn the nonlinear interactions between components through dimensionality reduction. The second layer (dimensionality increase layer) has 3 neurons corresponding to the three components and uses the Sigmoid activation function to output weight coefficients in the range [0,1]. Finally, the three components are weighted and summed. This design allows the network to automatically adjust the contribution of each component based on the characteristics of the input waveform.
[0083] The feature extractor consists of a symmetrical encoder and decoder. The encoder has four layers, each consisting of two residual convolutional blocks. The kernel size is uniformly set to 7 to capture longer temporal dependencies. The number of channels increases from the input layer to the bottleneck layer by 8, 16, 32, and 64 respectively. Downsampling is achieved between layers using max pooling with a stride of 2, thus expanding the receptive field layer by layer. The decoder also has four layers, achieving upsampling through transposed convolutions and establishing skip connections with the corresponding layers of the encoder to fuse high-resolution features from shallow layers with semantic features from deeper layers. The detection head contains three parallel branches: the P-wave detection branch and the S-wave detection branch both use 1×1 convolutions to map features to a single-channel output with a dimension of 1. The arrival probability of each sampling point is obtained by activating the Sigmoid function; the event detection branch performs global average pooling on the feature map and outputs the binary classification probability of earthquake and noise through a fully connected layer.
[0084] The pre-training phase was conducted on our own dataset, one of the largest publicly available seismic waveform datasets, containing approximately 1.2 million seismic event waveforms and 300,000 noise waveforms. The data sources cover multiple seismically active regions globally, and each waveform is labeled with P-wave arrival time, S-wave arrival time, and event type. Training employed the Adam optimizer with an initial learning rate of 0.001, using cosine annealing for 100 epochs. The loss function was a weighted sum of three binary cross-entropy losses for P-wave detection, S-wave detection, and event detection, with weights set to 1.0, 1.0, and 0.5, respectively. The event detection weight was lower because this task is relatively simple and primarily serves an auxiliary role. After pre-training, the model parameters were saved. At this point, the model already has basic phase recognition capabilities, but it does not yet have the ability to quickly adapt to new regions.
[0085] The core of the meta-training phase is the dual-stream knowledge injection mechanism and the self-learning weighted fusion strategy, such as... Figure 3 As shown. In this embodiment, each training scenario contains three types of datasets: the global support set... Random sampling from our own dataset The waveform represents the general characteristics of seismic waveforms; regional auxiliary support set. Selected from historical data of seismic networks Waveforms from areas with geological conditions similar to the target station represent region-specific characteristics; query set Sampling from our own dataset A waveform with no sample overlap between the two support sets is used to evaluate the generalization performance of the model.
[0086] The core of the meta-training phase is the dual-stream knowledge injection mechanism and the self-learning weighted fusion strategy, such as... Figure 3 As shown. In this embodiment, each training scenario contains three types of datasets: the global support set... Random sampling from our own dataset The waveform represents the general characteristics of seismic waveforms; regional auxiliary support set. Selected from historical data of seismic networks Waveforms from areas with geological conditions similar to the target station represent region-specific characteristics; query set Sampling from our own dataset A waveform with no sample overlap between the two support sets is used to evaluate the generalization performance of the model.
[0087] The two-stream knowledge injection mechanism uses the same network, rather than two independent copies. Network sharing: the prior knowledge stream and the auxiliary knowledge stream share the exact same network parameters θ (including the feature extractor and detector head). The only difference between the two streams is the input dataset. vs The two streams perform forward propagation sequentially: first, ... In Waveform input network Obtain the prediction results and calculate the loss. Then In Waveform input to the same network Obtain the prediction results and calculate the loss. The two forward propagations use the same network parameters but act on different data sources.
[0088] Loss fusion: fusing two losses using learnable weights. The fused loss is used for gradient updates in the inner loop, and also affects the entire network.
[0089] The specific implementation of dual-stream knowledge injection is as follows: the prior knowledge stream will... The waveform input network is used for forward propagation to obtain the predicted probabilities of P-waves and S-waves. These probabilities are then summed with the actual labels to calculate the binary cross-entropy loss, denoted as [the sum of these probabilities]. ; Auxiliary knowledge flow pairs Performing the same operation resulted in a loss. The losses of the two knowledge streams are fused using learnable weights. This embodiment defines the original parameters. and And initialized to 0, based on temperature parameters The fusion weights are obtained after normalizing the modulated sigmoid function. and :
[0090]
[0091]
[0092] In the initial state This indicates that the two types of knowledge are fused with equal weight. The temperature parameter adopts an exponential decay strategy, with an initial value... Final value The attenuation formula is ,in This represents the current training step count. In the early stages of training, the temperature is high, the Sigmoid curve is flat, and the weight distribution is relatively even, facilitating the model's exploration of different fusion strategies. As training progresses and the temperature gradually decreases, the Sigmoid curve becomes steeper, the weights tend to polarize, and the model gradually locks into the optimal fusion ratio. The formula for calculating the support set fusion loss is:
[0093]
[0094] This embodiment further introduces a dynamic weight adjustment mechanism based on uncertainty estimation, such as... Figure 4 As shown. A Dropout layer is added after each residual convolutional block of the feature extractor, with a dropout probability set to 0.1. The Dropout layer remains active while calculating uncertainty, and is applied to the same input waveform. The second forward propagation yields... Group prediction results. The variance of the predicted probabilities on the global support set and the regional auxiliary support set are calculated separately as a measure of uncertainty:
[0095]
[0096]
[0097] in and They are respectively The mean of the predictions. Define the uncertainty adjustment factor:
[0098]
[0099]
[0100] The sensitivity hyperparameter Multiplying the original weights by the adjustment factor and normalizing them yields the uncertainty-aware fusion weights:
[0101]
[0102]
[0103] The fusion loss of uncertainty perception is The mechanism works by the following: when the prediction variance of a knowledge source on the current sample is large, it indicates that the knowledge source's judgment on the current sample is not certain enough. At this time, its weight is automatically reduced, and more reliance is placed on knowledge sources with stable predictions.
[0104] Meta-training employs a dual-loop optimization structure. The inner loop simulates the few-shot adaptation process during meta-testing: it updates the current network parameters... Cloning as fast weights Perform one step of SGD update on the fusion loss, and the learning rate... :
[0105]
[0106] The outer loop evaluates the generalization performance after adaptation: the query set Input using updated fast weights For the network, calculate the phase recognition loss as the meta-loss:
[0107]
[0108] Meta-loss on network parameters and weight parameters , Perform Adam updates and learning rate adjustments. The meta-training process iterates for 10,000 steps, saving a checkpoint every 100 steps. If the validation set loss does not decrease for 500 consecutive steps, an early stopping mechanism is triggered, saving the parameters at which the validation loss is lowest. .
[0109] The meta-testing phase completes few-shot adaptation and actual inference at the target station. First, the parameters obtained from meta-training are loaded. The model is initialized, at which point it possesses the potential to quickly adapt to new regions. Then, waveforms from five labeled seismic events at the target station are collected as the support set for the target domain. Each waveform must include manually labeled arrival times for the P-wave and S-wave. The model undergoes a 5-step gradient update with a learning rate of 0.01. To prevent overfitting on a very small number of samples, only the detector head parameters are updated, while the feature extractor parameters are frozen. This allows the detector head to adapt to the waveform characteristics of the target region while preserving the general representation capabilities learned by the feature extractor. After fine-tuning, the model can be used for real-time phase recognition at target stations: input is a 60-second three-component waveform to be detected, and the network outputs a P-wave probability sequence. With S-wave probability sequence Candidate arrival times are selected using a probability threshold of 0.5, and then the final P-wave and S-wave arrival times are determined from the candidate locations using a peak detection algorithm.
[0110] Example 3
[0111] This embodiment also provides a seismic phase recognition system that integrates meta-learning and transfer learning, for implementing the methods of Embodiments 1 and 2. The system includes:
[0112] The preprocessing module is used to train a neural network based on a large-scale earthquake dataset to obtain a pre-trained model;
[0113] The meta-training module is used to perform meta-training on the model based on the pre-trained model using episodic samples containing a global support set, a regional auxiliary support set, and a query set, to obtain a meta-trained model.
[0114] The migration and deployment module is used to migrate the meta-trained model to the target region and fine-tune it based on the labeled waveform of the target region to obtain the adapted model.
[0115] The phase recognition module is used to input the seismic waveform to be identified into the adapted model and output the arrival probability sequences of P-waves and S-waves.
[0116] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A seismic phase recognition method integrating meta-learning and transfer learning, characterized in that, Includes the following steps: A pre-trained model is obtained by training a neural network based on a large-scale earthquake dataset. Based on the pre-trained model, the model is meta-trained using episodic samples containing a global support set, a regional auxiliary support set, and a query set. Specifically, based on the global support set and the regional auxiliary support set, a fusion loss is obtained by using dual-stream knowledge injection and self-learning weighted fusion. The fast weights are updated based on the fusion loss, and the meta-loss is calculated based on the query set to update the meta-parameters, thus obtaining the meta-trained model. The meta-trained model is transferred to the target region and fine-tuned based on the labeled waveform of the target region to obtain the adapted model. The earthquake waveform to be identified is input into the adapted model, which outputs the arrival probability sequences of P-waves and S-waves.
2. The seismic phase recognition method integrating meta-learning and transfer learning according to claim 1, characterized in that, The process of training a neural network based on a large-scale earthquake dataset includes: Using a three-component seismic waveform as input, the three-component seismic waveform is processed based on a channel attention module to obtain weighted fused waveform features; The weighted fused waveform features are processed using a feature extractor that includes an encoder and a decoder to obtain multi-scale depth features; Based on the detection head, the multi-scale depth features are processed to obtain P-wave probability sequences, S-wave probability sequences, and event classification results.
3. The seismic phase recognition method integrating meta-learning and transfer learning according to claim 1, characterized in that, The process of obtaining the fusion loss by employing dual-stream knowledge injection and self-learning weighted fusion includes: The general feature loss is calculated based on the global support set, and the region-specific feature loss is calculated based on the region-auxiliary support set. Based on learnable prior knowledge weight parameters and auxiliary knowledge weight parameters, the Sigmoid function is used to map the general feature loss and the region-specific feature loss to obtain normalized fusion weights. The fusion loss is obtained by weighting and summing the general feature loss and the region-specific feature loss based on the normalized fusion weights.
4. The seismic phase recognition method integrating meta-learning and transfer learning according to claim 3, characterized in that, After obtaining the normalized fusion weights, the process further includes: performing multiple forward propagations on the waveforms of the global support set and the regional auxiliary support set using the Monte Carlo Dropout method to obtain multiple prediction results; calculating the uncertainty of each knowledge flow based on the multiple prediction results; calculating an uncertainty adjustment factor based on the uncertainty; adjusting the normalized fusion weights using the uncertainty adjustment factor to obtain uncertainty-aware fusion weights; and performing a weighted summation of the general feature loss and the regional specific feature loss based on the uncertainty-aware fusion weights to obtain the uncertainty-aware fusion loss.
5. The seismic phase recognition method integrating meta-learning and transfer learning according to claim 4, characterized in that, The expression for calculating the uncertainty adjustment factor is: ; ; In the formula, For uncertainty sensitivity hyperparameter, As a global support set uncertainty adjustment factor, As an uncertainty adjustment factor for regional auxiliary support sets, To provide a global support set uncertainty measure To measure the uncertainty of the regional auxiliary support set.
6. The seismic phase recognition method integrating meta-learning and transfer learning according to claim 5, characterized in that, The expression for calculating the uncertainty-aware fusion weights is as follows: ; ; In the formula, For the normalized global weights, For the normalized region weights, These are the weight values for the original global scope information. The weight values are the original regional range information.
7. The seismic phase recognition method integrating meta-learning and transfer learning according to claim 1, characterized in that, The process of fine-tuning the labeled waveform of the target region to obtain the adapted model includes: copying the parameters of the meta-trained model as initial parameters; updating the detection head parameters with multi-step gradient descent based on the initial parameters using the target region support set, while keeping the feature extractor parameters unchanged; and obtaining the adapted model parameters.
8. A seismic phase recognition system integrating meta-learning and transfer learning, characterized in that, The system for implementing the method of claim 1, wherein the system comprises: The preprocessing module is used to train a neural network based on a large-scale earthquake dataset to obtain a pre-trained model; The meta-training module is used to perform meta-training on the model based on the pre-trained model using episodic samples containing a global support set, a regional auxiliary support set, and a query set, to obtain a meta-trained model. The migration and deployment module is used to migrate the meta-trained model to the target region and fine-tune it based on the labeled waveform of the target region to obtain the adapted model. The phase recognition module is used to input the seismic waveform to be identified into the adapted model and output the arrival probability sequences of P-wave and S-wave.