A domain incremental epilepsy detection system and method based on knowledge data fusion

By using a knowledge-based incremental epilepsy detection system, which leverages knowledge-guided parameter isolation and feature fusion techniques, the system addresses the challenge of balancing plasticity and stability in epilepsy detection, achieving high accuracy and stability in continuous learning scenarios.

CN122296818APending Publication Date: 2026-06-30HUAZHONG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-03-23
Publication Date
2026-06-30

Smart Images

  • Figure CN122296818A_ABST
    Figure CN122296818A_ABST
Patent Text Reader

Abstract

This invention discloses a domain incremental epilepsy detection system and method based on knowledge data fusion, belonging to the field of brain-computer interfaces and machine learning. The system includes: a preprocessing module for defining a single EEG data set as an independent domain, and a training set composed of multiple sequentially collected EEG data sets; a training module for training a domain incremental epilepsy detection model using the training set, including a knowledge-guided parameter isolation module, a feature extraction network, a data fusion module, and a classifier; and a detection module for inputting the EEG data of the test subject into the trained domain incremental epilepsy detection model to obtain classification results. For sequentially input data, this invention uses the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool as the similarity criterion. Similar prototypes are merged, while dissimilar prototypes are directly added, allowing the model to simultaneously consider plasticity and stability, making it applicable to continuous learning scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of brain-computer interface and machine learning, and more specifically, relates to a domain incremental epilepsy detection system and method based on knowledge data fusion. Background Technology

[0002] Epilepsy is a common neurological disorder affecting people of all ages, impacting over 50 million people worldwide. With the increasing demand for long-term neuromonitoring in clinical practice, electroencephalography (EEG) has been widely used in epilepsy diagnosis due to its ability to capture interictal and ictal patterns of brain activity. EEG monitoring typically generates a large amount of data for each patient. However, manual analysis by neurophysiologists is not only resource-intensive and time-consuming, but accurate epileptic seizure annotation also requires extensive clinical expertise. Therefore, most EEG recordings remain unannotated, with only a small portion of the data being labeled. This highlights the necessity of developing automated seizure detection methods with limited labeled data.

[0003] Traditional methods for detecting epileptic seizures typically rely on manually extracted EEG features combined with conventional classifiers. In recent years, deep learning-based methods have been widely applied to seizure detection due to their ability to learn representations directly from raw EEG signals. Some studies have explored fusing handcrafted features with deep learning models to further improve detection performance. Regarding application scenarios, early research primarily considered patient-specific models, while recent work has extended seizure detection to cross-patient scenarios. However, most existing cross-patient methods are developed within an offline learning framework, where the model is trained simultaneously using data from all patients and evaluated using leave-one-patient validation. This setup assumes that data from multiple patients can be pre-acquired, but this fails to reflect the actual situation in real-world clinical applications where patient data arrives sequentially.

[0004] Therefore, in practical applications, patients arrive sequentially, and the model can only be trained using data from the current patient, unable to access data from previous patients. Especially in scenarios with limited labeled data, a single model struggles to simultaneously achieve both plasticity and stability, making it unsuitable for continuous learning scenarios.

[0005] This demonstrates that existing epilepsy detection technologies suffer from the technical problem of failing to simultaneously achieve both plasticity and stability, thus hindering their application in continuous learning scenarios. Summary of the Invention

[0006] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a domain incremental epilepsy detection system and method based on knowledge data fusion, thereby solving the problem of difficulty in simultaneously achieving plasticity and stability, and the inability to apply it to continuous learning scenarios.

[0007] To achieve the above objectives, according to a first aspect of the present invention, a domain incremental epilepsy detection system based on knowledge data fusion is provided, comprising: The preprocessing module is used to define a single EEG data point as an independent domain and to combine multiple sequentially acquired EEG data points into a training set. The training module trains a domain incremental epilepsy detection model using the training set. This model includes a knowledge-guided parameter isolation module, a feature extraction network, a data fusion module, and a classifier. During training, multiple domains are input sequentially. The knowledge-guided parameter isolation module extracts handcrafted features from the first input domain. These handcrafted features are then encoded into multiple Gaussian distributions after domain prototype modeling. The mean of each Gaussian distribution is used as a local domain prototype. Multiple local domain prototypes form a global prototype pool. For subsequent input domains, the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool is calculated. If the minimum distance is less than a preset threshold, the local domain prototype of the new input domain and the local prototype in the global prototype pool with the smallest distance are used. The mean of the domain prototype replaces the corresponding local domain prototype in the global prototype pool; otherwise, the local domain prototype of the new input domain is added to the global prototype pool. The knowledge-guided parameter isolation module assigns a corresponding parameter group to each local domain prototype in the global prototype pool and masks the parameter groups to achieve parameter isolation. The feature extraction network extracts the deep features of the input domain, and the data fusion module fuses the handcrafted features and deep features of the new input domain to obtain fused features. The classifier predicts the classification result of the new input domain through the fused features. The error between the predicted classification result of the new input domain and the true category of the new input domain is used as the loss function, and backpropagation is used to update the model parameters. The model is trained until convergence or the preset maximum number of training iterations to obtain the trained domain incremental epilepsy detection model. The detection module is used to input the EEG data of the subject into the trained domain incremental epilepsy detection model to obtain the classification results.

[0008] Furthermore, the knowledge-guided parameter isolation module uses a Conformer as the backbone network, combined with a convolutional module and a Transformer block. The convolutional module extracts local features from the input domain, and the Transformer block includes a multi-head self-attention network and a feedforward network. The multi-head self-attention network projects local features into queries, keys, and values ​​for feature interaction. The feature interaction results are passed through a fully connected layer to obtain the multi-head self-attention output. The multi-head self-attention output is then processed by a feedforward network to obtain handcrafted features.

[0009] Furthermore, the knowledge-guided parameter isolation module assigns a corresponding parameter set to each local domain prototype in the global prototype pool, and masks the parameter set composed of queries, keys and values ​​of multi-head self-attention and parameters in the feedforward network.

[0010] Furthermore, the training module is used to control the activation of parameter groups during the forward propagation process by using a mask. If the activated local domain prototype comes from the previous domain, its corresponding parameter group is frozen and only participates in inference. If the activated local domain prototype comes from the current domain, its parameter group participates in training and is updated through the current domain. During the backpropagation process, the gradients of the parameter groups corresponding to the local domain prototypes from the previous domain are masked, and only the parameter groups corresponding to the local domain prototypes of the current domain are updated.

[0011] Furthermore, the number of unlabeled EEG data in the training set is far greater than the number of labeled EEG data, and the true category labels in the labeled EEG data include epileptic seizures and epileptic non-seizures; The training module is used to generate pseudo-labels for unlabeled EEG data by performing class-balanced sampling at set training cycles during the training process.

[0012] Furthermore, the training module is used to add epileptic seizure category pseudo-labels to unlabeled EEG data classified as epileptic seizures with a confidence level higher than a set value during the training process, and to add epileptic non-seizure category pseudo-labels to unlabeled EEG data classified as epileptic non-seizures with a high confidence level; the EEG data with epileptic seizure category pseudo-labels and epileptic non-seizure category pseudo-labels added, together with the original labeled EEG data, are used as labeled EEG data to train the domain incremental epilepsy detection model.

[0013] Furthermore, the training module is used to perform training using a semi-supervised training loss function during the training process.

[0014] According to a second aspect of the present invention, a domain incremental epilepsy detection method based on knowledge data fusion is provided, comprising: The EEG data of the subject to be tested is input into the trained domain incremental epilepsy detection model to obtain the classification results; The domain-incremental epilepsy detection model includes a knowledge-guided parameter isolation module, a feature extraction network, a data fusion module, and a classifier; it is trained in the following manner: Define a single EEG data point as an independent domain, combine multiple sequentially collected EEG data points into a training set, and use the training set to train the domain incremental epilepsy detection model. During training, multiple domains are input sequentially. The knowledge-guided parameter isolation module extracts handcrafted features from the first input domain. After domain prototype modeling, the handcrafted features are encoded into multiple Gaussian distributions. The mean of each Gaussian distribution is used as a local domain prototype. Multiple local domain prototypes form a global prototype pool. For subsequent input domains, the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool is calculated. If the minimum distance is less than a preset threshold, the local domain prototype of the new input domain and the mean of the local domain prototype in the global prototype pool with the smallest distance are used to replace the corresponding local domain prototype in the global prototype pool. Otherwise, the local domain prototype of the new input domain is added to the global prototype pool. The knowledge-guided parameter isolation module assigns a corresponding parameter group to each local domain prototype in the global prototype pool and masks the parameter group to achieve parameter isolation. The feature extraction network extracts deep features from the input domain. The data fusion module fuses the handcrafted features and deep features of the new input domain to obtain fused features. The classifier predicts the classification result of the new input domain using the fused features. The error between the predicted classification result of the new input domain and the true category of the new input domain is used as the loss function. The model parameters are updated by backpropagation and trained until convergence or the preset maximum number of training iterations are obtained to obtain the trained domain incremental epilepsy detection model.

[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a domain incremental epilepsy detection method based on knowledge data fusion.

[0016] According to a fourth aspect of the present invention, a computer program product is provided, comprising a computer program that, when run on a computer, causes the computer to execute a domain incremental epilepsy detection method based on knowledge data fusion.

[0017] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) Plasticity refers to the model's ability to learn new knowledge, while stability refers to the model's ability to retain learned knowledge. In deep learning, knowledge is encoded in the model parameters. Updating parameters to adapt to new patients may lead to the forgetting of previous knowledge, while restricting updates may restrict the learning of new knowledge. This fundamental trade-off makes it quite challenging to achieve both effective adaptation and robust knowledge retention in domain incremental epilepsy detection. The knowledge-guided parameter isolation module designed in this invention uses the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool as the basis for similarity judgment for sequentially input data. Similar prototypes are merged, enabling the model to retain learned knowledge. Dissimilar prototypes are directly added as new ones, enabling the model to learn new knowledge. This gradually aggregates representative domain prototypes, allowing the domain incremental epilepsy detection model to simultaneously consider both plasticity and stability. Unlike offline scenarios that focus only on the test accuracy of a single subject, the system of this invention uses continuous data during training and is specially designed to balance plasticity and stability. In addition, the model achieves parameter isolation by masking the parameter groups corresponding to the local domain prototype, reducing interference during training, and thus greatly improving accuracy when applied to continuous learning scenarios.

[0018] (2) This invention uses Conformer as the backbone network, combined with convolutional modules and Transformer blocks. Convolutional modules are suitable for local temporal and spatial patterns, while Transformer blocks (including multi-head self-attention MHSA and feedforward network FFN) are suitable for capturing long-range dependencies. The handcrafted features extracted in this way have higher cross-subject stability and lower sensitivity to patient-specific distribution shifts.

[0019] (3) The present invention masks the parameter set consisting of queries, keys, values, and parameters in the feedforward network for multi-head self-attention because these layers are most susceptible to interference during incremental training. The masking control during training controls the activation of parameters during the forward propagation process, enabling the current domain to reuse parameters related to learned prototypes. More importantly, parameter updates also depend on the source of the activated prototypes, thereby extracting stable and transferable domain knowledge from handcrafted features and using this knowledge to guide the data-driven learning process without accessing historical samples.

[0020] (4) In epilepsy detection tasks, due to severe class imbalance, pseudo-labels are often dominated by the majority of interictal classes. To alleviate this problem, this invention introduces a class-balanced sampling strategy during training. Every set training cycle, high-confidence pseudo-label samples that meet the requirements are selected from the unlabeled samples. Unlike directly adding all samples, the class-balanced sampling strategy controls the proportion of pseudo-label samples in each class. Attached Figure Description

[0021] Figure 1 This is a system structure block diagram provided in the embodiments of the present invention; Figure 2 This is a structural diagram of the domain incremental epilepsy detection model provided in an embodiment of the present invention; Figure 3 (a) is a comparison chart of task initialization accuracy under different parameter isolation strategies on the CHB-MIT dataset provided in the embodiments of the present invention; Figure 3 Figure (b) is a comparison of task initialization accuracy under different parameter isolation strategies in the CHSZ dataset provided by the embodiments of the present invention; Figure 4 In (a), the embodiment of the present invention provides a method for using only depth features. -SNE feature visualization results; Figure 4 (b) is the embodiment of the present invention that uses only depth features. -SNE feature visualization results; Figure 4 (c) is the method for using the fusion feature provided in the embodiments of the present invention. -SNE feature visualization results; Figure 5 (a) is a graph showing the change of average BCA in domain incremental learning on the CHB-MIT dataset provided in the embodiments of the present invention; Figure 5 Figure (b) is a graph showing the change of average BCA in domain incremental learning on the CHSZ dataset provided in the embodiments of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0023] like Figure 1 As shown, a domain incremental epilepsy detection system based on knowledge data fusion includes: The preprocessing module is used to define a single EEG data point as an independent domain and to combine multiple sequentially acquired EEG data points into a training set. The training module trains a domain incremental epilepsy detection model using the training set. This model includes a knowledge-guided parameter isolation module, a feature extraction network, a data fusion module, and a classifier. During training, multiple domains are input sequentially. The knowledge-guided parameter isolation module extracts handcrafted features from the first input domain. These handcrafted features are then encoded into multiple Gaussian distributions after domain prototype modeling. The mean of each Gaussian distribution is used as a local domain prototype. Multiple local domain prototypes form a global prototype pool. For subsequent input domains, the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool is calculated. If the minimum distance is less than a preset threshold, the local domain prototype of the new input domain and the local prototype in the global prototype pool with the smallest distance are used. The mean of the domain prototype replaces the corresponding local domain prototype in the global prototype pool; otherwise, the local domain prototype of the new input domain is added to the global prototype pool. The knowledge-guided parameter isolation module assigns a corresponding parameter group to each local domain prototype in the global prototype pool and masks the parameter groups to achieve parameter isolation. The feature extraction network extracts the deep features of the input domain, and the data fusion module fuses the handcrafted features and deep features of the new input domain to obtain fused features. The classifier predicts the classification result of the new input domain through the fused features. The error between the predicted classification result of the new input domain and the true category of the new input domain is used as the loss function, and backpropagation is used to update the model parameters. The model is trained until convergence or the preset maximum number of training iterations to obtain the trained domain incremental epilepsy detection model. The detection module is used to input the EEG data of the subject into the trained domain incremental epilepsy detection model to obtain the classification results.

[0024] Example 1 Example 1 provides a detailed description of the domain-incremental epilepsy detection model and its training process, such as... Figure 2 As shown, the domain incremental epilepsy detection model includes a knowledge-guided parameter isolation (KGPI) module, a feature extraction network, a data fusion (KDFF) module, and a classifier. Figure 2 In the domain name, "Labeled" indicates labeled samples, "Unlabeled" indicates unlabeled samples, and "Shared" indicates that some parameters used by each domain are shared with other domains, while the remainder are unique. "Timestep" indicates the order in which patients arrive. 1 This is the EEG data from the first patient. Local Prototypes represents local prototypes, and Global Prototype Pool represents the global prototype pool.

[0025] Plasticity refers to a model's ability to learn new knowledge, while stability refers to its ability to retain learned knowledge. In deep learning, knowledge is encoded in model parameters. Updating parameters to adapt to new patients may lead to the forgetting of previous knowledge, while restricting updates can hinder the learning of new knowledge. This fundamental trade-off makes achieving effective adaptation while ensuring robust knowledge retention particularly challenging in domain-incremental epilepsy detection. To address the plasticity-stability dilemma, this invention proposes a knowledge-guided parameter isolation module, which transforms stable domain knowledge into parameter-level control, adaptively allocating model parameters for each domain. To address the problem of insufficient utilization of expert knowledge, a feature fusion module is proposed, which integrates manual features and deep features at the representation level. To address the severe class imbalance problem in epilepsy detection, a Balanced Sampling Strategy (BSS) is introduced, which promotes balanced learning of features across different classes by sampling data from different classes.

[0026] Consider the domain incremental learning scenario in epilepsy detection: From The EEG data of the patients arrived sequentially, with each patient defined as an independent domain. For the first patient... Each domain can yield a small subset of labeled samples. and a large number of unlabeled samples ,in It is a sample The corresponding real category label, and The number of labeled and unlabeled samples. .

[0027] The model is trained incrementally across domains. At each training phase, the model can only access data from the current domain and parameters learned from previous domains. The research goal is to learn a unified model capable of effective epilepsy detection across all learned domains, while mitigating catastrophic forgetting.

[0028] In domain-incremental epilepsy detection, the distributional differences among patients are significant. When a model is trained sequentially across multiple domains, updating parameters for new patients can interfere with representations learned in previous domains, leading to catastrophic forgetting. This problem introduces the well-known plasticity-stability dilemma, which is particularly severe in semi-supervised domain-incremental learning scenarios because model updates often overfit the limited amount of labeled data in the current domain. In contrast, handcrafted feature encodings clinically meaningful and relatively stable signal features are insensitive to patient-specific variations. The knowledge-guided parameter isolation module leverages this stability to guide parameter allocation. It determines which model parameters should be reused, frozen, or updated through local domain prototypes, thus balancing model plasticity and stability without requiring data replay.

[0029] KGPI's key technologies include: 1) Domain Prototype Modeling Forty-one handcrafted features were extracted from each EEG data set, as shown in Table 1. These features encompass time-domain, frequency-domain, time-frequency-domain, and nonlinear characteristics. These features summarize clinically interpretable properties such as amplitude statistics, spectral energy distribution, rhythmic activity, and signal complexity, which have been extensively validated in epilepsy detection.

[0030] Compared to deep feature representations obtained through purely data-driven learning, handcrafted features exhibit greater cross-subject stability and are less sensitive to patient-specific distribution shifts. This stability makes them well-suited for representing domain-level structures.

[0031] Table 1

[0032] For each arriving domain A Gaussian mixture model is used to model the Gaussian distribution of handcrafted features. Given handcrafted features... Its likelihood function is defined as:

[0033] in, Indicates the quantity of the mixed components. It is a mixed weight, satisfying ; and They represent the first The mean and covariance of each Gaussian distribution. It is considered as a local domain prototype.

[0034] 2) Local–Global Prototype Fusion After modeling the Gaussian distribution of the handcrafted features of the current domain, a set of local domain prototypes represented by the mean of the Gaussian components is obtained. To achieve cross-domain knowledge sharing and avoid mutual interference, a global prototype pool is maintained. Used to progressively aggregate representative domain prototypes.

[0035] For each local domain prototype Calculate its relationship with each local prototype in the global prototype pool. (It can also be said here that the distance to the global prototype pool is the distance to the local prototype.)

[0036] The purpose of calculating the distance is to integrate the prototype obtained from the current domain into the global pool. This is to reduce parameter redundancy and to enable the parts similar to the previous domain to utilize the knowledge already learned.

[0037] Choose the prototype with the smallest distance:

[0038] If minimum distance Less than the preset threshold If the local prototype corresponds to existing domain knowledge, then the local prototype in the global prototype pool is replaced by the mean of the local prototype of the new input domain and the local prototype in the global prototype pool that is closest to it.

[0039] This update method optimizes the shared prototype step by step by fusing information from similar domains multiple times. Otherwise, if If the local prototype represents a new domain pattern, it is directly added to the global prototype pool.

[0040] This process enables the global prototype pool to aggregate shared structures from similar domains while preserving unique patterns from different domains, thereby evolving over time and capturing both shared and domain-specific characteristics.

[0041] 3) Prototype-Guided Parameter Masking The backbone network is a Conformer, which combines convolutional modules and Transformer blocks. The convolutional modules are used to model local temporal and spatial patterns, while the Transformer blocks (including multi-head self-attention network MHSA and feedforward network FFN) are used to capture long-range dependencies.

[0042] MHSA is the core module, which processes the input... Projection for query ,key Sum Perform feature interaction, where For the number of tokens, For the embedded dimension:

[0043] Multi-head outputs pass through a fully connected layer The MHSA layer output is then obtained:

[0044] Then, it is processed by the FFN layer:

[0045] Parameter isolation is achieved by masking the parameters in the Q / K / V projection layers and FFN layers of MHSA, because these layers are most susceptible to interference during incremental training.

[0046] During the initialization phase, the parameters of each masked layer are evenly divided into... A set of disjoint parameter groups. Meanwhile, the global prototype pool has a maximum capacity of [number missing]. Each global prototype Each parameter set corresponds to a unique set, thus establishing a one-to-one mapping between domain-level knowledge and parameter subsets.

[0047] During training, the corresponding parameter set is activated based on the matched prototype. Let... Indicates in the field t The set of prototype indices that are activated in the dataset. Next, a binary mask vector is constructed:

[0048] After adding masks to the MHSA and FFN layers, we get:

[0049]

[0050] This mask controls the activation of parameters during forward propagation, allowing the current domain to reuse parameters associated with learned prototypes. More importantly, parameter updates also depend on the source of the activated prototype: if the activated prototype comes from a previous domain, its corresponding parameters are frozen and only participate in inference; if the activated prototype comes from the current domain, its parameters can be trained and updated using data from the current domain. Formulaically, let... and These represent the sets originating from the old and new domains in the activation prototype, respectively. During backpropagation, the shielding... The gradient of the corresponding parameter set is updated only. The parameter set.

[0051] KGPI focuses on mitigating catastrophic forgetting across domains, but reliable feature representations are equally crucial in semi-supervised learning scenarios where labeled samples are scarce. To address this, this invention proposes KDFF, which enhances representation learning capabilities by combining stable handcrafted features with adaptive deep features.

[0052] Given a deep feature vector and handmade feature vectors KDFF combines the two:

[0053] Where [· ; ·] denotes vector concatenation operation. The fused features The data is then fed into a classification head to perform an epilepsy detection task. By combining stable, knowledge-based features with flexible deep representations, KDFF improves the reliability of model predictions and complements KGPI to jointly address the dual challenges of incremental learning in the semi-supervised domain.

[0054] The Knowledge-Data Fusion Domain Incremental Learning (KDF-DIL) algorithm is trained using a semi-supervised approach, following the FixMatch framework. For each domain, the model is optimized using a small number of labeled samples and a large number of unlabeled samples.

[0055] Given an unlabeled sample Its pseudo-labels Its weak enhancement version generate:

[0056] in, This represents a classification model. When the prediction confidence exceeds a threshold... At that time, output consistency between weak and strong enhancements is enforced by minimizing the following consistency loss:

[0057] in, This indicates a strong enhancement operation.

[0058] The overall training loss is:

[0059] in, This represents the cross-entropy loss on labeled data.

[0060] In epilepsy detection tasks, due to severe class imbalance, false labels are often dominated by the majority of interictal classes. To alleviate this problem, a BSS (Brain Support Strategies) strategy is introduced during training. Each time... Training epochs are used to select samples from unlabeled samples that meet the following criteria. High-confidence pseudo-label samples. Unlike adding all samples directly, BSS controls the proportion of pseudo-label samples in each category.

[0061] Specifically, the number of pseudo-labeled ictal samples is constrained to:

[0062] in, This represents the number of labeled samples during the flare-up phase. This is the scaling factor. The number of samples from the interictal period is determined proportionally to the category ratio of the labeled data.

[0063] Ultimately, these pseudo-labeled samples are merged with the original set of labeled samples for subsequent training. It's worth noting that BSS does not change the loss form of FixMatch, but rather improves training stability by adjusting the composition of pseudo-labeled samples under extreme class imbalance conditions.

[0064] The KDF-DIL method can be applied to domain-incremental epilepsy detection systems. By explicitly fusing handcrafted feature-based knowledge with deep neural representations, KDF-DIL simultaneously addresses two core challenges in domain-incremental learning: maintaining stability within the learned domain during continuous learning and achieving reliable model adaptation in situations where labeled data is scarce. The KGPI module extracts stable and transferable domain knowledge from handcrafted features and leverages this knowledge to guide the data-driven learning process without accessing historical samples. The KDFF module effectively fuses knowledge-based prototypes with deep representations to promote cross-domain adaptation; meanwhile, the BSS strategy enhances training robustness in semi-supervised DIL scenarios by jointly utilizing labeled and unlabeled data.

[0065] Tables 2 and 3 show the experimental results of KDF-DIL on two public datasets (CHB-MIT and CHSZ), respectively. The best experimental results are marked in bold.

[0066] Table 2

[0067] Table 3

[0068] Table 2 shows the experimental results on CHB-MIT. Each column represents the BCA of the final model for each patient, Avg. is the average accuracy for all patients, BWT is the backpropagation metric representing the degree of forgetting of the model on previously learned patients, and FWT is the forward propagation metric representing the generalization performance of the model on new subjects. Higher values ​​for all metrics indicate better performance. Table 3 shows the experimental results on CHSZ. Each column represents the BCA of the final model for each patient, Avg. is the average accuracy for all patients, BWT is the backpropagation metric representing the degree of forgetting of the model on previously learned patients, and FWT is the forward propagation metric representing the generalization performance of the model on new subjects. Higher values ​​for all metrics indicate better performance. Tables 2 and 3 Experimental results show that KDF-DIL consistently outperforms other methods in terms of overall performance. Regularization-based methods struggle to retain early knowledge in long sequences; while replay-based methods improve knowledge retention, they require storing historical samples; and data-driven parameter isolation methods, while effectively mitigating forgetting, limit cross-domain knowledge sharing. Overall, KDF-DIL achieves a better balance between knowledge retention, forward adaptability, and privacy protection.

[0069] Furthermore, by analyzing the role of knowledge in different stages of the learning process (including task initialization, feature representation, and long-term learning dynamics), the effectiveness of knowledge fusion in domain incremental learning was explored.

[0070] 1) Parameter Isolation Stage First, we examined the impact of introducing knowledge during the parameter isolation phase. Figure 3 (a) and Figure 3 (b) compares the task initialization accuracy under three parameter allocation strategies on two public datasets (CHB-MIT and CHSZ): random allocation, data-driven allocation based on adaptive pruning, and the proposed KGPI method. Figure 3 (a) and Figure 3 In (b), the x-axis represents patient ID and the y-axis represents average classification accuracy. The results show that KGPI achieves higher initialization accuracy in novel domains, demonstrating its effectiveness in mitigating the cold-start problem. By leveraging prior knowledge to guide subnetwork assignment, KGPI provides a more informative starting point for subsequent task-specific training.

[0071] 2) Feature Level Fusion Next, we will analyze the knowledge fusion effect at the feature level. Figure 4 (a) Figure 4(c) shows the three settings. -SNE feature visualization results: using only deep features, using only handcrafted features, and fused features. Figure 4 (a) Figure 4 In (c), interictal represents the interictal period of epilepsy, and ictal represents the ictal period. It can be seen that compared to features from a single source, fused features exhibit more compact intra-class clustering and clearer inter-class separation, indicating that KDFF enhances the structured organization of the feature space. This improved representation contributes to more discriminative learning, especially when labeled data is limited.

[0072] 3) Long-term Learning Dynamics Finally, the overall effectiveness of cross-stage knowledge integration was evaluated. Figure 5 (a) and Figure 5 Figure (b) shows the evolution of the average BCA after learning each domain on two public datasets (CHB-MIT and CHSZ), and compares KDF-DIL with the best-performing baseline methods based on regularization (MAS), playback (PSHD), and parameter isolation (SKS). As the number of domains increases, the baseline methods exhibit performance degradation or increased forgetting, while the proposed method maintains a higher average BCA throughout the incremental learning process.

[0073] These results demonstrate that knowledge fusion not only improves the performance of individual components but also makes the long-term learning process more stable and reliable across multiple domain sequences.

[0074] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A domain incremental epilepsy detection system based on knowledge data fusion, characterized in that, include: The preprocessing module is used to define a single EEG data point as an independent domain and to combine multiple sequentially acquired EEG data points into a training set. The training module uses the training set to train the domain incremental epilepsy detection model, which includes a knowledge-guided parameter isolation module, a feature extraction network, a data fusion module, and a classifier. During training, multiple domains are input sequentially. The knowledge-guided parameter isolation module extracts handcrafted features from the first input domain. These handcrafted features are then encoded into multiple Gaussian distributions after domain prototype modeling. The mean of each Gaussian distribution is used as a local domain prototype. Multiple local domain prototypes form a global prototype pool. For subsequent input domains, the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool is calculated. If the minimum distance is less than a preset threshold, the local domain prototype of the new input domain and the mean of the local domain prototype in the global prototype pool with the smallest distance are used to replace the corresponding local domain prototype in the global prototype pool. Otherwise, the local domain prototype of the new input domain is added to the global prototype pool. The knowledge-guided parameter isolation module assigns a corresponding parameter group to each local domain prototype in the global prototype pool and masks the parameter groups to achieve parameter isolation. The feature extraction network extracts deep features from the input domain, and the data fusion module fuses the handcrafted features and deep features of the new input domain to obtain fused features. The classifier predicts the classification result of the new input domain by fusing features; the error between the predicted classification result of the new input domain and the true category of the new input domain is used as the loss function, and the model parameters are updated by backpropagation. The model is trained until it converges or the preset maximum number of training iterations are reached to obtain the trained domain increment epilepsy detection model. The detection module is used to input the EEG data of the subject into the trained domain incremental epilepsy detection model to obtain the classification results.

2. The domain incremental epilepsy detection system based on knowledge data fusion as described in claim 1, characterized in that, The knowledge-guided parameter isolation module uses a Conformer as the backbone network, combined with a convolutional module and a Transformer block. The convolutional module extracts local features from the input domain, and the Transformer block includes a multi-head self-attention network and a feedforward network. The multi-head self-attention network projects local features into queries, keys, and values ​​for feature interaction. The feature interaction results are passed through a fully connected layer to obtain the multi-head self-attention output. The multi-head self-attention output is then processed by a feedforward network to obtain handcrafted features.

3. The domain incremental epilepsy detection system based on knowledge data fusion as described in claim 2, characterized in that, The knowledge-guided parameter isolation module assigns a corresponding parameter set to each local domain prototype in the global prototype pool and masks the parameter set composed of queries, keys and values ​​in the multi-head self-attention and parameters in the feedforward network.

4. The domain incremental epilepsy detection system based on knowledge data fusion as described in claim 3, characterized in that, The training module is used to control the activation of parameter groups during the forward propagation process by using a mask. If the activated local domain prototype comes from the previous domain, its corresponding parameter group is frozen and only participates in inference. If the activated local domain prototype comes from the current domain, its parameter group participates in training and is updated through the current domain. During the backpropagation process, the gradients of the parameter groups corresponding to the local domain prototypes from the previous domain are masked, and only the parameter groups corresponding to the local domain prototypes in the current domain are updated.

5. A domain incremental epilepsy detection system based on knowledge data fusion as described in any one of claims 1-4, characterized in that, The number of unlabeled EEG data in the training set is much greater than the number of labeled EEG data. The true category labels in the labeled EEG data include epileptic seizures and epileptic non-seizures. The training module is used to generate pseudo-labels for unlabeled EEG data by performing class-balanced sampling at set training cycles during the training process.

6. The domain incremental epilepsy detection system based on knowledge data fusion as described in claim 5, characterized in that, The training module is used to add epileptic seizure category pseudo-labels to unlabeled EEG data classified as epileptic seizures with a confidence level higher than a set value during the training process, and to add epileptic non-seizure category pseudo-labels to unlabeled EEG data classified as epileptic non-seizures with a high confidence level; the EEG data with epileptic seizure category pseudo-labels and epileptic non-seizure category pseudo-labels, together with the original labeled EEG data, are used as labeled EEG data to train the domain incremental epilepsy detection model.

7. A domain incremental epilepsy detection system based on knowledge data fusion as described in any one of claims 1-4, characterized in that, The training module is used to train using a semi-supervised training loss function during the training process.

8. A domain incremental epilepsy detection method based on knowledge data fusion, characterized in that, include: The EEG data of the subject to be tested is input into the trained domain incremental epilepsy detection model to obtain the classification results; The domain-incremental epilepsy detection model includes a knowledge-guided parameter isolation module, a feature extraction network, a data fusion module, and a classifier; it is trained in the following manner: Define a single EEG data point as an independent domain, combine multiple sequentially collected EEG data points into a training set, and use the training set to train the domain incremental epilepsy detection model. During training, multiple domains are input sequentially. The knowledge-guided parameter isolation module extracts handcrafted features from the first input domain. After domain prototype modeling, the handcrafted features are encoded into multiple Gaussian distributions. The mean of each Gaussian distribution is used as a local domain prototype. Multiple local domain prototypes form a global prototype pool. For subsequent input domains, the distance between the local domain prototype of the new input domain and each local domain prototype in the global prototype pool is calculated. If the minimum distance is less than a preset threshold, the local domain prototype of the new input domain and the mean of the local domain prototype in the global prototype pool with the smallest distance are used to replace the corresponding local domain prototype in the global prototype pool. Otherwise, the local domain prototype of the new input domain is added to the global prototype pool. The knowledge-guided parameter isolation module assigns a corresponding parameter group to each local domain prototype in the global prototype pool and masks the parameter group to achieve parameter isolation. The feature extraction network extracts deep features from the input domain, and the data fusion module fuses the handcrafted features and deep features from the new input domain to obtain fused features. The classifier predicts the classification result of the new input domain by fusing features; the error between the predicted classification result of the new input domain and the true category of the new input domain is used as the loss function, and the model parameters are updated by backpropagation. The model is trained until it converges or reaches the preset maximum number of training iterations to obtain a trained domain increment epilepsy detection model.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the domain incremental epilepsy detection method based on knowledge data fusion as described in claim 8.

10. A computer program product, characterized in that, Includes a computer program that, when run on a computer, causes the computer to perform the domain incremental epilepsy detection method based on knowledge data fusion as described in claim 8.