Abstract:
A device and method for decoding neuronal responses wherein sequences of potentials from neurons are monitored while specific motor tasks are carried out, and these sequences are characterized using order statistics and subsequently the order statistics are used to decode action potentials representing unidentified motor tasks to determine the desired motor task. The method of the invention comprises the steps of monitoring action potentials caused by a motor task being requested by the brain, calculating a spike density function and order tasks for each distinct motor task, to relate action potentials to their specific motor task. The invention also offers methods of formulating instructions for a prosthetic device. This method comprises the steps of learning the neuronal responses of distinct motor tasks by monitoring action potentials caused by a motor task being requested by the brain, calculating a cumulative density function for each distinct motor task, and using order statistics to relate action potentials to their respective motor tasks; monitoring action potentials from at least one neuron of said user wherein the action potentials are caused by the request for an unknown motor task; using said learned neuronal responses to determine which motor task is being requested by the monitored neuron; and formulating instructions on how to carry out the requested motor task. The device of the invention comprises a prosthetic limb, a device capable of making said prosthetic limb carry out motor tasks, a device capable of recording action potentials from neurons, and a device containing instructions for monitoring neurons, calculating cumulative density functions, utilizing order statistics, and determining instructions for various motor tasks.

Description:
[0001] This application is being filed as a PCT international patent application in the name of The Government of the United States of America, as Represented by the Secretary, Department of Health and Human Services (applicant for all designations except the U.S.), and in the names of Barry J. Richmond and Matthew Wiener, both U.S. citizens and residents (applicants for the U.S. designation only), on 11 Jan. 2002, designating all countries. 
     
    
     
       FIELD OF THE INVENTION  
         [0002]    The invention relates to the decoding of neuronal signals. More specifically the invention relates to methods of decoding neuronal signals so that the decoded neuronal signals can be translated into instructions for mechanical action of a prosthesis.  
         BACKGROUND OF THE INVENTION  
         [0003]    The development of prosthetic devices is a complex technological field. Prosthetic devices must be engineered to be both aesthetically pleasing and functional. Functionality not only requires that the prosthetic device be mechanically capable of accomplishing the required movements, but there must also be a system by which the user of the prosthetic device can “control” the device. User “control” of prosthetic devices remains an area where advances are still necessary.  
           [0004]    At first, simple prosthetic devices were controlled by a different, non-impaired part of the body. For example, using shoulder or stomach movements to initiate elbow bending, wrist movements or grasping of an artificial arm. Preferred methods of controlling prosthetic devices are commonly referred to as “EMG” or electromyogram actuated systems. An EMG-actuated system controls the prosthesis by direct synchronous control over or monitoring of the muscles that were originally responsible for the movement, and near simultaneous control over the prosthesis by the user&#39;s brain stimulating the same muscle system that formerly controlled the limb. Previously implemented EMG-actuated systems, while progressing rapidly, have met with limited success and suffer from significant drawbacks.  
           [0005]    A recently reported EMG-actuated system, J. Wessberg et al., Real-time prediction of hand trajectory by ensembles of cortical neurons in primates,  Nature  408: 361-365, 2000, has overcome some drawbacks normally found in these methods. This method began by recording neuronal impulses of primates generated by a specific type of motor skill. Then, the neuronal impulses were averaged and summed by following a population vector approach. The neuronal impulses associated with a specific mechanical action were then estimated.  
           [0006]    This method, although a considerable advance, has two significant drawbacks. First, the method requires a large amount of data. Neuronal impulses of the two subjects were recorded for 12 and 24 months respectively for the prediction of two motor tasks. Such a method would require an inordinate amount of “training” time in order for a patient to teach their prosthesis a relatively small number of motor skills. Second, although the method requires a substantial amount of data collection time, the estimation of the ultimate motor task that corresponds to the specific neuronal impulses is statistically not optimal. Unacceptable ambiguity in the corresponding motor task would result and perhaps even an inability to accomplish more detailed motor tasks.  
           [0007]    Therefore, there still exists a need for a method of controlling a prosthetic device through monitoring of neuronal impulses associated with motor tasks that can “learn” a reasonable amount of motor skills in a reasonable time and still offer the user of the prosthesis access to more detailed motor skills.  
         SUMMARY OF THE INVENTION  
         [0008]    The invention provides a method of decoding neuronal impulses to determine the specific corresponding motor task.  
           [0009]    The invention also offers a method of creating instructions for a prosthetic device by monitoring neuronal impulses associated with a specific motor task, corresponding specific neuronal impulses to specific motor tasks, formulating the desired motor task by monitoring neuronal impulses from the wearer of the prosthetic device, and relaying to the mechanical motors of the prosthesis the desired motor task.  
           [0010]    The invention also offers a device preferably comprising a neuronal probe, a computer processor and an electronic media storage device containing algorithms to decode the neuronal signals and convert them to instructions for mechanical action, and a prosthetic device. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0011]    [0011]FIG. 1A is a graph representing action potentials recorded as a function of time (msec), also referred to as a spike train, for a single neuron recorded a number of different times (each horizontal line represents one recordation of the neuron).  
         [0012]    [0012]FIG. 1B is a graph representing the summation of the spike trains in FIG. 1A, also referred to as the spike density function f (x).  
         [0013]    [0013]FIG. 1C is a graph representing the cumulative probability of a spike occurring at a certain time (msec) after onset of a stimulus, also referred to as the cumulative density function F (x).  
         [0014]    [0014]FIG. 2 is a graphical depiction of the probability of separate stimuli causing the observed spike train (represented by the marks under the x axis), also referred to as decoding the spike train.  
         [0015]    [0015]FIG. 3 is a graphical depiction of the accuracy with which single neurons decode the response over a fixed period of time.  
         [0016]    [0016]FIGS. 4A, C, E, and G depict numerous spike trains, elicited by four different stimuli, recorded from a single neuron. The x axis shows time from stimulus onset in milliseconds and the y axis shows separate trials.  
         [0017]    [0017]FIGS. 4B, D, F, and H depict the spike density functions for the spike trains depicted in FIGS. 4A, C, E, and G respectively. The gray histograms sum the data of all the trials and the curves show the spike density functions which are smoothed versions of the histograms.  
         [0018]    [0018]FIGS. 5A, B, C, and D depict the cumulative spike density functions of the spike trains depicted in FIGS. 4A, C, E, and G.  
         [0019]    [0019]FIGS. 6A, B, C, and D depict the first order statistics for the data from the four stimuli shown in FIG. 4 in spike trains with 1 (A), 2 (B), 5 (C), and 10 (D) spikes respectively. The x axis shows time (msec) after stimulus presentation and the y axis shows the probability of the first spike occurring at each time.  
         [0020]    [0020]FIG. 7 depicts the count weighted first order statistics for the four stimuli monitored in FIGS. 4A, C, E, and G. The x axis shows the time (msec) after the stimulus was presented, and the y axis shows the probability of the first spike occurring at each time.  
         [0021]    [0021]FIG. 8 represents the decoding of a spike train elicited by the black stimulus, the actual spike train is depicted by the hatch marks below the x axis. The lines represent the probabilities of the spike train being caused by the black, red, green and blue stimuli.  
         [0022]    [0022]FIG. 9 represents the probabilities that the stimulus estimated by a method of the invention is correct with an increasing number of trials per stimulus.  
         [0023]    [0023]FIG. 10A represents the probabilities, estimated by a method of the invention, that a certain stimulus would cause a spike to occur at any given time.  
         [0024]    [0024]FIG. 10B represents the probability, as a function of spike onset, that one of two stimuli caused the spike train. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0025]    Decoding neuronal responses is difficult in part because it has not previously been clear which parts of a response carry relevant information and which parts do not. It has recently been shown that all of the information carried by a single neuron is available from only two characteristics of the neuronal signal, the number of impulses and a smoothed version of the probability of observing an impulse at particular times after onset of the stimulus. As used herein, the word “stimulus” refers to a desired motor task, such as for example moving a prosthesis or a prosthetic limb in a particular direction.  
         [0026]    The recognition of the two important aspects of a neuronal signal allows more efficient monitoring thereof. Because these two characteristics of the neuronal signal contain the relevant information of the spike train, spike trains can be described using a well established branch of statistics, order statistics. Order statistics, in this context, allows estimation of the probability with which the next impulse in a spike train can be expected to occur at different times under a variety of conditions. Thus the arrival or absence of an impulse at each successive instant in time can be used to update the current estimate of which condition generated the spike train.  
         [0027]    This type of continuous updating of the estimate of the specific spike train can be used as a part of an algorithm to decode the spike trains. This algorithm can function with an arbitrarily large number of neurons, which would allow an efficient identification of detailed motor tasks. The number of neurons that can be monitored and decoded in the algorithm is limited only by computational resources and technology. A compact, rather inexpensive device that could simultaneously monitor and decode on the order of hundreds of neurons could easily be constructed given current technology.  
         [0028]    Through the use of an algorithm or a decoding device of the invention, a prosthetic device can be controlled by neuronal signals in real time after collecting a modest amount of data to calibrate the device. The data is collected by means of technology that is well known in the art. From the collected data, one can quickly and accurately estimate the specificity with which the prosthetic device can be controlled. Although there is a great deal of research concentrating on developing a decoder for neuronal signals, this method has the significant advantage of being very efficient. This allows collection of a limited amount of data for calibration, which translates into comparably less time spent on data collection.  
         [0029]    The invention is based on the practice of describing spike trains by the number of impulses in the spike train and a smoothed version of the average number of impulses over time that make up the spike train. Order statistics can then be used to analyze spike trains as they are recorded.  
       1. Spike Trains  
       [0030]    The neuron is the basic operating unit of the nervous system. The function of a neuron is to transmit information from one part of the body to another; that is either to transmit information about a stimulus to other neurons or to cause a motor task to be performed based upon a stimulus. As noted above, the terms “stimulus” and “motor task” are used interchangeably where the discussion focuses on the cause of a neuronal signal.  
         [0031]    The information regarding the stimulus is transmitted in the form of an electrochemical signal called a neural impulse. There are two types of neural impulses graded potentials and action potentials. Action potentials are brief reversals in the polarity of the dendrites, soma, and axon of the cell. Graded potentials are electric potentials that cause the action potentials to fire. The action potential functions to transmit the information from the neuron to some other portion of the body. This other portion can be either another nerve cell or a muscle cell. When the other portion of the body is a muscle cell, the purpose of transmitting the information is to carry out a movement of the muscle. Therefore, such action potentials control muscular movement in the human body.  
         [0032]    When the brain wants a muscle to move, neurons fire action potentials to the specific muscles that cause the movement. Specific motor tasks require control by a number of different neurons. A specific motor task will require a number of action potentials to be fired. The firing of action potentials occurs over a period of milliseconds. A trace of an action potential fired over time is called a spike train. A graphical depiction of a number of spike trains can be seen in FIG. 1A.  
         [0033]    Both the distribution of spike counts and the smoothed average firing rate profile over time of responses elicited by a stimulus influence spike timing in spike trains. A model that preserves both of these properties of spike trains but otherwise chooses spike times stochastically can correctly predict aspects of millisecond-level spike timing.  
         [0034]    This model can be used to simulate spike trains that are indistinguishable from observed spike trains. Rasters of the responses of one V 1  supragranular complex cell aligned at the time of stimulus onset are shown in FIG. 1A. The corresponding average spike density plot for those same responses are seen in FIG. 1B. The average spike density plot integrated over the whole period results in the curve seen in FIG. 1C. Such an integrated spike probability density function can then be used to generate the simulated spike trains using a uniform random number generator. The number of spikes needed is chosen from the number of spikes in the recorded data. In this example, six spikes were needed, so six random numbers would be chosen, placed on the ordinate and mapped through the cumulative spike density function as shown to generate the simulated spike train indicated by the dots at the bottom. Using this procedure places the spikes stochastically due to the random numbers. However, the probability density function averaged across many examples will be nearly indistinguishable from that in FIG. 1A.  
         [0035]    By directly examining a sufficient number of simulated spike trains we can estimate what intended motor task caused the observed spike train. However, methods of the invention utilize closed-form calculations to determine the same information much more efficiently.  
       2. Spike Density Function  
       [0036]    The second step of a method of the invention is to utilize the recorded spike trains to determine an overall spike density function for each stimulus.  
         [0037]    One embodiment of a method of the invention calculates spike density functions by summing action potentials at each time bin to create a histogram. The histogram is then smoothed to calculate the spike density function. One method of determining the spike density function is to use a local regression with an adaptive bin width chosen using generalized cross validation. An example of a spike density function can be seen in FIG. 1B. The cumulative spike density function is calculated from the spike density function by summing the spike density function across time as shown in Equation 1 below. 
           F ( t )=Σ t′≦t ƒ( t ′)  (1) 
         [0038]    All of the order statistics depend on the spike density function, which must be estimated from data. The empirical firing rate histogram will typically have peaks and valleys reflecting actual variation in the firing rate over time as well as many small fluctuations due to random variation in the sample at hand. A preferred estimate of the spike density function would preserve the former while smoothing out the latter.  
         [0039]    Histogram estimates are very sensitive not only to the bin width used, but also to the alignment of those bins. Kernel smoothing methods avoid the problems associated with bin alignment in histograms, but an inappropriate choice of kernel width (like an inappropriate choice of bin width) can lead to either under- or over-smoothing. Choosing the appropriate level of smoothing by eye, so the resulting fit “looks right”, is not adequate. Instead, cross-validation is preferably used to ensure a statistically valid fit.  
         [0040]    Cross-validation methods separate data into several subsets, using each to test the model fit on the others. Cross-validation is used for model selection in a variety of settings including a neuronal-network approach to estimating the information in neuronal responses. Leave-one-out cross-validation of a fit to a density selects a model based on some comparison of the density d(t i ) measured at a point t i  and the density d −1 (t i ) predicted by the model estimated using all the points except t i .  
         [0041]    There are a variety of cross-validated fitting methods. Methods of the invention preferably use local polynomial fits to the empirical firing rate histogram, with the degree of smoothing determined by generalized cross-validation, based on least-squares methods. Local polynomial fits are calculated and selected using C Loader&#39;s LOCFIT software running under R.  
         [0042]    For each neuron, spike density functions are calculated for each stimulus and for the entire set of responses together. Those stimuli that elicited fewer than five spikes cumulatively in response to all presentations of a particular stimulus were assigned the post-stimulus time histogram (PSTH) calculated for all stimuli together.  
         [0043]    In another embodiment of the invention, the spike density functions are calculated by modeling the spike trains as a doubly stochastic Poisson process.  
         [0044]    A doubly stochastic Poisson process is one way of modeling the occurrences of a sequence of discrete events. The defining characteristic of such a process is that the time intervals between successive events are exponentially distributed, and are treated as independent random variables drawn from an exponentially distributed population.  
         [0045]    In doubly stochastic Poisson process, as used in methods of the invention, a firing rate is first chosen, and then events are generated using a Poisson process with the appropriate rate. Accordingly, the spike count distribution is modeled as a mixture of (preferably two to three) Poisson distributions. This reconceptulization reduces the amount of computation necessary to decode spike trains because for a Poisson process, some of the calculation can be done in closed form rather than computationally. Instead of treating each spike count individually, the distribution of first spike times for each of the component Poisson processes of the doubly stochastic Poisson process can be calculated.  
         [0046]    Formally, consider the doubly stochastic Poisson process representing the trains elicited by some stimulus to be made up of component Poisson process with means μ 1 , . . . μ k  for some k and weights w 1 , . . . w k  such that Σ i=1   k w i =1. Assume that the rate function for each subcomponent is simply a multiple of an underlying rate function λ(t), where  
           ∫   t   t                finish           start              λ        (   t   )           =   1.                         
 
         [0047]    For the ith subprocess, the probability of the first spike occurring between t and t+δt is shown in Equation 2 below.  
                 p   i          (   t   )       =       exp   (       -     μ   i              ∫     t   0     t                          s                     λ        (   s   )             )          [     1   -     exp   (       -     μ   i              ∫     t   0         t   0     +     δ                 t                              s                     λ        (   s   )             )       ]               (   2   )                               
 
         [0048]    The distribution of the first spike times for the entire doubly stochastic Poisson process is simply the weighted sum of the subcomponent distributions, as given in Equation 3. 
           p ( t )=Σ w   i   p   i ( t )  (3) 
         [0049]    Embodiments of the invention that model the spike count distribution using a non-parametrically or truncated Gaussian distribution require the distribution of first spike times for each spike count, where spike counts range from 0 to 30 (frequently) or even 70 (less frequently). However, this embodiment requires calculating the distribution of first spike times for only 1-5 Poisson subprocesses. As might be expected, this dramatically reduces computation time: in the current calculations, by a factor of 5-10.  
         [0050]    Another advantage (both conceptual and computational) of this embodiment is that the distribution of spike counts can explicitly be calculated in any subinterval. If the doubly stochastic Poisson process is made up of subprocesses with mean rates (over the entire interval) μ i  . . . μ k  and weights w i  . . . w k , then the processes over a time subinterval from t 0  to t 1  is made up of subprocesses with mean rates cμ 1  . . . cμ k , where  
       c   =       ∫     t   0       t   1                            s                       λ        (   s   )       .                               
 
         [0051]    The conceptual advantage is that the predictions made by this model are borne out in the data, giving confidence in the model itself. The computational advantage is that because we can write down the Poisson process for any subinterval (and particularly, for the interval remaining), we no longer need to measure the spike count distribution for each subinterval, as was necessary in the other embodiment.  
         [0052]    Overall, this embodiment of the invention, provides a complete model of the spike trains. This embodiment may be more parsimonious than the previous embodiment, because fewer parameters need to be measured directly from the data. This embodiment may also be computationally simpler than the previous embodiment.  
       3. Order Statistics  
       [0053]    Order statistics describe the distribution of the k-th of n random numbers independently drawn from a single continuous distribution as illustrated in Equation 4.  
                 h     n   ,   k            (   t   )       =       (         n           k         )            F        (   t   )         k   -   1                f        (   t   )            [     1   -     F        (   t   )         ]         n   -   k                 (   4   )                               
 
         [0054]    where ƒ(t) is a density function, F(t) is the corresponding cumulative density function, and  
         (         n           k         )     ,                         
 
         [0055]    used here as a normalizing factor, is shorthand for n!/[(n-k)!k!], a combinatorial expression for the number of ways to place k spikes in n bins. In the context of spike trains, ƒ(t) is the spike density function (FIG. 1B) and F(t) the corresponding cumulative spike density function. Thus to a first approximation, the (n, k) order statistic h n,k  is the distribution of the k-th spike in a train with n spikes.  
         [0056]    This formulation is not entirely appropriate for spike trains because it does not include a refractory period. A refractory period can be included by considering conditional order statistics as shown in Equation 5 below.  
                       h     n   ,   k            (       t   |     t     k   -   1         =            t   &#39;       )       =         h   ~         n   -   k     ,   1            (   t   )                   =              (     n   -   k     )              F   ~          (   t   )       0                f   ~          (   t   )            [     1   -       F   ~          (   t   )         ]         n   -   k   -   1                       (   5   )                               
 
         [0057]    where {overscore (ƒ)} and {tilde over (F)} are the conditional spike density function and cumulative spike density function given that the (k−1)-th spike occurs at time t′. In standard order statistics {tilde over (ƒ)} is calculated from the spike density function ƒ by left-truncating ƒ at t′ and normalizing. Absolute and probabilistic refractory periods can be included in the definition of {tilde over (ƒ)} by multiplying the truncated version of ƒ by an appropriate time-dependent scaling factor g(t-t′) before normalizing. The unconditional (n, k)-th order statistic is calculated by taking the appropriate weighted sum of conditional order statistics as shown in Equation 6.  
                 h     n   ,   k            (   t   )       =       ∑     t   &#39;                                 p        (       t     k   -   1       =     t   &#39;       )              h     n   ,   k            (       t   |     t     k   -   1         =     t   &#39;       )                   (   6   )                               
 
         [0058]    This is a recursion equation: each (n, k) order statistic requires the previous (n, k−1) order statistic to evaluate p(t k−1 ). The first order statistic is not conditioned on any previous spike, and so can be calculated using Equation 1.  
         [0059]    Alternatively, the distribution of the k-th spike in all trains may want to be determined, not just those with a particular number of spikes. Such a distribution can be calculated by adding together the order statistics, weighted by the probability of observing different numbers of spikes as seen in Equation 7 below.  
                 h   k          (   t   )       =       ∑   n                       p        (   n   )              h     n   ,   k            (   t   )                   (   7   )                               
 
       4. Decoding a Spike Train  
       [0060]    Methods of the invention determine the unknown stimulus that caused an observed spike train as follows.  
         [0061]    Methods of the invention monitor spike trains elicited by known stimuli to calibrate or learn the functions and spike count distributions associated with each stimulus. From this, the methods calibrate the order statistics and count weighted order statistics. This information is then used to make the best estimate of the member of the set of unknown stimuli that elicited an observed response.  
         [0062]    An important special case of the count weighted order statistic h k (t) is h 1 (t), which describes the probability of the first spike (or, using conditional order statistics as described above, the next spike after an observed spike) appearing at different times. To emphasize the fact that this probability function depends on which stimulus has been shown, we rename this function h s,1 (t), adding a subscript denoting stimulus. The ensemble of functions {h s,1 (t)} s∈S  gives the probability of the first spike occurring at different times for all stimuli s in the set S. The cumulative count weighted order statistic H s,1 (t)=Σ r′≦t h s,1 (t) gives the probability of the first spike having occurred by some particular time, and 1−H s,1 (t) gives the probability of the first spike arriving after time t. Given some prior distribution of stimulus probabilities, Bayes&#39; Rule, as shown in Equation 8 below, calculates the new distribution of stimulus probabilities given an observed spike  
               p        (     s   |     next                 spike                 at                 time                 t       )       =         p        (   s   )              h     s   ,   1            (   t   )               ∑     s   &#39;                                   p        (     s   &#39;     )              h       s   &#39;     ,   1            (   t   )                     (   8   )                               
 
         [0063]    where p(s) is the estimated probability of stimulus s before seeing the spike at time t.  
         [0064]    Equation 5 calculates the change caused by observing a spike in a downstream neuron&#39;s estimate of how likely each stimulus is to be the one that elicited the response under consideration. However, not seeing a spike at a particular time can also be informative, and the order statistic model can calculate the change in a neuron&#39;s estimate of stimulus probabilities at any time. The order statistic model makes it possible to calculate the change in stimulus probabilities from one time to the next as a spike either does or does not arrive. Because the count weighted order statistic h s,1  gives the probability of a spike arriving at time t and not before, we require the conditional probability that a spike does or does not arrive at time t given that it did not arrive at time t−1. If a is the train up to time t−1 and b is the train up to time t, then the event a and b is the same as b, and the conditional probability of b given a is just p(b)/p(a). Thus the new information when the spike does or does not arrive at time t, given that it had not arrived by time t−1, is h s,1 (t)/(1−H s,1 (t−1)) if a spike does arrive, and (1−H s,1 (t))/(1−H s,1 (t−1)) if a spike does not arrive. This leads to Equation 9 below.  
                     p        (     s   |         δ        (   t   )                     and                 no                 spikes                 up                 to                                t     -   1       )                  =                p        (   s   )              g     s   ,   1            (   t   )                   ∑     s   &#39;                                   p        (     s   &#39;     )              g       s   &#39;     ,   1            (   t   )           |     s   &#39;       )                   where                          g     s   ,   1            (   t   )       =                      h     s   ,   1            (   t   )                      1   -       H     s   ,   1            (     t   -   1     )                         if                   δ        (   t   )         =   1                     g     s   ,   1            (   t   )       =                  1   -       H     s   ,   1            (   t   )           1   -       H     s   ,   1            (     t   -   1     )                         if                                  δ        (   t   )         =   0                   (   9   )                               
 
         [0065]    It can be shown that calculating the changes in stimulus probability millisecond by millisecond until a spike occurs gives the same result as calculating the change in a single step using Equation 5.  
       5. Applying the Invention to Prosthetic Devices  
       [0066]    While investigators record from neurons, the subject is asked to attempt (with the phantom limb) the various motions that the prosthetic will perform. A restricted set of motions is used, for example motion in only a few directions, or at only a single speed, could be investigated initially, with additional motions added later. The distribution of spike counts and spike density function associated with each motion can be estimated from the data collected. A few hundred repetitions of representative desired motions should suffice; furthermore, the adequacy of the estimate can be monitored while data is collected. Data collection can be stopped when the representation is sufficiently good or has stopped improving. Plugging the estimated parameters in to the model sets the decoder to estimate which desired motion generated a set of spike trains observed coming in from the recorded neurons. At set time intervals the decoder reports to the controller both its guess of the desired motion and its degree of certainty (based on the entire distribution of motion probabilities) that its guess is correct. The controller initiates the movement only when the certainty reaches some acceptable level. This prevents “runaway” prostheses from injuring the wearer or others. Increasing the number of neurons on which the decoder bases its guesses will reduce the time required to reach the desired level of certainty.  
         [0067]    In one embodiment of a method of the invention, a single prosthesis is trained by monitoring neural data from an individual while predetermined movements are undertaken, and later utilized by the same individual. This method of training and utilizing a single prosthesis minimizes problems that may result from differences between different prosthesis, different users, and different neural probes.  
         [0068]    [0068]FIG. 2 shows the results of applying the decoding procedure to a single train. The lines in the top panel show, for each of the 16 stimuli presented in the course of the experiment, the decoding procedure&#39;s estimate of the probability that that stimulus elicited the response. Each vertical bar at the bottom of FIG. 2 shows the time at which the neuron emitted an action potential. The x axis shows the time (in milliseconds) after stimulus onset. The y axis shows the probability with which each stimulus is believed to have elicited the response being decoded. Here, the neuron quickly estimates that the stimulus represented by the ascending line (which did in fact elicit this response) is most likely to have elicited this response.  
         [0069]    If the decoding procedure always guesses that the highest-probability stimulus elicited the response, we can ask how accurate the decoding is. FIG. 3 shows the percent of trains decoded correctly by each of 29 neurons in monkey primary visual cortex. The x axis shows time from stimulus presentation in milliseconds. The y axis shows the percent of trials for which the response was actually elicited by the stimulus with the highest estimated probability. Results for 29 single neurons are shown. Accuracy increases with time. By the end of the 300 ms period examined, individual neurons accurately identify the stimulus that elicited a response between 15 and 60% of the time.  
       6. Methods of Implementing the Invention  
       [0070]    One of skill in the art, having read this specification, would know how to incorporate a method of the invention into a system comprising a prosthetic limb. Examples of specific embodiments of such incorporation are explained in more detail below.  
         [0071]    The method and device of the invention can be used with virtually any prosthetic that is capable of or can be modified to be capable of being instructed to carry out motor tasks. The method and device of the invention can be used with any type of prosthetic limb, including for example arms and legs. More preferably, the method and device of the invention is used with prosthetic arms.  
         [0072]    The method of the invention can be incorporated into any device capable of electronically storing the information, practicing the invention, or combinations thereof. Preferably, the method of the invention is incorporated into an electronic media storage device which is coupled with a computer processor, a neural probe, and a power source. Such an embodiment of the invention is preferably configured so that the neural probe is in electrical contact with the wearer&#39;s limb, the neural probe is also electrically coupled to the microprocessor, the microprocessor is electrically coupled to the actuators of the prosthetic limb so that the limb can carry out actions as directed by the microprocessor. In such an embodiment, the power source can be coupled to individual components that need power, or can be coupled in series.  
         [0073]    The computer processor is typically an embedded processing system capable of being housed within the device and operated using a power storage device, such as a battery. The processing system itself may be a general purpose processing system, as is known to those of skill in the art. This embodiment of a device of the invention may include an electronic media storage device and/or a computer processor.  
         [0074]    Microprocessors for use with devices incorporating methods of the invention can be chosen from those that are normally used by those of skill in the art. In one embodiment, the microprocessor can be coupled to a read-only-memory (ROM) and a random-access-memory (RAM). In such an embodiment, the ROM can contain the instructions for carrying out the method of the invention. In this embodiment, the results of a decoded neural signal are temporarily stored in the RAM.  
         [0075]    Neural probes for use with devices incorporating methods of the invention can be chosen from those that are normally used by those of skill in the art. Preferably, such devices utilize microelectrodes. A specific, and preferred example of such a microelectrode is a tungsten microelectrode with an impedance of 0.8-1.3 MΩ (MicroProbe, Clarksburg Md.). The microelectrode is preferably housed in a stainless steel guide tube so that the dura could be penetrated.  
         [0076]    Power sources for use with devices incorporating methods of the invention can be chosen from those that are normally used by those of skill in the art. In one embodiment, one power source provides the requisite power to all components that need power, such as the microprocessor and the actuators of the prosthetic limb. In another embodiment, the separate components can be controlled by separate power sources. Power sources can include batteries such as rechargeable or disposable batteries.  
         [0077]    While the above embodiments of the invention describe the use of a decoding algorithm of neuronal responses for use in generating instructions to a mechanical prosthesis, one skilled in the are will recognize that the use of the processing system discussed above are merely example embodiments of the invention. As long as physiological data is used to provide the necessary instructions, the present invention to would be useable in other data processing systems. It is to be understood that other embodiments may be utilized and operational changes may be made without departing from the scope of the present invention as recited in the attached claims.  
       WORKING EXAMPLES  
     Example 1  
       [0078]    Recording a Spike Train  
         [0079]    Action potentials from neurons were monitored in the visual cortex of monkeys. The data was monitored with a tungsten microelectrode with an impedance of 0.8-1.3 MΩ (MicroProbe, Calrksburg Md.). The microelectrode was housed in a stainless steel guide tube so that the dura could be penetrated. A hydraulic microdrive was mounted on the recording cylinder. Experimental control and data collection were performed by a Hewlett Packard Vectra 486/33, using a real time data acquisition system adapted for the QNX operating system. Single units were discriminated according to spike shape and amplitude by calculating principal components.  
         [0080]    [0080]FIGS. 4A, C, E, and G show responses elicited from a single neuron by four different stimuli. The responses are represented by dot diagrams (rasters). In each FIG. ( 6 A, C, E, and G) each horizontal row of dots represents a separate presentation of the stimulus to the neuron. Each dot in any row marks the time of occurrence of an action potential after the presentation of the stimulus (0 msec is the point at which the stimulus was presented to the neuron).  
       EXAMPLE 2  
       [0081]    Determining Spike Density Function  
         [0082]    [0082]FIGS. 4B, D, F, and H show the corresponding spike density functions for the raw data recorded above. The gray histograms sum the data of FIGS. 4A, C, E, and G across the trials to show the probability of spikes occurring in each 1 ms bin. The spike density functions, the lines in FIGS. 4B, D, F, and H are then calculated from the histograms by creating a smoothed version of the histogram. Spike density functions were fit using local regression, with adaptive bin width chosen using generalized cross validation. Note that both histograms and spike density functions sum to 1, so the number of spikes in each trial is not represented in these panels. The cumulative spike density functions are obtained by adding up the spike density functions over time, See equation 1.  
       EXAMPLE 3  
       [0083]    Determining the Cumulative Spike Density Functions  
         [0084]    [0084]FIGS. 5A, B, C, and D show the cumulative spike density functions for the four stimuli. The histograms show the observed count distributions; the curves show a truncated Gaussian approximation to each distribution. Truncated Gaussian distributions have been shown to be a good approximation to count distributions in several areas of the brain, and are utilized in one embodiment of the invention to determine the cumulative density function.  
       EXAMPLE 4  
       [0085]    Calculation of the Order Statistics for the Stimuli  
         [0086]    Once the cumulative spike density functions have been determined from the raw data, the order statistics can be computed. As explained above, order statistics describe the distribution of the k-th of n random numbers independently drawn from a single continuous distribution:  
                 h     n   ,   k            (   t   )       =       (         n           k         )            F        (   t   )           k   -   1     _                f        (   t   )            [     1   -     F        (   t   )         ]         n   -   k                 (   4   )                               
 
         [0087]    where ƒ(t) is a density function (calculated in FIGS. 4B, D, F, and H) and F(t) is the corresponding cumulative density function (shown in FIGS. 5A, B, C, and D). FIG. 6 shows the first order statistics for the data from the four stimuli (the stimuli associated with the spike trains from FIGS. 4A, C, E, and G are designated a, c, e, and g respectively) shown in FIG. 6 in trains with 1, 2, 5, and 10 spikes. In each panel the x axis shows the time after stimulus presentation, and the y axis shows the probability of the first spike occurring at each time. Note that the actual distribution of counts elicited by a stimulus does not need to be known to calculate the order statistics.  
         [0088]    A neuron receiving a spike train does not know how many spikes will be in the train. Therefore for decoding it is desirable to know the distribution of (in our example) the first spike overall. This distribution is given by the count weighted order statistics, obtained by adding together the order statistics weighted by the probability of observing different numbers of spikes: 
           h   k ( t )=Σ p ( n ) h   n,k ( t )  (7) 
         [0089]    A nominal bin accounts for spikes occurring beyond the observation window, that is, for trials with zero spikes. Thus the count weighted first order statistic for a stimulus will not integrate to one over the observation window if there is a non-zero probability that that stimulus elicits no spikes. FIG. 7 shows the count weighted first order statistics for the four stimuli (a, c, e, and g). The x axis shows the time after stimulus presentation, and the y axis shows the probability of the first spike occurring at each time. The distributions sum to 0.96, 1, 0.99, and 1 That is, the probability of observing 0 spikes for the four stimuli is 0.04, 0, 0.01, and 0 (compare FIG. 6).  
       EXAMPLE 5  
       [0090]    Decoding a Spike Train  
         [0091]    The first spike times for the stimulus represented by the black line (a) tend to be later than those for the other stimuli (FIG. 7). The effect of this is seen when the neuron decodes a spike train elicited by the black stimulus (a). The first spike in the train occurs 97 ms after stimulus onset, as seen in FIG. 8. The x axis shows time from stimulus onset; they axis shows the estimated probability that the spike train shown at bottom was elicited by each stimulus (a, c, e, and g). When more than 90 ms have passed since stimulus onset, the decoding algorithm detects that a first spike must now be relatively late, so the black stimulus (a) is more likely. The arrival of the first spike 97 ms after stimulus onset actually makes the black stimulus (a) somewhat less favored (first dip in the black curve (a), with corresponding rise in the blue curve (g)).  
         [0092]    Further count weighted order statistics conditioned on the observed spikes were calculated. Each time a spike is observed, new order statistics are calculated from the truncated spike density functions and weighted using the distribution of counts expected in the remaining time. The results of the rest of the decoding can be seen in FIG. 8. Note that the probabilities at any time are based only on the response up to that time. No knowledge of how many additional spikes will arrive is available to the decoding algorithm.  
       EXAMPLE 6  
       [0093]    Validating the Decoding  
         [0094]    As a basic check on the decoding algorithm, we created two situations in which the proper outcome is known. First we created artificial data sets with equal numbers of trials for two artificial stimuli. The PSTHs used for the two stimuli were identical, and the data were generated according to the spike count matched model (described in our earlier notes), so spike timing carried no unique information distinguishing responses to the two artificial stimuli from one another. All information that could be used to distinguish responses to the two stimuli was contained in the spike count distributions. In this situation Bayes&#39; Rule shows that the probability with which an observed response made up of n spikes was elicited by a particular stimulus (as opposed to all other stimuli) is proportional to the probability with which each stimulus elicits responses with n spikes (as opposed to responses with other numbers of spikes). In this case we compared two artificial stimuli that elicited Poisson distributions of spike counts with means of 4 and 10, respectively, with flat spike density functions. A set of 500 randomly generated test spike trains with 7 spikes per train was decoded using the order statistic method. With increasing numbers of trials per stimulus the stimulus probabilities estimated by the order statistic model converge to the probabilities expected based on the spike count distributions (approximately a 40% chance of belonging to stimulus eliciting counts with a mean of 4; FIG. 9). It can be shown analytically that if a stimulus elicits no spikes, the order statistic model gives exactly the probabilities expected based on spike count.  
         [0095]    At the other end of the spectrum are situations in which all of the information about which stimulus elicited a response is available from spike timing. This occurs, for example, when some range of spike times can be elicited by only one of the stimuli (FIG. 10A). When a spike occurs at one of the stimulus-specific times, the model correctly determines that only one stimulus could have elicited the observed response (FIG. 10B).  
         [0096]    The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.