A self-supervised cross-session brainprint recognition method and system based on distillation learning
By adopting a self-supervised cross-time period brainprint recognition method based on distillation learning, and combining training strategies of global view and local view, the problem of poor cross-time period generalization ability in brainprint recognition technology is solved. It achieves robust recognition and efficient self-supervised pre-training in different time periods, thereby improving the accuracy and robustness of recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-12
AI Technical Summary
Existing brainprint recognition technology faces problems in practical applications, such as poor model generalization ability across time periods, easy data distribution drift, and high dependence on large-scale labeled data.
We employ a self-supervised cross-temporal brainprint recognition method based on distillation learning. By constructing a pre-training dataset and a fine-tuning dataset, and combining an EEG signal serializer, a teacher network, and a student network, we use global and local views for training. We introduce temporal consistency constraints and dynamic feature distillation strategies to achieve efficient self-supervised pre-training without the need for a large number of labeled samples.
This improved the model's cross-time-period generalization performance and long-term adaptability, enhanced the robustness and discriminativeness of EEG signal features, and ensured robust recognition across different time periods.
Smart Images

Figure CN122196655A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of biometric recognition technology, specifically relating to a self-supervised cross-time period brainprint recognition method and system based on distillation learning. Background Technology
[0002] With the iterative upgrade of information technology and the deep penetration of the digital society, personal identity authentication technology, as the first line of defense for information security, is facing unprecedented opportunities and challenges. While mainstream biometric systems such as iris scanning, fingerprint recognition, facial recognition, and voice waveform recognition are widely used, their biometric features cannot be changed once registered. This means that once this immutable biometric data is leaked, it will bring permanent security risks that cannot be effectively remedied.
[0003] Brainprint recognition, which uses unique and stable electroencephalogram (EEG) signal characteristics for identity authentication, is a promising emerging biometric technology. Compared with traditional biometric methods, brainprint recognition has a significant advantage in "reversibility." Users can dynamically update their "brainprint" characteristics by changing different thinking tasks or stimulus paradigms, thus effectively avoiding the inherent defects caused by the leakage of immutable biometric characteristics. Furthermore, EEG signals have high temporal resolution, relatively low acquisition equipment cost, and are easy to carry, making them promising for building sustainable and highly secure identity authentication systems.
[0004] However, despite the significant advantages of brainprint recognition, its transition from laboratory research to large-scale practical application still faces serious challenges. One of the core bottlenecks hindering its development lies in the poor generalization ability of brainprint recognition models across different time periods. Neural signals are inherently highly non-stationary and time-varying, easily affected by individual physiological states (such as fatigue and emotions) and environmental noise, leading to significant drift in the distribution of EEG signal data collected at different time periods (such as days, weeks, or months apart). This drift causes a sharp drop in the accuracy of recognition models trained on data from a specific time period when applied to new data from different time periods.
[0005] To address this challenge of cross-time-bound generalization, some methods attempt to extract relatively stable time-frequency-spatial multidimensional features through complex signal processing and feature engineering to resist the effects of time-varying characteristics. Other methods try to compensate for differences in data distribution across different time periods using transfer learning or domain adaptation techniques. However, these methods often heavily rely on labeled data for model training or transfer learning, but in practical applications, acquiring precisely labeled EEG data spanning long time periods is costly and impractical. Furthermore, traditional feature extraction methods may fail to fully capture the subtle dynamic information in the signal that changes over time, resulting in a need to improve long-term recognition stability.
[0006] To address the shortcomings of existing brainprint recognition technologies, such as insufficient cross-timeframe generalization ability, susceptibility to data distribution shifts, and over-reliance on labeled data, this invention proposes a self-supervised cross-timeframe brainprint recognition method and system based on online distillation learning. This method innovatively combines EEG self-supervised learning with an online EEG feature distillation mechanism, constructing a learning framework that enables efficient self-supervised pre-training without requiring a large number of labeled samples. By introducing temporal consistency constraints and dynamic feature distillation strategies during model training, the model can adaptively update its representation capabilities across constantly changing time distributions, thereby achieving robust recognition of EEG data from different time periods and effectively improving the model's cross-timeframe generalization performance and long-term adaptability. Summary of the Invention
[0007] This invention aims to solve the fundamental technical problems faced by existing brainprint recognition technologies in practical applications, such as poor model generalization ability across time periods, sensitivity to data distribution drift, and high dependence on large-scale labeled data. It provides a self-supervised cross-time period brainprint recognition method and system based on distillation learning.
[0008] In a first aspect, the present invention provides a self-supervised cross-temporal brainwave recognition method based on distillation learning, the method comprising:
[0009] A pre-training dataset and a fine-tuning dataset are constructed respectively; the pre-training dataset consists of EEG signals corresponding to unknown identity labels; the fine-tuning dataset consists of EEG signals corresponding to known identity labels.
[0010] Based on the time dimension of EEG signals, EEG signals are divided into global segments and local segments, and an EEG signal serializer is used to convert the global segments and local segments into global views and local views, respectively.
[0011] We constructed teacher and student networks with identical structures and pre-trained them using a pre-training dataset. During the pre-training process, we constructed a total loss to guide the parameter updates of the student network by using the results of the teacher network as input from a global view and the results of the student network as input from both global and local views.
[0012] A brainprint recognition model was built based on a pre-trained student network, and the model was trained using a fine-tuned dataset.
[0013] The trained brainprint recognition model is used to identify the tested EEG signals and obtain the identity information corresponding to the tested EEG signals.
[0014] Preferably, the EEG signal serializer includes a temporal feature embedding module, an EEG feature extraction and separation convolution module, an average pooling layer, and a random inactivation layer connected in sequence; the temporal feature embedding module includes a cascaded convolutional layer and a batch normalization layer; the EEG feature extraction and separation convolution module includes a depthwise separable convolutional layer, a batch normalization layer, and an activation function connected in sequence.
[0015] Preferably, both the teacher network and the student network include multiple cascaded rotational position encoders; in each rotational position encoder, a query vector is obtained by performing a linear transformation on the input feature X. Key vector Sum value vector ; for query vector and key vector Perform rotation position encoding to obtain the rotation matrix. and rotation matrix A multi-head attention mechanism is used to calculate the similarity between the query vector, key vector, and corresponding rotation matrix, resulting in attention weights. These attention weights are then applied to the value vector. Weighted summation is performed to obtain the output of single-head attention; the outputs of each attention head are concatenated along the feature dimension, and feature fusion is achieved through linear mapping to obtain the output features of the multi-head attention mechanism module; the output features of the multi-head attention mechanism module are fused with the input features, and the fusion result is processed sequentially by a feedforward neural network and a regularization block, and then added to the fusion result to obtain the output result of the rotation position encoder.
[0016] Preferably, the global view input to the student network during pre-training is a masked global view, which is obtained by performing random operations on the global view. Obtained by mask operation.
[0017] Preferably, the total loss includes global consistency loss, local representation consistency loss, and mask reconstruction loss; the global consistency loss is constructed based on the results extracted by the student network from the masked global view and the results extracted by the teacher network from the global view; the local representation consistency loss is constructed based on the results extracted by the student network from the local view and the results extracted by the teacher network from the global view; and the mask reconstruction loss is constructed based on the reconstructed features and the true features.
[0018] Preferably, the parameters of the teacher network are updated smoothly using an exponential moving average of the parameters of the student network.
[0019] Preferably, the time window of the global segment is more than half of the original signal time window; the EEG signal window of the local segment is half of the original signal time window. .
[0020] Secondly, this invention provides a self-supervised cross-temporal brainprint recognition system based on distillation learning, which is used to execute the aforementioned self-supervised cross-temporal brainprint recognition method. This self-supervised cross-temporal brainprint recognition system includes an EEG data acquisition module, a self-supervised online distillation learning module, a brainprint task fine-tuning module, and an identity classification decision module. The EEG data acquisition module is used to acquire raw EEG signals. The self-supervised online distillation learning module includes an EEG signal serializer, a teacher network, and a student network. The EEG signal serializer is used to convert EEG signals into sequential representations. The teacher network is used to guide the student network in training. The brainprint task fine-tuning module is used to construct a brainprint recognition model based on the student network and fine-tune the parameters of the brainprint recognition model. The identity classification decision module is used to use the brainprint recognition model to perform identity recognition on the tested EEG signals.
[0021] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes the self-supervised cross-time brainprint recognition method as described above.
[0022] Fourthly, the present invention provides a readable storage medium storing a computer program; when the computer program is executed by a processor, it is used to implement the above-described self-supervised cross-time period brainprint recognition method.
[0023] The beneficial effects of this invention are:
[0024] 1. This invention combines global and local views to assist the teacher network in training the student network, enabling the student network to learn global temporal consistency features while further perceiving fine-grained information contained in local temporal segments. At the same time, by combining global and local views with a mask modeling mechanism, the student network can learn to represent EEG signals from multiple perspectives, such as overall structure, local dynamics, and information reconstruction, thereby providing more robust and discriminative feature representations for subsequent cross-time period identity recognition tasks.
[0025] 2. The EEG signal serializer of this invention encodes EEG signals and, combined with rotational position encoding technology, accurately models the relative temporal structure of EEG signals, solving the high-dimensional problem of EEG signal temporal data and significantly enhancing the invariance and robustness of extracted brain pattern features to temporal variations.
[0026] 3. This invention updates the parameters of the teacher network using an exponential moving average method, providing the teacher network with a time-series smoothing optimization objective. This forces the student network to learn core brainprint features that remain unchanged under different data augmentations, thus demonstrating significantly higher long-term stability and accuracy than existing technologies in cross-time applications. At the same time, by centering and sharpening the output of the teacher network, the convergence and stability of the self-supervised training process are ensured, effectively avoiding model collapse and guaranteeing the high discriminative power of the self-supervised training features, resulting in superior performance of the model in downstream brainprint recognition tasks. Attached Figure Description
[0027] Figure 1 This is a system structure diagram of Embodiment 1 of the present invention.
[0028] Figure 2 This is an overall flowchart of Embodiment 2 of the present invention. Detailed Implementation
[0029] The present invention will be further described below with reference to the accompanying drawings.
[0030] Example 1
[0031] like Figure 1 As shown, a self-supervised cross-time periodic brainprint recognition system based on distillation learning includes an EEG data acquisition module, an EEG data preprocessing module, a self-supervised online distillation learning module, a brainprint task fine-tuning module, an identity classification decision module, and an identity label result visualization module. The EEG data acquisition module is used to acquire the user's raw EEG signals in real time from the EEG acquisition device. Its main function is to synchronously sample multi-channel EEG data to ensure signal integrity and temporal consistency. This module can acquire high-quality physiological signal data, providing a foundation for subsequent feature extraction and analysis.
[0032] The EEG data preprocessing module performs noise filtering, artifact removal, and normalization on the acquired EEG signals to improve signal usability and stability. Through common filtering algorithms and artifact detection strategies, environmental interference and electrode noise can be effectively eliminated, resulting in clean and stable EEG waveform data.
[0033] The self-supervised online distillation learning module includes an EEG signal sequencer and a teacher network. and student network Among them, the system responsible for processing the raw multi-channel temporal EEG signals... Transform into an abstract sequence representation Both teacher and student networks consist of multiple layers. The network consists of layers, and each layer integrates rotational position coding. This encoding mechanism is in Relative positional information is embedded in the self-attention computation, thereby enhancing the model's ability to model the temporal sequence of EEG signals. (Teacher Network) The parameters are only available through the student network. The parameters are updated using an exponential moving average (EMA) to ensure a more stable and smoother pseudo-label learning target than a single iteration. Furthermore, the teacher network's output is processed through a centering and sharpening layer to prevent model collapse and generate a high-confidence target probability distribution. Its core objective is to maintain stable recognition performance even when the signal is time-varying or there are inter-individual differences.
[0034] The brainprint task fine-tuning module is used to fine-tune all or part of the parameters of the brainprint feature extractor using labeled cross-time EEG data to further optimize the feature's ability to distinguish specific identities, thereby achieving high-precision user registration, template construction, and cross-time identity authentication.
[0035] The identity classification decision module is used to identify and classify individuals based on their identity information. This module integrates a multi-layer neural network, which performs attention-based decision calculations on input features and outputs corresponding identity category labels. The module can automatically adjust the discrimination threshold based on EEG signals under different time periods or task conditions, thereby achieving robust and accurate identity recognition and classification decisions.
[0036] The identity labeling results visualization module is used to graphically display the recognition results output by the identity classification decision module. By presenting identity labels, classification confidence scores, and the model's discrimination process in a visual interface, the system helps users intuitively understand the reliability of the recognition results and model output. Through this module, users can easily monitor the system's recognition accuracy, recognition stability, and the distribution of differences between different samples.
[0037] Example 2
[0038] like Figure 2 As shown, a self-supervised cross-temporal brainprint recognition method based on distillation learning is used, employing the self-supervised cross-temporal brainprint recognition system in Example 1; this self-supervised cross-temporal brainprint recognition method includes the following steps:
[0039] Step S1: Construct the dataset
[0040] Electrodes are placed on the scalp of subjects using specialized equipment to non-invasively collect raw electroencephalogram (EEG) signals from different subjects at different times, ensuring data diversity and representativeness. The raw EEG signals are then filtered, and the specific process is as follows:
[0041] A bandpass filter was applied to the raw EEG signal to retain the physiologically valid signal in the 1Hz–40Hz range, removing baseline drift and high-frequency noise. This process ensured that only frequency components directly related to brain activity were preserved. Simultaneously, a notch filter was used to precisely remove 50Hz or 60Hz power frequency interference, reducing environmental electromagnetic interference and significantly improving the quality of the EEG signal.
[0042] The filtered EEG signal was segmented into fixed time lengths. Data samples ;in, This refers to the number of channels. For example, at a sampling rate of 200Hz, a 10-second signal corresponds to... This segmentation approach provides the foundation for subsequent feature extraction. A dataset is constructed based on the segmented data samples and divided into a pre-training dataset, a fine-tuning dataset, and a test dataset according to the order of data sample collection. The pre-training dataset consists of data samples with corresponding unknown identity labels and serves as the training set for self-supervised pre-training. The fine-tuning dataset consists of data samples with corresponding identity labels and is used to further optimize model parameters. During the fine-tuning stage, the model parameters are adjusted specifically for the downstream task of brainprint recognition. The test dataset is used to evaluate the model's recognition performance. This segmentation strategy not only considers the model's generalization ability but also takes into account the needs of practical applications.
[0043] Step S2: Generate View
[0044] The data samples are randomly divided into global segments along the time dimension. and local fragments Global fragment For a complete EEG signal window or a large proportion (e.g.) Random temporal pruning is used to capture complete brainwave patterns with cross-channel and long temporal dependencies, resisting large temporal drift. Local fragments For a smaller proportion (e.g.) Random pruning is used to force the model to focus on local temporal features and high-frequency details, ensuring the discriminative power of the features.
[0045] Use an EEG signal serializer to separate global segments from the dataset. and local fragments Convert to The abstract token required by the model ( )sequence global view and partial view ;in, The sequence length; The feature dimension is defined by the structure of the EEG signal serializer, which is specifically designed for the spatiotemporal characteristics of EEG signals. It comprises a temporal feature embedding module, an EEG feature extraction and separation convolutional module, an average pooling layer, and a dropout layer, all connected in sequence. The temporal feature embedding module includes cascaded two-dimensional convolutional layers and batch normalization layers. The two-dimensional convolutional layers extract short-term temporal features from the data samples, and the batch normalization layers stabilize the extracted features. This process is mathematically expressed as:
[0046]
[0047] in, This is the output of the temporal feature embedding module; This indicates batch normalization layer processing; Represents a two-dimensional convolutional layer; The length of the convolution kernel in the time dimension (e.g.) ).
[0048] The EEG feature extraction separable convolutional module consists of sequentially connected depthwise separable convolutional layers, batch normalization layers, and ELU (Exponential Linear Unit) activation functions. The depthwise separable convolutional layers are used to extract input features and learn along the channel dimension. Spatial characteristics between leads, and project them into a higher dimension. This operation decouples and abstracts temporal and channel features. Nonlinearity is then introduced through a batch normalization layer and the ELU activation function.
[0049] In this embodiment, the kernel size of the depth-separable convolutional layer is .
[0050] The average pooling layer downsamples the time dimension (e.g., by a factor of 4), thereby compressing the time dimension. Length of sequence Finally, the convolutional feature map is flattened to obtain... sequence ,in for length, for Embedded dimension.
[0051] Step S3: Construct teacher and student networks
[0052] Teacher Network and student network They have the same structure, both consisting of multiple rotary position encoders connected in series. In the rotary position encoder, a query vector is obtained by performing a linear transformation on the input feature X. Key vector Sum value vector For query vectors and key vector Perform rotation position encoding to obtain the rotation matrix. and rotation matrix It is represented as:
[0053]
[0054]
[0055] in, This represents the angular frequency corresponding to the nth dimension in the rotation position encoding, used to perform rotation transformation on each pair of even-odd dimensions of the query vector and key vector; These represent the position indices of the query vector and the key vector in the sequence, respectively. For input Sequence length.
[0056] After introducing rotational positional encoding, a multi-head attention mechanism is used to model the similarity between the rotated query vector and the key vector. The attention weights between position indices A and B are... It is calculated using scaled dot product attention, and its expression is:
[0057]
[0058] in, and Positions in the sequence and The query vector and key vector at the location; The feature dimension of a single attention head.
[0059] Based on the obtained attention weights, the value vector Perform weighted summation to obtain the output of single-head attention. It is represented as:
[0060]
[0061] To enhance the model's ability to model in different representation subspaces, the multi-head attention mechanism executes the above computation process in parallel across multiple attention heads. The outputs of each attention head are concatenated along the feature dimension, and feature fusion is achieved through linear mapping to obtain the output features of the multi-head attention mechanism module. It is represented as:
[0062]
[0063] in, This is the output of the h-th attention head; To output the projection matrix; ; The quantity of; This indicates a splicing operation.
[0064] By using multi-head attention splicing, the model is able to capture the correlation patterns of EEG signals at different temporal locations in parallel from multiple subspaces.
[0065] The output features of the multi-head attention mechanism module Add the intermediate features to the input features X to obtain the intermediate features. To enhance gradient propagation and stabilize model training, the computational process is as follows:
[0066]
[0067] intermediate features The input is fed into a feedforward neural network for nonlinear transformation. The feedforward neural network consists of two linear mapping layers and an intermediate nonlinear activation function, and its computational form is as follows:
[0068]
[0069] in, These are the output features of the feedforward neural network; Represents a nonlinear activation function; This is the weight matrix of the feedforward neural network; This is the bias term for the feedforward neural network.
[0070] The output features of the feedforward neural network With intermediate features Adding them together, we obtain the output Y of the rotary position encoder, which is expressed as:
[0071]
[0072] Through the above-described joint modeling process of multi-head attention and feedforward neural network based on rotational position encoding, the model can effectively capture the local and global dependencies of EEG signals in the temporal dimension while maintaining the continuity of relative position information, providing a more robust representational basis for subsequent brain pattern feature modeling and recognition tasks.
[0073] Step S4: Online pre-training for students
[0074] Using local views from the pre-trained dataset and the masked global view For student networks Training was conducted to enhance its ability to model the multi-layered structure of EEG signals. (Partial view) Used to highlight the dynamic changes of EEG signals on a short timescale; a masked global view. By performing random on the global view Masking operations (For example This is used to guide the model in reconstructing the overall structural features of EEG signals under conditions of missing information. Using a global view... For teacher networks Training is conducted to extract global feature representations with temporal consistency, thus providing a stable target reference for the student network's learning process. Through the aforementioned multi-scale view input design, the student network, while learning global temporal consistency features, can further perceive fine-grained information contained in local temporal segments. Combining global views, local views, and masking modeling mechanisms enables the model to learn representations of EEG signals from multiple perspectives, including overall structure, local dynamics, and information reconstruction, thereby providing more robust and discriminative feature representations for subsequent cross-temporal identity recognition tasks.
[0075] Teacher Network Output After the projection head Mapping to a low-dimensional feature space. To avoid model collapse, the output... Centering and sharpening are performed sequentially. Centering is achieved by subtracting the dynamically updated center vector. To eliminate batch deviation, center vector The update formula is:
[0076]
[0077] in, This is the updated center vector; Batch size; The momentum coefficient of the center vector. ).
[0078] Sharpening is achieved by using a lower teacher temperature coefficient. application The function that makes the target probability distribution of the teacher network output... More targeted, providing students with high-confidence learning objectives for their online learning, represented as follows:
[0079]
[0080] in, Set to a low value (e.g.) ).
[0081] During training, construct the total loss. The parameter updates of the student network are guided; the total loss includes global consistency loss, local representation consistency loss, and mask reconstruction loss; student network The core optimization objective is its equipped distillation projection head. (Mapping features extracted by the network to a high-dimensional space) and mask prediction projection head (Feature reconstruction from the original signal) Jointly driven, aiming to achieve a balance between feature robustness and detail discriminativeness through a weighted balance of three loss methods. Total loss Represented as:
[0082]
[0083] in, This results in a loss of global consistency. This represents the loss of local characterization consistency. Loss due to mask reconstruction; and This is a hyperparameter.
[0084] Global consistency loss Responsible for handling the time-shifting problem, it minimizes the student network from the masked global view. The predicted distribution extracted from , with the teacher network from a global view The sharpening target obtained in Between Divergence. Divergence is used here as an asymmetric distance metric for penalty purposes. Deviation from stable target The degree to which it drives Approaching This loss directly forces the model to resist perturbations introduced by data masking and augmentation, ensuring that features are highly robust to cross-time variations and missing local information. Its formula is expressed as:
[0085]
[0086] in, The teacher model is represented in the first... The sample, the first Probability distribution values for each pseudo-label category; The global branch of the student model is in the first... The sample, the first Predicted probability values for each pseudo-label category; express Divergence.
[0087] To enhance the multi-scale consistency of features, a local representation consistency loss is introduced. This loss also uses Divergence, minimizing the student network from a local view The predicted distribution extracted from , with the overall goals provided by the teacher network The difference lies in the fact that this loss requires the model's local detail features to be semantically aligned with low-frequency, stable, globally invariant features, effectively transferring cross-temporal robustness to the model's local feature encoding ability and improving the feature generalization ability; it is expressed as:
[0088]
[0089] in, For the local branch of the student model in the th The sample, the first Predicted probability values for each pseudo-label category.
[0090] Mask reconstruction loss Intended to learn The underlying structural details of the signal. This loss utilizes mask prediction projection head. The student network was masked. The generated features Mapping back to the original EEG signal features and only at the masked location The mean square error is calculated above. By forcing the model to accurately reconstruct signal features from contextual information, this loss significantly improves the Transformer encoder's understanding of the local temporal continuity and interchannel dependencies of EEG signals. Its formula is as follows:
[0091]
[0092] in, For student network to the first The token corresponding to each masked position is projected by the mask prediction head. Representation of the features of the reconstructed electroencephalogram (EEG) signals; For the first The true characteristics of the original EEG signal corresponding to the masked location.
[0093] Teacher Network parameters It does not participate in gradient backpropagation, but instead uses the student network. parameters The exponential moving average is updated smoothly to ensure... It exhibits stability, provides robust pseudo-label targets, and serves as a teacher network. Updated parameters for:
[0094]
[0095] in, This is the momentum coefficient.
[0096] In this embodiment, the momentum coefficient The initial value is 0.996, and a cosine annealing strategy is used based on the number of training steps. Dynamic adjustment so that the momentum coefficient at the end of training Approaching 1.
[0097] Step S5: Downstream brain texture task fine-tuning and adaptation
[0098] After the self-supervised process is completed, the core robust brainprint feature extractor (i.e., student network) This feature extractor has been endowed with strong feature representation capabilities that resist cross-time-period drift. In order to apply this general robust feature to the user identification task, this invention adopts a full-parameter fine-tuning strategy, using a fine-tuning dataset to adapt and optimize the entire feature extractor.
[0099] S5-1: Initialization of Feature Extractor and Classification Head
[0100] At the start of fine-tuning, discard all projection heads used in the pre-training phase. And the teacher network f_t. The student network is retained. As the feature extractor after initialization At its output, connect a brand new, randomly initialized lightweight classification head. (Usually composed of one to three linear layers) constitute a brainprint recognition model, which is used to map the extracted brainprint features to a specific identity label space.
[0101] S5-2: Full parameter fine-tuning
[0102] The brainprint recognition model was trained end-to-end using a fine-tuned dataset. This means that the feature extractor... All parameters And new category head All parameters All parameters participate in gradient backpropagation and update. The fine-tuning process typically employs standard cross-entropy loss. As the optimization objective, it is expressed as:
[0103]
[0104] in, Here, K represents the real identity label of sample i; K represents the total number of subjects. This represents the predicted probability of the brainprint recognition model.
[0105] Through this process, the feature extractor While preserving its robustness against time-varying shifts, the feature's discriminative power for specific identities has been further optimized.
[0106] S5-3: Performance Testing and Identity Authentication
[0107] After fine-tuning, the generalization ability and final recognition accuracy of the brainprint recognition model were evaluated using an independent test dataset.
[0108] Step S6: Use the trained brainprint recognition model to identify the tested EEG signal and obtain the identity information corresponding to the tested EEG signal, thus completing the brainprint recognition process.
[0109] Step S7: Method Evaluation
[0110] This invention was experimentally tested against other existing methods on a publicly available cross-time dataset. This dataset aggregates data from 54 participants across two independent time periods, covering three different brain-computer interface (BCI) tasks. These tasks include motor imagery, event-related potentials (ERPs), and steady-state visual evoked potentials (SVPs), encompassing classic BCI research paradigms. The dataset not only records participants' EEG signals during specific BCI tasks but also includes their resting states before and after the tasks, as well as various physiological and psychological factors that may affect BCI performance. Based on a cross-time period research approach, this invention uses EEG data from the same subject at different time periods as both training and test sets. Pre-training was performed using unlabeled training data, followed by fine-tuning with identity labels. Finally, testing was conducted on an independent test set. The comparison results with other existing methods are shown in Table 1.
[0111] Table 1. Results of cross-time period brainprint identity recognition
[0112]
[0113] As shown in Table 1, under different sample lengths, the method of this invention achieved optimal or significantly better performance than the comparative methods in the brainprint cross-time period identity recognition task. As the sample length increased from 1s to 4s, the recognition accuracy of each method generally showed an upward trend, while the error rate gradually decreased, indicating that a longer time window can provide more sufficient discriminative information. However, under the same sample length, the method of this invention significantly outperformed existing methods such as EEGNet, SSVEPFormer, BrainNet, and DeepConvNet in both recognition accuracy and error rate, demonstrating stronger cross-time period generalization ability.
[0114] The above results demonstrate that the cross-time period brainprint recognition method proposed in this invention can effectively alleviate the problem of inconsistent EEG signal distribution among the same subject collected at different time periods. By combining label-free pre-training with identity label fine-tuning, it fully exploits the discriminative features in EEG signals that possess temporal stability and individual uniqueness, thereby maintaining high recognition accuracy and low false recognition rate across different task paradigms and time scales. This verifies the effectiveness and robustness of the method in practical cross-time period brain-computer interface identity recognition applications.
Claims
1. A self-supervised cross-temporal brainprint recognition method based on distillation learning, characterized in that: The method includes: A pre-training dataset and a fine-tuning dataset are constructed respectively; the pre-training dataset consists of EEG signals corresponding to unknown identity labels; the fine-tuning dataset consists of EEG signals corresponding to known identity labels. Based on the time dimension of EEG signals, EEG signals are divided into global segments and local segments, and an EEG signal serializer is used to convert the global segments and local segments into global views and local views, respectively. We constructed teacher and student networks with identical structures and pre-trained them using a pre-training dataset. During the pre-training process, we constructed a total loss to guide the parameter updates of the student network by using the results of the teacher network as input from a global view and the results of the student network as input from both global and local views. A brainprint recognition model was built based on a pre-trained student network, and the model was trained using a fine-tuned dataset. The trained brainprint recognition model is used to identify the tested EEG signals and obtain the identity information corresponding to the tested EEG signals.
2. The self-supervised cross-temporal brainprint recognition method based on distillation learning according to claim 1, characterized in that: The EEG signal serializer includes a temporal feature embedding module, an EEG feature extraction and separation convolution module, an average pooling layer, and a random inactivation layer connected in sequence; the temporal feature embedding module includes a cascaded convolutional layer and a batch normalization layer; the EEG feature extraction and separation convolution module includes a depthwise separable convolutional layer, a batch normalization layer, and an activation function connected in sequence.
3. The self-supervised cross-temporal brainprint recognition method based on distillation learning according to claim 1, characterized in that: Both the teacher network and the student network include multiple cascaded rotational position encoders; in each rotational position encoder, a query vector is obtained by performing a linear transformation on the input feature X. Key vector Sum value vector ; for query vector and key vector Perform rotation position encoding to obtain the rotation matrix. and rotation matrix ; A multi-head attention mechanism is used to calculate the similarity between the query vector, the key vector, and the corresponding rotation matrix to obtain the attention weights. Use attention weights on the value vector We perform weighted summation to obtain the output of a single-head attention; we then concatenate the outputs of each attention head along the feature dimension and achieve feature fusion through linear mapping to obtain the output features of the multi-head attention mechanism module. The output features and input features of the multi-head attention mechanism module are fused together, and the fusion result is processed sequentially by a feedforward neural network and a regularization block, and then added to the fusion result to obtain the output result of the rotation position encoder.
4. The self-supervised cross-temporal brainprint recognition method based on distillation learning according to claim 1, characterized in that: The global view input to the student network during pre-training is a masked global view, which is obtained by performing random operations on the global view. Obtained by mask operation.
5. The self-supervised cross-temporal brainprint recognition method based on distillation learning according to claim 4, characterized in that: The total loss includes global consistency loss, local representation consistency loss, and mask reconstruction loss; the global consistency loss is constructed based on the results extracted by the student network from the masked global view and the results extracted by the teacher network from the global view; the local representation consistency loss is constructed based on the results extracted by the student network from the local view and the results extracted by the teacher network from the global view; the mask reconstruction loss is constructed based on the reconstructed features and the true features.
6. The self-supervised cross-temporal brainprint recognition method based on distillation learning according to claim 1, characterized in that: The parameters of the teacher network are updated smoothly using an exponential moving average of the parameters of the student network.
7. The self-supervised cross-temporal brainprint recognition method based on distillation learning according to claim 1, characterized in that: The time window of the global segment is more than half of the original signal time window; the EEG signal window of the local segment is half of the original signal time window. .
8. A self-supervised cross-temporal brainprint recognition system based on distillation learning, characterized in that: This system is used to execute a self-supervised cross-temporal brainprint recognition method based on distillation learning as described in claim 1. The self-supervised cross-temporal brainprint recognition system includes an EEG data acquisition module, a self-supervised online distillation learning module, a brainprint task fine-tuning module, and an identity classification decision module. The EEG data acquisition module is used to acquire raw EEG signals. The self-supervised online distillation learning module includes an EEG signal serializer, a teacher network, and a student network. The EEG signal serializer is used to convert EEG signals into sequential representations. The teacher network is used to guide the student network in training; the brainprint task fine-tuning module is used to construct a brainprint recognition model based on the student network and fine-tune the parameters of the brainprint recognition model; the identity classification decision module is used to use the brainprint recognition model to identify the identity of the tested EEG signal.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The memory stores a computer program; the processor executes the self-supervised cross-time brainprint recognition method as described in any one of claims 1-7.
10. A readable storage medium storing a computer program; characterized in that: When the computer program is executed by the processor, it is used to implement the self-supervised cross-time brainprint recognition method as described in any one of claims 1-7.