Adaptive selection method and system for cross-subject source domain transfer learning

CN122925936APending Publication Date: 2026-10-16TONGJI HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611113927.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]本申请实施例提供了一种跨被试源域迁移学习自适应选择方法及系统,能够解决由于不同个体之间的神经生理信号存在显著异质性,导致的在一个被试上训练的分类模型难以直接迁移至其他被试的问题

Benefits of technology

[0008]In summary, the adaptive selection method for cross-subject source domain transfer learning provided in this application first uses distribution distance to measure the transferability between candidates for the source domain and the target domain. Then, it uses classification performance metrics to measure the class discrimination information contained in the brain signals of the candidate source domains. A trust score is used to collaboratively evaluate these two aspects, determining the initial source domain subjects from multiple candidate source domain subjects. After the initial selection, this scheme does not directly put the initially selected source domain subjects into transfer learning. Instead, it determines an adaptive distance threshold based on the local density of the target domain subjects, and then uses this adaptive distance threshold to verify whether the distribution difference between the initially selected source domain subjects and the target domain subjects is within an acceptable range for the target domain. Only when the distribution distance corresponding to the initially selected source domain subject does not exceed the adaptive distance threshold is it determined as a target source domain subject. Therefore, this scheme actually forms two levels of source domain selection criteria: the trust score is used for comprehensive ranking among multiple candidate source domain subjects, and the adaptive distance threshold is used to determine whether the top-ranked candidate source domain subjects are truly suitable for the target domain subject based on the distribution characteristics of the target domain subjects themselves. The two levels address the relative optimization problem among candidate source domains and the adaptation verification problem of the initial selection results relative to the target domain, respectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925936A_ABST
    Figure CN122925936A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a cross-subject source domain transfer learning adaptive selection method and system, which can solve the problem that a classification model trained on one subject is difficult to be directly transferred to other subjects due to significant heterogeneity between the neurophysiological signals of different individuals. The method comprises the following steps: obtaining a target domain feature distribution of a target domain brain signal sample and a plurality of candidate source domain feature distributions of candidate source domain brain signal samples; determining a distribution distance between the candidate source domain feature distributions and the target domain feature distribution, and combining a classification performance index corresponding to each candidate source domain subject to determine a pre-selected source domain subject; comparing the distribution distance with an adaptive distance threshold value determined according to the local density of the target domain subject, and in the case that the distribution distance does not exceed the adaptive distance threshold value, determining the pre-selected source domain subject as a target source domain subject, so as to use the corresponding candidate source domain brain signal sample to perform transfer learning on a brain signal classification model corresponding to the target domain subject.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of brain-computer interface transfer learning technology, and in particular to an adaptive selection method and system for cross-subject source domain transfer learning. Background Technology

[0002] Brain-computer interface (BCI) technology enables direct communication between the human brain and external devices by analyzing brain neural signals, and it holds significant application potential in fields such as neurorehabilitation and assistive medicine. BCI systems based on motor imagery can assist patients with neurological injuries such as stroke and cerebral hemorrhage in motor function rehabilitation training. However, significant heterogeneity in neurophysiological signals exists between different individuals, making it difficult to directly transfer classification models trained on one subject to other subjects—a problem known as cross-subject transfer learning. Summary of the Invention

[0003] This application provides a cross-subject source domain transfer learning adaptive selection method and system, which can solve the problem that classification models trained on one subject are difficult to directly transfer to other subjects due to the significant heterogeneity of neurophysiological signals between different individuals.

[0004] The first aspect of this application provides an adaptive selection method for cross-subject source domain transfer learning, including: Obtain target domain brain signal samples from target domain subjects and candidate source domain brain signal samples from multiple candidate source domain subjects respectively. Extract features from the target domain brain signal samples and the candidate source domain brain signal samples to obtain target domain feature distribution and multiple candidate source domain feature distribution. For each candidate source domain subject, determine the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution; Classification verification was performed using labeled brain signal samples corresponding to the subjects of each candidate source domain, and classification performance indicators corresponding to the subjects of each candidate source domain were obtained. Based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject, a trust score is determined for each candidate source domain subject to determine the initial source domain subjects, wherein the trust score is positively correlated with the classification performance index and negatively correlated with the distribution distance statistic; The distribution distance corresponding to the initially selected source domain subject is compared with an adaptive distance threshold determined based on the local density of the target domain subject. If the distribution distance does not exceed the adaptive distance threshold, the initially selected source domain subject is determined as the target source domain subject, so as to use the candidate source domain brain signal samples corresponding to the target source domain subject to perform transfer learning on the brain signal classification model corresponding to the target domain subject.

[0005] A second aspect of this application provides an adaptive selection apparatus for cross-subject source domain transfer learning, comprising: The acquisition unit is used to acquire target domain brain signal samples of target domain subjects and candidate source domain brain signal samples of multiple candidate source domain subjects, and to perform feature extraction on the target domain brain signal samples and the candidate source domain brain signal samples to obtain target domain feature distribution and multiple candidate source domain feature distribution. Analysis unit, used for: For each candidate source domain subject, determine the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution; Classification verification was performed using labeled brain signal samples corresponding to the subjects of each candidate source domain, and classification performance indicators corresponding to the subjects of each candidate source domain were obtained. Based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject, a trust score is determined for each candidate source domain subject to determine the initial source domain subjects, wherein the trust score is positively correlated with the classification performance index and negatively correlated with the distribution distance statistic; The execution unit is configured to compare the distribution distance corresponding to the initially selected source domain subject with an adaptive distance threshold determined based on the local density of the target domain subject. If the distribution distance does not exceed the adaptive distance threshold, the initially selected source domain subject is determined as the target source domain subject, so as to use the candidate source domain brain signal samples corresponding to the target source domain subject to perform transfer learning on the brain signal classification model corresponding to the target domain subject.

[0006] A third aspect of this application provides an electronic system including a memory and a processor, wherein the processor is used to execute a computer program stored in the memory to implement the steps of the above-described adaptive selection method for cross-subject source domain transfer learning.

[0007] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described adaptive selection method for cross-subject source domain transfer learning.

[0008] In summary, the adaptive selection method for cross-subject source domain transfer learning provided in this application first uses distribution distance to measure the transferability between candidates for the source domain and the target domain. Then, it uses classification performance metrics to measure the class discrimination information contained in the brain signals of the candidate source domains. A trust score is used to collaboratively evaluate these two aspects, determining the initial source domain subjects from multiple candidate source domain subjects. After the initial selection, this scheme does not directly put the initially selected source domain subjects into transfer learning. Instead, it determines an adaptive distance threshold based on the local density of the target domain subjects, and then uses this adaptive distance threshold to verify whether the distribution difference between the initially selected source domain subjects and the target domain subjects is within an acceptable range for the target domain. Only when the distribution distance corresponding to the initially selected source domain subject does not exceed the adaptive distance threshold is it determined as a target source domain subject. Therefore, this scheme actually forms two levels of source domain selection criteria: the trust score is used for comprehensive ranking among multiple candidate source domain subjects, and the adaptive distance threshold is used to determine whether the top-ranked candidate source domain subjects are truly suitable for the target domain subject based on the distribution characteristics of the target domain subjects themselves. The two levels address the relative optimization problem among candidate source domains and the adaptation verification problem of the initial selection results relative to the target domain, respectively.

[0009] Accordingly, the cross-subject source domain transfer learning adaptive selection device, electronic system, and computer-readable storage medium provided in the embodiments of the present invention also have the above-mentioned technical effects. Attached Figure Description

[0010] Figure 1 A flowchart illustrating a possible cross-subject source domain transfer learning adaptive selection method provided in this application embodiment; Figure 2 A heatmap of cross-subject trust score matrix provided in an embodiment of this application; Figure 3 A comparison chart of classification accuracy and source domain selection stability between adaptive distance threshold and fixed threshold is provided for embodiments of this application; Figure 4 A schematic structural block diagram of a possible cross-subject source domain transfer learning adaptive selection device provided in this application embodiment; Figure 5 A schematic diagram of the hardware structure of a possible cross-subject source domain transfer learning adaptive selection device provided in this application embodiment; Figure 6 A schematic structural block diagram of a possible electronic system provided for embodiments of this application; Figure 7 This is a schematic structural block diagram of a possible computer-readable storage medium provided for embodiments of this application. Detailed Implementation

[0011] This application provides a cross-subject source domain transfer learning adaptive selection method and system, which can solve the problem that classification models trained on one subject are difficult to directly transfer to other subjects due to the significant heterogeneity of neurophysiological signals between different individuals.

[0012] Existing cross-subject transfer learning methods mainly employ domain adaptation techniques, such as Maximum Mean Difference (MMD) and Correlation Alignment (CORAL), to directly align the feature distributions of the source and target domains. However, these methods have the following shortcomings: First, source domain selection lacks objective quantitative standards, typically employing random selection or selecting all available source domains without considering the degree of distributional differences between subjects in different source domains and those in the target domain. Second, traditional methods share the same source domain across all modalities, ignoring the differences caused by the heterogeneity of signal features across different modalities. For example, EEG signals and fNIRS signals have fundamental differences in their time-frequency characteristics, meaning the same subject may not necessarily have the optimal source domain for both modalities. Third, existing methods usually use fixed thresholds for source domain selection, but the data distribution density of subjects in different target domains varies significantly, making it difficult for fixed thresholds to adapt to individual differences. Fourth, source domain selection is usually determined all at once during the initial training phase, failing to respond to dynamic changes in the feature space during training.

[0013] To resolve the above issues, please refer to [link / reference]. Figure 1 The flowchart of an adaptive selection method for cross-subject source domain transfer learning provided in this application embodiment may specifically include: S110-S150.

[0014] S110, acquire target domain brain signal samples of the target domain subject and candidate source domain brain signal samples of each of the multiple candidate source domain subjects, extract features from the target domain brain signal samples and the candidate source domain brain signal samples to obtain target domain feature distribution and multiple candidate source domain feature distribution.

[0015] S120, for each candidate source domain subject, determine the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution.

[0016] S130, use the labeled brain signal samples corresponding to the subjects of each candidate source domain to perform classification verification and obtain the classification performance index corresponding to each subject of each candidate source domain.

[0017] S140, based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject, determine the trust score corresponding to each candidate source domain subject to determine the initial source domain subjects, wherein the trust score is positively correlated with the classification performance index and negatively correlated with the distribution distance statistic.

[0018] S150, compare the distribution distance corresponding to the initially selected source domain subject with the adaptive distance threshold determined based on the local density of the target domain subject. If the distribution distance does not exceed the adaptive distance threshold, determine the initially selected source domain subject as the target source domain subject, so as to use the candidate source domain brain signal samples corresponding to the target source domain subject to perform transfer learning on the brain signal classification model corresponding to the target domain subject.

[0019] Understandably, the core challenge of cross-subject transfer learning lies in the potential differences in neurophysiological states, pathological conditions, signal acquisition conditions, and motor imagery habits among different subjects. Even when different subjects perform the same brain-computer interface task, their brain signals may differ significantly in amplitude range, temporal variations, frequency domain energy, spatial distribution, and the separability between different categories. Therefore, not just any subject's brain signal sample is suitable as transfer learning data for the target domain subject. If the source domain is selected solely based on the candidate source domain subject's own classification accuracy, a candidate source domain subject with good classification performance but a significantly different distribution from the target domain subject might be chosen. The classification boundary formed by this candidate source domain subject may not be applicable to the target domain subject, potentially leading to negative transfer. If the source domain is selected solely based on the distribution distance between the candidate source domain subject and the target domain subject, a candidate source domain subject that is relatively close to the target domain subject but has weaker class discrimination ability in their own brain signals might be selected. For example, the left-hand and right-hand motor imagery signals of the subjects in this candidate source domain are highly overlapping. Even if their overall signal distribution is similar to that of the target domain, it is difficult to provide effective category discrimination knowledge for brain signal classification models.

[0020] For example, brain signal samples generated when subjects in the target domain perform a preset brain-computer interface task can be acquired first, and brain signal samples generated when multiple subjects perform the same or corresponding tasks can also be acquired. The target domain subjects are those for whom a brain signal classification model needs to be established or adapted, while other subjects with available brain signal samples serve as candidate source domain subjects. Taking motor imagery classification as an example, brain signals can be collected during the subjects' left-hand and right-hand motor imagery tasks according to instructions. Each motor imagery task can form one brain signal trial, or multiple brain signal samples can be divided from a continuous acquisition interval. For EEG signals, features can be extracted from the time domain, frequency domain, time-frequency domain, or spatial domain. For example, energy in different frequency bands, covariance between multiple electrode channels, event-related desynchronization degree, or common spatial pattern features can be extracted. For functional near-infrared spectral signals, changes in oxyhemoglobin concentration, changes in deoxyhemoglobin concentration, response peaks, response slopes, or average response degree within a preset time interval can be extracted. During feature extraction, it is essential to ensure that the target domain brain signal samples and the candidate source domain brain signal samples use consistent feature definitions and dimensional order. For example, if the first dimension of a candidate source domain subject represents a specific frequency band energy of the central EEG channel, the first dimension of a target domain subject should also represent the same signal meaning. After feature extraction, multiple feature samples from the target domain subject collectively form the target domain feature distribution, and multiple feature samples from each candidate source domain subject collectively form the corresponding candidate source domain feature distribution.

[0021] For example, for each candidate source domain participant, the distribution of the candidate source domain features and the distribution of the target domain features can be input into a preset distribution distance calculation process to obtain the distribution distance corresponding to that candidate source domain participant. One specific approach is to use the Wasserstein distance. This distance can be understood as the minimum cost required to transfer the sample quality from the candidate source domain feature distribution to the target domain feature distribution. The closer the candidate source domain feature distribution is to the target domain feature distribution, the lower the cost required to complete the above transfer, and the smaller the resulting Wasserstein distance.

[0022] It can be represented as:

[0023] Where k represents the candidate source domain participant number, and t is used to indicate the target domain participant. This represents the distribution of candidate source domain features for the subject in the k-th candidate source domain. Represents the distribution of features in the target domain. The marginal distributions represent the joint distribution set of the candidate source domain feature distributions and the target domain feature distributions. and Let represent the feature samples in the two feature distributions respectively. γ represents a candidate joint distribution selected from the set of joint distributions, which can also be understood as a feature quality transfer relationship between the candidate source domain feature samples and the target domain feature samples. inf represents the lower bound of the expected distance value among all candidate joint distributions, i.e., finding the minimum cost required to transform the candidate source domain feature distribution into the target domain feature distribution. E represents the expectation under the joint distribution γ. In practice, the distribution distance between each candidate source domain participant and the target domain participant can be calculated separately. For example, when there are ten candidate source domain participants, the distribution distances from the ten candidate source domains to the target domain can be obtained. The distance values ​​of participants from different candidate source domains form the basis for subsequent normalization and comprehensive evaluation. When the numerical ranges of different feature dimensions differ significantly, the features can be uniformly scaled before calculating the distribution distance to avoid features with large numerical ranges having an inappropriate dominant effect on the distance results. This processing is used to ensure that the distribution distance truly reflects the overall differences of multidimensional features, rather than only reflecting a single feature with a large numerical range.

[0024] For example, for each candidate source domain subject, classification verification can be performed using its corresponding labeled brain signal samples. The labels in the labeled brain signal samples represent the task category corresponding to the sample, such as left-hand motor imagery, right-hand motor imagery, resting state, or other preset brain-computer interface task categories. In one implementation, cross-validation can be used to obtain classification performance indicators. First, the labeled brain signal samples of a candidate source domain subject are divided into multiple sample subsets; then, a subset of these subsets is selected to train a classifier, and the classifier is validated using the subsets not used for training; by rotating the validation sample subsets, each sample has a chance to be used for validation; finally, the classification accuracy of the candidate source domain subject is obtained based on the results of each validation. By processing each candidate source domain subject using the same classification verification process, multiple classification performance indicators under a unified evaluation scale can be obtained. For example, candidate source domain subject A has clear brain signal category boundaries, and its classification performance indicator is relatively high; candidate source domain subject B has more brain signal artifacts, or significant feature overlap between different motor imagery categories, and its classification performance indicator is relatively low. Classification performance metrics are not limited to training accuracy obtained from a single training run. Using independent validation samples or cross-validation results can reduce the inflated evaluations caused by the classification model memorizing training samples, allowing classification performance metrics to more accurately reflect the class discrimination ability of candidate source domain brain signals.

[0025] For example, let the classification performance index of the subject in the k-th candidate source domain be... The distributional distance between the candidate source domain participants and the target domain participants is It is possible to determine the distribution distances of all candidate source domain participants based on the distribution distances. Normalization is performed to obtain the distribution distance statistic. In one implementation, the trust score can be expressed as:

[0026] in, This represents the trust score of the subject in the k-th candidate source domain. This represents the normalized distribution distance statistic. Because... The distance statistic decreases as the distribution distance statistic increases; therefore, the smaller the distributional difference between candidates from the source domain and those from the target domain, the higher the corresponding distance fit rating. When a candidate from the same source domain corresponds to multiple distributional distances, a distributional distance statistic can be generated first. For example, the average distances across multiple trials can be calculated, or the distances between the candidate from the source domain and the multiple participants in the comparison can be summed and normalized. Regardless of the statistical method used, a larger statistic should indicate a more significant difference between the candidate from the source domain and those from the target domain, or between the participants in the comparison, thus maintaining the negative correlation between the trust score and the distribution distance statistic. After obtaining the trust scores of all candidates from the source domain, they can be sorted from highest to lowest, and the candidate from the source domain with the highest trust score can be selected as the initial source domain candidate. For example, candidate source domain participant A has a high classification performance index, but its distribution distance from the target domain participant is also large; candidate source domain participant B has a slightly lower classification performance than candidate source domain participant A, but its distribution distance from the target domain participant is significantly smaller; candidate source domain participant C has the smallest distribution distance from the target domain participant, but its classification performance is poor. After co-evaluation using trust scores, candidate source domain participant B is likely to obtain the highest trust score. This indicates that candidate source domain participant B has a more appropriate balance between the quality of classification knowledge and the degree of fit to the target domain, and is therefore identified as a preliminary source domain participant.

[0027] For example, local density can be estimated based on the nearest neighbor relationships between feature samples in the target domain feature distribution. For each feature sample in the target domain feature distribution, several nearest neighbor feature samples can be identified, and the average distance between the feature sample and these nearest neighbor feature samples can be calculated. Then, based on the average nearest neighbor distances corresponding to all target domain feature samples, a local density representation of the target domain subject can be formed.

[0028] It should be noted that when local density is represented by the average nearest neighbor distance, this value also reflects the local scale of the target domain feature distribution. A smaller average nearest neighbor distance indicates that the feature samples are more concentrated in the local area; a larger average nearest neighbor distance indicates that the feature samples are more dispersed in the local area.

[0029] The local density representation of the target domain subjects can be denoted as: The adaptive distance threshold is determined according to the following formula:

[0030] in, Indicates the adaptive distance threshold. This represents the adaptive coefficient used to adjust the stringency of the screening. When the target domain feature samples are relatively concentrated, the average nearest neighbor distance is small, resulting in a smaller adaptive distance threshold. In this case, only subjects from the initial source domain that are relatively close to the target domain subjects can pass the validation. When the target domain feature samples are relatively dispersed, the average nearest neighbor distance is large, and the adaptive distance threshold increases accordingly, allowing subjects from the initial source domain that are within the range of variation of the target domain to pass the validation. For example, target domain subject A's brain signal features are highly concentrated in multiple trials, and its local density representation corresponds to a small local scale. If a larger uniform threshold is used, candidate source domains that are significantly different from the target domain subject may be allowed to pass the validation. This scheme forms a stricter adaptive distance threshold based on its local density, which can reduce the possibility of unsuitable source domains being accepted. Target domain subject B may have a relatively dispersed distribution of feature samples due to changes in pathological state, low task performance stability, or large fluctuations in physiological signals. This scheme forms a relatively looser adaptive distance threshold based on its local density, which can avoid using an overly strict fixed threshold to exclude all candidate source domain subjects with transfer value.

[0031] For example, after obtaining the subjects for the initial source domain, the distribution distance corresponding to these subjects is read and compared with the adaptive distance threshold corresponding to the subjects for the target domain. If the distribution distance corresponding to the subjects for the initial source domain is less than or equal to the adaptive distance threshold, the verification result indicates that the distribution difference between the subjects for the initial source domain and the subjects for the target domain is within an acceptable range, and the subjects for the initial source domain are identified as subjects for the target source domain. For instance, in a group of candidate source domain subjects, subject A of the candidate source domain obtains the highest trust score. Further comparison reveals that the distribution distance between subject A of the candidate source domain and the subjects for the target domain does not exceed the adaptive distance threshold determined based on the local density of the target domain. In this case, it can be confirmed that subject A of the candidate source domain possesses both good classification performance and target domain fit, and therefore subject A of the candidate source domain is identified as a subject for the target source domain. As another example, the feature distribution of the subjects for the target domain is relatively concentrated, and its adaptive distance threshold is relatively strict. Although a subject for a certain candidate source domain obtains the highest trust score due to high classification performance, its distribution distance still exceeds this strict threshold. At this point, the candidate source domain participant cannot be identified as a target source domain participant based solely on the condition that the distribution distance does not exceed the adaptive distance threshold. This avoids masking the significant distributional differences between the candidate and the target domain participants simply because of higher classification performance.

[0032] For example, a brain signal classification model can be trained using brain signal samples from candidate source domains corresponding to the target source domain subjects, and then the classification model can be adapted based on the target domain brain signal samples. Alternatively, both target source domain brain signal samples and target domain brain signal samples can be used simultaneously during transfer learning, allowing the model to retain the class discrimination ability of the target source domain and reduce the difference between the feature distributions of the source and target domains. For instance, in a left-hand motor imagery and right-hand motor imagery classification task, an initial classification model can be trained using labeled brain signal samples from target source domain subjects, enabling the model to acquire the basic ability to distinguish between the two types of motor imagery signals. Subsequently, the model is adjusted using brain signal samples from target domain subjects, adapting the classification boundary to the brain signal features of the target domain subjects. Since the target source domain subjects have already undergone classification performance index evaluation, initial trust score selection, and adaptive distance threshold verification, their brain signal samples are more likely to contain both clear class information and distribution features suitable for target domain subjects compared to unscreened candidate source domain samples.

[0033] In summary, the above method first transforms the brain signals of multiple candidate source domain subjects and target domain subjects into feature distributions in a unified feature space, enabling quantitative analysis of differences between different subjects. Then, it uses distribution distance to evaluate the fit between candidate source domain subjects and target domain subjects, and uses classification performance indicators to evaluate the class discrimination ability contained in the candidate source domain brain signals. Based on this, it uses trust scores to collaboratively consider the classification value and transfer fit of candidate source domain subjects, determining the initial source domain subjects. Furthermore, it uses an adaptive distance threshold based on the local density of target domain subjects to verify the individual distribution characteristics of the initial source domain subjects. When the distribution distance corresponding to an initial source domain subject does not exceed this threshold, it is determined as a target source domain subject, and transfer learning is implemented using the corresponding brain signal samples. Thus, cross-subject source domain selection can be transformed into a quantitative process with clear computational basis, reducing the uncertainty caused by random selection, full use of candidate source domains, or reliance on human experience. It can simultaneously consider the class discrimination ability of candidate source domain brain signals and the distributional differences between candidate source domains and the target domain, avoiding one-sided selection caused by using classification performance indicators or distribution distance alone. It can adjust the source domain validation criteria based on the local density of the target domain subjects, making the distance threshold adaptable to the feature concentration and variation range of different target domain subjects, improving the adaptability of the source domain selection criteria to individual differences. After relatively optimal trust scores, it can continue to verify whether the subjects in the initially selected source domains meet the target domain fit conditions, preventing the direct use of a candidate source domain subject for transfer learning simply because it is relatively better in a group of overall unfit candidate source domains. It can reduce the interference of source domain data with excessively large distributional differences on the target domain brain signal classification model, reduce the possibility of negative transfer, and improve the adaptability of the transferred classification model to the brain signal features of the target domain subjects.

[0034] like Figure 2 and Figure 3 As shown, Figure 2 This includes the EEG modal trust score matrix on the left and the fNIRS modal trust score matrix on the right. The vertical axis represents the target domain participants, and the horizontal axis represents the candidate source domain participants. The element in the i-th row and j-th column of the matrix represents the participant's... As the target domain subject, with the subject The trust score obtained when a subject is selected as a candidate source domain. Figure 2 The diagonal elements in the table represent reference trust scores within the same subject, used to characterize the consistency of the subject's characteristic distribution; when performing cross-subject source domain selection, subjects who are the same as the target domain subjects are excluded from the candidate set. Figure 2 The left-hand EEG heatmap uses colors ranging from light yellow to dark red to represent trust scores, while the right-hand fNIRS heatmap uses colors ranging from light yellow to dark blue. The color scales on the right side of both heatmaps indicate a trust score range of approximately 0.2 to 1.0. Therefore, in the EEG heatmap, a color closer to dark red indicates a higher EEG trust score for the corresponding candidate source region; a color closer to light yellow indicates a lower EEG trust score for the corresponding candidate source region. Similarly, in the fNIRS heatmap, a color closer to dark blue indicates a higher near-infrared spectral trust score for the corresponding candidate source region; and a color closer to light yellow indicates a lower near-infrared spectral trust score for the corresponding candidate source region. Figure 2 It is evident that the candidate source domains with high trust scores differ for participants from different target domains. This indicates that source domain selection needs to be tailored to specific target domain participants, rather than pre-assigning a single source domain for all target domain participants. Furthermore, the trust score distributions for the same target domain participant differ between the EEG and fNIRS modalities. This suggests that the same candidate source domain participant may not be suitable for the target domain in both modalities; therefore, it is necessary to calculate the trust scores for each modality separately and select target source domain participants accordingly. Figure 3 As shown, the horizontal axis of the left subplot represents three distance threshold settings: a fixed threshold of 0.5; a fixed threshold of 0.7; and an adaptive threshold determined based on the distribution of target domain features. The vertical axis represents the average classification accuracy, in percentage. From the results annotated in the bar chart: with a fixed threshold of 0.5, the average classification accuracy is 62%; with a fixed threshold of 0.7, the average classification accuracy is 68%; and with the adaptive threshold, the average classification accuracy is 76%. Figure 3 The error bar above the left column indicates the range of classification accuracy fluctuations across multiple evaluation results for the corresponding threshold setting method. Figure 3The horizontal axis of the right subplot still represents the three distance threshold setting methods mentioned above, and the vertical axis represents the number of unstable source domain selection trials. When the fixed threshold is 0.5, the number of unstable source domain selection trials is 3; when the fixed threshold is 0.7, the number of unstable source domain selection trials is 2; and when the adaptive threshold is used, the number of unstable source domain selection trials is 0. Figure 3 In the diagram, the left subplot shows that the adaptive distance threshold can adjust the screening scale according to the distribution characteristics of the subjects in the target domain, making the subjects in the validated target source domain more suitable for the corresponding target domain, thereby achieving an average classification accuracy higher than that of the fixed threshold scheme shown in the diagram. The right subplot shows that the adaptive distance threshold can reduce the sensitivity of the source domain selection results to the fixed threshold boundary and changes in experimental data, making the source domain selection results more stable for subjects in the same target domain.

[0035] In one embodiment, determining the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution includes: Based on the complete trial features corresponding to the candidate source domain subjects and the target domain subjects, calculate the global Wasserstein distance between the feature distribution of the candidate source domain and the feature distribution of the target domain. The brain signals of the candidate source domain subjects and the target domain subjects are divided into multiple time windows, and the local Wasserstein distance is calculated based on the features within the corresponding time window. The global Wasserstein distance and the local Wasserstein distance are weighted and fused according to a preset fusion weight to obtain the distribution distance, wherein the distribution distance is expressed as: ; in, Indicates the distribution distance, Represents the global Wasserstein distance. Represents the local Wasserstein distance. The fusion weights are values ​​between 0.5 and 0.8.

[0036] For example, firstly, target domain brain signal samples are acquired from subjects performing preset brain-computer interface tasks. For instance, brain signals can be acquired when subjects perform left-hand motor imagery, right-hand motor imagery, or resting tasks. Each complete task trial can be considered as one brain signal sample, or multiple brain signal samples can be extracted from continuous signals according to preset time intervals. Simultaneously, candidate source domain brain signal samples corresponding to subjects from multiple candidate source domains are obtained from a historical database. These candidate source domain brain signal samples can carry explicit task category labels for subsequent classification performance verification. The same feature extraction method is used for both the target domain brain signal samples and each candidate source domain brain signal sample. For example, when the brain signal is an EEG signal, one or more of the following features can be extracted: power of different EEG channels within preset frequency bands; spectral energy within different task time intervals; covariance features between multiple EEG channels; spatial pattern features related to motor imagery; and temporal statistical features of EEG amplitude changes over time. When the brain signal is a functional near-infrared spectral signal, changes in oxyhemoglobin concentration, deoxyhemoglobin concentration, response peak, response slope, or average concentration change within the task time interval can be extracted. It should be ensured that the target domain participants and all candidate source domain participants use the same feature dimensions and feature arrangement order. For example, if the first dimension of the feature vector represents the power of a specific frequency band in the first EEG channel of the central region, then the first dimension of the feature vector should have the same meaning for all participants. After feature extraction, multiple feature samples from the target domain participants constitute the target domain feature distribution. Multiple feature samples from each candidate source domain participant constitute the candidate source domain feature distribution for that participant.

[0037] For example, during the calculation, the matching relationship between candidate source domain feature samples and target domain feature samples can be understood as a transfer relationship of feature sample quality. The minimum cost required to transfer the candidate source domain feature distribution to the target domain feature distribution is the Wasserstein distance between them. For each candidate source domain subject, a distribution distance calculation is performed once, thus obtaining the distribution distances corresponding to multiple candidate source domain subjects. If the sample sizes of candidate source domain subjects and target domain subjects are different, the samples can be converted into empirical distributions separately, and then the distance can be calculated between the empirical distributions. Different sample sizes do not necessarily hinder distribution comparison, because the comparison object is the feature distribution formed by each sample set, not requiring the two subjects to have exactly the same sample size. If there are large differences in the dimensions or numerical ranges of different feature dimensions, the scale of each feature dimension can be adjusted in a uniform way first. For example, the scale parameters of each feature dimension can be determined based on the subject samples involved in the comparison, and then the same parameters can be used to process the target domain features and candidate source domain features to avoid a feature with a large numerical range inappropriately controlling the distance results.

[0038] In one embodiment, the step of performing classification verification using labeled brain signal samples corresponding to each candidate source domain subject to obtain classification performance indicators corresponding to each candidate source domain subject includes: k-fold cross-validation is performed using labeled brain signal samples corresponding to each candidate source domain subject to obtain the classification accuracy of the corresponding candidate source domain subject, and the classification accuracy is used as the classification performance index. The step of determining the trust score for each candidate source domain subject based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject includes: The distribution distances between the candidate source domain participants and other participants in the source domain selection are summed to obtain the distribution distance statistics corresponding to the candidate source domain participants. The distribution distance statistic is normalized, and the trust score is determined according to the following formula:

[0039] in, This represents the trust score of the subject in the k-th candidate source domain. This represents the classification accuracy of the subject in the k-th candidate source domain. This represents the distribution distance between the participant in the k-th candidate source domain and the other participants in the i-th source domain selection. This represents the normalization function.

[0040] For example, for each candidate source domain participant, its labeled brain signal samples are read. The label of each sample represents the brain-computer interface task category corresponding to that sample. K-fold cross-validation can be used to obtain the classification performance index of the candidate source domain participants. Specifically, the labeled brain signal samples of the candidate source domain participants are divided into k sample subsets. Each time, one sample subset is selected for validation, and the classifier is trained using the remaining sample subsets. Training and validation are repeated until each sample subset has been used for validation once. The classification accuracy corresponding to the candidate source domain participant is calculated based on the results of each validation. =Number of correctly classified validation samples / Total number of samples participating in validation All candidates for the source domain should be assigned the same sample partitioning principles, classifier types, and performance calculation methods to ensure the comparability of the resulting classification performance metrics. For example, in left-hand motor imagery and right-hand motor imagery classification tasks, a binary classification model can be trained using labeled samples from each candidate source domain participant, and classification accuracy can be obtained through cross-validation. Higher classification accuracy indicates that the two types of brain signals from the candidate source domain participants have relatively clear and reproducible differences.

[0041] In one embodiment, determining the local density of the target domain feature distribution based on the proximity relationships between feature samples in the target domain feature distribution, and determining an adaptive distance threshold corresponding to the subject in the target domain based on the local density, includes: For each feature sample in the target domain feature distribution, determine the multiple nearest neighbor feature samples that are closest to that feature sample; The local density of the target domain feature distribution is estimated based on the average distance between each feature sample and its corresponding nearest neighbor feature sample. The local density is multiplied by a preset adaptive coefficient to obtain the adaptive distance threshold, which is expressed as:

[0042] in, This represents the adaptive distance threshold. This represents the local density of the feature distribution of the target domain. This represents an adaptive coefficient with a value between 0.5 and 2.0.

[0043] In one embodiment, it further includes: During the transfer learning process of the brain signal classification model, after each preset number of training rounds, the trust score corresponding to each candidate source domain subject is re-determined based on the feature distribution obtained in the current training round. Determine the change in the re-obtained trust score relative to the trust score at the previous calculation time. If the change amount corresponding to at least one candidate source domain subject exceeds a preset change threshold, the determination of the initial source domain subject and the screening based on the adaptive distance threshold are re-executed to update the target source domain subject.

[0044] For example, after determining the subjects in the initial source domain, the distribution distance between the subjects in the initial source domain and the subjects in the target domain is read, and this distribution distance is compared with the adaptive distance threshold corresponding to the subjects in the target domain. When the distribution distance is less than or equal to the adaptive distance threshold, the subjects in the initial source domain are determined as subjects in the target source domain. Subsequently, the brain signal classification model corresponding to the subjects in the target source domain is transferred to the brain signal classification model corresponding to the subjects in the target domain using candidate source domain brain signal samples. One implementation is to first train the initial brain signal classification model using labeled brain signal samples of the subjects in the target source domain, and then adjust the model using target domain brain signal samples to adapt it to the feature distribution of the target domain. Another implementation is to use target source domain brain signal samples and target domain brain signal samples simultaneously during the transfer learning process, so that the model learns the source domain category discrimination rules while reducing the difference between source domain features and target domain features. For example, in the classification task of left-hand motor imagery and right-hand motor imagery, the classification model can first be trained by using labeled samples from subjects in the target source domain to learn the basic discrimination rules of the two types of motor imagery signals. Then, the model parameters or feature representations can be adjusted by using samples from subjects in the target domain to make the classification model applicable to subjects in the target domain.

[0045] For example, during the transfer learning training process, every N training rounds (N ranges from 5 to 20), the trust score of each candidate source domain is recalculated. When the change in the trust score exceeds a preset threshold θ (θ ranges from 0.05 to 0.15), the source domain reselection mechanism is triggered.

[0046] In one embodiment, it further includes: If the distribution distance exceeds the adaptive distance threshold, the subjects in the initial source domain are excluded, and the subjects in the target source domain are re-determined based on the trust scores of the remaining candidate source domain subjects.

[0047] In one embodiment, the brain signal includes electroencephalogram (EEG) signals and functional near-infrared spectral signals, and the method further includes: For the EEG signal and the functional near-infrared spectral signal, the distribution distance between the feature distribution of the candidate source domain and the feature distribution of the target domain, the classification performance index of the candidate source domain subject, and the confidence score are determined independently. Screening based on the adaptive distance threshold is performed separately to determine the corresponding target source domain subjects for the electroencephalogram (EEG) signal and the functional near-infrared spectral signal, respectively.

[0048] For example, EEG signal samples and functional near-infrared spectral signal samples from subjects in the target domain can be acquired, as well as EEG signal samples and functional near-infrared spectral signal samples from subjects in multiple candidate source domains. For the EEG signals, frequency band energy, spatial patterns, time-frequency features, or inter-channel covariance features of different EEG channels can be extracted. Multiple EEG feature samples from the target domain subjects constitute the target domain EEG feature distribution, and multiple EEG feature samples from each candidate source domain subject constitute the corresponding candidate source domain EEG feature distribution. For the functional near-infrared spectral signals, statistical features such as changes in oxyhemoglobin concentration, changes in deoxyhemoglobin concentration, hemodynamic response peak value, response slope, peak arrival time, or concentration changes within a preset task interval can be extracted. Multiple near-infrared spectral feature samples from the target domain subjects constitute the target domain near-infrared spectral feature distribution, and multiple near-infrared spectral feature samples from each candidate source domain subject constitute the corresponding candidate source domain near-infrared spectral feature distribution. Feature spaces are established for both modalities. EEG features do not need to have the same dimensions or numerical range as near-infrared spectral features; it is only necessary to ensure that the target domain subjects and candidate source domain subjects within the same modality use the same feature definition.

[0049] For example, for EEG signals, the distribution distance between the EEG feature distribution of the candidate source domain and the EEG feature distribution of the target domain is calculated for each candidate source domain subject, thus obtaining the EEG distribution distance corresponding to that candidate source domain subject. For functional near-infrared spectral signals, the distribution distance between the near-infrared spectral feature distribution of the candidate source domain and the near-infrared spectral feature distribution of the target domain is calculated for each candidate source domain subject, thus obtaining the near-infrared spectral distribution distance corresponding to that candidate source domain subject. In one implementation, both modalities use Wasserstein distance, but are calculated separately in their respective feature spaces. Even when using the same type of distance calculation method, EEG features and near-infrared spectral features are not mixed to form a unified distance. For example, the EEG rhythm changes and spatial patterns of candidate source domain subject A may be closer to those of the target domain subject, thus resulting in a smaller EEG distribution distance; however, the hemodynamic response peak and response time of candidate source domain subject A may differ significantly from those of the target domain subject, thus resulting in a larger near-infrared spectral distribution distance.

[0050] For example, for EEG signals, labeled EEG signal samples corresponding to each candidate source domain are used for classification verification to obtain the EEG classification performance index for that candidate source domain. For functional near-infrared spectroscopy signals, labeled near-infrared spectroscopy signal samples corresponding to each candidate source domain are used for classification verification to obtain the near-infrared spectroscopy classification performance index for that candidate source domain. For instance, in the left-hand motor imagery and right-hand motor imagery classification task, the EEG signals of a candidate source domain participant may have significant differences in sensorimotor rhythm, thus resulting in high EEG classification performance; however, the participant's hemodynamic response may be weak, and the near-infrared spectral features corresponding to the two motor imagery categories may overlap significantly, resulting in low near-infrared spectroscopy classification performance. Another candidate source domain participant may have a strong and stable hemodynamic response, but their EEG signals are susceptible to electromyography artifacts. This participant may have high near-infrared spectroscopy classification performance and low EEG classification performance. Therefore, even if the EEG signals and functional near-infrared spectroscopy signals come from the same candidate source domain participant, their classification performance in the two modalities is not necessarily consistent.

[0051] For example, for EEG signals, the EEG trust score for each candidate source domain participant is determined based on the EEG classification performance index and EEG distribution distance statistic for each candidate source domain participant. For functional near-infrared spectral signals, the near-infrared spectral trust score for each candidate source domain participant is determined based on the near-infrared spectral classification performance index and near-infrared spectral distribution distance statistic for each candidate source domain participant. Participants for the initial EEG source domain are determined based on their EEG trust scores, and participants for the initial near-infrared spectral source domain are determined based on their near-infrared spectral trust scores. The two initial source domain participants can be the same participant or different participants. An adaptive distance threshold corresponding to the EEG modality is determined based on the local density of the EEG feature distribution of the target domain participant. The EEG distribution distance corresponding to the initial EEG source domain participant is compared with this threshold to verify whether the initial source domain participant is suitable as the target source domain participant for EEG signals. An adaptive distance threshold corresponding to the near-infrared spectral modality is determined based on the local density of the near-infrared spectral feature distribution of the target domain participant. The distance of the near-infrared spectral distribution corresponding to the subject in the initial near-infrared spectral source region is compared with a threshold to verify whether the subject in the initial source region is suitable as the target source region subject for the near-infrared spectral signal. Local density and adaptive distance thresholds are determined for the two modalities separately because EEG features and near-infrared spectral features reside in different feature spaces, and their numerical scales, sample concentration, and distribution patterns are also different. Therefore, the distance threshold of the EEG modality cannot be directly used for the near-infrared spectral modality, nor can the distance threshold of the near-infrared spectral modality be used for the EEG modality. When the distance of the EEG distribution corresponding to the subject in the initial EEG source region does not exceed the adaptive distance threshold of the EEG modality, the subject in the initial source region is determined as the target source region subject for the EEG signal. When the distance of the near-infrared spectral distribution corresponding to the subject in the initial near-infrared spectral source region does not exceed the adaptive distance threshold of the near-infrared spectral modality, the subject in the initial source region is determined as the target source region subject for the functional near-infrared spectral signal. Subsequently, using EEG signal samples from subjects in the target EEG source domain, transfer learning was performed on the EEG classification model corresponding to the target domain subjects; using near-infrared spectral signal samples from subjects in the near-infrared spectral source domain, transfer learning was performed on the near-infrared spectral classification model or the corresponding modality processing part corresponding to the target domain subjects.

[0052] In some cases, considering that functional compensation may occur between the affected and unaffected sides in patients with stroke, cerebral hemorrhage, or unilateral brain region injury, the overall brain signal feature distributions of a candidate source domain subject and a target domain subject may be very similar, and the candidate source domain subject may also have high classification performance. However, the correspondence between their category features may be mirror images. For example, when a candidate source domain subject performs left-hand motor imagery, the right sensorimotor area shows a typical response; due to lesions and functional reorganization, the target domain subject may primarily generate a response from the other side of the brain when performing left-hand motor imagery. In this case, the overall feature distributions of the two subjects may be similar, but the left-hand category region of the source domain may correspond to the right-hand category region of the target domain. Ordinary distribution distance only compares whether the overall distributions are similar and cannot identify whether the category semantics are consistent. The high classification performance of the candidate source domain itself does not prove that its category orientation is suitable for the target domain. Based on this, in one embodiment, in addition to calculating the overall distribution distance, the category conditional feature distributions of each category of the candidate source domain subject are constructed separately. For subjects in the target domain, a small number of target domain samples with task instruction information can be used to form a category conditional feature distribution. When target domain samples lack definite labels, a provisional category set can be formed based on the task prompt time, the model's high-confidence prediction results, or the consistent prediction results of multiple classifiers. The category conditional distribution distance is calculated separately when maintaining the original category correspondence and after exchanging the category correspondence. Simultaneously, based on the spatial relationship of the EEG channels, left and right hemisphere mirror mapping is performed on the candidate source domain features, and the category conditional distribution distance after mirror mapping is calculated. If the category conditional distribution distance significantly decreases after mirror mapping and category correspondence adjustment, and the adjusted intra-category clustering and inter-category separation meet the requirements, then the candidate source domain subject is labeled as a mirror-transferable source domain. During transfer, the spatial channel relationship or category correspondence is transformed accordingly, rather than directly using the original source domain label relationship.

[0053] In some cases, candidates for the source domain and those for the target domain may use the same type of acquisition equipment, electrode caps, probe fixation methods, or experimental cues. The equipment noise, electrooculogram (EOG) artifacts, electromyogram (EMG) artifacts, and task-cue-related interferences arising from these conditions can cause the feature distributions of the two subjects to appear very similar. The classifier for the candidate source domain subject may utilize artifacts that occur synchronously with the task label. For example, a subject might be more likely to produce a certain eye movement during left-hand motor imagery and a different muscle tension during right-hand motor imagery. This candidate source domain subject may simultaneously possess high classification performance and a small distribution distance, but the model learns artifact patterns rather than transferable neural activity patterns. Therefore, in one embodiment, candidate source domain features can be divided into a task-related neural feature subspace and a suspected artifact feature subspace. Suspected artifact features can be determined based on frontal EEG channels, EOG reference channels, EMG sensitive bands, superficial channels of functional near-infrared spectroscopy, or non-physiological changes strictly synchronized with the stimulus cue timing. Calculate the classification performance and distribution distance when retaining all features, and the classification performance and distribution distance after suppressing suspected artifact features. If the classification performance of the candidate source domain subjects drops significantly after suppressing suspected artifact features, or the distribution similarity between them and the target domain subjects disappears significantly, it indicates that the original high confidence score mainly originated from shared artifacts. A neural information preservation coefficient can be formed based on the degree of preservation of classification performance and distribution distance before and after artifact suppression, and this coefficient can be used to correct the confidence score of the candidate source domain subjects.

[0054] In some cases, overlapping sliding windows are often used in brain signal processing to increase the number of samples. Adjacent windows extracted from the same brain signal trial have high similarity. If the local density of the target domain is directly estimated based on the nearest neighbor distance of all windows, the nearest neighbor of a window usually comes from adjacent windows in the same trial. These nearest neighbors do not reflect the true distribution density of the target domain across different trials, but instead make the target domain feature distribution appear abnormally concentrated. Therefore, in one embodiment, each target domain feature sample retains its trial identifier, acquisition interval identifier, or continuous recording identifier. When determining nearest neighbor feature samples, other feature samples from the same trial or the same continuous recording interval as the current feature sample are excluded; only nearest neighbor samples from different trials are allowed. The local density of the target domain is determined based on the cross-trial nearest neighbor distance. Alternatively, the local density within a trial and the local density across trials can be calculated separately. When the difference between the two exceeds a preset level, it is determined that the target domain sample has a density deviation caused by overlapping windows, and the adaptive distance threshold is determined using the cross-trial local density.

[0055] In some cases, the brain signals of subjects within the same target domain may not originate from a single stable distribution. For example, subjects in the target domain may remain alert in the early stages of training but become fatigued later; or patients may successfully perform motor imagery in some trials but fail to form stable intentions in others. In such cases, the target domain feature distribution may form multiple local clusters. State clusters with a larger sample size will dominate the overall local density, while state clusters with a smaller sample size but practical significance will be ignored. A candidate source domain subject may be very close to the main state cluster but completely fail to cover a few state clusters. Its overall distribution distance and trust score may still be superior, but the transferred model is prone to failure when the patient is fatigued, attention is reduced, or task performance is weak. Based on this, in one embodiment, the target domain feature distribution is divided into multiple local state clusters according to the adjacency relationship between target domain feature samples. The formation of state clusters can be based on the feature space clustering relationship or constrained by trial time, task stage, or physiological state indicators. The local density and corresponding cluster-level adaptive distance threshold of each target domain state cluster are determined separately. For each candidate source domain participant, the coverage distance between the candidate source domain feature distribution and each target domain state cluster is calculated. When determining the initial source domain participants, not only the distance between the candidate source domain participants and the overall target domain distribution is considered, but also the candidate source domain is required to meet the preset coverage conditions for each target domain state cluster. For state clusters with a small sample size but high classification uncertainty, a coverage priority no lower than that of the main state cluster can be assigned.

[0056] In some cases, considering the potential time delays in the neural and hemodynamic responses of different subjects to the same task, the peak response of functional near-infrared spectroscopy signals may be earlier or later due to differences in vascular condition, age, pathological severity, and probe position. EEG signals may also show shifts in the response start point due to different task execution reaction times. If the distribution distance is calculated directly within a fixed time window, responses with the same morphology but different occurrence times will be judged as having significant differences. Conversely, some candidate source domains with similar overall amplitudes but incorrect temporal relationships may yield smaller distances. Based on this, in one embodiment, multiple candidate time offsets are set for each candidate source domain subject within a preset physiologically permissible range. The candidate source domain feature sequence and the target domain feature sequence are aligned according to each candidate time offset, and the aligned distribution distance is calculated separately. Not only is the minimum distribution distance recorded, but also the distance curve formed by the change in distance with the time offset is recorded. If a candidate source domain subject only exhibits a small distance at an extremely narrow offset position that does not conform to physiological laws, its reliability is reduced; if a stable low-distance interval is formed within a continuous physiologically permissible offset range, its response morphology is considered to have high consistency with the target domain. For functional near-infrared spectral signals, it is also possible to compare whether the oxyhemoglobin response and the deoxyhemoglobin response are improved under the same time offset relationship, avoiding accidental alignment of only a single hemoglobin index.

[0057] In some cases, selecting source domains for EEG signals and functional near-infrared spectroscopy signals separately can avoid forcing unsuitable subjects to share between the two modalities. However, when subsequent classification models need to utilize the correspondence between the two modalities, independently selecting different subjects may introduce new problems. For example, subject A (EEG target source domain) and subject B (near-infrared spectroscopy target source domain) may differ in task response speed, trial stages, and physiological response intensity. Although they are the optimal source domains in their respective modalities, directly using their data as the same multimodal training sample would create a non-existent correspondence between EEG activity and hemodynamic response. Based on this, in one embodiment, a cross-modal relationship description of the target domain subjects is constructed based on the selection of candidate target source domains for each modality. This relationship description may include the relative relationship between the EEG task response intensity and the subsequent hemodynamic response intensity, the delay relationship between the EEG response initiation point and the near-infrared spectral response initiation point, and the relationship of the changing direction of the two modalities under different task categories. For each candidate source domain combination consisting of candidate subjects from the EEG source domain and candidate subjects from the near-infrared spectral source domain, the difference between the cross-modal relationship formed after task-stage alignment and the cross-modal relationship of the target domain is calculated. Only when the EEG candidate source domain and the near-infrared spectral candidate source domain satisfy their respective trust scores and distance threshold requirements, and the cross-modal relationship formed by them satisfies the target domain relationship constraints, is the source domain combination used for multimodal transfer.

[0058] In some cases, the sample sizes of different task categories for candidates in the source domain and those in the target domain may be unbalanced. If one category is the majority, the overall distribution distance is primarily determined by that category. For example, the target domain sample may have more resting state samples and fewer motor imagery samples. A candidate in the source domain may only need to be close to the target domain in the resting state to achieve a smaller overall distribution distance, even if their motor imagery characteristics are completely different from the target domain. Based on this, in some examples, category-conditional feature distributions can be formed separately according to task categories, and when calculating distance statistics, each category can be adjusted to the same evaluation weight to prevent the category with a larger sample size from automatically receiving a higher weight. The distribution distance and classification performance for each category are obtained separately. Constraints are set based on the candidate in the source domain's fit in the weakest category, or the confidence score is adjusted based on the high quantile results in each category distance. For cases where target domain labels are insufficient, a target domain category set can be formed based on task instructions, rather than relying entirely on the predicted labels of the classification model. Task instructions reflect the tasks that subjects are required to perform in the corresponding time intervals, providing an initial basis for the classification conditional distance.

[0059] In some cases, considering that participants in two candidate source domains and those in the target domain may have similar or identical distribution distances, but the required movement directions when adjusting from the source domain distribution to the target domain distribution may differ, the following scenarios apply. When one candidate source domain adapts to the target domain, features of each category move along the direction that maintains the category gap; when another candidate source domain adapts to the target domain, different categories of features need to cross over or cluster towards the same location. Ordinary distance only reflects the magnitude of the required movement and does not reflect whether the movement direction disrupts the category structure. Therefore, in some examples, when calculating the distribution distance between the candidate source domain and the target domain, the correspondence or transfer relationship of the feature samples that minimizes the distribution distance can be preserved simultaneously. Based on this correspondence, the adaptation direction for each category of the candidate source domain to move to the target domain is determined. Further analysis is conducted to determine whether the adaptation directions of different categories will reduce the category gap, change the category order, or cause different categories to cross over in the target domain. When a candidate source domain has a small distribution distance, but its adaptation direction significantly reduces the degree of separation between categories, the confidence score of that candidate source domain is reduced. Candidate source domains with smaller adaptation distances and adaptation directions that maintain the category structure are preferred.

[0060] In some cases, considering that the effective sample size for subjects in different candidate source domains may vary, subjects in candidate source domains with fewer samples may occasionally achieve high classification performance and thus obtain high confidence scores. Even if all candidate source domains use the same number of folds for cross-validation, classification performance estimates may still fluctuate significantly when the sample size is small. Comparing only the point estimates of classification performance can easily lead to mistaking occasional high scores for stable classification ability. Based on this, in some examples, multiple sample resampling is performed for each candidate source domain subject. In each resampling, the classification performance, distribution distance statistic, and confidence score are recalculated to obtain the confidence score distribution for that candidate source domain subject. Candidate source domains are ranked according to the lower confidence boundary of this confidence score distribution, rather than according to the highest confidence score obtained in a single calculation. Changes in source domain ranking across different resampling results can also be recorded. If a candidate source domain subject has a high average confidence score but its ranking changes frequently and significantly, its selection priority is reduced; if a candidate source domain subject consistently maintains a high ranking in most resampling results, its selection reliability is increased.

[0061] Please see Figure 4 One embodiment of the cross-subject source domain transfer learning adaptive selection device in this application may include: The acquisition unit 21 is used to acquire the target domain brain signal sample of the target domain subject and the candidate source domain brain signal sample of each of the multiple candidate source domain subjects, and to extract features from the target domain brain signal sample and the candidate source domain brain signal sample to obtain the target domain feature distribution and the multiple candidate source domain feature distribution. Analysis unit 22 is used for: For each candidate source domain subject, determine the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution; Classification verification was performed using labeled brain signal samples corresponding to the subjects of each candidate source domain, and classification performance indicators corresponding to the subjects of each candidate source domain were obtained. Based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject, a trust score is determined for each candidate source domain subject to determine the initial source domain subjects, wherein the trust score is positively correlated with the classification performance index and negatively correlated with the distribution distance statistic; The execution unit 23 is used to compare the distribution distance corresponding to the initially selected source domain subject with an adaptive distance threshold determined based on the local density of the target domain subject. If the distribution distance does not exceed the adaptive distance threshold, the initially selected source domain subject is determined as the target source domain subject, so as to use the candidate source domain brain signal samples corresponding to the target source domain subject to perform transfer learning on the brain signal classification model corresponding to the target domain subject.

[0062] above Figure 4 The cross-subject source domain transfer learning adaptive selection device in this application embodiment has been described from the perspective of modular functional entities. The following is a detailed description of the cross-subject source domain transfer learning adaptive selection device in this application embodiment from the perspective of hardware processing. Please refer to... Figure 5 One embodiment of the cross-subject source domain transfer learning adaptive selection device 300 in this application includes: The system includes an input device 301, an output device 302, a processor 303, and a memory 304, wherein the number of processors 303 can be one or more. Figure 5 Taking a processor 303 as an example. In some embodiments of this application, the input device 301, output device 302, processor 303, and memory 304 can be connected via a bus or other means, wherein... Figure 5 Taking the example of a connection between China and Israel via a bus.

[0063] Among them, by calling the operation instructions stored in memory 304, processor 303 is also used to execute Figure 1 Any of the methods in the corresponding embodiments.

[0064] Please see Figure 6 , Figure 6 A schematic diagram of an embodiment of the electronic system provided in this application.

[0065] like Figure 6As shown, this application provides an electronic system including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, it can achieve... Figure 1 Any of the corresponding implementation methods in the embodiments.

[0066] Since the electronic system described in this embodiment is the device used to implement the cross-subject source domain transfer learning adaptive selection device in the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic system in this embodiment based on the method described in the embodiments of this application. Therefore, how the electronic system implements the method in the embodiments of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiments of this application is within the scope of protection of this application.

[0067] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided in this application.

[0068] like Figure 7 As shown, this embodiment provides a computer-readable storage medium 500 on which a computer program 511 is stored. When the computer program 511 is executed by a processor, it can perform... Figure 1 Any of the corresponding implementation methods in the embodiments.

[0069] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0070] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0071] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0072] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0073] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0074] This application also provides a computer program product, which includes computer software instructions that, when executed on a processing device, cause the processing device to perform actions such as... Figure 1 The process in the cross-subject source domain transfer learning adaptive selection method in the corresponding embodiment.

Claims

1. An adaptive selection method for cross-subject source domain transfer learning, characterized in that, include: Obtain target domain brain signal samples from target domain subjects and candidate source domain brain signal samples from multiple candidate source domain subjects respectively. Extract features from the target domain brain signal samples and the candidate source domain brain signal samples to obtain target domain feature distribution and multiple candidate source domain feature distribution. For each candidate source domain subject, determine the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution; Classification verification was performed using labeled brain signal samples corresponding to the subjects of each candidate source domain, and classification performance indicators corresponding to the subjects of each candidate source domain were obtained. Based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject, a trust score is determined for each candidate source domain subject to determine the initial source domain subjects, wherein the trust score is positively correlated with the classification performance index and negatively correlated with the distribution distance statistic; The distribution distance corresponding to the initially selected source domain subject is compared with an adaptive distance threshold determined based on the local density of the target domain subject. If the distribution distance does not exceed the adaptive distance threshold, the initially selected source domain subject is determined as the target source domain subject, so as to use the candidate source domain brain signal samples corresponding to the target source domain subject to perform transfer learning on the brain signal classification model corresponding to the target domain subject.

2. The method according to claim 1, further comprising: The local density of the target domain feature distribution is determined based on the proximity relationship between each feature sample in the target domain feature distribution, and an adaptive distance threshold corresponding to the subject in the target domain is determined based on the local density.

3. The method according to claim 1, characterized in that, Determining the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution includes: Based on the complete trial features corresponding to the candidate source domain subjects and the target domain subjects, calculate the global Wasserstein distance between the feature distribution of the candidate source domain and the feature distribution of the target domain. The brain signals of the candidate source domain subjects and the target domain subjects are divided into multiple time windows, and the local Wasserstein distance is calculated based on the features within the corresponding time window. The global Wasserstein distance and the local Wasserstein distance are weighted and fused according to a preset fusion weight to obtain the distribution distance, wherein the distribution distance is expressed as: ; in, Indicates the distribution distance, Represents the global Wasserstein distance. Represents the local Wasserstein distance. The fusion weights are values ​​between 0.5 and 0.

8.

4. The method according to claim 2, characterized in that, The step of using labeled brain signal samples corresponding to each candidate source domain subject for classification verification to obtain classification performance indicators corresponding to each candidate source domain subject includes: k-fold cross-validation is performed using labeled brain signal samples corresponding to each candidate source domain subject to obtain the classification accuracy of the corresponding candidate source domain subject, and the classification accuracy is used as the classification performance index. The step of determining the trust score for each candidate source domain subject based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject includes: The distribution distances between the candidate source domain participants and other participants in the source domain selection are summed to obtain the distribution distance statistics corresponding to the candidate source domain participants. The distribution distance statistic is normalized, and the trust score is determined according to the following formula: in, This represents the trust score of the subject in the k-th candidate source domain. This represents the classification accuracy of the subject in the k-th candidate source domain. This represents the distribution distance between the participant in the k-th candidate source domain and the other participants in the i-th source domain selection. This represents the normalization function.

5. The method according to claim 2, characterized in that, The step of determining the local density of the target domain feature distribution based on the proximity relationships between feature samples in the target domain feature distribution, and then determining the adaptive distance threshold corresponding to the subject in the target domain based on the local density, includes: For each feature sample in the target domain feature distribution, determine the multiple nearest neighbor feature samples that are closest to that feature sample; The local density of the target domain feature distribution is estimated based on the average distance between each feature sample and its corresponding nearest neighbor feature sample. The local density is multiplied by a preset adaptive coefficient to obtain the adaptive distance threshold, which is expressed as: in, This represents the adaptive distance threshold. This represents the local density of the feature distribution of the target domain. This represents an adaptive coefficient with a value between 0.5 and 2.

0.

6. The method according to claim 1, characterized in that, Also includes: During the transfer learning process of the brain signal classification model, after each preset number of training rounds, the trust score corresponding to each candidate source domain subject is re-determined based on the feature distribution obtained in the current training round. Determine the change in the re-obtained trust score relative to the trust score at the previous calculation time. If the change amount corresponding to at least one candidate source domain subject exceeds a preset change threshold, the determination of the initial source domain subject and the screening based on the adaptive distance threshold are re-executed to update the target source domain subject.

7. The method according to any one of claims 1 to 6, characterized in that, Also includes: If the distribution distance exceeds the adaptive distance threshold, the subjects in the initial source domain are excluded, and the subjects in the target source domain are re-determined based on the trust scores of the remaining candidate source domain subjects.

8. A cross-subject source domain transfer learning adaptive selection device, characterized in that, include: The acquisition unit is used to acquire target domain brain signal samples of target domain subjects and candidate source domain brain signal samples of multiple candidate source domain subjects, and to extract features from the target domain brain signal samples and the candidate source domain brain signal samples to obtain target domain feature distribution and multiple candidate source domain feature distribution. Analysis unit, used for: For each candidate source domain subject, determine the distribution distance between the corresponding candidate source domain feature distribution and the target domain feature distribution; Classification verification was performed using labeled brain signal samples corresponding to the subjects of each candidate source domain, and classification performance indicators corresponding to the subjects of each candidate source domain were obtained. Based on the classification performance index and distribution distance statistic corresponding to each candidate source domain subject, a trust score is determined for each candidate source domain subject to determine the initial source domain subjects, wherein the trust score is positively correlated with the classification performance index and negatively correlated with the distribution distance statistic; The execution unit is configured to compare the distribution distance corresponding to the initially selected source domain subject with an adaptive distance threshold determined based on the local density of the target domain subject. If the distribution distance does not exceed the adaptive distance threshold, the initially selected source domain subject is determined as the target source domain subject, so as to use the candidate source domain brain signal samples corresponding to the target source domain subject to perform transfer learning on the brain signal classification model corresponding to the target domain subject.

9. An electronic system comprising a memory and a processor, characterized in that, When the processor executes the computer program stored in the memory, it implements the steps of the cross-subject source domain transfer learning adaptive selection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the adaptive selection method for cross-subject source domain transfer learning as described in any one of claims 1 to 7.