An adaptive segmented interpretable hybrid expert electroencephalogram processing method and device
By employing an adaptive segmentation and hybrid expert coding approach to EEG processing, the problems of information loss and interpretability in EEG signal temporal modeling are solved, achieving efficient and interpretable EEG signal processing that can adapt to the changing needs of different tasks and individuals.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-05
Smart Images

Figure CN122153492A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of brain-computer interface and neural information processing technology, and in particular to an adaptive segmented interpretable hybrid expert EEG processing method and device. Background Technology
[0002] Electroencephalography (EEG) signals, as non-invasive physiological signals reflecting the activity of brain neuronal populations, have wide applications in brain-computer interfaces (BCI), cognitive function assessment, auxiliary diagnosis of neurological diseases, detection of mental disorders, and affective computing. With the development of artificial intelligence and deep learning technologies, academia and industry have gradually shifted from traditional feature engineering methods (such as power spectrum or event-related potential analysis) to data-driven EEG representation learning and coding model research. Currently, common EEG coding techniques mainly include the following categories: (1) Shallow feature method based on time-frequency analysis: The rhythm energy distribution is extracted by short-time Fourier transform, wavelet transform and empirical mode decomposition to realize statistical modeling of the α, β and γ frequency band features.
[0003] (2) End-to-end modeling method based on deep neural networks: In recent years, convolutional neural networks and graph convolutional networks and Transformer structures have achieved significant performance improvements in EEG recognition. However, the above-mentioned EEG analysis models usually adopt a fixed-length sliding window segmentation method, which cannot accurately capture the non-stationarity and abrupt changes of brain activity on the time axis. At the same time, the above-mentioned models rely on data-driven end-to-end training in feature extraction, which makes it difficult to reveal specific neurophysiological meanings. Their latent space representation lacks the correspondence with interpretable features such as EEG rhythm, complexity, and functional networks, which is not conducive to clinical application and decision interpretation.
[0004] (3) EEG pre-training models based on self-supervised or contrastive learning attempt to pre-train temporal representations on unlabeled data. However, these models mostly directly perform random masking or contrast on continuous time segments without introducing neurophysiological temporal segmentation criteria.
[0005] With the rise of deep learning and large-scale datasets, the problem of universal representation of EEG signals has become an important research direction in the fields of brain-computer interfaces (BCI) and neural information processing. Currently, many studies focus on constructing universal encoders capable of adapting to various EEG tasks, and EEG basic models represent an emerging universal representation paradigm. By pre-training on large-scale neural datasets, EEG basic models learn generalized neural activity patterns and, through fine-tuning, adapt to different tasks and contexts, demonstrating a certain degree of cross-task and cross-context generalization ability. However, despite achieving initial success in cross-task and cross-context learning, existing EEG basic models still face the following challenges: (1) Limitations of temporal data processing: Existing basic EEG modeling techniques use fixed time windows for signal segmentation, but this method fails to fully consider the non-stationarity and dynamic changes in EEG signals. Especially in EEG signals, the transitions in brain activity are rapid and non-linear, and fixed time window segmentation easily loses dynamic information. In addition, existing basic EEG models mainly rely on standardized temporal segmentation, which is difficult to cope with changes in brain signals at different time scales and across individuals.
[0006] (2) Lack of physiological interpretability: The encoding representation architecture of existing EEG basic model technologies is mostly derived directly from pre-trained models of natural language processing or natural image processing, including deep learning modules based on convolutional neural networks, graph convolutional networks, recurrent neural networks, and Transformer architecture. Although EEG basic models can automatically learn the features of EEG signals from large-scale data, most of them lack biologically interpretable characteristics. Existing models mostly rely on standardized data processing and static feature fusion strategies, often ignoring the rhythmic and nonlinear dynamic characteristics of EEG signals, and failing to effectively combine the dynamic functional connections of different brain regions.
[0007] (3) Redundancy in multi-task data representation: Although existing basic EEG models demonstrate cross-task generalization ability to some extent, there is still a problem of redundant computation in cross-domain data representation. This is because existing models usually rely on a lot of fine-tuning when processing different tasks, and cannot effectively distinguish the commonalities and differences between tasks, resulting in a waste of computing resources and low efficiency. Especially when processing multiple tasks in parallel, the performance of the model is significantly limited and cannot fully cope with the changing needs of different tasks, different individuals or different diseases. Summary of the Invention
[0008] To address the shortcomings of existing technologies, such as insufficient temporal dynamic modeling with fixed time windows leading to the loss of crucial information and misjudgments, and the inability to provide sufficient interpretability due to the insufficient interpretability of brain function in feature extractors, this invention provides an adaptive segmentation interpretable hybrid expert EEG processing method and apparatus. The technical solution is as follows: On the one hand, an adaptive segmentation interpretable hybrid expert EEG processing method is provided, which is implemented by an adaptive segmentation interpretable hybrid expert EEG processing device, and the method includes: S1. Align the acquired raw EEG signals across devices, resample the raw EEG signals and project them onto a unified lead space to obtain the processed EEG signals. S2. Perform microstate adaptive segmentation on the processed EEG signal. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototype, perform adaptive segmentation on the processed EEG signal. By segmenting at the microstate transition point, EEG segments of unequal length are obtained and segment labels and durations are formed. S3. Unified embedding of unequal-length EEG segments: By masking, intra-segment position encoding, and cross-segment global temporal encoding of unequal-length EEG segments, and fusing micro-state labels and duration priors, a fixed-dimensional segment vector is obtained. S4. Construct a hybrid expert encoder; input fixed-dimensional fragment vectors into the hybrid expert encoder for hybrid expert encoding, adaptively select expert subsets and weighted fuse them through a gated routing mechanism, output fragment-level hybrid expert representations and stack them in time to form a hybrid expert sequence; S5. Perform self-supervised pre-training on the hybrid expert encoder based on the hybrid expert sequence. Input the hybrid expert sequence into the sequence coding layer and the prediction head, and output the prediction result of the current segment. Perform joint training based on the prediction result of the current segment and the constructed pre-trained total objective loss function to obtain the pre-trained general representation. S6. Fine-tune the hybrid expert encoder based on the pre-trained general representation to obtain the fine-tuned hybrid expert encoder. S7. Input the EEG signal to be processed into the fine-tuned hybrid expert encoder and output the processing result corresponding to the EEG signal to be processed.
[0009] On the other hand, an adaptive segmented interpretable hybrid expert EEG processing device is provided, which is applied to the adaptive segmented interpretable hybrid expert EEG processing method. The device includes: The alignment module is used to align the acquired raw EEG signals across devices, resample the raw EEG signals and project them onto a unified lead space to obtain processed EEG signals. The segmentation module is used to perform microstate adaptive segmentation on the processed EEG signal. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototype, the processed EEG signal is adaptively segmented. By segmenting at the microstate transition point, EEG segments of unequal length are obtained and segment labels and durations are formed. The embedding module is used to uniformly embed EEG segments of unequal length. It obtains fixed-dimensional segment vectors by masking, intra-segment position encoding, and cross-segment global temporal encoding of EEG segments of unequal length, and by fusing micro-state labels and duration priors. The hybrid expert coding module is used to construct a hybrid expert encoder. Fixed-dimensional fragment vectors are input into the hybrid expert encoder for hybrid expert coding. The expert subset is adaptively selected and weighted by a gated routing mechanism, and fragment-level hybrid expert representations are output and stacked in time to form a hybrid expert sequence. The pre-training module is used to perform self-supervised pre-training of the hybrid expert encoder based on the hybrid expert sequence. The hybrid expert sequence is input into the sequence coding layer and the prediction head, and the prediction result of the current segment is output. Based on the prediction result of the current segment and the constructed pre-trained total objective loss function, joint training is performed to obtain the pre-trained general representation. The fine-tuning module is used to fine-tune the hybrid expert encoder based on the pre-trained general representation to obtain the fine-tuned hybrid expert encoder. The processing module inputs the EEG signal to be processed into the finely tuned hybrid expert encoder and outputs the processing result corresponding to the EEG signal to be processed.
[0010] On the other hand, an adaptive segmented interpretable hybrid expert EEG processing device is provided, the adaptive segmented interpretable hybrid expert EEG processing device comprising: a processor; a memory storing computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, any one of the methods described above for adaptive segmented interpretable hybrid expert EEG processing is implemented.
[0011] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement any of the above-described adaptive segmentation interpretable hybrid expert EEG processing methods.
[0012] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: This invention provides high-fidelity temporal modeling capabilities for non-stationary EEG. Tokenization using micro-state transitions as boundaries avoids cross-state aliasing and semantic boundary ambiguity caused by fixed windows, significantly reducing temporal aliasing effects and information leakage, and improving the accuracy of capturing sudden changes. For variable-length segments, unified embedding and masked attention or pooling are used to maintain the explicit visibility of segment duration (Δt), preserving fine-grained dynamics within segments while learning transition structures between segments. Micro-state boundaries can be detected online, and the autoregressive structure pre-trained with Next-token naturally supports segment-by-segment streaming inference, reducing end-to-end latency and facilitating applications in closed-loop BCI scenarios.
[0013] This invention provides interpretation and decision-making interpretability led by interpretable experts. It utilizes interpretable experts to directly output physiological quantities through frequency domain analysis, nonlinear complexity, and functional connectivity, and aligns these with classical measures via consistency distillation to form visualized intermediate evidence (visualized spectrum or network graph). MoE gating uses priors such as "fragment embedding + microstate labeling + duration" as conditions, supporting Top-K expert activation trajectory recording and contribution attribution (gating weights). It can generate interpretation reports at both the individual and session levels, enhancing the acceptability in clinical and regulatory scenarios. This invention also allows for optional sequence layers to provide global consistency and minimum duration constraints for fragment labels or task labels, suppressing unreasonable jitter and improving the stability of temporal interpretation.
[0014] The embodiments of this invention can achieve system-level benefits in terms of improved computational efficiency and scalability. Employing Top-(K) sparse routing reduces the single-sample forward complexity to approximately [the lower limit]. Road downgraded to road( This approach significantly reduces inference FLOPs and GPU memory usage while maintaining performance; combined with capacity control and load balancing regularization, it avoids overloading hotspot experts. During the fine-tuning stage, task embedding participation gating is introduced to automatically select the most relevant subset of interpretable experts, reducing redundant feature extraction and improving throughput and energy efficiency during multi-task parallel processing. In this embodiment, the experts are pluggable units, facilitating the addition of experts (such as sleep stage or epilepsy-specific experts) based on tasks and populations without retraining the entire model, thus meeting the needs of long-term evolution across multiple centers.
[0015] The embodiments of this invention can enhance robust generalization capabilities across devices and individuals. By mapping different lead schemes to a common space through a projection matrix, the structural domain shift caused by device heterogeneity is significantly mitigated, allowing pre-trained knowledge to be shared across multiple devices. Strategies such as adversarial invariance and moment matching are employed to make fragment embeddings insensitive to device or subject labels, reducing the need for fine-tuning the target domain and supporting cross-individual and cross-device testing. Denoising and reconstruction processing enables the model to learn "contextual repair," and masked attention shields against padding and missing tests, improving robustness against electrode detachment, motion artifacts, and transient data loss.
[0016] This invention improves training efficiency and leverages the advantages of small-sample adaptation. By combining forward predictability and bidirectional contextual consistency, complementary supervision is provided, reducing reliance on a large number of manual labels and shortening the annotation bottleneck path. Transforming physiological priors into training signals is equivalent to providing physical alignment anchors for deep encoding, improving convergence speed and stability during small-sample fine-tuning. This invention allows for task transfer by adjusting only small heads such as normalized affines, gated bias, or LoRA / Adapter. In latency-constrained scenarios, only a small number of experts and shallow sequence heads can be used to ensure real-time performance.
[0017] This invention improves usability for clinical and engineering applications. It generates interpretable reports including output fragment-level spectral features, connectivity networks, expert activation trajectories, and key fragment hotspots, meeting the needs of clinical review and research verification. Furthermore, it generates structured intermediate evidence and traceable reasoning paths, facilitating the interpretation and auditability requirements for medical device and algorithm registration. It supports hybrid edge or cloud deployment (interpretable expert prior extraction at the edge and deep expert cloud inference), reducing overall computing costs while maintaining latency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of an adaptive segmentation interpretable hybrid expert EEG processing method provided in an embodiment of the present invention; Figure 2 This is a block diagram of an adaptive segmented interpretable hybrid expert EEG processing device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an adaptive segmented interpretable hybrid expert EEG processing device provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0021] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0022] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0023] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0024] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0025] This invention provides an adaptive segmented, interpretable hybrid expert EEG processing method, which can be implemented by an adaptive segmented, interpretable hybrid expert EEG processing device, which can be a terminal or a server. Figure 1 The flowchart shown is for an adaptive segmentation-based interpretable hybrid expert EEG processing method. This method's processing flow may include the following steps: S1. The acquired raw EEG signals are aligned across devices, resampled, and projected onto a unified lead space to obtain the processed EEG signals.
[0026] EEG signals exhibit multiple microstates along the timeline, each representing a stable potential pattern in different functional processing stages of the brain. These microstates typically last approximately 80–120 milliseconds and reflect the brain's basic functional units. By analyzing the microstates of EEG signals, the model can achieve adaptive temporal segmentation, dynamically dividing EEG signal segments and avoiding the loss of temporal features caused by fixed time windows.
[0027] In one feasible implementation, it is assumed that there is an EEG signal dataset containing EEG signals from multiple devices. Since the data length and number of channels may differ between devices, the basic structure of the EEG signals is first defined. The extracted EEG signals are assumed to be a three-dimensional matrix. ,in, Indicates the first EEG signals (from different subjects / different devices / different tasks) containing One channel and Number of time points (sampling rate) ).
[0028] To unify the representation space, a target sampling rate is defined. With channel set Target number of channels and .Will First resample to Then use channel alignment and projection matrix Mapping to a common lead (or common subspace) is represented by the following formula (1): (1) If the devices share a portion of the anatomical electrodes of the same name, it can make To select the matrix or interpolation matrix; if the channel sets differ significantly, spherical harmonic or spline interpolation can be performed on the scalp grid first, and then projected onto the [matrix / interpolation matrix]. Further investigation After bandpass filtering and reference reset, the preprocessing result is denoted as... Order No. The topology of scalp potentials at time t is a column vector.
[0029] S2. Perform microstate adaptive segmentation on the processed EEG signal. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototype, perform adaptive segmentation on the processed EEG signal. By segmenting at the microstate transition point, EEG segments of unequal length are obtained and segment labels and durations are formed.
[0030] Optionally, the specific implementation process of S2 includes S21-S22: S21. Extract the peak points of the EEG signal at the peak of the global field potential and perform topological normalization. Then, obtain multiple microstate prototypes by using the polarity-invariant clustering method. Each microstate prototype represents the stable potential pattern of the brain in a certain functional stage. In one feasible implementation, K microstate prototypes are obtained by selecting points using global field potential, normalizing the topology, and clustering. The specific processing procedure is represented by the following formula (2): (2) in, Indicates the first The EEG records the global field potential at time t; Indicates the number of channels in the common lead space; Indicates the first The potential value of the c-th channel in the common lead space is recorded in the EEG record at time t. Among them, in the GFP local extremum set The topology is taken and normalized, and it is expressed by the following formula (3): (3) in, Indicates the first Topological vector of scalp potentials recorded by EEG at time t through The unit topological vector after norm normalization; Indicates the time index (sampling time); Among them, for Clustering methods employing polarity invariance include K-means or Gaussian Mixture Models, among others, combined with... Equivalence class A prototype (microstate template) is represented by the following formula (4): (4) in, This represents the result obtained from polarity-invariant clustering. A collection of microstate prototypes (microstate templates); Indicates the number of microstate prototypes; Indicates the first A vector of microstate prototypes (templates); For complex and large-scale EEG data, local clustering can be performed for each subject / device / task, and then global secondary clustering can be performed to obtain a unified template, which can be expressed by the following formula (5): (5) in, Indicates that for the first The first subject / device / task (or the first subject / device / task) A set of microstate prototypes obtained by clustering local data from a set of electroencephalogram (EEG) records; This represents the prototype vector of the j-th local microstate obtained from the local clustering. Indicates the first The number of local microstate prototypes obtained by local clustering; Indicates the subject / device / task identifier or EEG recording index; S22. The normalized topology based on multiple microstate prototypes is assigned time-by-time in a spatially correlated manner, and threshold filtering, temporal smoothing and minimum duration constraints are applied. Finally, the label change point is used as the segment boundary to obtain unequal-length EEG segments and form segment labels and durations.
[0031] In one feasible implementation, for any time topology Spatial correlation coefficient is used for template matching and label assignment, which is expressed by the following formulas (6)-(7): (6) (7) in, Represents the normalized scalp potential topology With the Microstate prototype The spatial correlation coefficient (equivalent to the cosine similarity between the two). Indicates the first Microstate labels (values in {1,…,K}) are obtained from EEG recordings at time t through maximum correlation matching.
[0032] Among them, by setting relevant thresholds Make a judgment: if It is then recorded as undetermined / noise, and subsequently filled with time smoothing or nearest neighbor.
[0033] In one feasible implementation, median filtering or Markov posterior smoothing is used to suppress jitter, and a minimum duration is applied. (Sample point) constraints are expressed by the following formula (8): (8) In one feasible implementation, a set of state transitions (boundary set) is defined. ,remember ,Will Sort by time in ascending order. and order Then the first Section (the first) The coverage interval of each token in the original time is represented by the following formula (9): (9) in, Indicates the first The first EEG recording The segment (i.e., the first segment) The coverage area of (each token) on the original timeline; Indicates the segment number; Indicates the first Segment start time index (corresponding to the first) (one state transition point) Indicates the first The time index of the next state transition point after the segment.
[0034] Among them, the The label of a segment is a constant microstate within that segment, expressed by the following formula (10): (10) in, Indicates the first The first EEG recording Section (the first) The fragment label corresponding to each token, and the label is equal to the coverage area of the fragment. At any time within microstate labels .
[0035] Among them, the The duration of a segment (sample point) and the physical duration are expressed by the following formulas (11)-(12): (11) (12) in, Indicates the first The first EEG recording The duration of the token; Indicates the first The physical duration of the segment (in seconds); This represents the target sampling rate (the sampling rate after resampling) in the common representation space.
[0036] In one feasible implementation, according to the first The duration of the segment, the first The tag of the paragraph and the first The coverage interval of the segment in the original time is obtained to obtain the first segment. The token sequence of the sequence is represented by the following formula (13): (13) S3. Unified embedding of unequal-length EEG segments: By masking, intra-segment position encoding, and cross-segment global temporal encoding of unequal-length EEG segments, and by fusing micro-state labels and duration priors, a fixed-dimensional segment vector is obtained.
[0037] In one feasible implementation, for unified embedding, segment-level statistics can be calculated for each token for quality control and used as prior or conditional inputs for subsequent models, expressed by the following formulas (14)-(15): (14) (15) in, Indicates the first The first EEG recording Segment in coverage area The topological mean vector of scalp potentials within the body, i.e., for exist The average of the above times is obtained; Indicates the first The first EEG recording Segment in coverage area The mean global field potential within; (16) (17) in, Indicates the first The first EEG recording The proportion of microstates across the entire time sequence; Indicates the first The total number of time points in the EEG recordings after resampling and mapping to the common lead space; Indicates from microstate Transition to microstate The transfer count.
[0038] Optionally, the specific implementation process of S3 includes S31-S32: S31. Perform zero-padding or edge-preserving resampling on EEG segments of unequal length to obtain the superimposed segments at each time step, and generate the corresponding mask. In one feasible implementation, let the obtained first... The token sequence of a record is represented by the following formula (18): (18) The preprocessed signal after alignment to the common lead is as follows: ;in, Indicates the first The EEG recordings are preprocessed into an EEG signal matrix after resampling, channel alignment, bandpass filtering, and reference reset. This indicates that the preprocessed EEG signals were processed in the first... Topological column vectors of scalp potentials at each time point.
[0039] In one feasible implementation, to unify variable length, a maximum segment length is defined, and the length of the segment is determined for the first segment. The segment construction fill operator and mask are expressed by the following formulas (19)-(20): (19) in, Indicates the fill operator; Indicates the maximum defined fragment length; Indicates the first The first EEG recording A fixed-size segment tensor, obtained by processing unequal-length EEG segments with a padding operator, is used as the input to the subsequent embedding coding model.
[0040] (20)
[0041] in, Represents the mask; where, For length insufficient The fragments are padded with zeros (or repeatedly padded) on the right side of the time dimension. When the length exceeds the limit, uniform resampling under edge-preserving sampling can be used, which is expressed by the following formula (21): (twenty one) in, Indicates the first Record No. The fixed-length segment tensor obtained after edge-preserving uniform resampling of the segment is in the th... The column vector at each time step; The target resampling length.
[0042] S32. Construct relative position encoding within each time step and global time encoding across segments, and fuse micro-state label embedding as well as duration and rate embedding. Through shared convolution and masked attention processing, obtain fixed-dimensional segment vectors.
[0043] In one feasible implementation, in order to characterize the intra-segment and cross-segment timing, and to introduce microstates and duration priors, the embodiments of the present invention construct the following additivity embeddings for each token, including: intra-segment relative position encoding, cross-band global time encoding, microstate tag embedding, duration and rate embedding, and channel spatial position information.
[0044] The relative position encoding within a segment is represented by the following formulas (22)-(23): (twenty two) (twenty three) in, and The relative position encoding within the segment is in the first position. One time step; Indicates the model embedding dimension; Indicates the length of the segment.
[0045] Among them, let the global time index Or directly use the fragment starting point The corresponding absolute time, the cross-band global time coding is constructed by the following formula (24): (twenty four) in, Indicates cross-band global time coding; This represents a global time index aligned with the original record's timeline, specifically corresponding to the [number]th [timeline]. The starting point of each segment Offset The absolute sampling time index.
[0046] Among them, Each microstate template configuration can learn a lookup table, and the microstate label embedding is constructed by the following formula (25): (25) in, This indicates that a table lookup can be learned; This indicates the embedding of microstate labels.
[0047] The physical duration and rate embedding of the frequency band using two-layer MLP mapping coding are expressed by the following formula (26): (26) in, Indicates the first The first EEG recording The physical duration (in seconds) of each token; This represents the segment rate embedding vector obtained from the encoding; express A real vector space.
[0048] The channel spatial location information can be constructed using the graph Laplacian feature of the electrode map or three-dimensional coordinates to generate the channel location embedding. To characterize the topological priors across channels.
[0049] In one feasible implementation, The shared temporal convolutional front end (depth-separable convolution combined with pointwise projection) is fed into the time-step embedding sequence, which is represented by the following formula (27): (27) in, Indicates the first The first record A segment tensor; This represents the temporal convolution-projection embedding module.
[0050] Among them, based on the time step embedding sequence, for each time step The final input vector is represented by the following formula (28): (28) in, Represents each time step The final input vector; The first character within the character fragment Relative position information at each time step; It represents the position of this time step on the global timeline of the entire record; Indicates the first Record No. The microstate label embedding vector of each segment; Indicates the first Record No. The physical rate embedding vector of each fragment.
[0051] If channel position embedding is used, then in ConvProj Broadcast items embedded within or outside the channel location.
[0052] In one feasible implementation, based on each time step The final input vector is processed by masked attention and pooling to obtain a fixed-dimensional fragment vector, which is represented by the following formula (29): (29) in, Indicates the first Record No. The first segment Attention weights for each time step; Indicates the first The validity mask for each time step; This represents the fixed-dimensional segment embedding vector after masking and attention pooling.
[0053] In one feasible implementation, the token of a record is embedded in a sequentially stacked manner. Record-level features can be added to the first part. Vectors are used for global discrimination, represented as ;in, Indicates the first Fragment-level embedding sequences from EEG recordings; Indicates the first The global convergent label vector ([CLS] vector) of the EEG recording is used for subsequent global discrimination or regression tasks of the entire recording; Indicates in The input sequence representation after concatenating the [CLS] vector is used as the input to the sequence-level encoder.
[0054] Specifically, for cross-sample batch processing, token-level padding length is defined. With sequence mask Attention or sequence pooling By masking the padding token, a unified input for a variable number of tokens can be achieved.
[0055] In one feasible implementation method, It can be directly used as a time step input into encoders with structures such as Transformer or Conformer; It can be used as a token-level input sequence-level encoder (e.g., for cross-segment relationship modeling and MoE gating). The two-level interface enables the system to learn fine-grained timing within segments and macroscopic transition structures between segments, and provides conditions for subsequent hybrid expert gating.
[0056] In this embodiment of the invention, a Mixture of Experts (MoE) framework is employed. The MoE framework dynamically selects expert modules through a gating mechanism to process features of different tasks or data. Specifically, a mixed expert encoder is constructed, primarily composed of interpretable experts and secondarily of non-interpretable experts, and gating routing is used to achieve adaptive selection and efficient computation of different physiological feature patterns.
[0057] S4. Construct a hybrid expert encoder; input fixed-dimensional fragment vectors into the hybrid expert encoder for hybrid expert encoding, adaptively select expert subsets and weighted fuse them through a gating routing mechanism, output fragment-level hybrid expert representations and stack them in time to form a hybrid expert sequence.
[0058] Optionally, the hybrid experts include interpretable experts and non-interpretable experts; Among them, interpretable experts include at least: rhythm / frequency domain experts, nonlinear dynamics experts, and brain functional network experts; Among them, the rhythm / frequency domain expert is used to calculate the multi-band energy to bandwidth ratio; Among them, the nonlinear dynamics expert is used to estimate sample entropy, permutation entropy, LZ complexity, or Hurst exponent; Among them, brain functional network experts are used to calculate phase-locked values or amplitude envelope correlations and encode them using graph networks; Among them, the uninterpretable expert is the end-to-end depth encoder.
[0059] Optionally, the specific implementation process of S4 includes S41-S42: S41. Using fragment vectors, microstate label embeddings, and duration embeddings as gating conditions, scores are generated for each expert. In one feasible implementation, the fixed-dimensional segment vector is represented as and retain and optional context. The gating condition vector is constructed by the following formula (30): (30) in, Intra-fragment characterization Micro-state tags With duration prior If necessary, introduce the context of the previous segment. It characterizes transfer dependencies and provides routing for context sensitivity at microstate boundaries.
[0060] S42. Based on the scores of each expert, select a subset of experts according to Top-K, encode and weight them, and configure a capacity limit and load balancing regularization for each expert. Output fragment-level hybrid expert representations and stack them in time to form a hybrid expert sequence.
[0061] In one feasible implementation, the embodiments of the present invention are configured as follows: A set of experts, of whom the explainable expert set With the unexplainable expert group constitute The division, and .
[0062] Among them, the score generated for each expert based on the gating condition vector through the gating network is expressed by the following formula (31): (31) in, Indicates the segment in the first Gating scores from individual experts; Indicates the corresponding number in the gating network A learnable weight vector for each expert; Indicates the corresponding number in the gating network Learnable biases of each expert; This indicates an expert index.
[0063] Among them, the one with the highest score was selected. An index set was formed by experts. (generally To ensure sparse efficiency), normalization is performed within this set, and the normalized index set is represented by the following formula (32): (32) in, This represents the normalized gated route weight; Expressing gratitude to experts Gating system scoring; To avoid overloading some experts, a capacity limit is set for each expert per batch. If the number of tokens routed to a certain expert exceeds... Any excess throughput will be allocated to backup experts (or routed through the residual channel) with the next highest priority to ensure throughput and stability.
[0064] In one feasible implementation, to promote balanced use, the load balancing regularity is set by the following formulas (33)-(34): (33) (34) in, Indicates that within a batch, the first Average occupancy rate of each expert being routed to; This represents the load balancing regularization loss; This indicates the total number of tokens participating in routing in the current batch; This indicates the total number of experts.
[0065] In one feasible implementation, for the first Each expert assigns a unique code to the token, expressed by the following formula (35): (35) in, Represents the expert coding vector; Represents an expert network; This represents the input tensor of a fixed-length segment after resampling; Indicates and The corresponding encoding; This represents the set of learnable parameters of an expert network.
[0066] In one feasible implementation, Projected onto a common dimension and weighted fused, the MoE fragment output is formed through residuals and normalization; whereby... Projecting onto the common dimension and weighted fusion is expressed by the following formulas (36)-(37): (36) (37) in, The expert then stated after the projection. Represents a learnable linear projection matrix; This represents the MoE weighted fusion representation; This represents the normalized gating weight.
[0067] The process of generating the MoE fragment output through residual and normalization is represented by the following formula (38): (38) in, Indicates the output of the MoE fragment; The representation layer normalization operator is used to normalize vector features to stabilize training. It is represented as a base segment.
[0068] Among them, Stacked by time In embodiments of the present invention, sequence transformers, graph convolutional networks (GCNs), or conditional random fields (CRFs) can be used to further model the inter-segment transition structure to obtain record-level representations. It is used for self-supervised training or downstream tasks.
[0069] In this invention, experts are categorized into two main types: interpretable experts (based on biophysically and physiologically interpretable features) and uninterpretable experts (deep end-to-end units to cover unknown patterns). Specifically, these include: rhythm and frequency domain interpretable experts, nonlinear dynamics experts, brain functional network experts, and uninterpretable deep experts. Rhythm and frequency domain interpretable experts are used to extract… Equal-frequency band energy and rhythm dynamics. The specific implementation process includes: (1) The energy extraction using learnable Sinc-Conv or fixed filter banks is expressed by the following formulas (39)-(40): (39) (40) in, Indicates the first Record No. EEG segment via the first The sub-band signal matrix obtained after bandpass filtering; Represents the first in the filter bank One filter; Indicates the first The first channel in the Power estimation over a frequency band.
[0070] (2) Logarithmic power and normalization are expressed by the following formulas (41)-(42): (41) (42) in, It is a stabilizing term introduced to avoid log(0) or numerical instability in logarithmic operations; Indicates frequency band energy; It represents the average logarithmic power across channels, used to characterize the overall band energy level of that segment.
[0071] (3) Through The convergence of vectors is expressed by the following formula (43): (43) in, This represents the rhythm interpretable expert output vector obtained by MLP convergence of rhythmic features such as frequency band energy and its ratio; It represents a set of frequency band ratio characteristics constructed from energy in different frequency bands, used to characterize the relative relationships of energy distribution.
[0072] In one feasible implementation, nonlinear dynamics experts are used to compute characterization complexity, nonstationarity, and chaotic features. The specific implementation process includes: (1) Calculate the sample entropy, expressed by the following formulas (44)-(45): (44) (45) Among them, sample entropy This indicates that the segment (or channel sequence) is in the embedding dimension. Tolerance The sequence complexity is as follows; Indicates the embedded dimension Below, distance threshold is Match rate; Indicates the embedded dimension Below, distance threshold is Match rate; Indicated by time index The length of the structure constructed from the starting point is The delayed embedding vector; Indicates indexing by another time. An embedding vector of the same dimension is constructed starting from the given point; Indicates the matching tolerance; Indicates the embedding dimension.
[0073] (2) The order type distribution entropy of the sequence within the fragment; (3) Calculate the LZ complexity; (4) Adopt The convergence vector is represented by the following formula (46): (46) in, The segment representation vector, representing the output of the nonlinear dynamics expert, is derived from the sample entropy. Permutation entropy, a measure of the complexity of sequence order relations. Lempel-Ziv complexity for measuring sequence compressibility Hurst exponent, a measure of long-range correlation of sequences. Multiple complexity features are aggregated and then processed by MLP to obtain the result.
[0074] In one feasible implementation, brain functional network experts are used to characterize inter-channel phase or amplitude coupling and network topology within a segment. The specific implementation process includes: (1) The Hilbert transform is used to analyze the signal and instantaneous phase, which is expressed by the following formula (47): (47) in, For the first Channel at time The complex form of the analytic signal; Indicates the first EEG segment Channel at time step scalar sampled values; (2) Calculate the phase lock value, expressed by the following formula (48): (48) in, Indicates channel With channel Phase lock value between; Indicates channel At any moment The instantaneous phase; Indicates channel At any moment The instantaneous phase; (3) Calculate the amplitude envelope correlation, expressed by the following formula (49): (49) in, Indicates channel With channel The amplitude envelope is related; (4) Graph construction and graph encoding; weight the phase-locked values or amplitude envelope correlations to construct a weighted adjacency. and node features (Bandwidth energy, local field potential, or position embedding, etc.) are input to the graph network, and are expressed by the following formulas (50)-(51): (50) (51) in, Indicates the first Record No. The node-level implicit representation matrix obtained after encoding the segment using a graph network; Represents a graph convolution network operator; Represents graph attention network operators; The fragment-level representation vectors output by the expert in the graph network; This represents the graph aggregation operator.
[0075] In one feasible implementation, unexplainable deep experts are used to cover unmodeled or complex patterns in an end-to-end manner, improving the upper bound. The specific implementation process includes: (1) Use a time-domain encoder, such as Transformer or Conformer, to... or The processing is carried out using the following formulas (52)-(53): (52) (53) in, This represents the time-step-level implicit representation sequence obtained after the deep temporal encoder encodes the segment input sequence; Indicates the first Record No. Segment in time step The initial input embedding vector; This represents the time mask of the segment; Indicates the pooling operator; (2) Use a channel-time joint encoder, such as CNN / TDNN / time-frequency CNN (the time-frequency graph formed by STFT / Wavelet is the input).
[0076] In one feasible implementation, to enhance interpretability, embodiments of the present invention assign prior biases (e.g., to the interpretable expert) during the gating phase. The scoring with bias β>0): is expressed by the following formula (54): (54) In this process, while ensuring performance, priority is given to interpretable experts; when non-interpretable experts significantly improve the verification metrics, the gating system automatically assigns higher weights, thereby achieving a balance between interpretability and performance.
[0077] S5. Perform self-supervised pre-training on the hybrid expert encoder based on the hybrid expert sequence. Input the hybrid expert sequence into the sequence coding layer and the prediction head, and output the prediction result of the current segment. Perform joint training based on the prediction result of the current segment and the constructed pre-trained total objective loss function to obtain the pre-trained general representation.
[0078] In one feasible implementation, without manual annotation, this embodiment of the invention employs an encoder (including MoE and sequence layers) to learn temporal predictability, micro-state consistency, and invariance across devices and individuals, providing a universal representation for multi-task fine-tuning. The specific implementation process includes: (1) Output based on MoE fragments , construct the first The sequence of fragments of a record is represented as The hidden sequence is obtained by inputting the fragment sequence into the sequence encoder, which is represented by the following formula (55): (55) Among them, sequence encoder It can be a Transformer, GCN, or CRF front-end, any one or a combination thereof; Indicates the sequence encoder's first... The hidden sequence representation matrix output by the layer; This indicates optional sequence-level additional priors used to encode information about "segment structure"; Indicates the first Record No. The segment in the first The contextualized hidden state vector of the layer.
[0079] (3) Based on the hidden sequence, a teacher-forced method is used to predict the multiple objectives of the next token, and a prediction head and main loss function are constructed; whereby the multiple objectives of the next token include: the embedding vector of the next segment. Microstate labels for the next segment And the physical duration of the next segment ; The prediction head is represented by the following formulas (56)-(58): (56) (57) (58) in, Indicates the next segment is embedded The predicted value; The linear mapping matrix representing the embedded regression head; This represents the predicted probability distribution vector for the microstate category of the next segment; Represents the class head weight matrix; This represents the predicted physical duration of the next segment; This represents the linear weight vector of the duration regression head.
[0080] The main loss function is expressed by the following formula (59): (59) in, Indicates the main loss; This represents the loss weight coefficient for embedding the regression term; The loss weight coefficient representing the label classification item; This represents the loss weight coefficient of the duration regression term; This represents the cross-entropy loss.
[0081] (3) Randomly select intervals for the segment sequence After occlusion or noise perturbation, the leader model is based on the time step representation of the occluded token or the fragment embedding in the context. Taking fragment embedding reconstruction as an example, it can be expressed by the following formulas (60)-(61): (60) (61) in, This indicates fragment embedding under occlusion conditions. The reconstruction results; This indicates the decoder module; This represents the hidden context state output by the sequence encoder for reconstruction. Optionally, during pre-training, a consistent distillation loss is established between the interpretable expert output and the corresponding classical measure, and a positive bias is introduced for the interpretable expert in the gating scoring to prioritize activation.
[0082] One feasible implementation involves constructing a consistent distillation of interpretable experts: ensuring that the interpretable experts maintain consistency between their physical quantity outputs and classical measures during the self-supervised phase, forming a weakly supervised prior, including: (1) Frequency domain expert: Compared with direct calculation Between norm or Norm consistency; (2) Connecting Experts: Obtained from the analytical signal Consistency; (3) Complexity expert: Sample entropy , Consistent with the corresponding traditional estimate; The loss from uniform distillation is expressed by the following formula (62): (62) in, This represents the power spectral density predicted by the sequence encoder output; This represents the weighting coefficient of the PSD consistency term; This indicates that the loss can be explained by expert consensus distillation. Represents the weighting coefficient of the connectivity consistency term; This represents the set of connectivity measures obtained from connectivity-interpretable expert predictions; This represents the set of connectivity measures calculated using traditional methods for analytic signals; This represents the set of complexity measures obtained from complexity-interpretable expert predictions. This represents the set of complexity measures obtained by directly estimating the complexity on a fragment using traditional algorithms.
[0083] Optionally, the pre-trained total objective loss includes: neighbor consistency contrastive learning loss, hybrid expert structure regularization loss, domain adversarial invariance loss, and consistency distillation of interpretable experts.
[0084] When negative samples exist, neighbor consistency comparison learning can be performed to encourage local temporal continuity and boundary separability. For positive sample pairs (m, m+1) and negative samples n≠m+1 from the same batch, a loss function based on noise contrastive estimation (InfoNCE) is used, expressed by the following formula (63): (63) in, This represents the contrastive learning loss in InfoNCE. This represents the temperature coefficient.
[0085] In one possible implementation, the source identifier is recorded. For the domain label, construct the domain adversarial invariance loss function, which is expressed by the following formula (64): (64) in, Representation domain adversarial invariance loss; Represents cross-entropy loss; express Domain discriminator; In one feasible implementation, the hybrid expert structure regularization loss function is expressed by the following formula (65): (65) in, Indicates the regularized loss of the hybrid expert structure; This represents the weighting coefficient of the load balancing regularization term; This indicates load balancing losses; This represents the weight coefficient of the gate entropy regularization term; Indicates the first Record No. The token is assigned to the first Gating weights for each expert; This is a penalty for the gating distribution entropy.
[0086] The pre-training total objective loss function is expressed by the following formula (66): (66) in, This represents the total objective loss during pre-training; This indicates the predicted loss for the next token; This represents the loss of the denoising autoencoder reconstruction; This represents the neighbor consistency comparison learning loss; This indicates that the loss can be explained by expert consensus distillation. Indicates domain adversarial loss; Indicates the regularized loss of the hybrid expert structure; Indicates the first weighting coefficient; This represents the second weighting coefficient; This represents the third weighting coefficient; Indicates the third weighting coefficient; This represents the fourth weighting coefficient.
[0087] S6. Fine-tune the hybrid expert encoder based on the pre-trained general representation to obtain the fine-tuned hybrid expert encoder. In one feasible implementation, embodiments of the present invention utilize pre-trained general representations on a small or medium-sized amount of labeled data to achieve efficient multi-task adaptation; simultaneously, it supports zero-shot cross-individual and cross-device generalization testing. The specific fine-tuning process includes: (1) Processing and constructing a multi-task loss function through task heads: This embodiment of the invention targets three representative tasks, including: multi-label diagnosis of neurological diseases (multi-label classification); detection of mental illnesses (multi-class or binary classification); and classification of emotional and cognitive states (multi-class). Specifically, the sequence-level representation is... Through task sharing layer and task header processing, it is expressed by the following formulas (67)-(68): (67) (68) in, Indicates the first The sequence-level intermediate representation vector of each record; Indicates a shared header module for tasks; Indicates in task type The predicted output is as follows; This represents the corresponding class header weight matrix; This represents the corresponding bias vector; express A real vector space of dimensionless numbers, where Output the dimension for the sequence header; {Neurological disease diagnosis task, mental illness detection task, emotional and cognitive state classification task}; For task type The corresponding output activation function.
[0088] The multi-task loss function is expressed by the following formula (69): (69) in, This indicates the multitasking loss during the fine-tuning phase. Indicates task type The loss weighting coefficient; This represents the cross-entropy loss, used in multi-class classification tasks; This represents the binary cross-entropy loss, used for binary classification or multi-label classification tasks. Indicates in task type Truth labels below.
[0089] In the fine-tuning phase, task embedding is introduced to reduce redundant computation. The participation in gating conditions prompts MoE to select a more suitable subset of interpretable experts for different tasks, thereby improving reasoning efficiency and interpretability, as expressed by the following formula (70): (70) in, Indicates the first Record No. The gating condition vector of the segment; This represents the general fragment representation of the segment; This indicates the microstate label of the segment; Embedding representing the physical duration of a segment; This indicates the task context embedding of the current downstream task; This represents the gated condition fusion function (e.g., after concatenation through a linear layer + nonlinearity), used to compress the above multi-source priors to a unified dimension.
[0090] Among them, weighted cross-entropy and temperature calibration are used, and exponential moving average (EMA) is used to maintain teacher weights for stable fine-tuning.
[0091] (2) In zero-shot scenarios, without using labeled data of the target individuals, the pre-trained (or source domain fine-tuned) model is directly used on the target records. The above reasoning. To further improve robustness, embodiments of the present invention propose two label-free adaptive schemes, including: Option 1: Minimum Entropy Adaptation During Testing: While keeping the backbone frozen, only a small number of steps are adaptively applied to the normalized affine parameter control bias, and the prediction entropy is minimized, as expressed by the following formula (71): (71) in, This represents the predicted output probability vector under the current model; This represents the set of parameters that can be updated during the Test-Time Adaptation (TTA) phase. This represents the scaling parameter of the normalization layer; This represents the translation bias parameter of the normalized layer; This indicates gating bias.
[0092] Option 2: Feature moment matching: Fragment embedding of the target record Source Domain Statistics The second-order moment alignment is expressed by the following formula (72): (72) in, This represents the feature moment matching loss, used to align the feature statistics of the target domain and the source domain. Represents target domain fragment embedding The first moment; The first moment representing the embedding of a source domain segment; The second moment representing the embedding of the target domain segment; The second moment representing the embedding of a segment in the source domain; This represents the number of segment samples used to count the target domain moments.
[0093] Among these methods, minimum entropy adaptation or feature moment matching can be used to iterate a small number of steps within the inference time limit; if there are limitations, these methods can be completely turned off, and zero-shot learning inference can be performed directly.
[0094] In one feasible implementation, the fine-tuning of the total objective loss function is expressed by the following formula (73): (73) in, This represents the total loss function during the labeled fine-tuning phase; This indicates the loss from monitoring downstream tasks; This represents the loss of a Conditional Random Field (CRF), used to impose temporal consistency and label transition constraints; The weighting coefficients represent the CRF sequence constraint loss; Indicates the regularized loss of the hybrid expert structure; express; Represents the weight coefficients of the regularization term in the hybrid expert structure; This represents the distillation loss of interpretable expert consistency, which can be retained as a balancing regularity in the labeled stage to maintain the physical consistency of interpretable experts.
[0095] S7. Input the EEG signal to be processed into the fine-tuned hybrid expert encoder and output the processing result corresponding to the EEG signal.
[0096] This invention provides high-fidelity temporal modeling capabilities for non-stationary EEG. Tokenization using micro-state transitions as boundaries avoids cross-state aliasing and semantic boundary ambiguity caused by fixed windows, significantly reducing temporal aliasing effects and information leakage, and improving the accuracy of capturing sudden changes. For variable-length segments, unified embedding and masked attention or pooling are used to maintain the explicit visibility of segment duration (Δt), preserving fine-grained dynamics within segments while learning transition structures between segments. Micro-state boundaries can be detected online, and the autoregressive structure pre-trained with Next-token naturally supports segment-by-segment streaming inference, reducing end-to-end latency and facilitating applications in closed-loop BCI scenarios.
[0097] This invention provides interpretation and decision-making interpretability led by interpretable experts. It utilizes interpretable experts to directly output physiological quantities through frequency domain analysis, nonlinear complexity, and functional connectivity, and aligns these with classical measures via consistency distillation to form visualized intermediate evidence (visualized spectrum or network graph). MoE gating uses priors such as "fragment embedding + microstate labeling + duration" as conditions, supporting Top-K expert activation trajectory recording and contribution attribution (gating weights). It can generate interpretation reports at both the individual and session levels, enhancing the acceptability in clinical and regulatory scenarios. This invention also allows for optional sequence layers to provide global consistency and minimum duration constraints for fragment labels or task labels, suppressing unreasonable jitter and improving the stability of temporal interpretation.
[0098] The embodiments of this invention can achieve system-level benefits in terms of improved computational efficiency and scalability. Employing Top-(K) sparse routing reduces the single-sample forward complexity to approximately [the lower limit]. Road downgraded to road( This approach significantly reduces inference FLOPs and GPU memory usage while maintaining performance; combined with capacity control and load balancing regularization, it avoids overloading hotspot experts. During the fine-tuning stage, task embedding participation gating is introduced to automatically select the most relevant subset of interpretable experts, reducing redundant feature extraction and improving throughput and energy efficiency during multi-task parallel processing. In this embodiment, the experts are pluggable units, facilitating the addition of experts (such as sleep stage or epilepsy-specific experts) based on tasks and populations without retraining the entire model, thus meeting the needs of long-term evolution across multiple centers.
[0099] The embodiments of this invention can enhance robust generalization capabilities across devices and individuals. By mapping different lead schemes to a common space through a projection matrix, the structural domain shift caused by device heterogeneity is significantly mitigated, allowing pre-trained knowledge to be shared across multiple devices. Strategies such as adversarial invariance and moment matching are employed to make fragment embeddings insensitive to device or subject labels, reducing the need for fine-tuning the target domain and supporting cross-individual and cross-device testing. Denoising and reconstruction processing enables the model to learn "contextual repair," and masked attention shields against padding and missing tests, improving robustness against electrode detachment, motion artifacts, and transient data loss.
[0100] This invention improves training efficiency and leverages the advantages of small-sample adaptation. By combining forward predictability and bidirectional contextual consistency, complementary supervision is provided, reducing reliance on a large number of manual labels and shortening the annotation bottleneck path. Transforming physiological priors into training signals is equivalent to providing physical alignment anchors for deep encoding, improving convergence speed and stability during small-sample fine-tuning. This invention allows for task transfer by adjusting only small heads such as normalized affines, gated bias, or LoRA / Adapter. In latency-constrained scenarios, only a small number of experts and shallow sequence heads can be used to ensure real-time performance.
[0101] This invention improves usability for clinical and engineering applications. It generates interpretable reports including output fragment-level spectral features, connectivity networks, expert activation trajectories, and key fragment hotspots, meeting the needs of clinical review and research verification. Furthermore, it generates structured intermediate evidence and traceable reasoning paths, facilitating the interpretation and auditability requirements for medical device and algorithm registration. It supports hybrid edge or cloud deployment (interpretable expert prior extraction at the edge and deep expert cloud inference), reducing overall computing costs while maintaining latency.
[0102] Figure 2 This is a block diagram of an adaptive segmented interpretable hybrid expert EEG processing device provided in an embodiment of the present invention. This device is used for an adaptive segmented interpretable hybrid expert EEG processing method. (Refer to...) Figure 2 The device includes an alignment module 210, a segmentation module 220, an embedding module 230, a hybrid expert coding module 240, a pre-training module 250, a fine-tuning module 260, and a processing module 270. Wherein: Alignment module 210 is used to align the acquired raw EEG signals across devices, resample the raw EEG signals and project them onto a unified lead space to obtain processed EEG signals. The segmentation module 220 is used to perform microstate adaptive segmentation on the processed EEG signal. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototype, the processed EEG signal is adaptively segmented. By segmenting at the microstate transition point, EEG segments of unequal length are obtained and segment labels and durations are formed. Embedding module 230 is used to uniformly embed EEG segments of unequal length. By performing masking, intra-segment position encoding, and cross-segment global temporal encoding on the EEG segments of unequal length, and fusing micro-state labels and duration priors, a fixed-dimensional segment vector is obtained. Hybrid expert coding module 240 is used to construct a hybrid expert encoder; fixed-dimensional segment vectors are input into the hybrid expert encoder for hybrid expert coding, and expert subsets are adaptively selected and weighted fused through a gated routing mechanism to output segment-level hybrid expert representations and stack them in time to form a hybrid expert sequence. The pre-training module 250 is used to perform self-supervised pre-training of the hybrid expert encoder based on the hybrid expert sequence. The hybrid expert sequence is input into the sequence coding layer and the prediction head, and the prediction result of the current segment is output. The pre-trained general representation is obtained by joint training based on the prediction result of the current segment and the constructed pre-trained total objective loss function. The fine-tuning module 260 is used to fine-tune the hybrid expert encoder based on the pre-trained general representation to obtain the fine-tuned hybrid expert encoder. The processing module 270 is used to input the EEG signal to be processed into the fine-tuned hybrid expert encoder and output the processing result corresponding to the EEG signal to be processed.
[0103] Optionally, the segmentation module 220 is used for: Peak points of EEG signals were extracted at the peak of global field potential and normalized topology. Multiple microstate prototypes were obtained by using a polarity-invariant clustering method. Each microstate prototype represents a stable potential pattern of the brain at a certain functional stage. The normalized topology based on multiple microstate prototypes is assigned time-by-time in a spatially correlated manner, and threshold filtering, temporal smoothing and minimum duration constraints are applied. Finally, the label change point is used as the segment boundary to obtain EEG segments of unequal length and form segment labels and durations.
[0104] Optionally, the embedding module 230 is used for: Zero-padding or edge-preserving resampling is performed on EEG segments of unequal length to obtain the superimposed segments at each time step, and the corresponding mask is generated. Construct relative position encoding within each time step and global temporal encoding across segments, and fuse micro-state label embeddings as well as duration and rate embeddings. Obtain fixed-dimensional segment vectors through shared convolution and masked attention.
[0105] Optionally, the hybrid expert coding module 240 is used for: Using fragment vectors, microstate label embeddings, and duration embeddings as gating conditions, scores are generated for each expert. Based on the scores of each expert, a subset of experts is selected according to Top-K, encoded, and weighted and fused. A capacity limit and load balancing regularization are configured for each expert. The output is a fragment-level hybrid expert representation, which is then stacked in time to form a hybrid expert sequence.
[0106] Optionally, the hybrid experts include interpretable experts and non-interpretable experts; Among them, interpretable experts include at least: rhythm / frequency domain experts, nonlinear dynamics experts, and brain functional network experts; Among them, the rhythm / frequency domain expert is used to calculate the multi-band energy to bandwidth ratio; Among them, the nonlinear dynamics expert is used to estimate sample entropy, permutation entropy, LZ complexity, or Hurst exponent; Among them, brain functional network experts are used to calculate phase-locked values or amplitude envelope correlations and encode them using graph networks; Among them, the uninterpretable expert is the end-to-end depth encoder.
[0107] Optionally, during the pre-training process, a consistent distillation loss is established between the interpretable expert output and the corresponding classical measure, and a positive bias is introduced for the interpretable expert in the gating scoring to prioritize activation; The loss from uniform distillation is expressed by the following formula (74): (74) in, This represents the power spectral density predicted by the sequence encoder output; Indicates the weighting coefficient of the PSD consistency term; This indicates that the loss can be explained by expert consensus distillation. Represents the weighting coefficient of the connectivity consistency term; This represents the set of connectivity measures obtained from connectivity-interpretable expert predictions; This represents the set of connectivity measures calculated using traditional methods for analytic signals; This represents the set of complexity measures obtained from complexity-interpretable expert predictions. This represents the set of complexity measures obtained by directly estimating the complexity on a fragment using traditional algorithms.
[0108] Optionally, the pre-trained total objective loss includes: neighbor consistency contrastive learning loss, hybrid expert structure regularization loss, domain adversarial invariance loss, and consistency distillation of interpretable experts.
[0109] This invention provides high-fidelity temporal modeling capabilities for non-stationary EEG. Tokenization using micro-state transitions as boundaries avoids cross-state aliasing and semantic boundary ambiguity caused by fixed windows, significantly reducing temporal aliasing effects and information leakage, and improving the accuracy of capturing sudden changes. For variable-length segments, unified embedding and masked attention or pooling are used to maintain the explicit visibility of segment duration (Δt), preserving fine-grained dynamics within segments while learning transition structures between segments. Micro-state boundaries can be detected online, and the autoregressive structure pre-trained with Next-token naturally supports segment-by-segment streaming inference, reducing end-to-end latency and facilitating applications in closed-loop BCI scenarios.
[0110] This invention provides interpretation and decision-making interpretability led by interpretable experts. It utilizes interpretable experts to directly output physiological quantities through frequency domain analysis, nonlinear complexity, and functional connectivity, and aligns these with classical measures via consistency distillation to form visualized intermediate evidence (visualized spectrum or network graph). MoE gating uses priors such as "fragment embedding + microstate labeling + duration" as conditions, supporting Top-K expert activation trajectory recording and contribution attribution (gating weights). It can generate interpretation reports at both the individual and session levels, enhancing the acceptability in clinical and regulatory scenarios. This invention also allows for optional sequence layers to provide global consistency and minimum duration constraints for fragment labels or task labels, suppressing unreasonable jitter and improving the stability of temporal interpretation.
[0111] The embodiments of this invention can achieve system-level benefits in terms of improved computational efficiency and scalability. Employing Top-(K) sparse routing reduces the single-sample forward complexity to approximately [the lower limit]. Road downgraded to road( This approach significantly reduces inference FLOPs and GPU memory usage while maintaining performance; combined with capacity control and load balancing regularization, it avoids overloading hotspot experts. During the fine-tuning stage, task embedding participation gating is introduced to automatically select the most relevant subset of interpretable experts, reducing redundant feature extraction and improving throughput and energy efficiency during multi-task parallel processing. In this embodiment, the experts are pluggable units, facilitating the addition of experts (such as sleep stage or epilepsy-specific experts) based on tasks and populations without retraining the entire model, thus meeting the needs of long-term evolution across multiple centers.
[0112] The embodiments of this invention can enhance robust generalization capabilities across devices and individuals. By mapping different lead schemes to a common space through a projection matrix, the structural domain shift caused by device heterogeneity is significantly mitigated, allowing pre-trained knowledge to be shared across multiple devices. Strategies such as adversarial invariance and moment matching are employed to make fragment embeddings insensitive to device or subject labels, reducing the need for fine-tuning the target domain and supporting cross-individual and cross-device testing. Denoising and reconstruction processing enables the model to learn "contextual repair," and masked attention shields against padding and missing tests, improving robustness against electrode detachment, motion artifacts, and transient data loss.
[0113] This invention improves training efficiency and leverages the advantages of small-sample adaptation. By combining forward predictability and bidirectional contextual consistency, complementary supervision is provided, reducing reliance on a large number of manual labels and shortening the annotation bottleneck path. Transforming physiological priors into training signals is equivalent to providing physical alignment anchors for deep encoding, improving convergence speed and stability during small-sample fine-tuning. This invention allows for task transfer by adjusting only small heads such as normalized affines, gated bias, or LoRA / Adapter. In latency-constrained scenarios, only a small number of experts and shallow sequence heads can be used to ensure real-time performance.
[0114] This invention improves usability for clinical and engineering applications. It generates interpretable reports including output fragment-level spectral features, connectivity networks, expert activation trajectories, and key fragment hotspots, meeting the needs of clinical review and research verification. Furthermore, it generates structured intermediate evidence and traceable reasoning paths, facilitating the interpretation and auditability requirements for medical device and algorithm registration. It supports hybrid edge or cloud deployment (interpretable expert prior extraction at the edge and deep expert cloud inference), reducing overall computing costs while maintaining latency.
[0115] Figure 3 This is a schematic diagram of the structure of an adaptive segmented interpretable hybrid expert EEG processing device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the adaptive segmented interpretable hybrid expert EEG processing device may include the above-mentioned Figure 2 The adaptive segmented interpretable hybrid expert EEG processing device 310 is shown. Optionally, the adaptive segmented interpretable hybrid expert EEG processing device 310 may include a first processor 2001.
[0116] Optionally, the adaptive segmented interpretable hybrid expert EEG processing device 310 may also include a memory 2002 and a transceiver 2003.
[0117] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.
[0118] The following is combined with Figure 3 A detailed description of each component of the adaptive segmented interpretable hybrid expert EEG processing device 310 is provided below: The first processor 2001 is the control center of the adaptive segmented interpretable hybrid expert EEG processing device 310. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0119] Optionally, the first processor 2001 can perform various functions of the adaptive segmented interpretable hybrid expert EEG processing device 310 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0120] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 3 CPU0 and CPU1 are shown in the diagram.
[0121] In a specific implementation, as one example, the adaptive segmented interpretable hybrid expert EEG processing device 310 may also include multiple processors, for example... Figure 3 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0122] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0123] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently, and may be connected via the interface circuit of the adaptive segmented interpretable hybrid expert brainwave processing device 310. Figure 3 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0124] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0125] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 3 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0126] Optionally, the transceiver 2003 can be integrated with the first processor 2001 or exist independently, and can be connected to the interface circuit of the adaptive segmented interpretable hybrid expert EEG processing device 310. Figure 3 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0127] It should be noted that, Figure 3 The structure of the adaptive segmented interpretable hybrid expert EEG processing device 310 shown in the figure does not constitute a limitation on the router. Actual adaptive segmented interpretable hybrid expert EEG processing devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0128] Furthermore, the technical effects of the adaptive segmented interpretable hybrid expert EEG processing device 310 can be referred to the technical effects of the adaptive segmented interpretable hybrid expert EEG processing method described in the above method embodiments, and will not be repeated here.
[0129] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or it may be any conventional processor, etc.
[0130] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0131] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0132] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0133] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0134] It should be understood that, in various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0135] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0137] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0138] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0139] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0140] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0141] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An adaptive segmented, interpretable hybrid expert EEG processing method, characterized in that, The method includes: S1. Align the acquired raw EEG signals across devices, resample the raw EEG signals and project them onto a unified lead space to obtain the processed EEG signals. S2. Perform microstate adaptive segmentation on the processed EEG signal. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototype, perform adaptive segmentation on the processed EEG signal. By segmenting at the microstate transition point, EEG segments of unequal length are obtained and segment labels and durations are formed. S3. Unified embedding of unequal-length EEG segments: By masking, intra-segment position encoding, and cross-segment global temporal encoding of unequal-length EEG segments, and fusing micro-state labels and duration priors, a fixed-dimensional segment vector is obtained. S4. Construct a hybrid expert encoder; input fixed-dimensional fragment vectors into the hybrid expert encoder for hybrid expert encoding, adaptively select expert subsets and weighted fuse them through a gated routing mechanism, output fragment-level hybrid expert representations and stack them in time to form a hybrid expert sequence; S5. Perform self-supervised pre-training on the hybrid expert encoder based on the hybrid expert sequence. Input the hybrid expert sequence into the sequence coding layer and the prediction head, and output the prediction result of the current segment. Perform joint training based on the prediction result of the current segment and the constructed pre-trained total objective loss function to obtain the pre-trained general representation. S6. Fine-tune the hybrid expert encoder based on the pre-trained general representation to obtain the fine-tuned hybrid expert encoder. S7. Input the EEG signal to be processed into the fine-tuned hybrid expert encoder and output the processing result corresponding to the EEG signal to be processed.
2. The adaptive segmentation interpretable hybrid expert EEG processing method according to claim 1, characterized in that, The process S2 involves adaptively segmenting the processed EEG signal into microstate segments. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototypes, the processed EEG signal is adaptively segmented. This is achieved by segmenting the signal at microstate transition points to obtain EEG segments of unequal length and forming segment labels and durations, including: S21. Extract the peak points of the EEG signal at the peak of the global field potential and perform topological normalization. Then, obtain multiple microstate prototypes by using the polarity-invariant clustering method. Each microstate prototype represents the stable potential pattern of the brain in a certain functional stage. S22. The normalized topology based on multiple microstate prototypes is assigned time-by-time in a spatially correlated manner, and threshold filtering, temporal smoothing and minimum duration constraints are applied. Finally, the label change point is used as the segment boundary to obtain unequal-length EEG segments and form segment labels and durations.
3. The adaptive segmentation interpretable hybrid expert EEG processing method according to claim 1, characterized in that, The S3 method involves uniformly embedding unequal-length EEG segments. This is achieved by masking the unequal-length EEG segments, encoding their intra-segment positions, and encoding their cross-segment global time sequences. Micro-state labels and duration priors are then fused to obtain a fixed-dimensional segment vector, including: S31. Perform zero-padding or edge-preserving resampling on EEG segments of unequal length to obtain the superimposed segments at each time step, and generate the corresponding mask. S32. Construct relative position encoding within each time step and global time encoding across segments, and fuse micro-state label embedding as well as duration and rate embedding. Through shared convolution and masked attention processing, obtain fixed-dimensional segment vectors.
4. The adaptive segmentation interpretable hybrid expert EEG processing method according to claim 1, characterized in that, S4 inputs fixed-dimensional fragment vectors into hybrid expert encoding for hybrid expert encoding. It adaptively selects a subset of experts through a gated routing mechanism and performs weighted fusion, outputting fragment-level hybrid expert representations which are then stacked in time to form a hybrid expert sequence, including: S41. Using fragment vectors, microstate label embeddings, and duration embeddings as gating conditions, scores are generated for each expert. S42. Based on the scores of each expert, select a subset of experts according to Top-K, encode and weight them, and configure a capacity limit and load balancing regularization for each expert. Output fragment-level hybrid expert representations and stack them in time to form a hybrid expert sequence.
5. The adaptive segmentation interpretable hybrid expert EEG processing method according to claim 1, characterized in that, The hybrid experts include interpretable experts and non-interpretable experts; Among them, interpretable experts include at least: rhythm / frequency domain experts, nonlinear dynamics experts, and brain functional network experts; Among them, the rhythm / frequency domain expert is used to calculate the multi-band energy to bandwidth ratio; Among them, the nonlinear dynamics expert is used to estimate sample entropy, permutation entropy, LZ complexity, or Hurst exponent; Among them, brain functional network experts are used to calculate phase-locked values or amplitude envelope correlations and encode them using graph networks; Among them, the uninterpretable expert is the end-to-end depth encoder.
6. The adaptive segmentation interpretable hybrid expert EEG processing method according to claim 1, characterized in that, During the pre-training process, a consistent distillation loss is established between the interpretable expert output and the corresponding classical measure, and a positive bias is introduced for interpretable experts in the gating scoring to prioritize their activation. The uniform distillation loss is expressed by the following formula (1): (1) in, This represents the power spectral density predicted by the sequence encoder output; This represents the weighting coefficient of the PSD consistency term; This indicates that the loss can be explained by expert consensus distillation. Represents the weighting coefficient of the connectivity consistency term; This represents the set of connectivity measures obtained from connectivity-interpretable expert predictions; This represents the set of connectivity measures calculated using traditional methods for analytic signals; This represents the set of complexity measures obtained from complexity-interpretable expert predictions. This represents the set of complexity measures obtained by directly estimating the complexity on a fragment using traditional algorithms.
7. The adaptive segmentation interpretable hybrid expert EEG processing method according to claim 1, characterized in that, The pre-training total objective loss includes: neighbor consistency contrastive learning loss, hybrid expert structure regularization loss, domain adversarial invariance loss, and consistency distillation of interpretable experts.
8. An adaptive segmented interpretable hybrid expert EEG processing device, wherein the adaptive segmented interpretable hybrid expert EEG processing device is used to implement the adaptive segmented interpretable hybrid expert EEG processing method as described in any one of claims 1-7, characterized in that, The device includes: The alignment module is used to align the acquired raw EEG signals across devices, resample the raw EEG signals and project them onto a unified lead space to obtain processed EEG signals. The segmentation module is used to perform microstate adaptive segmentation on the processed EEG signal. Based on the spatial correlation matching results between the original EEG signal at all times and the extracted microstate prototype, the processed EEG signal is adaptively segmented. By segmenting at the microstate transition point, EEG segments of unequal length are obtained and segment labels and durations are formed. The embedding module is used to uniformly embed EEG segments of unequal length. It obtains fixed-dimensional segment vectors by masking, intra-segment position encoding, and cross-segment global temporal encoding of EEG segments of unequal length, and by fusing micro-state labels and duration priors. The hybrid expert coding module is used to construct a hybrid expert encoder. Fixed-dimensional fragment vectors are input into the hybrid expert encoder for hybrid expert coding. The expert subset is adaptively selected and weighted by a gated routing mechanism, and fragment-level hybrid expert representations are output and stacked in time to form a hybrid expert sequence. The pre-training module is used to perform self-supervised pre-training of the hybrid expert encoder based on the hybrid expert sequence. The hybrid expert sequence is input into the sequence coding layer and the prediction head, and the prediction result of the current segment is output. Based on the prediction result of the current segment and the constructed pre-trained total objective loss function, joint training is performed to obtain the pre-trained general representation. The fine-tuning module is used to fine-tune the hybrid expert encoder based on the pre-trained general representation to obtain the fine-tuned hybrid expert encoder. The processing module is used to input the EEG signal to be processed into the fine-tuned hybrid expert encoder and output the processing result corresponding to the EEG signal to be processed.
9. An adaptive segmented, interpretable hybrid expert EEG processing device, characterized in that, The adaptive segmentation interpretable hybrid expert EEG processing device includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1 to 7.