An Incremental Learning Approach for ECG Identity Recognition
By employing the Herding algorithm with similarity penalty and the subspace distillation strategy in the ECG identity recognition system, a memory bank is constructed and the separation constraint between new and old categories is strengthened. This solves the catastrophic forgetting problem in class incremental learning of the ECG identity recognition system and achieves efficient recognition of new and old categories.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-25
- Publication Date
- 2026-04-21
AI Technical Summary
Existing ECG identity recognition systems suffer from catastrophic forgetting problems in incremental learning, and the distributions of new and old category features tend to overlap, making it difficult to maintain recognition accuracy under data-constrained conditions.
A Herding algorithm with similarity penalty is used to construct a memory bank. Combined with subspace distillation and new and old class separation constraints, a joint optimization objective function is constructed to optimize the model iteratively by minimizing the classification prediction error and the difference in feature subspace geometric structure and maximizing the distribution distance between the prototypes of the new and old classes.
It significantly improves the separability between new and old categories, suppresses catastrophic forgetting, improves the sample quality of the limited memory bank, maintains high accuracy in recognition performance, and performs particularly well in multi-round incremental learning.
Smart Images

Figure CN121724101B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a class-incremental learning method for ECG identity recognition. Background Technology
[0002] Electrocardiogram (ECG) identification is a biometric technology that utilizes the individual distinguishability of ECG signals in terms of morphological structure, temporal rhythm, and electrophysiological conduction to achieve personnel authentication or identity verification. Compared to external biometric features such as faces and fingerprints, ECG is an internal physiological signal with a natural advantage in liveness detection. It is not easily copied or forged and can be continuously collected through wearable devices. Therefore, it has wide application value in scenarios such as access control and security, medical internet, and remote health management.
[0003] In practical applications, ECG identity recognition systems typically face the deployment challenge of "dynamically changing user sets," with new users (new identity categories) continuously being added after the system goes live. To reduce privacy compliance costs and storage overhead, many scenarios do not allow the long-term storage of all raw ECG data, or only a very small number of historical samples. Therefore, the system often needs to continuously update the model under the condition of "data arriving in stages and historical data being limited." This problem is usually modeled as Class-Incremental Learning (CIL) or, more generally, Continual Learning.
[0004] However, deep neural networks commonly suffer from catastrophic forgetting in incremental learning settings. When the model is fine-tuned using only new user data, the model parameters are updated to fit the new category, causing the discrimination boundary for old users to be disrupted and the accuracy of the old category to drop significantly. This problem is particularly prominent in ECG identification, where the superposition of multiple factors such as heart rate changes and changes in individual state makes the feature distribution between "new and old categories" and "different stages of the same category" more likely to overlap or drift, thus further exacerbating forgetting and misidentification.
[0005] Existing methods for addressing the forgetting problem in incremental learning mainly include:
[0006] 1. Playback-based strategy. This approach approximates the effect of joint training by saving a small number of old class samples (real playback) or training a generative model to synthesize old class samples (generated playback) and mixing them with new class data. This method relies on the representativeness and diversity of the memory. If the memory selection is biased towards class centers or there is sample redundancy, it is difficult to cover intra-class variations in ECG under limited budget, leading to a shift in old class boundaries. Generative playback may introduce synthesis errors, especially for one-dimensional signal waveforms like ECG that are sensitive to high-frequency details; insufficient generation quality will further affect recognition stability.
[0007] 2. Distillation-based strategies. A common approach is to perform knowledge distillation on the raw unnormalized scores (Logits) or intermediate features output by the old model to constrain the output of the new model on samples from the old class to be consistent with the old model. However, Logits distillation mainly constrains the output of the classification layer and may not effectively maintain the geometric structure of the ECG feature space (such as intra-class principal variation methods, feature subspaces, or manifold structures). When there are many incremental stages and high inter-class similarity, relying solely on output consistency may still result in the mixing of features from the old and new classes.
[0008] 3. Parameter regularization-based strategy. This strategy mainly constrains key parameters to prevent excessive changes based on parameter importance. However, ECG identity recognition typically requires strong feature flexibility to adapt to new users and distribution shifts. Excessive parameter freezing can sacrifice the learning performance of new classes, and parameter importance estimation may be unstable under noisy and small sample conditions.
[0009] 4. Prototype / metric learning-based methods. These methods enhance inter-class separation by maintaining class prototypes (class center vectors) or employing contrastive learning, triplet loss, etc. While prototypes provide stable anchors, conventional prototypes are usually simple means, which are insufficient to characterize the relative relationships and boundary structures between existing classes. Furthermore, in incremental class scenarios, the lack of explicit constraints maximizing the gap between new and old classes can still lead to new classes approaching older classes, increasing the probability of misidentification.
[0010] In summary, existing incremental learning techniques for ECG identity recognition have the following main shortcomings:
[0011] 1. The lack of a penalty mechanism for the gap between old and new identity categories leads to the easy overlap of old and new clusters in the feature space;
[0012] 2. Lack of structured preservation of the old class representation; distillation output or point-to-point features alone are insufficient to stably maintain the old class's subspace or geometric relationship in the feature space;
[0013] 3. Under conditions of limited memory, the selection of memory samples often does not fully consider the diversity of ECG waveforms, resulting in limited playback effects.
[0014] Therefore, there is an urgent need for an incremental learning method that is more suitable for one-dimensional ECG signals, can continuously acquire new identities, and significantly reduce forgetting. Summary of the Invention
[0015] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides a class-incremental learning method for ECG identity recognition.
[0016] An incremental learning method for ECG identity recognition, characterized by the following steps:
[0017] S1: Acquire the ECG one-dimensional signal data to be identified and preprocess it to obtain a one-dimensional heartbeat sequence of uniform length. The one-dimensional heartbeat sequence includes new category samples and old category samples.
[0018] S2: Construct an old class model, which includes a backbone network for feature extraction and a classification layer;
[0019] S3: Based on the old class model, the Herding algorithm with similarity penalty is used to filter memory samples from the old class samples and construct a memory bank;
[0020] S4: Construct a new class model with the optimization objectives of minimizing classification prediction error, minimizing the difference in geometric structure of feature subspaces between the old and new models, and maximizing the distribution distance between the old and new class prototypes. The new class model inherits the backbone network parameters of the old class model and expands the output dimension of the classification layer so that the output dimension of the classification layer is equal to the sum of the number of old classes and the number of newly added classes.
[0021] S5: Construct a joint optimization objective function, which includes subspace distillation constraints, new and old class separation constraints, and cross-entropy classification loss;
[0022] S6: Using the old category samples in the memory bank and the new category samples in the current stage, the new category model is iteratively optimized according to the joint optimization objective function to obtain the updated identity recognition model. The updated identity recognition model performs identity recognition by analyzing a one-dimensional heartbeat sequence.
[0023] Furthermore, the backbone network in S2 adopts an improved ResNet18 structure, in which the convolutional kernel size is adjusted from two dimensions to one dimension, and the output dimension of the feature output layer is set to 300.
[0024] Furthermore, the Herding algorithm in S3, which includes a similarity penalty, has the following scoring rules:
[0025]
[0026] In the formula For the scoring results, For category The corresponding in-class global feature mean vector, Features of the candidate samples For category The selected set of memory sample features, To remember the number of samples in the sample set, Features for memory samples.
[0027] Furthermore, the similarity penalty coefficient Set to 0.1, and the number of memory samples selected for each category is 5 to 20.
[0028] Furthermore, the subspace distillation constraints in S5 include hard alignment loss and soft distillation loss: the subspace distillation constraints are constructed through the following steps:
[0029] Singular value decomposition is used to extract the subspace basis vectors of the old class model and the new class model for the features of the old class samples, respectively.
[0030] Based on the subspace basis vectors, a projection matrix is constructed, and the subspace hard alignment loss is constructed by quantifying the Frobenius norm difference between the projection matrices of the new and old models.
[0031] The old class sample features extracted by the new class model and the old class model are projected through the basis vectors of the subspace corresponding to the old class model, and the soft distillation loss is constructed by combining the KL divergence.
[0032] Furthermore, the mathematical description of the hard alignment loss is as follows:
[0033]
[0034] In the formula, For subspace distillation hard alignment loss, The number of principal components selected for singular value decomposition. and These are the subspace basis vectors corresponding to the old class model and the new class model obtained from singular value decomposition, respectively. It is the Frobenius norm;
[0035] The mathematical form of the soft distillation loss is as follows:
[0036]
[0037] In the formula, This is due to soft distillation losses. and These are feature representations of subsets of samples from the memory bank, both derived from the old class model's subspace basis vectors. The difference lies in... Extracted from the new class model, Extracted from the old class model;
[0038] The mathematical form of the subspace distillation loss constraint is as follows:
[0039]
[0040] In the formula, To construct the subspace distillation constraint, For subspace distillation hard alignment loss, For soft distillation loss, η and λ are weighting coefficients.
[0041] Furthermore, the process of constructing the separation constraints between old and new categories in S5 includes:
[0042] The old class prototype is obtained by calculating the average feature values of the old class in the computation memory, and the new class features are extracted as the new class prototype.
[0043] A self-attention mechanism is used to enhance the old and new class prototypes, resulting in enhanced old and new class prototypes.
[0044] Calculate the minimum Euclidean distance between each enhanced new class prototype and the set of all enhanced old class prototypes.
[0045] Furthermore, the separation constraint between the old and new categories The mathematical description is as follows:
[0046]
[0047] In the formula, To separate the old and new categories, To increase the number of prototypes of the new class, For the first An enhanced prototype of the new class. This is the set of enhanced old class prototypes corresponding to all "old categories" in the memory. To obtain and The minimum value in the set of Euclidean distances obtained from the calculation.
[0048] Furthermore, during non-first-round incremental learning, the parameters of the old class model in the current round are inherited from the new class model obtained in the previous round of incremental learning.
[0049] Furthermore, the total loss of the joint optimization objective function for:
[0050]
[0051] In the formula, To construct the subspace distillation constraint, To separate the old and new categories, For general cross-entropy loss, and These are the weighting coefficients.
[0052] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:
[0053] 1. Significantly improves the separability of new and old categories (preventing confusion). The technical solution of this invention constructs a "separation constraint between new and old categories." Unlike the traditional prototype mean method, it introduces a learnable self-attention mechanism to enhance the prototypes and directly optimizes by maximizing the "minimum distance from the new category prototype set to the old category prototype set." This effectively expands the easily confused boundaries in the feature space and solves the problem of overlapping and misjudgment of new user features with old user features as the number of users increases.
[0054] 2. This invention more effectively suppresses catastrophic forgetting (forgetting prevention). The technical solution employs a "subspace distillation" strategy, utilizing singular value decomposition (SVD) to extract eigenvalue principal components. Through dual constraints of Grassmann distance (hard alignment) and KL divergence (soft alignment), it forces the new model to maintain the eigenspace geometry of the old model. Compared to Logits distillation, which only constrains numerical outputs, this method is better able to adapt to the overall distribution shift of ECG signals caused by physiological changes, thus better preserving the discriminative power of the old class when fine-tuning the new class.
[0055] 3. Improved sample quality of the limited memory bank (resistance to diversity loss): The technical solution of this invention improves the Herding algorithm when constructing the memory bank by adding a "similarity penalty term". This mechanism avoids the memory bank being filled with average samples of uniform form, and forces the selection of key samples with diverse forms, thereby more comprehensively covering the intra-class waveform changes of ECG signals with limited storage overhead, and improving the effect of playback training.
[0056] 4. Maintaining high accuracy in multiple rounds of incremental learning: Experimental data shows that after 5 rounds of incremental learning, the recognition accuracy of this scheme (55.13%) is significantly better than the mainstream iCaRL (39.52%) and POD (52.27%) methods, proving its stability and superiority in long-term continuous learning tasks.
[0057] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0059] Figure 1 This is a flowchart of an incremental learning method for ECG identity recognition according to the present invention.
[0060] Figure 2 This is a flowchart of the construction process of the "new class model" based on subspace distillation and the separation constraint between new and old categories in this invention. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.
[0062] The following is combined with Figure 1 , Figure 2 The technical solution of the present invention is described.
[0063] Figure 1 The main flow of the class incremental learning method for ECG identity recognition of the present invention is shown.
[0064] Figure 2 This paper illustrates the construction method and data transfer flow of the "new class model" based on subspace distillation and the separation constraint between old and new categories in this invention.
[0065] The technical problem this solution addresses is how to continuously integrate new identity categories while maintaining the ability to recognize old identities to the greatest extent possible, given the limitation of historical ECG data.
[0066] I. Data Preprocessing
[0067] 1. Obtain ECG one-dimensional signal data, which includes multiple identity categories (user IDs).
[0068] 2. The ECG is denoised, segmented, normalized, and resampled to form a one-dimensional heartbeat sequence of uniform length. In each round of incremental learning, the already covered categories are defined as "old categories," and the categories newly introduced during the incremental training phase are defined as "new categories."
[0069] II. Construction of the "Old Class Model"
[0070] To identify already covered categories, the "old class model" structure constructed in this solution is as follows:
[0071] Input layer: The 1D heartbeat sequence corresponding to the "old category" is used as the input of the "old category model". The input layer dimension is 1×400.
[0072] Convolutional Layers: Based on the standard ResNet18 network convolutional layer structure, to adapt to the characteristics of one-dimensional heartbeat data, only the kernel size within the original ResNet18 network was adjusted from 7×7, 3×3 to 1×7, 1×3, while the number of network layers and residual connections remained unchanged. During convolution operations, the number of channels, stride, and padding were also consistent with the original ResNet18 network parameter settings.
[0073] Feature output layer: Adjust the output dimension of the last fully connected layer of ResNet18 to... In this plan, Set to 300. The heartbeat sequence corresponding to the "old category" obtains its corresponding feature representation after network mapping;
[0074] Classification layer: A fully connected layer is connected after the feature output layer for identity recognition. The output dimension of the classification layer is the total number of categories covered.
[0075] When it is the first round of incremental learning, the parameters of the "old class model" are obtained by iterative optimization on the "old class" training set through the gradient descent method; when it is not the first round of incremental learning, the parameters of the "old class model" in the current round are inherited from the "new class model" obtained in the previous round of incremental learning.
[0076] III. Construction of Herding memory with diversity penalty for "old category" samples
[0077] By setting up a memory bank and retaining a small number of key samples from the "older categories," the memory cost is reduced while preventing forgetting during incremental class learning. The process is as follows:
[0078] 1. Determine the candidate sample set for the memory bank. During the first round of incremental learning, there is no historical memory bank, and the candidate sample set for the memory bank consists of all the "old category" heartbeat data. During subsequent rounds of incremental learning, the candidate sample set for the memory bank includes not only the "old category" samples from the previous round of memory bank, but also the "new category" samples that were incorporated into the learning after the previous round of incremental training (what were "new category" samples in the previous round have become "old category" samples in this round).
[0079] 2. Calculation of the intra-class global feature mean vector for the candidate sample set. The candidate sample set from the "memory" is input into the "old class model," and the corresponding feature set is obtained at the feature output layer. For each feature set, it is divided into feature subsets according to its corresponding class label (ID), with each subset containing only the feature representations of samples from the same class. Next, the number of feature vectors within each feature subset is counted, and the mean is calculated for all feature vectors. Specifically, the summation of each feature vector within a feature subset is performed along its dimensions, and then the summation result is divided by the total number of feature vectors in that subset to obtain the intra-class global feature mean vector for the corresponding class.
[0080] 3. Category-by-Category Sample Selection. For each category, an iterative process is used to select a number (5-20) of memory samples. Each iteration follows a pre-defined scoring rule, which is an improvement on the traditional Herding method. This rule addresses the shortcomings of traditional methods, such as excessively similar samples and incomplete coverage of intra-class features, while balancing intra-class representativeness and diversity. Specifically, the score of each candidate sample is composed of two combined indicators. The first indicator follows the greedy strategy of the traditional Herding method, aiming to minimize the distance between the cumulative mean of the selected sample features and the mean of the global features within the category, ensuring the representativeness of the selected sample category. In addition, a similarity penalty coefficient with a fixed weight of 0.1 is introduced. Through vector inner product operations, the similarity between the features of the candidate sample and the features of all samples in the selected sample feature set is quantified. A penalty constraint is applied to candidate samples with highly similar features. The mathematical form of this scoring rule is shown below:
[0081] (1)
[0082] In the formula For the scoring results, For category The corresponding in-class global feature mean vector, Features of the candidate samples For category The selected set of memory sample features, To remember the number of samples in the sample set, The memory sample features are used for each iteration. The candidate sample that results in the lowest score is selected and added to the memory, until the required number of memory samples is met.
[0083] 4. Memory bank construction. The memory samples selected for each category are collected together to form the memory bank for this round of incremental class learning.
[0084] IV. Construction of the "New Class Model" Based on Subspace Distillation and Separation Constraints of Old and New Categories
[0085] Based on the "old class model" and the memory, incremental learning is performed to obtain the "new class model." The "new class model" uses the same backbone network as the "old class model." Except for the classification layer, the network parameters, layer settings, and computational logic of the input layer, convolutional layer, and feature output layer are consistent with the "old class model." The classification layer is expanded to accommodate the newly added categories, increasing the output dimension from the number of old categories to the total number of "new + old" categories. The learning process of the "new class model" is as follows:
[0086] 1. Subspace Distillation Constraint Construction. As a mechanism for preserving old class knowledge, its core purpose is to replicate the distribution knowledge of old class sample features in the "old class model". Specifically, in each batch of training samples, the old class sample set from the memory is selected and input into the "old class model" and "new class model" respectively, and the corresponding sample feature sets are extracted. Subsequently, the two sets of sample feature sets are processed by the singular value decomposition method, and the first few principal components are extracted as the feature subspace basis vectors. Finally, the Grassman flow distance is used as a metric to quantify the difference in subspace basis between the "new class model" and the "old class model", and the consistency of the subspace structure is constrained by hard alignment loss. The mathematical form of hard alignment loss is as follows:
[0087] (2)
[0088] In the formula, For subspace distillation hard alignment loss, The number of principal components selected for singular value decomposition. and These are the subspace basis vectors corresponding to the "old class model" and the "new class model" obtained from singular value decomposition, respectively. It is the Frobenius norm.
[0089] Simultaneously, the old class sample features extracted from the memory bank by the "new class model" and the "old class model" are projected onto the feature subspace of the "old class model" through the basis vectors of the subspace corresponding to the old class model. Furthermore, the consistency of the feature distribution constrained by the soft distillation loss is measured by KL divergence. The mathematical form of the soft distillation loss is as follows:
[0090] (3)
[0091] In the formula, This is due to soft distillation losses. and These are feature representations of subsets of samples from the memory bank, both derived from the subspace basis vectors of the "old class model," the difference being... Extracted from the "new class model", Extracted from the "old class model". Based on hard alignment loss and soft distillation loss, the mathematical form of the subspace distillation loss constraint is as follows:
[0092] (4)
[0093] In the formula, To construct the subspace distillation constraint, For subspace distillation hard alignment loss, This is due to soft distillation losses.
[0094] 2. Construction of New and Old Category Separation Constraints. This is used to strengthen category boundaries and avoid confusion caused by overlap between the "new category" and the "old category." Specifically, first, separate sets of new and old category prototypes are constructed. The old category prototypes are obtained by calculating the mean value of the features of "old category" samples mapped to the "old category model" in the category memory. The new category prototypes directly take the features of "new category" samples mapped to the "new category model." Then, the constructed new and old category prototypes are enhanced using a self-attention mechanism to obtain enhanced new and old category prototypes. Next, for each enhanced new category prototype, its distance to all enhanced old category prototypes is calculated, and the minimum distance is selected. This distance directly reflects the closest correlation between the new and old categories. Finally, a new and old category separation constraint is constructed based on the minimum distance of all new category prototypes, with the following mathematical form:
[0095] (5)
[0096] In the formula, To separate the old and new categories, To increase the number of prototypes of the new class, For the first An enhanced prototype of the new class. This is the set of enhanced old class prototypes corresponding to all "old categories" in the memory. To obtain and The minimum value in the set of Euclidean distances obtained from the calculation.
[0097] 3. Joint Optimization. Further, based on the subspace distillation constraint and the separation constraint between old and new classes, a traditional cross-entropy classification loss is introduced to construct a joint optimization objective function, mathematically as follows:
[0098] (6)
[0099] In the formula, To construct the subspace distillation constraint, To separate the old and new categories, For general cross-entropy loss,
[0100] Using the joint optimization objective as the loss function, the parameters of the "new class model" are optimized through gradient descent to obtain the "new class model" after class incremental learning.
[0101] The above method was validated using the public dataset ECG-ID. During the incremental learning process, the ECG signals corresponding to individuals with ID numbers 01-39 in the ECG-ID dataset were used as the initial "old category" dataset. Five rounds of incremental learning were then performed on this basis, with 10 "new categories" in each round. The experimental results are shown in Table 1.
[0102] Table 1. Performance Comparison of this Solution with Other Methods
[0103]
[0104] As shown in Table 1, our proposed solution performs comparably to iCaRL and POD in the initial stages. Both our solution and iCaRL achieve an identity recognition accuracy of 92.43%, higher than POD's 87.33%, indicating that our solution has a performance benchmark comparable to mainstream methods on basic tasks. With increasing incremental learning rounds, the identity recognition accuracy of all three methods shows a downward trend, but the performance degradation rate of our solution is significantly slower. After the first incremental learning round, the accuracy of iCaRL and POD plummeted to 73.43% and 72.71%, respectively, while our solution maintained a relatively high level of 88.86%. By the fifth incremental learning round, the accuracy of iCaRL had dropped to 39.52%, POD to 52.27%, while our solution remained at 55.13%, significantly outperforming the two comparison methods. In summary, our proposed solution effectively mitigates the rate of accuracy degradation in multi-round incremental learning tasks, ensuring the model's recognition performance after continuously learning new samples, demonstrating significant technical advantages.
[0105] The technical effects that can be achieved by the above-described technical solutions in the embodiments of the present invention include:
[0106] 1. Higher separation between new and old domains. After modeling the relationships between prototypes through self-attention, the worst-case interval is directly optimized using the "minimum distance from the new class to the old class prototype set" as the core constraint, improving the separability of new and old identities. Unlike the conventional "prototype averaging + triplet / contrastive" approach, this scheme constructs a learnable prototype enhancement module and builds a differentiable loss for the minimum distance between the new and old domains, which is jointly optimized with the main network.
[0107] 2. Less forgetting of old classes. Instead of being limited to traditional logit layer distillation, it aligns the subspace geometry of old class features and adopts a combination of "hard alignment (Grassmann) + soft alignment (KL projection distillation)" to adapt to the drift problem of ECG signals under physiological changes.
[0108] 3. Herding memory selection with diversity penalty. A similarity penalty is added to the class center approximation to avoid memory samples being concentrated in a single morphology, improve coverage of ECG morphological changes, and enhance the performance of a limited memory budget.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A class-incremental learning method for ECG identity recognition, characterized in that the steps include... include: S1: Acquire the ECG one-dimensional signal data to be identified and preprocess it to obtain a one-dimensional heartbeat sequence of uniform length. The one-dimensional heartbeat sequence includes new category samples and old category samples. S2: Construct an old class model, which includes a backbone network for feature extraction and a classification layer; S3: Based on the old class model, the Herding algorithm with similarity penalty is used to filter memory samples from the old class samples and construct a memory bank; S4: Construct a new class model with the optimization objectives of minimizing classification prediction error, minimizing the difference in geometric structure of feature subspaces between the old and new models, and maximizing the distribution distance between the old and new class prototypes. The new class model inherits the backbone network parameters of the old class model and expands the output dimension of the classification layer so that the output dimension of the classification layer is equal to the sum of the number of old classes and the number of newly added classes. S5: Construct a joint optimization objective function, which includes subspace distillation constraints, new and old class separation constraints, and cross-entropy classification loss; S6: Using the old category samples in the memory bank and the new category samples in the current stage, the new category model is iteratively optimized according to the joint optimization objective function to obtain the updated identity recognition model. The updated identity recognition model performs identity recognition by analyzing a one-dimensional heartbeat sequence.
2. The class-incremental learning method for ECG identity recognition according to claim 1, characterized in that, The backbone network in S2 adopts an improved ResNet18 structure, in which the convolutional kernel size is adjusted from two dimensions to one dimension, and the output dimension of the feature output layer is set to 300.
3. The class incremental learning method for ECG identity recognition according to claim 1, characterized in that, The Herding algorithm in S3, which includes a similarity penalty, has the following scoring rules: In the formula For the scoring results, For category The corresponding in-class global feature mean vector, Features of the candidate samples For category The selected set of memory sample features, To remember the number of samples in the sample set, Features for memory samples.
4. The class incremental learning method for ECG identity recognition according to claim 3, characterized in that, The number of memory samples screened for each category is 5 to 20.
5. The class incremental learning method for ECG identity recognition according to claim 1, characterized in that, Subspace distillation constraints in S5 include hard alignment loss and soft distillation loss: Subspace distillation constraints are constructed through the following steps: Singular value decomposition is used to extract the subspace basis vectors of the old class model and the new class model for the features of the old class samples, respectively. Based on the subspace basis vectors, a projection matrix is constructed, and the subspace hard alignment loss is constructed by quantifying the Frobenius norm difference between the projection matrices of the new and old models. The old class sample features extracted by the new class model and the old class model are projected through the basis vectors of the subspace corresponding to the old class model, and the soft distillation loss is constructed by combining the KL divergence.
6. The class incremental learning method for ECG identity recognition according to claim 5, characterized in that, The mathematical description of the hard alignment loss is as follows: In the formula, For subspace distillation hard alignment loss, The number of principal components selected for singular value decomposition. and These are the subspace basis vectors corresponding to the old class model and the new class model obtained from singular value decomposition, respectively. It is the Frobenius norm; The mathematical form of the soft distillation loss is as follows: In the formula, This is due to soft distillation losses. and These are feature representations of subsets of samples from the memory bank, both derived from the old class model's subspace basis vectors. The difference lies in... Extracted from the new class model, Extracted from the old class model; The mathematical form of the subspace distillation loss constraint is as follows: In the formula, To construct the subspace distillation constraint, For subspace distillation hard alignment loss, For soft distillation loss, η and λ are weighting coefficients.
7. The class incremental learning method for ECG identity recognition according to claim 1, characterized in that, The process of constructing the new and old category separation constraints in S5 includes: The old class prototype is obtained by calculating the average feature values of the old class in the computation memory, and the new class features are extracted as the new class prototype. A self-attention mechanism is used to enhance the old and new class prototypes, resulting in enhanced old and new class prototypes. Calculate the minimum Euclidean distance between each enhanced new class prototype and the set of all enhanced old class prototypes.
8. The class incremental learning method for ECG identity recognition according to claim 7, characterized in that, The new and old category separation constraint The mathematical description is as follows: In the formula, To separate the old and new categories, To increase the number of prototypes of the new class, For the first An enhanced prototype of the new class. This is the set of enhanced old class prototypes corresponding to all "old categories" in the memory. To obtain and The minimum value in the set of Euclidean distances obtained from the calculation.
9. The class incremental learning method for ECG identity recognition according to claim 1, characterized in that, When performing incremental learning in a non-first round, the parameters of the old class model in the current round are inherited from the new class model obtained in the previous round of incremental learning.
10. The class incremental learning method for ECG identity recognition according to claim 1, characterized in that, The total loss of the joint optimization objective function for: In the formula, To construct the subspace distillation constraint, To separate the old and new categories, For general cross-entropy loss, and These are the weighting coefficients.
Citation Information
Patent Citations
Class increment image classification method based on knowledge distillation and consistency regularization
CN116797850A
Incremental learning method based on prototype dynamic updating and deep metric learning
CN118397383A