Neural signal-based behavior prediction method and apparatus, device, and storage medium
By training the decoder and meta-aligner of the behavior prediction model, the problem of unstable neural recording in cross-object and cross-task scenarios of traditional BCI technology is solved, realizing rapid adaptation and accurate prediction of neural signal distribution, and improving the accuracy and stability of behavior prediction.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- LINGANG LAB
- Filing Date
- 2025-04-18
- Publication Date
- 2026-07-30
AI Technical Summary
Traditional BCI technology cannot guarantee the stability and accuracy of neural recordings in cross-object and cross-task scenarios, and cannot adapt to individual differences and task diversity, resulting in inaccurate behavior prediction.
By training a behavior prediction model based on a sample dataset of multiple sample objects, a decoder and a meta-aligner are introduced. The decoder extracts neural signal features and performs alignment processing through the meta-aligner, enhancing the model's adaptability to neural signal distributions across tasks, time, and individuals. Meta-learning training is introduced to quickly adapt to new neural signal distributions.
It improves the generalization and robustness of behavior prediction models, ensures rapid adaptation to neural signal distribution in unseen scenarios, and enhances the accuracy and stability of behavior prediction, providing reliable technical support for fields such as brain-computer interfaces and neurorehabilitation.
Smart Images

Figure CN2025089878_30072026_PF_FP_ABST
Abstract
Description
Behavior prediction methods, devices, equipment, and storage media based on neural signals Technical Field
[0001] This application relates to the field of artificial intelligence (AI) technology, and in particular to a behavior prediction method, apparatus, device and storage medium based on neural signals. Background Technology
[0002] In recent years, brain-computer interface (BCI) technology has made significant progress in helping paralyzed patients control computers and external devices. However, the instability of neural recordings remains a key challenge for the application of BCI technology. Because neural activity changes over time, BCI systems require frequent recalibration to maintain stable performance.
[0003] However, these technologies are only applicable to BCI calibration for single objects and single-task applications. Once changes occur across objects and tasks, the stability of neural recordings cannot be guaranteed. For example, some BCI systems require objects to switch between tasks, such as controlling cursor position and switching function options. Traditional technologies cannot capture the impact of task changes on neural signals, potentially leading to the cursor moving to the wrong location or the user being unable to switch to the target function. Furthermore, when the same BCI system is applied to different objects, the signal characteristics differ significantly due to differences in neurophysiological characteristics (such as brain structure or neural activity patterns), making it impossible to accurately predict the behavior of each object.
[0004] Therefore, traditional technologies cannot guarantee the accuracy and efficiency of predictions based on individual differences and task diversity when predicting behavior based on neural signals. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and storage medium for behavior prediction based on neural signals, in order to improve the accuracy and efficiency of behavior prediction.
[0006] In a first aspect, this application provides a behavior prediction method based on neural signals, the method comprising:
[0007] Acquire the target neural signals of the target object and input the target neural signals into the trained behavior prediction model;
[0008] Obtain the predicted behavior data of the target object output by the behavior prediction model;
[0009] The behavior prediction model is trained on a sample dataset of multiple sample objects. The sample dataset includes sample neural signals and sample behavior data generated by the corresponding sample objects under multiple neural activity tasks. The behavior prediction model includes a decoder and a meta-aligner. The aligner is used to align the target neural signals to obtain aligned neural signal features. The decoder is used to predict the neural signal features and output the corresponding predicted behavior data.
[0010] Secondly, this application provides a behavior prediction device based on neural signals, the device comprising:
[0011] The acquisition unit is used to acquire the target neural signal of the target object and input the target neural signal into the trained behavior prediction model;
[0012] The prediction unit is used to obtain the predicted behavior data of the target object output by the behavior prediction model;
[0013] The behavior prediction model is trained on a sample dataset of multiple sample objects. The sample dataset includes sample neural signals and sample behavior data generated by the corresponding sample objects under multiple neural activity tasks. The behavior prediction model includes a decoder and a meta-aligner. The aligner is used to align the target neural signals to obtain aligned neural signal features. The decoder is used to predict the neural signal features and output the corresponding predicted behavior data.
[0014] Optionally, the device further includes a training unit for:
[0015] Obtain the original datasets corresponding to multiple sample objects, and preprocess the original datasets; the original datasets include the original neural signals and original behavioral data generated by the corresponding sample objects under multiple neural activity tasks;
[0016] Based on preset scenario conditions, the preprocessed original dataset is classified to obtain the corresponding sample dataset.
[0017] Optionally, the training unit is further configured to:
[0018] Based on the first sample subset in the sample dataset, the decoder is iteratively trained until the loss function of the decoder satisfies the preset convergence condition, and the trained decoder is obtained.
[0019] Based on the second sample subset in the sample dataset, the meta-aligner is trained by inner loop training and meta-learning to obtain a trained meta-aligner.
[0020] Optionally, the training unit is specifically used for:
[0021] Based on a preset task construction strategy, the second sample subset is sampled to obtain multiple training task sets corresponding to the second sample subset.
[0022] Based on the multiple training task sets, the meta-objective function of the meta-aligner is obtained, and the meta-objective function represents the total loss value of the meta-aligner on the multiple training task sets.
[0023] Based on the meta-objective function, the model parameters of the meta-aligner are adjusted to obtain a trained meta-aligner.
[0024] Optionally, the training unit is specifically used for:
[0025] Based on the training data in each training task set and the loss function of the meta-aligner, the model parameters of the meta-aligner are updated to obtain multiple updated parameters;
[0026] Based on the test data and corresponding update parameters in each training task set, the test error corresponding to the training task set is obtained.
[0027] The meta-objective function is obtained by summing up the various test errors.
[0028] Optionally, the preset scene conditions include at least one of cross-time scene conditions, cross-task scene conditions, and cross-object scene conditions; wherein,
[0029] The sample dataset corresponding to the cross-time scenario is characterized as: data generated by the same sample object in two different time periods of the same neural activity task;
[0030] The sample dataset corresponding to the cross-task scenario is characterized as: data generated by the same sample object in two similar time periods of different neural activity tasks;
[0031] The sample dataset corresponding to the cross-object scenario is characterized as follows: data generated by different sample objects in two similar time periods of the same neural activity task; the similar time periods indicate that the time interval between the two corresponding time periods meets the preset interval condition.
[0032] Thirdly, this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the neural signal-based behavior prediction methods described in the first aspect above.
[0033] Fourthly, this application provides a computer storage medium storing computer program instructions, which are executed by a processor using any of the neural signal-based behavior prediction methods described in the first aspect above.
[0034] Fifthly, an embodiment of this application provides a computer program product including computer program instructions, which, when executed by a processor, implement any of the neural signal-based behavior prediction methods described in the first aspect above.
[0035] The beneficial effects of this invention are as follows:
[0036] This application provides a behavior prediction method based on neural signals. This method acquires the target neural signals of a target object and inputs these signals into a trained behavior prediction model to obtain the model's output predicted behavior data of the target object. Specifically, this application trains the model using sample data from multiple neural activity tasks, enhancing the behavior prediction model's adaptability to changes in neural signal distribution across tasks, time periods, and individuals. Furthermore, it introduces meta-learning training, enabling the model to quickly adapt to new neural signal distributions in unseen scenarios, ensuring the accuracy and stability of behavior prediction. Overall, this improves the generalization and robustness of the behavior prediction model, providing reliable technical support for applications in brain-computer interfaces, neurorehabilitation, and other fields. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0038] Figure 1 is a flowchart illustrating a training method for a behavior prediction model provided in an embodiment of this application;
[0039] Figure 2 is a schematic diagram of a meta-aligner training process provided in an embodiment of this application;
[0040] Figure 3 is a flowchart of a behavior prediction method based on neural signals provided in an embodiment of this application;
[0041] Figure 4 is a schematic diagram of a model training and model application process provided in an embodiment of this application;
[0042] Figure 5 is a schematic diagram of the structure of a behavior prediction device based on neural signals provided in an embodiment of this application;
[0043] Figure 6 is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0045] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and this application does not impose limitations.
[0046] The term "and / or" in the embodiments of this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0047] It is understood that the following specific embodiments of this application involve data related to polyolefin production, etc. When the various embodiments of this application are applied to specific products or technologies, relevant licenses or consents are required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, relevant volunteers can be recruited and agreements can be signed to authorize their data, thereby enabling the implementation using the data of these volunteers; or, implementation can be carried out within an authorized organization, using data from members of the organization to implement the following implementation methods for data management; or, the relevant data used in the specific implementation may be simulated data, such as simulated data generated in a virtual scenario.
[0048] The embodiments of this application relate to artificial intelligence and machine learning (ML) technologies, and are primarily designed based on machine learning in artificial intelligence.
[0049] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0050] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0051] Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory, among others. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0052] Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence. Its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning. Artificial Neural Networks (ANNs) abstract the neural network of the human brain from an information processing perspective, establishing a simple model and forming different networks with different connection methods. A neural network is a computational model composed of a large number of interconnected nodes (or neurons). Each node represents a specific output function called the activation function. The connection between any two nodes represents a weighted value for the signal passing through that connection, called a weight. This is equivalent to the memory of the artificial neural network. The network's output varies depending on the connection method, weight values, and activation functions. The network itself is usually an approximation of a certain algorithm or function in nature, or it may be an expression of a logical strategy.
[0053] The design concept of the embodiments of this application will be briefly introduced below.
[0054] In recent years, BCI technology has made significant progress in helping paralyzed patients control computers and external devices. However, the instability of neural recordings remains a key challenge for the application of BCI technology. Because neural activity changes over time, BCI systems require frequent recalibration to maintain stable performance.
[0055] Traditional techniques for addressing the instability of neural activity typically employ methods such as updating interface parameters with an exponentially weighted moving average, tracking and adjusting parameters to account for non-stationarity, or using low-dimensional projection to counteract neural fluctuations. Alternatively, they may train the interface with a large amount of data and use semi-supervised learning to align the probability density function of the newly predicted motion to the probability density function of the previously typical motion.
[0056] However, traditional techniques are only applicable to single-object and single-task scenarios. When changes occur across objects and tasks, traditional techniques cannot guarantee the stability of neural recordings. For example, some BCI systems require objects to switch between multiple tasks, such as controlling cursor position and switching function options. Traditional techniques cannot capture the impact of task changes on neural signals, potentially leading to the cursor moving to the wrong location or the user being unable to switch to the target function. Furthermore, when the same BCI system is applied to different objects, the signal characteristics differ significantly due to differences in neurophysiological characteristics (such as brain structure or neural activity patterns), making it impossible to accurately predict the behavior of each object. Clearly, traditional techniques cannot guarantee the accuracy and efficiency of predictions based on individual differences and task diversity when predicting behavior based on object neural signals.
[0057] In view of the above problems, this application provides a behavior prediction method based on neural signals. This method acquires the target neural signals of a target object and inputs these signals into a trained behavior prediction model to obtain the predicted behavior data of the target object output by the model. Specifically, this application trains the model using sample data from multiple neural activity tasks, enhancing the behavior prediction model's adaptability to changes in neural signal distribution across tasks, time periods, and individuals. Furthermore, it introduces meta-learning training, enabling the model to quickly adapt to new neural signal distributions in unseen scenarios, ensuring the accuracy and stability of behavior prediction. Overall, this improves the generalization and robustness of the behavior prediction model, providing reliable technical support for applications in brain-computer interfaces, neurorehabilitation, and other fields.
[0058] The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.
[0059] The solution provided in this application can be applied to most xxx application scenarios, significantly improving the accuracy of polyolefin melt index prediction. For example, in industrial production scenarios, distributed control systems are common automated control systems in industrial production processes. They can collect polymerization parameters of the polyolefin to be predicted (such as temperature, pressure, flow rate, catalyst concentration, etc.) in real time, and predict and provide feedback on the polyolefin melt index based on the index prediction model provided in this application, obtaining a more accurate melt index prediction result. This helps operators adjust production conditions in real time, optimize process parameters, and improve product quality.
[0060] Of course, the methods provided in this application are not limited to the above-described application scenarios, and can also be used in other possible application scenarios. This application does not impose any limitations. The functions that each device can achieve in the above application scenarios will be described in subsequent method embodiments, and will not be elaborated upon here.
[0061] The following describes the methods provided by exemplary embodiments of this application in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the application scenarios described above are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.
[0062] The behavior prediction model in this embodiment is trained using a sample dataset of multiple sample objects. This model can be used to obtain predicted behavior data from the target neural signals of the target object. The model architecture consists of a decoder and a meta-aligner. The trained aligner aligns the target neural signals to obtain aligned neural signal features, while the trained decoder performs predictive processing on these features, outputting the corresponding predicted behavior data. During model training, the decoder achieves good performance by training on well-recorded sample datasets and correctly predicts behaviors evaluated using the test set in each sample dataset. This means the decoder has learned to extract the relationship between latent states and motor intentions from neural activity. Other sample datasets are treated as training tasks for meta-learning, performing meta-training on the meta-aligner while keeping the decoder fixed. The trained meta-aligner projects the altered neural activity recorded in different sample datasets into the historical neural activity space, then converts it into latent states, allowing the fixed decoder to predict the target object's behavior.
[0063] Therefore, before deploying a behavior prediction model, it is necessary to collect a sample dataset in advance and train the model using this dataset to achieve convergence. To facilitate the description of the model application process, the process of obtaining the sample dataset will be introduced first:
[0064] In one possible implementation, embodiments of this application may acquire the original datasets corresponding to multiple sample objects and preprocess the original datasets. The original datasets include the original neural signals and original behavioral data generated by the corresponding sample objects under multiple neural activity tasks.
[0065] Specifically, taking two rhesus monkeys, "RS" and "NW," as sample subjects, three neural activity tasks were performed on the two sample subjects: an 8-way joystick, a random target joystick, and a touchscreen whack-a-mole game. Raw datasets generated over a period of time were collected, such as 150 sessions spanning 18 months. These datasets included raw neural signals and corresponding raw task data from the M1 and PMD brain regions of RS and NW. For example, the raw task data for the 8-way joystick and random target joystick were the two-dimensional coordinates of the cursor, while the raw task data for the touchscreen whack-a-mole game were the numbers of the mole holes where the moles appeared and were hit.
[0066] In one possible implementation, the preprocessing of this application embodiment may include threshold cross-detection, Gaussian smoothing, affine transformation, data normalization, and sliding window segmentation. This application may first extract spike firings from the original neural signal using threshold cross-detection, and then use Gaussian smoothing to separate the discrete spike firings.
[0067] Convert to continuous values, denoted as neural signal X = {x1, x2, ..., x...} n For discrete behavioral data in the original dataset, such as the numbers of the burrows where a gopher appears and is attacked, this embodiment of the application will also transform the discrete values into continuous two-dimensional coordinate values through affine transformation. Next, for the X neural signal and its corresponding behavioral data Y = {y1, y2, ..., y...}, n The data is standardized to eliminate differences in the units of measurement between different data sets, thereby improving the stability and accuracy of subsequent model training. A sliding window approach is used to standardize the entire time series. 据 X = {x1, x2, ..., x} n} and corresponding behavioral data Y = {y1, y2, ..., y n In the}, take all successfully completed trials and extract several subsequences.
[0068] Specifically, threshold cross-detection is used to extract impulse activity from neural signals. A fixed voltage threshold is set for the original neural signal. When the signal value exceeds this threshold, the occurrence of the impulse at that time point is recorded, thereby converting the continuous original neural signal into sparse impulse events, improving signal effectiveness and reducing noise interference.
[0069] Gaussian smoothing is a signal smoothing technique used to transform discrete impulse activity into a continuous signal representation. It smooths the signal by applying a Gaussian kernel function around each impulse event. In this embodiment, a Gaussian distribution function is applied to the impulses in the detected raw neural signal near their respective time points to smooth the discrete impulse activity into continuous values, thereby eliminating noise in the discrete impulse signal and generating a more continuous and modelable neural activity signal.
[0070] Affine transformations are used to map data from one coordinate system to another. For discrete behavioral data (such as gopher burrow numbers), affine transformations can convert them into two-dimensional coordinate values, facilitating unified processing with data from other tasks. Preprocessing discrete data through affine transformations allows subsequent regression models to uniformly decode classification problems, a prerequisite for achieving cross-task stability in brain-computer interfaces.
[0071] Standardization is a process that shifts data to zero mean and scales it to unit variance to ensure uniform distribution characteristics. The mean and standard deviation of neural activity and corresponding behavioral data can be calculated separately, and then a standardization formula can be applied to each data point. The formula for data standardization is as follows:
[0072] in, Let X be the mean of the neural signal X, and σ(X) be the standard deviation of X. σ(Y) is the mean of the behavioral data Y, and σ(Y) is the standard deviation of Y.
[0073] Sliding window segmentation is a method for dividing continuous time series data into several fixed-length subsequences. It extracts subsequences from a complete time series according to a set window size and sliding step, with each subsequence serving as a sample. In this embodiment, the sliding window method is used to extract subsequences from a complete time series data X = {x1, x2, ..., x...}. n} and corresponding behavioral data Y = {y1, y2, ..., y n In this process, all successfully completed trials are taken and several subsequences are extracted. While preserving the local features of the time series, a sufficient number of samples are generated for model training. Specifically, assuming the window size is w and the sliding distance is d, and a certain trial has L data points, the number of samples s after data segmentation is as follows:
[0074] Where ceil is the floor function, s represents the number of generated samples, and L represents the total length of the time series data.
[0075] In one possible implementation, after preprocessing the original dataset, this application embodiment will further classify the preprocessed original dataset according to preset scenario conditions to obtain a corresponding sample dataset, which can adapt to different scenario requirements such as cross-time, cross-task, and cross-individual. It can also enable the model to learn the changes in the distribution of neural activity data across time, cross-task, and cross-individual, thereby aligning the neural data to a low-dimensional manifold representation of the latent space. Moreover, the relationship between this feature representation and the motion intention is relatively stable, which can improve the accuracy of behavior prediction.
[0076] In one possible implementation, the preset scenario conditions in this application embodiment may include at least one of cross-time scenario conditions, cross-task scenario conditions, and cross-object scenario conditions. The sample dataset corresponding to a cross-time scenario represents data generated by the same sample object in two different time periods of the same neural activity task. The sample dataset corresponding to a cross-task scenario represents data generated by the same sample object in two similar time periods of different neural activity tasks. The sample dataset corresponding to a cross-object scenario represents data generated by different sample objects in two similar time periods of the same neural activity task, where similar time periods refer to the time interval between the corresponding two time periods satisfying a preset interval condition. This application embodiment does not specifically limit the size of the time interval. Under any scenario condition, the data generated in the first time period (i.e., the first data segment) will be used for decoder training to ensure that the decoder can interpret neural activity in a specific scenario and learn the mapping relationship between current neural signals and behavior. The data generated in the second time period (i.e., the second data segment) will be used for training the meta-aligner, enabling the meta-aligner to learn the neural signal characteristics of new time periods, new objects, and / or new tasks, enhancing the model's alignment ability in cross-time, cross-task, and cross-individual scenarios.
[0077] Specifically, for cross-time scenarios, this application embodiment can select the raw datasets generated by a specific rhesus monkey during two different time periods under a specific neural activity task. For example, the first data segment contains 20 sessions within the first time period, and the second data segment contains 40 sessions within the second time period.
[0078] For cross-time scenarios, this application embodiment can select the original datasets generated by a specific rhesus monkey in two similar time periods under multiple neural activity tasks. For example, the first data segment contains 40 sessions of the first task, and the second data segment contains 40 sessions of the second task.
[0079] For cross-individual scenarios, this application embodiment can select two rhesus monkeys and their original datasets generated in two similar time periods under a specific neural activity task. For example, the first data segment contains 40 sessions of the first rhesus monkey and the second data segment contains 40 sessions of the second rhesus monkey.
[0080] To facilitate the description of the model application process, the training process of the behavior prediction model will be introduced below:
[0081] Please refer to Figure 1, which is a schematic diagram of the training process of a behavior prediction model provided in an embodiment of this application. The specific implementation flow of the training process is as follows:
[0082] Step 101: Based on the first sample subset in the sample dataset, iteratively train the decoder until the loss function of the decoder satisfies the preset convergence condition, and obtain the trained decoder.
[0083] In this embodiment, the sample dataset used for model training may include sample neural signals and sample behavioral data generated by the corresponding sample objects under multiple neural activity tasks. Through the aforementioned sample dataset acquisition process, this application divides the sample dataset into a first sample set and a second sample set, respectively used for training the decoder and the meta-aligner, according to a certain partitioning strategy.
[0084] In one possible implementation, the decoder in this application may consist of a Gated Recurrent Unit (GRU) encoder and a nonlinear regressor. After obtaining a first subset of samples for training the decoder, a sliding window of length T can be used to segment the neural signals of successful trials and their corresponding behavioral data from each session contained in the first subset of samples. The parameters of the GRU encoder are adjusted through training to learn time-dependent patterns in neural activity.
[0085] Specifically, the generative forward process of the decoder is as follows: Z i,1...T =GRU enc (x i,1...T )
[0086] Among them, GRU enc and W dec These are the GRU parameters used to encode neural activity inputs, and the nonlinear layer parameters used to decode behavior from latent variables.
[0087] x i This represents the neural signal sequence, specifically the time series of neural signals segmented by a sliding window, with each sample having a length of T. i The representative behavior data label is the target behavior corresponding to each neural signal sequence, such as a two-dimensional cursor position or a target task number.
[0088] The latent variable Z, representing the predictive behavior data of the decoder, is extracted by the GRU encoder. i,T The result is obtained through nonlinear regression layer calculation. This application performs prediction in the final step of the output sequence, denoted as... For the sake of simplicity, let the predicted value be denoted as
[0089] In one possible implementation, in each iteration of decoder training, the present application embodiments can use an optimizer to minimize the loss function until the loss function is minimized, or when the loss function no longer decreases significantly after multiple iterations, or when a preset maximum number of iterations is reached, the training process stops, and a trained decoder is obtained. Thus, by minimizing the loss function, the encoder is optimized, improving the encoder's data representation capability.
[0090] Specifically, in this embodiment, the Adam optimizer can be used to minimize the loss function, the expression of which is as follows:
[0091] Among them, y i This represents the actual behavioral data of the i-th sample. This represents the predicted behavior data obtained by the decoder for the i-th sample, where N is the batch size.
[0092] Lbehavior is the loss function value used to measure the predicted behavior data. and actual behavioral data y i The differences between them.
[0093] Step 102: Based on the second sample subset in the sample dataset, perform inner loop training and meta-learning training on the meta-aligner to obtain the trained meta-aligner.
[0094] In this embodiment, inner loop training refers to updating the aligner parameters based on training data for a single task, while meta-learning training involves jointly optimizing the aligner's generalization ability using training data from multiple tasks. In this way, the trained meta-aligner can quickly adapt to the neural signal distribution of new tasks, new time periods, or new individuals, thereby improving the accuracy and efficiency of behavior prediction.
[0095] Specifically, after the decoder completes training, meaning it has extracted an appropriate latent space for neural BCI decoding, this application further considers that neural signal recordings will change over time, by the individual, and by the task, and the decoder may not be usable for future decoding. Therefore, embodiments of this application will train a meta-aligner to convert neural activity into a latent space through an alignment function. This allows the model to learn a universal model initialization in any scenario across time, task, and / or individual, regardless of how the neural activity recorded by implanted cortical electrodes changes or drifts over time, task, or individual, enabling it to quickly adapt to new tasks and maintain the high performance of the BCI itself.
[0096] In one possible implementation, embodiments of this application can use a Transformer encoder as the architecture for the meta-aligner, constructing a novel transformer-based network architecture, Meta-AlignNN. This enables the meta-aligner to possess strong feature extraction and representation capabilities, capturing changes in the distribution of neural activity data across different scenarios, and outperforming other traditional methods in evaluation metrics on relevant datasets. Furthermore, a training strategy based on Model-Agnostic Meta-Learning (MAML) is employed to train the meta-aligner. For example, the meta-aligner may be trained in a multi-task setting during a meta-learning phase, allowing it to quickly adapt to new, unseen recording sessions exhibiting neural drift, even with limited neural data and a small number of training iterations.
[0097] In one possible implementation, this embodiment of the application will sample the second sample subset using a preset task construction strategy to obtain multiple training task sets corresponding to the second sample subset. Through these multiple training task sets, a meta-objective function representing the total loss value of the meta-aligner across the multiple training task sets will be obtained. Therefore, the model parameters of the meta-aligner will be adjusted using the meta-objective function to obtain a trained meta-aligner.
[0098] Specifically, this application samples from the second sample subset according to the task distribution p(T) to construct multiple training task sets T. i Thus, by covering scenarios across time, tasks, and individuals, and reflecting the different variations in neural signal distributions through the diversity of task sets, a foundation is laid for training the meta-aligner. This is achieved by constructing multiple training task sets T. i Then, the aligner parameters for each task are optimized through in-task training. A meta-objective function representing the total loss of the meta-aligner across multiple training task sets is obtained. This meta-objective function is used to evaluate the adaptability and generalization ability of the aligner's global parameters. Based on the meta-objective function, the global parameters ψ of the meta-aligner can be optimized using gradient descent to improve its cross-task adaptability.
[0099] Specifically, the model parameter adjustment process of the meta-aligner in this embodiment can be as follows: randomly initialize the model parameter ψ of the meta-aligner, and the optimization process randomly samples a batch of task sets T from the task distribution p(T). i ~p(T). For each task T i From T respectively i Sampling K samples, denoted as S i ={(x (j) y (j) Updating model parameters using gradient descent. Then from the same task set T i In the middle, a new batch of samples S was collected again. i′ ={(x (j) y (j) )}, and use the updated parameters Calculate the corresponding loss value Meta-update of model parameter ψ by combining the loss values from all tasks. Thus, through multiple iterations, the meta-aligner is gradually optimized across training task sets spanning time, tasks, and individuals, resulting in a meta-aligner model capable of rapidly adapting to new task distributions. This model significantly improves the stability and robustness of neural signal alignment and behavior prediction with less calibration data and training iterations.
[0100] In one possible implementation, the process of obtaining the meta-objective function in the embodiments of this application can be as follows: the model parameters of the meta-aligner are updated using the training data in each training task set and the loss function of the meta-aligner to obtain multiple update parameters; the test error corresponding to the training task set is obtained using the test data in each training task set and the corresponding update parameters; and the meta-objective function is obtained by summing the various test errors.
[0101] Specifically, the multiple training task sets T constructed in the embodiments of this application i In the middle, each task T i The dataset includes a training dataset S(x, y) and a test dataset Q(x, y). S(x, y) is used to train task-specific aligner parameters, and Q(x, y) is used to evaluate the adaptability of the parameters. The initial global parameters ψ of the aligner are optimized using the training data S(x, y) and a loss function, and task-specific update parameters are calculated for each task. That is, in each task T i Minimize the loss function on the training data S(x,y) Get the updated parameters Next, for each training task set T i After updating the parameters on the training dataset, the task-specific update parameters will be applied. It is applied to the corresponding test dataset Q(x, y) to calculate the in-task test error on the test data. By integrating the test errors from all training task sets and summing them, a meta-objective function is obtained. This meta-objective function is then used to optimize the global parameters of the aligner using methods such as gradient descent, thus enabling the training of the aligner. In this way, by integrating the test errors from multiple tasks, local adaptation within a task is combined with global generalization across tasks.
[0102] In one possible implementation, Figure 2 illustrates a meta-aligner training process provided by an embodiment of this application. The left side of Figure 2 shows the meta-learning training process, where Day 1, Day m, and Day M represent the time span of data collection, covering neural activity data across multiple time periods to generate a training task set spanning time, tasks, and individuals. This neural activity data is input into the corresponding aligners 1, m, and M. The initialization of the meta-training phase represents the initial state of the aligner's global parameters, which are optimized into the final aligner parameters after meta-training updates, gradually adapting to the task scenario of the future M+k days. The right side includes the testing and updating phases of the inner loop phase. The neural activity data is used for testing and updating the aligner, where channels represent multidimensional neural signals collected from different electrode channels, and time represents temporal signal segments segmented by a sliding window. In the inner-loop testing phase, neural activity data is first smoothed and input into the aligner to generate aligned neural signals. These signals are then decoded into predicted behavior values by a decoder with fixed parameters. The behavior loss is calculated from the difference between the actual behavior data and the predicted behavior data and is used to update the aligner parameters or evaluate its performance. The update process in the inner-loop phase involves optimizing the aligner parameters based on the behavior loss of the aligner on the task's training data, thus completing the local adaptation of the aligner within the task. In this way, through the cycle of training and testing within the task, the meta-aligner can be gradually optimized, making it more stable across all tasks and possessing stronger cross-task adaptability.
[0103] Specifically, in meta-learning, the meta-aligner is trained to adapt to a large number of tasks. A task involves inputting sample data corresponding to a session into the meta-aligner and using the aligned neural data to input into the decoder to predict behavior. Let p(T) denote the set of all training tasks corresponding to the second sample subset, where ψ represents the parameters of the meta-aligner used to align neural activities. The parameterizable function h with parameter ψ is... ψ Represents the meta aligner.
[0104] Formally, each task can be denoted as: T = {L(x, y), s(x, y), q(x, y)}
[0105] Where L(·) is the loss function, s(x, y) represents the training data, and q(x, y) represents the test data. Specifically, 80% of the sample data from recorded sessions spanning a certain time period, excluding the earlier sessions used to train the decoder, is selected as the test data for the meta-aligner, and the remaining 20% of the data is used as the test data. Each task includes both training and test data.
[0106] Specifically, taking a training task set T i Let's take T as an example to introduce the inner loop training of the meta-aligner: iK samples are randomly sampled from the training dataset s(x, y), and the corresponding loss function is applied. Perform gradient descent to update the parameters and obtain the updated parameters.
[0107] Among them, w dec The parameters are the pre-trained decoder parameters, which remain fixed during the training of the meta-aligner. α is the learning rate during the inner loop training phase. h ψ The latent representation of the output of the meta-aligner is that the meta-aligner can extract alignment features based on the input neural signal and the current parameter ψ, and output the aligned neural signal as the input of the decoder. The value representing the loss of the meta-aligner on this training task set is used to optimize the meta-aligner parameter ψ and minimize the gap between the predicted behavior and the actual behavior.
[0108] Next, the embodiments of this application require T i The new sample is tested on the existing test data q(x, y). ψ is updated based on the test error to minimize the prediction error of the new test data.
[0109] in, Indicates the use of updated parameters In the model, ψ represents the model that needs to be updated to minimize the test error.
[0110] In one possible implementation, to minimize the meta-objective function of the meta-aligner, this embodiment of the application can use stochastic gradient descent (SGD) to update the meta-aligner parameter ψ, and the specific update formula is as follows:
[0111] Where β represents the meta-learning rate.
[0112] It is important to note that the meta-optimization is performed on the parameter ψ, but the calculation of the objective function depends on the model parameters updated for each task. Therefore, when performing meta-optimization, a situation may occur where "gradient passes through gradient," resulting in relatively high computational overhead. Embodiments of this application may also use a first-order approximation to ignore the second derivative, thereby reducing computational overhead.
[0113] After obtaining a trained behavior prediction model, embodiments of this application can use the behavior prediction model to perform behavior prediction processing on the target neural signals of the target object to obtain the predicted behavior data of the target object output by the behavior prediction model.
[0114] Referring to Figure 3, a flowchart of a behavior prediction method based on neural signals provided in an embodiment of this application is shown. The specific implementation process of this method is as follows:
[0115] Step 301: Obtain the target neural signal of the target object and input the target neural signal into the trained behavior prediction model.
[0116] In this embodiment of the application, after the behavior prediction model is trained, the behavior of the target object can be predicted in real time based on the target neural signals.
[0117] In one possible implementation, the behavior prediction model can be fine-tuned before the actual prediction to further improve the model's prediction accuracy for the target object.
[0118] Specifically, it can collect raw neural signals and corresponding raw behavioral data generated by the target object in real time within a certain period of time, and perform preprocessing such as threshold cross-detection, data standardization, and sliding window processing to obtain the corresponding sample dataset S={(x (j) y (j) The trained meta-aligner h is fine-tuned using this sample dataset. ψ The fine-tuned aligner is obtained. The specific fine-tuning process can be referred to the in-task training in the aforementioned training process, and will not be repeated in this embodiment.
[0119] Step 302: Obtain the predicted behavior data of the target object output by the behavior prediction model.
[0120] In this embodiment of the application, the predicted behavior data of the target object can be obtained by predicting the real-time target neural signals of the target object through a pre-trained behavior prediction model.
[0121] Specifically, the behavior prediction model in this application can be applied to online brain control. By preprocessing the latest real-time acquired neural data through threshold cross-detection, data standardization, and sliding window processing, a target neural signal x is obtained. This target neural signal is then processed by an aligner. After alignment, it is handled by the decoder w dec Output predictive behavior data The system can display the predicted behavioral data (e.g., 2D cursor coordinates and the number of the mole hole hit) in real time through a display interface. Furthermore, by receiving behavioral feedback from the previous moment's online brain control, it adjusts and generates the latest neural data for the next moment, then generates the predicted behavioral data for the next moment, repeating this cycle until the session ends.
[0122] In this embodiment of the application, the prediction process of the target object's predicted behavior data during training is the same as the prediction process in actual application. Therefore, this process can be referred to in the detailed introduction of the aforementioned training process, and will not be elaborated further here.
[0123] In one possible implementation, Figure 4 illustrates a flowchart of model training and application according to an embodiment of this application. Figure 4 includes an offline process (model training process) and an online process (model application process). The offline process comprises four sub-processes: data acquisition, data preprocessing, data partitioning, and model training. In the data acquisition stage, raw datasets are acquired via cortical flexible electrode implantation, containing neural signals and behavioral data generated by two rhesus monkeys under three neural activity tasks. Next, in the data preprocessing stage, the acquired data undergoes data standardization, and a threshold cross-detection method is applied to extract impulses from the neural signals. Then, a sliding window segmentation method is used to window the neural signals, generating sample data. Subsequently, data partitioning is performed, dividing the preprocessed data according to time span, task span, and individual scenario span. First and second sample subsets are allocated for the decoder and meta-aligner, respectively, for subsequent model training. In the model training stage, the decoder and meta-aligner are trained based on the partitioned datasets. The meta-aligner performs inner-loop training on task-specific data to optimize task-specific parameters. Then, through meta-training, it integrates test errors from multiple tasks to optimize the meta-aligner's global parameters, improving its cross-task generalization ability. In the online process, real-time acquired neural signal data undergoes preprocessing, including data standardization, threshold cross-detection, and sliding window segmentation. The preprocessed data is then input into an offline-trained model for fine-tuning and prediction. By fine-tuning the model parameters to adapt to changes in real-time neural signals, it predicts motor intentions and outputs the predicted behavioral results as behavioral feedback for interactive control via brain-computer interface.
[0124] Please refer to Figure 5. Based on the same inventive concept, this application also provides a behavior prediction device 50 based on neural signals, which includes:
[0125] The acquisition unit 501 is used to acquire the target neural signal of the target object and input the target neural signal into the trained behavior prediction model;
[0126] Prediction unit 502 is used to obtain the predicted behavior data of the target object output by the behavior prediction model;
[0127] The behavior prediction model is trained on a sample dataset of multiple sample objects. The sample dataset includes sample neural signals and sample behavior data generated by the corresponding sample objects under multiple neural activity tasks. The behavior prediction model includes a decoder and a meta-aligner. The aligner is used to align the target neural signals to obtain aligned neural signal features. The decoder is used to predict the neural signal features and output the corresponding predicted behavior data.
[0128] Optionally, the device also includes a training unit 503 for:
[0129] Obtain the original datasets corresponding to multiple sample objects and preprocess the original datasets; the original datasets include the original neural signals and original behavioral data generated by the corresponding sample objects under multiple neural activity tasks;
[0130] Based on preset scenario conditions, the preprocessed original dataset is classified to obtain the corresponding sample dataset.
[0131] Optionally, training unit 503 is also used for:
[0132] Based on the first sample subset in the sample dataset, the decoder is iteratively trained until the loss function of the decoder satisfies the preset convergence condition, and the trained decoder is obtained.
[0133] Based on the second sample subset in the sample dataset, the meta-aligner is trained by inner loop training and meta-learning to obtain the trained meta-aligner.
[0134] Optional, training unit 503, specifically used for:
[0135] Based on the preset task construction strategy, the second sample subset is sampled to obtain multiple training task sets corresponding to the second sample subset;
[0136] Based on multiple training task sets, the meta-objective function of the meta-aligner is obtained. The meta-objective function represents the total loss value of the meta-aligner on multiple training task sets.
[0137] Based on the meta-objective function, the model parameters of the meta-aligner are adjusted to obtain the trained meta-aligner.
[0138] Optional, training unit 503, specifically used for:
[0139] Based on the training data in each training task set and the loss function of the meta-aligner, the model parameters of the meta-aligner are updated to obtain multiple updated parameters;
[0140] Based on the test data and corresponding update parameters in each training task set, the test error corresponding to the training task set is obtained.
[0141] The meta-objective function is obtained by summing up the individual test errors.
[0142] Optionally, the preset scene conditions include at least one of cross-time scene conditions, cross-task scene conditions, and cross-object scene conditions; wherein,
[0143] The representation of sample datasets corresponding to cross-time scenarios: data generated by the same sample object in two different time periods of the same neural activity task;
[0144] The sample dataset representation corresponding to cross-task scenarios: data generated by the same sample object in two similar time periods of different neural activity tasks;
[0145] The sample dataset representation for cross-object scenarios: data generated by different sample objects in two similar time periods of the same neural activity task; similar time periods represent that the time interval between the two corresponding time periods meets the preset interval conditions.
[0146] For ease of description, the above sections are divided into functional units (or modules) and described separately. Of course, in implementing this application, the functions of each unit (or module) can be implemented in one or more software or hardware components. Those skilled in the art will understand that various aspects of this application can be implemented as systems, methods, or program products. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as "circuit," "module," or "system."
[0147] This device can be used to execute the methods shown in the various embodiments of this application. Therefore, the functions that each functional module of this device can achieve can be referred to the description of the foregoing embodiments, and will not be repeated here.
[0148] Please refer to Figure 6. Based on the same technical concept, this application also provides a computer device 60. In one embodiment, the computer device can be a BCI system. As shown in Figure 6, the computer device includes a memory 601, a communication module 603, and one or more processors 602.
[0149] The memory 601 is used to store computer programs executed by the processor 602. The memory 601 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0150] Memory 601 may be volatile memory, such as random-access memory (RAM); memory 601 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 601 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 601 may be a combination of the above-described memories.
[0151] Processor 602 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 602 is used to implement the above-described neural signal-based behavior prediction method when calling computer programs stored in memory 601.
[0152] The communication module 603 is used to communicate with terminal devices such as signal acquisition equipment or other servers.
[0153] This application embodiment does not limit the specific connection medium between the memory 601, communication module 603, and processor 602. In Figure 6, the memory 601 and processor 602 are connected via a bus 604, which is depicted as a thick line. The connection methods between other components are merely illustrative and not intended to be limiting. The bus 604 can be an address bus, data bus, control bus, etc. For ease of description, Figure 6 uses only one thick line, but it does not imply that there is only one bus or one type of bus.
[0154] The memory 601 stores a computer storage medium, which stores computer-executable instructions. The computer-executable instructions are used to implement the neural signal-based behavior prediction method of the embodiments of this application. The processor 602 is used to execute the neural signal-based behavior prediction method of the above embodiments.
[0155] Based on the same inventive concept, embodiments of this application also provide a storage medium storing a computer program that, when run on a computer, causes the computer to perform the steps in the neural signal-based behavior prediction method described above according to various exemplary embodiments of this application.
[0156] In some possible implementations, various aspects of the neural signal-based behavior prediction method provided in this application can also be implemented in the form of a computer program product, which includes a computer program that, when run on a computer device, causes the computer device to perform the steps in the neural signal-based behavior prediction method according to various exemplary embodiments of this application described above. For example, the computer device can perform the steps of the various embodiments.
[0157] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0158] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include a computer program, and may run on a computer device. However, the program product of this application is not limited thereto. In this application, the readable storage medium may be any tangible medium that contains or stores a program, and the computer program included therein may be used by or in conjunction with a command execution system, apparatus, or device.
[0159] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.
[0160] Computer programs contained on readable media may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0161] Computer programs for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages.
[0162] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0163] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0164] 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.
[0165] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0166] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A behavior prediction method based on neural signals, characterized in that, The method includes: Acquire the target neural signals of the target object and input the target neural signals into the trained behavior prediction model; Obtain the predicted behavior data of the target object output by the behavior prediction model; The behavior prediction model is trained on a sample dataset of multiple sample objects. The sample dataset includes sample neural signals and sample behavior data generated by the corresponding sample objects under multiple neural activity tasks. The behavior prediction model includes a decoder and a meta-aligner. The aligner is used to align the target neural signals to obtain aligned neural signal features. The decoder is used to predict the neural signal features and output the corresponding predicted behavior data.
2. The method of claim 1, wherein, The sample dataset was obtained in the following way: Obtain the original datasets corresponding to multiple sample objects, and preprocess the original datasets; the original datasets include the original neural signals and original behavioral data generated by the corresponding sample objects under multiple neural activity tasks; Based on preset scenario conditions, the preprocessed original dataset is classified to obtain the corresponding sample dataset.
3. The method as described in claim 1, characterized in that, The behavior prediction model was trained in the following manner: Based on the first sample subset in the sample dataset, the decoder is iteratively trained until the loss function of the decoder satisfies the preset convergence condition, and the trained decoder is obtained. Based on the second sample subset in the sample dataset, the meta-aligner is trained by inner loop training and meta-learning to obtain a trained meta-aligner.
4. The method as described in claim 3, characterized in that, The step of performing inner loop training and meta-learning training on the meta-aligner based on the second sample subset to obtain a trained meta-aligner includes: Based on a preset task construction strategy, the second sample subset is sampled to obtain multiple training task sets corresponding to the second sample subset. Based on the multiple training task sets, the meta-objective function of the meta-aligner is obtained, and the meta-objective function represents the total loss value of the meta-aligner on the multiple training task sets. Based on the meta-objective function, the model parameters of the meta-aligner are adjusted to obtain a trained meta-aligner.
5. The method of claim 4, wherein, The step of obtaining the meta-objective function of the meta-aligner based on the multiple training task sets includes: Based on the training data in each training task set and the loss function of the meta-aligner, the model parameters of the meta-aligner are updated to obtain multiple updated parameters; Based on the test data and corresponding update parameters in each training task set, the test error corresponding to the training task set is obtained. The meta-objective function is obtained by summing up the various test errors.
6. The method of claim 2, wherein, The preset scenario conditions include at least one of cross-time scenario conditions, cross-task scenario conditions, and cross-object scenario conditions; wherein... The sample dataset corresponding to the cross-time scenario is characterized as: data generated by the same sample object in two different time periods of the same neural activity task; The sample dataset corresponding to the cross-task scenario is characterized as: data generated by the same sample object in two similar time periods of different neural activity tasks; The sample dataset corresponding to the cross-object scenario is characterized as follows: data generated by different sample objects in two similar time periods of the same neural activity task; the similar time periods indicate that the time interval between the two corresponding time periods meets the preset interval condition.
7. A behavior prediction device based on neural signals, characterized by, The device includes: The acquisition unit is used to acquire the target neural signal of the target object and input the target neural signal into the trained behavior prediction model; The prediction unit is used to obtain the predicted behavior data of the target object output by the behavior prediction model; The behavior prediction model is trained on a sample dataset of multiple sample objects. The sample dataset includes sample neural signals and sample behavior data generated by the corresponding sample objects under multiple neural activity tasks. The behavior prediction model includes a decoder and a meta-aligner. The aligner is used to align the target neural signals to obtain aligned neural signal features. The decoder is used to predict the neural signal features and output the corresponding predicted behavior data.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer storage medium storing computer program instructions thereon, characterized in that, When executed by a processor, the computer program instructions implement the steps of the method according to any one of claims 1 to 6.
10. A computer program product comprising computer program instructions, characterized in that, When executed by a processor, the computer program instructions implement the steps of the method according to any one of claims 1 to 6.