Closed-loop adaptive brain‑machine interface decoding method and device based on reinforcement learning

By adopting a closed-loop adaptive decoding method based on reinforcement learning in the brain-computer interface, combined with the DQN algorithm and supervised learning neural network, the problems of low efficiency and poor accuracy of traditional decoders are solved, and fast and high-accuracy neural networks are realized. Signal decoding, suitable for label-free scenarios.

WO2024197457A1PCT designated stage expired Publication Date: 2024-10-03SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI

Patent Information

Application Number
PCT/CN2023/083704
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing brain-computer interface decoders have low efficiency and poor accuracy when decoding neural signals. In particular, traditional direct decoding methods cannot effectively learn deep features and cannot quickly adapt in unlabeled scenes.

Method used

A closed-loop adaptive decoding method based on reinforcement learning is adopted, and the DQN algorithm is combined with the neural network of supervised learning to realize the mapping of neural signals and action instructions, and adapt to each other in the training and testing stages, avoiding trial-and-error learning and improving decoding efficiency. and accuracy.

Benefits of technology

It achieves fast decoding and high accuracy, can effectively learn and decode in unlabeled scenes, has better decoding results than traditional methods, and can quickly establish the mapping relationship between neural signals and actions in the early stages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023083704_03102024_PF_FP_ABST
    Figure CN2023083704_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the field of neural signal decoding, and in particular to a closed-loop adaptive brain‑machine interface decoding method and device based on reinforcement learning. The method and device comprise: pre-processing a collected neural signal of a test animal body; inputting the pre-processed neural signal into a decoder and mapping same into a specific action instruction, and the test animal body performing visual feedback on the executed specific action instruction to generate a new neural signal; and inputting the new neural signal into the decoder, enabling the decoder to generate a new action instruction to form a closed loop, and fusing a reinforcement learning theory and a brain-machine interface decoding paradigm. The brain and the decoder perform mutual learning and mutual adaptation, label signals are not needed, and this is also in line with the law of biological learning.
Need to check novelty before this filing date? Find Prior Art

Description

A closed-loop adaptive brain-computer interface decoding method and device based on reinforcement learning Technical Field

[0001] The present invention relates to the field of neural signal decoding, and in particular to a closed-loop adaptive brain-computer interface decoding method and device based on reinforcement learning. Background Art

[0002] A brain-machine interface (BMI) decoder is a computational model designed to translate neural activity into human-understandable commands for controlling external devices, such as prosthetic limbs, wheelchairs, and computer games. This technology is a key component of brain-machine interfaces (BMIs). A BMI decoder works by converting neural signals from the brain into commands for controlling external devices. These neural signals are typically recorded via implanted electrodes or non-invasive neuroimaging techniques such as electroencephalography (EEG). By decoding and analyzing these signals, the computational model can identify human intentions and behaviors and translate them into machine-understandable commands, thereby achieving the purpose of controlling external devices. BMI decoders have applications in both clinical and laboratory settings. In clinical settings, BMI decoders can help people who have lost motor skills regain the ability to control prosthetic limbs or wheelchairs. In the laboratory, they can help neuroscientists better understand how the brain controls behavior and movement and provide basic research support for the development of new BMI technologies.

[0003] Closed-loop decoder adaptation is a BCI decoder paradigm that allows real-time adjustments based on feedback signals, thereby improving decoder accuracy and reliability. Compared to traditional open-loop decoders, it can better adapt to diverse neural signals and actual use cases, thereby improving the performance and stability of BCI systems. A closed-loop adaptive decoder typically consists of two main components: a decoder and a feedback control loop. The decoder is responsible for converting neural signals into control signals, while the feedback control loop provides real-time feedback for adjustment. This adjustment can be achieved in various ways, such as adjusting decoder parameters, selecting different neural signal features, or adjusting the time delay of the feedback signal. Closed-loop adaptive decoders can help overcome many common issues, such as unstable signals, signal loss, and nonlinear neural responses. They can also better adapt to individual differences and dynamically changing brain activity, thereby improving decoder accuracy and reliability, enabling better control of external devices or execution of behavioral tasks. Closed-loop adaptive decoders have been widely used in BCI research and have been applied to many application scenarios, such as prosthetic control and brain-controlled gaming. In the future, with the continuous development of brain-computer interface technology, closed-loop adaptive decoders will continue to play an important role in helping humans better control and interact with external devices, as well as providing a deeper understanding of neuroscience research. Current decoders are mainly divided into traditional direct decoding and decoding using a new paradigm of closed-loop adaptive decoders. Among them, the traditional decoder that directly decodes neural signals is mainly used for offline decoding, decoding offline data, where decoding methods such as RNN networks are often used, such as using long short-term memory networks (LSTM) as decoders to extract temporal information from neural signals. Due to the rise of closed-loop adaptive decoders and their excellent results, more and more research has begun to pay attention to this emerging paradigm. For example, Wu, Zhang and others used this paradigm for decoding, where the decoder module mainly uses methods such as Kalman filtering or support vector regression.

[0004] Traditional direct decoding decoders are often used in offline scenarios. Because they only unilaterally learn from the brain's neural signals, learning efficiency is lower and decoding accuracy is lower than that of closed-loop adaptive decoders. Within the closed-loop adaptive decoder paradigm, there are currently methods based on Kalman filtering and traditional machine learning, such as support vector regression and random forests. However, these methods learn more superficially than artificial neural networks and are less able to learn deep features. Therefore, they are not as effective as deep learning methods.

[0005] Summary of the Invention

[0006] The embodiment of the present invention provides a closed-loop adaptive brain-computer interface decoding method and device based on reinforcement learning, so as to design a decoder that can both quickly decode and ensure decoding accuracy for application in the brain-computer interface.

[0007] According to one embodiment of the present invention, a closed-loop adaptive brain-computer interface decoding method based on reinforcement learning is provided, comprising the following steps:

[0008] S101: Preprocessing the collected neural signals of the test animal;

[0009] S102: Inputting the pre-processed neural signal into the decoder to map it into a specific action instruction, and the test animal receives visual feedback of the executed specific action instruction to generate a new neural signal;

[0010] S103: The new neural signal is input to the decoder, and the decoder generates new action instructions, forming a closed loop that integrates reinforcement learning theory and brain-computer interface decoding paradigm.

[0011] Furthermore, the method further comprises:

[0012] S100: Collecting neural signals from the test animal.

[0013] Furthermore, in step S101 , preprocessing includes amplification, filtering, and denoising.

[0014] Furthermore, the specific action instruction includes moving a cursor to a specified position. After the decoder generates a new action instruction, it assists the test animal in moving the cursor to a fixed position by setting constraints.

[0015] Further, the method includes a training part and a testing part;

[0016] In the training phase, the monkey is trained to push the joystick to control the cursor to a specified position, and a reward is given to the monkey at this point. The training phase uses a supervised learning neural network as a decoder, with the target as the supervised learning label. Through training, a mapping relationship between neural signals and actions is established, and the trained model is saved.

[0017] During the testing phase, the monkey controlled the cursor movement through imagination. The monkey generated the intention to control the cursor movement by observing the position of the cursor on the screen. At this time, the decoder was replaced with a reinforcement learning algorithm to act as a decoder for decoding.

[0018] Furthermore, the reinforcement learning algorithm is DQN, in which the network that maps states to actions is directly loaded into the training phase using model parameters trained by a neural network with supervised learning.

[0019] Furthermore, during the training phase, the monkey used a joystick to control the cursor on the page. A circle of a different color appeared in each trial. After training, the monkey knew that moving the current cursor to the target position would result in a reward.

[0020] At the beginning of each trial, neural signals are collected. After the signals are collected, they need to be amplified and denoised. The processed data is 256 channels, half-precision floating-point data with a sampling rate of 30kHz for each channel. The collected data is then downsampled to 1kHz using a fixed-interval sampling method. After that, the data is converted to the frequency domain, and specific frequency band features are extracted. The frequency band is set according to the specific task. These features are used as neural network inputs, and the target position is used as a label. A multi-layer perceptron network is used to perform the classification task on the above data, and the trained model is saved as a .pth file.

[0021] Furthermore, in the test phase, the monkeys used imagination to control the cursor movement and eventually reached the target area;

[0022] In this process, the decoder first loads the previously saved PTH model, specifically the DQN network acting as a decoder. The DQN network uses the same network structure as the previous supervised deep learning. Then, by loading the trained parameter model, the input neural signal is extracted and decoded, and the corresponding action command is output.

[0023] The output instruction updates the cursor position on the page. At this time, the monkey knows the cursor change through visual feedback and generates a new neural signal. The new neural signal is input into the decoder, and the decoder generates a new action, thus forming a closed loop.

[0024] According to another embodiment of the present invention, a closed-loop adaptive brain-computer interface decoding device based on reinforcement learning is provided, comprising:

[0025] A preprocessing unit, used for preprocessing the collected neural signals of the test animal;

[0026] A new neural signal generating unit is used to input the pre-processed neural signal into the decoder and map it into a specific action instruction, and the test animal generates a new neural signal by providing visual feedback on the specific action instruction executed;

[0027] The new action instruction generation unit is used to input new neural signals into the decoder. The decoder generates new action instructions, forming a closed loop that integrates reinforcement learning theory and brain-computer interface decoding paradigm.

[0028] Furthermore, the device also includes:

[0029] The signal acquisition unit is used to collect nerve signals from the test animal.

[0030] A storage medium storing a program file capable of implementing any one of the above-mentioned closed-loop adaptive brain-computer interface decoding methods based on reinforcement learning.

[0031] A processor is used to run a program, wherein when the program is running, any one of the above-mentioned closed-loop adaptive brain-computer interface decoding methods based on reinforcement learning is executed.

[0032] The closed-loop adaptive brain-computer interface decoding method and device based on reinforcement learning in the embodiment of the present invention inputs the preprocessed neural signal into the decoder and maps it into specific action instructions. The test animal provides visual feedback on the specific action instructions executed to generate new neural signals. The new neural signals are input to the decoder, and the decoder generates new action instructions, forming a closed loop. The reinforcement learning theory and the brain-computer interface decoding paradigm are integrated. The brain and the decoder learn from each other and adapt to each other without the need for label signals, which is in line with the laws of biological learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0034] FIG1 is a flow chart of a closed-loop adaptive brain-computer interface decoding method based on reinforcement learning of the present invention;

[0035] FIG2 is a preferred flow chart of the closed-loop adaptive brain-computer interface decoding method based on reinforcement learning of the present invention;

[0036] FIG3 is a schematic diagram of a closed-loop adaptive decoder in the present invention;

[0037] FIG4 is a diagram of a reinforcement learning model in the present invention;

[0038] FIG5 is a diagram illustrating a closed-loop adaptive decoder according to the present invention;

[0039] FIG6 is a scene diagram of the macaque training stage in the present invention;

[0040] FIG7 is a module diagram of a closed-loop adaptive brain-computer interface decoding device based on reinforcement learning of the present invention;

[0041] FIG8 is a preferred module diagram of the closed-loop adaptive brain-computer interface decoding device based on reinforcement learning of the present invention. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0043] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0044] Example 1

[0045] According to one embodiment of the present invention, a closed-loop adaptive brain-computer interface decoding method based on reinforcement learning is provided, as shown in FIG1 , comprising the following steps:

[0046] S101: Preprocessing the collected neural signals of the test animal;

[0047] S102: Inputting the pre-processed neural signal into the decoder to map it into a specific action instruction, and the test animal receives visual feedback of the executed specific action instruction to generate a new neural signal;

[0048] S103: The new neural signal is input to the decoder, and the decoder generates new action instructions, forming a closed loop that integrates reinforcement learning theory and brain-computer interface decoding paradigm.

[0049] The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning in the embodiment of the present invention inputs the preprocessed neural signal into the decoder and maps it into specific action instructions. The test animal provides visual feedback on the specific action instructions executed to generate new neural signals. The new neural signals are input to the decoder, and the decoder generates new action instructions, forming a closed loop. It integrates reinforcement learning theory and the brain-computer interface decoding paradigm. The brain and the decoder learn from each other and adapt to each other without the need for label signals, which is in line with the laws of biological learning.

[0050] Wherein, referring to FIG2 , the method further includes:

[0051] S100: Collecting neural signals from the test animal.

[0052] In step S101 , preprocessing includes amplification, filtering, and denoising.

[0053] Among them, the specific action instruction includes moving the cursor to a specified position. After the decoder generates a new action instruction, it assists the test animal to move the cursor to a fixed position by setting constraints.

[0054] Among them, the method includes a training part and a testing part;

[0055] In the training phase, the monkey is trained to push the joystick to control the cursor to a specified position, and a reward is given to the monkey at this point. The training phase uses a supervised learning neural network as a decoder, with the target as the supervised learning label. Through training, a mapping relationship between neural signals and actions is established, and the trained model is saved.

[0056] During the testing phase, the monkey controlled the cursor movement through imagination. The monkey generated the intention to control the cursor movement by observing the position of the cursor on the screen. At this time, the decoder was replaced with a reinforcement learning algorithm to act as a decoder for decoding.

[0057] Among them, the reinforcement learning algorithm is DQN, in which the network that maps states to actions is directly loaded into the training phase using the model parameters trained by the neural network with supervised learning.

[0058] In other embodiments, the reinforcement learning algorithm may also adopt: Q-learning, SARSA, deep reinforcement learning algorithm.

[0059] During the training phase, the monkey used a joystick to control the cursor on the page. A circle of a different color appeared in each trial. After training, the monkey knew that moving the current cursor to the target position would result in a reward.

[0060] At the beginning of each trial, neural signals are collected. After the signals are collected, they need to be amplified and denoised. The processed data is 256 channels, half-precision floating-point data with a sampling rate of 30kHz for each channel. The collected data is then downsampled to 1kHz using a fixed-interval sampling method. After that, the data is converted to the frequency domain, and specific frequency band features are extracted. The frequency band is set according to the specific task. These features are used as neural network inputs, and the target position is used as a label. A multi-layer perceptron network is used to perform the classification task on the above data, and the trained model is saved as a .pth file.

[0061] In the test phase, the monkeys used imagination to control the movement of the cursor and eventually reached the target area;

[0062] In this process, the decoder first loads the previously saved PTH model, specifically the DQN network acting as a decoder. The DQN network uses the same network structure as the previous supervised deep learning. Then, by loading the trained parameter model, the input neural signal is extracted and decoded, and the corresponding action command is output.

[0063] The output instruction updates the cursor position on the page. At this time, the monkey knows the cursor change through visual feedback and generates a new neural signal. The new neural signal is input into the decoder, and the decoder generates a new action, thus forming a closed loop.

[0064] The following is a detailed description of the closed-loop adaptive brain-computer interface decoding method based on reinforcement learning of the present invention using a specific embodiment:

[0065] Neural decoding involves recording brain neural activity and using computational models to analyze that activity in order to infer the cognitive or behavioral processes being experienced or executed by the observer. Decoder design is crucial in neural decoding. Designing a decoder that can decode quickly and accurately is crucial in brain-computer interface applications.

[0066] To address the issues with the aforementioned decoders, the present invention has designed a new decoding paradigm based on deep learning and reinforcement learning. This new approach also includes a brain-computer interface decoder based on closed-loop decoding, which controls cursor movement on the screen by decoding neural signals. This decoder combines the rapid convergence of supervised deep learning methods with the advantage of reinforcement learning, which does not require labels. Both algorithms use the same neural network for learning, but the reinforcement learning algorithm later directly uses the network trained with the supervised deep learning algorithm. This eliminates the need for extensive random exploration in the early stages of the reinforcement learning algorithm, significantly reducing convergence time.

[0067] The basic contents of the technical solution of the present invention include:

[0068] As shown in Figure 3, neural signals collected from an animal, such as a monkey, are collected via neural microelectrodes and then sent to a PC through amplification, filtering, and denoising. The PC then executes the decoder code, which maps the neural signal into a specific action command, such as moving a cursor up or down. The actuator executes this movement command, updating the screen in real time. The updated page is displayed on the monitor. The monkey observes the updated page on the monitor and generates a corresponding new neural signal, thus forming a closed decoding loop. Due to the plasticity of the monkey's neurons, they autonomously adjust to move the cursor to a specified position during this process. The decoder, by setting constraints, assists the monkey in moving the cursor to a fixed position. The monkey and decoder adapt and learn from each other to complete the same task.

[0069] The present invention mainly includes two parts, namely the training part and the testing part. In the training part, the monkey pushes the joystick to control the cursor to reach the specified position, and the monkey is rewarded with juice at this time. In the training stage, a supervised learning neural network is used as a decoder. Because there are labels in the training part, the target can be used as a supervised learning label in this process. Through training, a mapping relationship between neural signals and actions can be established, and the trained model can be saved. In the testing stage, the monkey controls the movement of the cursor through imagination. The monkey does not push the joystick, but the monkey generates the intention to control the movement of the cursor by observing the position of the cursor on the screen. At this time, the decoder is replaced by a reinforcement learning algorithm to act as a decoder for decoding. The reinforcement learning algorithm used here is the DQN algorithm. In this algorithm, the network that maps the state to the action is directly loaded into the model parameters trained by the neural network with supervised learning in the training stage. This avoids trial and error learning, thereby improving efficiency and accuracy, and making the system more practical.

[0070] First, let's introduce reinforcement learning. Reinforcement learning is an important branch of machine learning that aims to learn how to make optimal decisions through interaction with the environment. Reinforcement learning models are generally composed of the following five basic elements:

[0071] State: Represents the state of the environment, such as the state of a board in a game or sensor readings from a robot.

[0072] Action: represents the operation performed by an agent in a certain state, such as the movement of chess pieces in a game or the movement of a robot.

[0073] Reward: This is the feedback received for performing an action in a certain state, usually a scalar value. Rewards can be positive, negative, or zero, reflecting the quality of the action.

[0074] Environment: The environment is the external environment in which the agent exists, including all possible states and actions, as well as the feedback signals from the environment to the agent. The environment can be a real physical environment or a simulated environment, such as a game environment.

[0075] Agent: An agent is an algorithm or model that learns decision-making strategies. By interacting with the environment, the agent continuously observes the current state, makes decisions, and executes actions. It also receives rewards and penalties from the environment to provide feedback on the quality of its decisions. The agent's goal is to learn an optimal decision-making strategy that maximizes long-term cumulative rewards.

[0076] Based on these elements, a reinforcement learning model can be described using a mathematical model. This model can calculate the next action based on the current state, historical actions and rewards, and feedback signals provided by the environment, thereby enabling autonomous decision-making and action. Common reinforcement learning algorithms include Q-learning, SARSA, and deep reinforcement learning. These algorithms can select different strategies and value functions based on different tasks to achieve optimal decision-making. Reinforcement learning models have been widely used in many fields, such as robotic control, game AI, and autonomous driving. Through reinforcement learning, intelligent agents can learn optimal strategies from their interactions with the environment, continuously optimizing their performance and performance.

[0077] As shown in Figure 5, in the present invention, the decoder in Figure 5 is regarded as the intelligent agent in Figure 4. The decoder generates actions, and the monkey's brain and external devices such as the display are the external environment for the decoder. The neural signals transmitted by the monkey's brain to the decoder in Figure 5 correspond to the state received by the intelligent agent in Figure 4. When the decoder receives the neural signal, it generates a corresponding action instruction. After receiving the action instruction, the host updates the display state. After the display state changes, the monkey observes the corresponding change and the brain encodes and generates a new neural signal. The new neural signal can be regarded as a new state, thus forming a closed loop. Here, the reinforcement learning theory and the brain-computer interface decoding paradigm are integrated. The brain and decoder learn from each other and adapt to each other without the need for label signals, which is in line with the law of biological learning.

[0078] As shown in Figure 6, during the training phase, the monkey used a joystick to control the cursor on the page. A circle of a different color appeared in each trial. After training, the monkey learned that moving the cursor from its current position to the target position would result in a juice reward. At the beginning of each trial, neural signals were collected using a Utah electrode. After acquisition, the signals were amplified and processed, including noise reduction. The processed data was 256 channels, with each channel sampling at a 30kHz sampling rate and half-precision floating-point data. The collected data was then downsampled to a 1kHz sampling rate using a fixed-interval sampling method. The data was then converted to the frequency domain, and specific frequency band features were extracted. Frequency bands were set according to the specific task. These features were used as neural network inputs. The target position was then used as a label. A multilayer perceptron network was used to classify the data, and the trained model was saved as a .pth file.

[0079] During the testing phase, the monkey needed to use imagination to control the cursor's movement until it reached the target area. During this process, the decoder first loaded a previously saved PTH model. The Deep Q Learning (DQN) network served as the decoder, using the same network structure as previous supervised deep learning methods. The DQN network then loaded the trained parameter model to extract features and decode the input neural signals, outputting the corresponding action commands. These output commands updated the cursor position on the page. The monkey then perceived the cursor's movement through visual feedback, generating new neural signals. These new neural signals were fed into the decoder, which in turn generated new actions, thus forming a closed loop.

[0080] The key points and intended protection points of the present invention are:

[0081] The supervised deep learning solution is combined with the reinforcement learning solution that does not require labels. During the training phase (joystick control), supervised deep learning decoding ensures that training can be completed in a short time (establishing the mapping relationship between neural signals and actions). During the testing phase (control through intention), the reinforcement learning solution ensures that learning and decoding can be carried out well without the need for a label decoder.

[0082] Compared with the prior art, the advantages of the present invention are:

[0083] Compared with the traditional direct decoding method, the present invention has better decoding effect and can achieve online decoding effect. Compared with the general closed-loop adaptive decoder, the present invention can quickly establish the mapping relationship between neural signals and actions in the early stage, and can also be applied to unlabeled scenarios.

[0084] The present invention has been tested and simulated, and the model has been tested, and it can basically achieve the technical effect of the present invention. The present invention can be used not only in implantable brain-computer interfaces, but also in non-implantable brain-computer interfaces based on EEG data.

[0085] Example 2

[0086] According to another embodiment of the present invention, a closed-loop adaptive brain-computer interface decoding device based on reinforcement learning is provided, as shown in FIG7 , comprising:

[0087] A preprocessing unit 201 is used to preprocess the collected neural signals of the test animal;

[0088] A new neural signal generating unit 202 is used to input the pre-processed neural signal into the decoder and map it into a specific action instruction. The test animal performs visual feedback on the specific action instruction to generate a new neural signal.

[0089] The new action instruction generating unit 203 is used to input new neural signals to the decoder, and the decoder generates new action instructions, forming a closed loop that integrates reinforcement learning theory and brain-computer interface decoding paradigm.

[0090] The closed-loop adaptive brain-computer interface decoding device based on reinforcement learning in the embodiment of the present invention inputs the preprocessed neural signal into the decoder and maps it into specific action instructions. The test animal body provides visual feedback on the specific action instructions executed to generate new neural signals. The new neural signals are input to the decoder, and the decoder generates new action instructions, forming a closed loop. It integrates reinforcement learning theory and brain-computer interface decoding paradigm. The brain and decoder learn from each other and adapt to each other without the need for label signals, which is in line with the laws of biological learning.

[0091] Wherein, referring to FIG8 , the device further includes:

[0092] The signal acquisition unit 200 is used to acquire nerve signals from the test animal.

[0093] The following is a detailed description of the closed-loop adaptive brain-computer interface decoding device based on reinforcement learning of the present invention using a specific embodiment:

[0094] Neural decoding involves recording brain neural activity and using computational models to analyze that activity in order to infer the cognitive or behavioral processes being experienced or executed by the observer. Decoder design is crucial in neural decoding. Designing a decoder that can decode quickly and accurately is crucial in brain-computer interface applications.

[0095] To address the issues with the aforementioned decoders, the present invention has designed a new decoding paradigm based on deep learning and reinforcement learning. This new approach also includes a brain-computer interface decoder based on closed-loop decoding, which controls cursor movement on the screen by decoding neural signals. This decoder combines the rapid convergence of supervised deep learning methods with the advantage of reinforcement learning, which does not require labels. Both algorithms use the same neural network for learning, but the reinforcement learning algorithm later directly uses the network trained with the supervised deep learning algorithm. This eliminates the need for extensive random exploration in the early stages of the reinforcement learning algorithm, significantly reducing convergence time.

[0096] The basic contents of the technical solution of the present invention include:

[0097] As shown in Figure 3, neural signals collected from an animal, such as a monkey, are collected via neural microelectrodes and then sent to a PC through amplification, filtering, and denoising. The PC then executes the decoder code, which maps the neural signal into a specific action command, such as moving a cursor up or down. The actuator executes this movement command, updating the screen in real time. The updated page is displayed on the monitor. The monkey observes the updated page on the monitor and generates a corresponding new neural signal, thus forming a closed decoding loop. Due to the plasticity of the monkey's neurons, they autonomously adjust to move the cursor to a specified position during this process. The decoder, by setting constraints, assists the monkey in moving the cursor to a fixed position. The monkey and decoder adapt and learn from each other to complete the same task.

[0098] The present invention mainly includes two parts, namely the training part and the testing part. In the training part, the monkey pushes the joystick to control the cursor to reach the specified position, and the monkey is rewarded with juice at this time. In the training stage, a supervised learning neural network is used as a decoder. Because there are labels in the training part, the target can be used as a supervised learning label in this process. Through training, a mapping relationship between neural signals and actions can be established, and the trained model can be saved. In the testing stage, the monkey controls the movement of the cursor through imagination. The monkey does not push the joystick, but the monkey generates the intention to control the movement of the cursor by observing the position of the cursor on the screen. At this time, the decoder is replaced by a reinforcement learning algorithm to act as a decoder for decoding. The reinforcement learning algorithm used here is the DQN algorithm. In this algorithm, the network that maps the state to the action is directly loaded into the model parameters trained by the neural network with supervised learning in the training stage. This avoids trial and error learning, thereby improving efficiency and accuracy, and making the system more practical.

[0099] First, let's introduce reinforcement learning. Reinforcement learning is an important branch of machine learning that aims to learn how to make optimal decisions through interaction with the environment. Reinforcement learning models are generally composed of the following five basic elements:

[0100] State: Represents the state of the environment, such as the state of a board in a game or sensor readings from a robot.

[0101] Action: represents the operation performed by an agent in a certain state, such as the movement of chess pieces in a game or the movement of a robot.

[0102] Reward: This is the feedback received for performing an action in a certain state, usually a scalar value. Rewards can be positive, negative, or zero, reflecting the quality of the action.

[0103] Environment: The environment is the external environment in which the agent exists, including all possible states and actions, as well as the feedback signals from the environment to the agent. The environment can be a real physical environment or a simulated environment, such as a game environment.

[0104] Agent: An agent is an algorithm or model that learns decision-making strategies. By interacting with the environment, the agent continuously observes the current state, makes decisions, and executes actions. It also receives rewards and penalties from the environment to provide feedback on the quality of its decisions. The agent's goal is to learn an optimal decision-making strategy that maximizes long-term cumulative rewards.

[0105] Based on these elements, a reinforcement learning model can be described using a mathematical model. This model can calculate the next action based on the current state, historical actions and rewards, and feedback signals provided by the environment, thereby enabling autonomous decision-making and action. Common reinforcement learning algorithms include Q-learning, SARSA, and deep reinforcement learning. These algorithms can select different strategies and value functions based on different tasks to achieve optimal decision-making. Reinforcement learning models have been widely used in many fields, such as robotic control, game AI, and autonomous driving. Through reinforcement learning, intelligent agents can learn optimal strategies from their interactions with the environment, continuously optimizing their performance and performance.

[0106] As shown in Figure 5, in the present invention, the decoder in Figure 5 is regarded as the intelligent agent in Figure 4. The decoder generates actions, and the monkey's brain and external devices such as the display are the external environment for the decoder. The neural signals transmitted by the monkey's brain to the decoder in Figure 5 correspond to the state received by the intelligent agent in Figure 4. When the decoder receives the neural signal, it generates a corresponding action instruction. After receiving the action instruction, the host updates the display state. After the display state changes, the monkey observes the corresponding change and the brain encodes and generates a new neural signal. The new neural signal can be regarded as a new state, thus forming a closed loop. Here, the reinforcement learning theory and the brain-computer interface decoding paradigm are integrated. The brain and decoder learn from each other and adapt to each other without the need for label signals, which is in line with the law of biological learning.

[0107] As shown in Figure 6, during the training phase, the monkey used a joystick to control the cursor on the page. A circle of a different color appeared in each trial. After training, the monkey learned that moving the cursor from its current position to the target position would result in a juice reward. At the beginning of each trial, neural signals were collected using a Utah electrode. After acquisition, the signals were amplified and processed, including noise reduction. The processed data was 256 channels, with each channel sampling at a 30kHz sampling rate and half-precision floating-point data. The collected data was then downsampled to a 1kHz sampling rate using a fixed-interval sampling method. The data was then converted to the frequency domain, and specific frequency band features were extracted. Frequency bands were set according to the specific task. These features were used as neural network inputs. The target position was then used as a label. A multilayer perceptron network was used to classify the data, and the trained model was saved as a .pth file.

[0108] During the testing phase, the monkey needed to use imagination to control the cursor's movement until it reached the target area. During this process, the decoder first loaded a previously saved PTH model. The Deep Q Learning (DQN) network served as the decoder, using the same network structure as previous supervised deep learning methods. The DQN network then loaded the trained parameter model to extract features and decode the input neural signals, outputting the corresponding action commands. These output commands updated the cursor position on the page. The monkey then perceived the cursor's movement through visual feedback, generating new neural signals. These new neural signals were fed into the decoder, which in turn generated new actions, thus forming a closed loop.

[0109] The key points and intended protection points of the present invention are:

[0110] The supervised deep learning solution is combined with the reinforcement learning solution that does not require labels. During the training phase (joystick control), supervised deep learning decoding ensures that training can be completed in a short time (establishing the mapping relationship between neural signals and actions). During the testing phase (control through intention), the reinforcement learning solution ensures that learning and decoding can be carried out well without the need for a label decoder.

[0111] Compared with the prior art, the advantages of the present invention are:

[0112] Compared with the traditional direct decoding method, the present invention has better decoding effect and can achieve online decoding effect. Compared with the general closed-loop adaptive decoder, the present invention can quickly establish the mapping relationship between neural signals and actions in the early stage, and can also be applied to unlabeled scenarios.

[0113] The present invention has been tested and simulated, and the model has been tested, and it can basically achieve the technical effect of the present invention. The present invention can be used not only in implantable brain-computer interfaces, but also in non-implantable brain-computer interfaces based on EEG data.

[0114] Example 3

[0115] A storage medium storing a program file capable of implementing any one of the above-mentioned closed-loop adaptive brain-computer interface decoding methods based on reinforcement learning.

[0116] Example 4

[0117] A processor is used to run a program, wherein when the program is running, any one of the above-mentioned closed-loop adaptive brain-computer interface decoding methods based on reinforcement learning is executed.

[0118] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0119] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0120] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0121] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0122] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0124] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A closed-loop adaptive brain-computer interface decoding method based on reinforcement learning, characterized in that: The following steps are involved: S101: preprocessing the collected neural signals of the test animal; S102: inputting the preprocessed neural signal into the decoder to map it into a specific action instruction, and the test animal performs visual feedback on the executed specific action instruction to generate a new neural signal; S103: The new neural signal is input to the decoder, and the decoder generates new action instructions, forming a closed loop that integrates reinforcement learning theory and brain-computer interface decoding paradigm.

2. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 1 is characterized in that: The method further comprises: S100: Collecting neural signals from the test animal.

3. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 1 is characterized in that: In step S101, preprocessing includes amplification, filtering, and denoising.

4. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 1 is characterized in that: The specific action instructions include moving the cursor to a specified position. After the decoder generates a new action instruction, it will assist the test animal to move the cursor to a fixed position by setting constraints.

5. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 1, characterized in that: The method comprises a training part and a testing part; In the training part, the monkey is trained to push the joystick to control the cursor to the specified position, and the monkey is rewarded at this time; the supervised learning neural network is used as a decoder in the training stage, and the target is used as a supervised learning label. Through training, a mapping relationship between neural signals and actions is established, and the trained model is saved; During the testing phase, the monkey controlled the cursor movement through imagination. The monkey generated the intention to control the cursor movement by observing the position of the cursor on the screen. At this time, the decoder was replaced with a reinforcement learning algorithm to act as a decoder for decoding.

6. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 5 is characterized in that: The reinforcement learning algorithm is DQN, in which the network that maps states to actions is directly loaded into the training phase using the model parameters trained by the neural network with supervised learning.

7. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 5 is characterized in that: In the training phase, the monkey used a joystick to control the cursor on the page to move. At this time, a circle of a different color appeared in each trial. After training, the monkey knew that moving the current cursor to the target position would be rewarded; At the beginning of each trial, neural signals are collected. After the signals are collected, they need to be amplified and denoised. The processed data is 256 channels, half-precision floating-point data with a sampling rate of 30kHz for each channel. The collected data is then downsampled to 1kHz using a fixed interval sampling method. The data is then converted to the frequency domain, and specific frequency band features are extracted. The frequency band is set according to the specific task. These features are used as neural network inputs, and the target position is used as a label. A multi-layer perceptron network is used to implement the classification task for the above data, and the trained model is saved as a .pth file.

8. The closed-loop adaptive brain-computer interface decoding method based on reinforcement learning according to claim 5, characterized in that: In the test phase, the monkeys used imagination to control the cursor movement to eventually reach the target area; In this process, the decoder first loads the previously saved PTH model, specifically the DQN network acting as a decoder. The DQN network uses the same network structure as the previous supervised deep learning. Then, the trained parameter model is loaded to extract and decode the input neural signal features and output the corresponding action instructions. The output instruction updates the cursor position on the page. At this time, the monkey knows the cursor change through visual feedback and generates new neural signals. The new neural signals are input into the decoder, and the decoder generates new actions, thus forming a closed loop.

9. A closed-loop adaptive brain-computer interface decoding device based on reinforcement learning, characterized in that: include: A preprocessing unit, used for preprocessing the collected neural signals of the test animal; A new neural signal generating unit is used to input the pre-processed neural signal into the decoder and map it into a specific action instruction, and the test animal body generates a new neural signal by providing visual feedback to the executed specific action instruction; The new action command generation unit is used to input new neural signals into the decoder, and the decoder generates new action commands, forming a closed loop that integrates reinforcement learning theory and brain-computer interface decoding paradigm.

10. The closed-loop adaptive brain-computer interface decoding device based on reinforcement learning according to claim 9, characterized in that: The device also includes: The signal acquisition unit is used to collect nerve signals from the test animal.

Citation Information

Patent Citations

  • Deep learning man-machine interaction motor imagery brain-computer interface system and training method

    CN110534180A

  • Hybrid reinforcement learning training method and device embedded with multi-step rule, and storage medium

    CN112884148A

  • Autonomous brain-machine interface

    US20190025917A1

  • Methods of cognitive fitness detection and training and systems for practicing the same

    US20190159715A1

  • Systems and methods for responsive neurorehabilitation

    WO2014025772A2

Cited By

  • Method and system for decoding free association semantics by utilizing stereotactic electroencephalogram signals

    CN119884886A

  • Brain-computer interface method and system based on real-time closed-loop vibration enhancement

    CN121030462A

  • A brain-computer interface method and system based on real-time closed-loop vibration enhancement

    CN121030462B