A method and system to decode neural activity in the motor cortex to infer at least the position and velocity of a subject's hand from neural spiking activity of some number of nerve cells. In one embodiment the method includes simultaneously recording electrical activity of the nerve cells in the primary motor cortex to obtain neural data; and modeling the encoding and decoding of the neural data using a Kalman filter, where a measurement model assumes a cell firing rate to be a stochastic linear function of at least the position and velocity of the hand, and where the measurement model is learned from training data in conjunction with a system model that encodes a manner in which the hand moves. In another embodiment the method includes using the neural data to generate training data of neural firing activity conditioned on hand kinematics; learning a non-parametric representation of the firing activity using a Bayesian model; inferring an a posterior probability distribution over hand motion, conditioned on the neural training data using Bayesian inference; defining a non-Gaussian likelihood term that is combined with a prior probability for the kinematics based on learned firing models of multiple nerve cells; and using a particle filtering method is to represent, update, and propagate the posterior distribution over time.
Method and system for inferring hand motion from multi-cell recordings in the motor cortex using a kalman filter or a bayesian model