Using a Neural Network Classifier to predict movement outcome from LFP signals

The dorsal lateral prefrontal cortex (DLPFC) is thought to be an integrative brain area for intelligent behavior in primates. It is responsible for motor planning, decision making, and has been shown to be involved with working memory. We studied the role of the DLPFC in controlling a complex instructed behavior, in which a non-human primate produced sequential arm movements punctuated by sequences of self-timed temporal intervals. We examined local field potentials (LFPs) recorded during an instruction period before the movement onset and used a Neural Network Classifier to predict whether the subject would perform the upcoming behavior correctly. The classifier was able to predict the outcomes of movement using LFPs during 3 scenarios: spatial error versus correct trial, temporal error versus correct trial, and spatial versus temporal error. The successful classification of the outcomes indicates that DLPFC LFPs can be used as a signal for cognitive neural prosthetics (CNPs).


I. INTRODUCTION
The investigation into the serial nature of behavior to this day remains a robust area of research. This breakdown of behavior encompasses the anticipation, planning, kinetics and dynamics, and finally the action itself. The planning of movement requires not only information itself, but the integration of information from various sources. The dorsal lateral prefrontal cortex (DLPFC) is such an association cortical area that integrates inputs from other brain regions such as visual and auditory cortex [1], and also a cortical region associated with motor planning, learning of motor sequences, temporal coding, and working memory [2] [3]. One vital aspect of motor planning is linked to cognition, where an estimate (or prediction) of the outcome of the action should be acquired at the planning stage: for example, one should be able to predict the outcome of an action to avoid potentially hazardous results. Because of DLPFC's role in higher order motor processing, we hereby test the hypothesis that DLPFC is able to predict the outcome on an upcoming behavior in which a subject had to control both the temporal and the spatial aspects of movement. We believe that successful decoding these signals can be a basis for an effective cognitive neural prosthetic (CNP) that involves action planning and decision making [4]. The implementation of such CNP will offer an additional cognitive control component to existing brain-machine interface (BMI) systems (which have focused exclusively on movement execution) to assist patients with amputations or paralysis.
We also decided to focus on the predictive features of LFPs rather than single cells. LFPs are a class of electrophysiological signal that reveal the dendritic synaptic activity from the surrounding neurons within a few hundred microns from the site of recording [5]. The frequency component of LFPs is often sub-grouped into canonical frequency "bands" similar to electroencephalogram (EEG). Although decoding of LFPs from motor areas has become routine [6], the information encoded by LFPs from DLPFC have received less attention. We investigated the LFPs of DLPFC by developing a neural network classifier offline to predict the outcome of the planned movements using LFPs recorded before the movement onset. The neural network classifier is a learning-based method to classify signals empirically. It uses inputs to obtain a first trial, and then it adjusts the weights of input signals accordingly, effectively training itself to interpret inputs to maximize successful modeling of the output. This kind of model enables us to determine which signals are associated with different outcomes for different scenarios.
In this current study, we trained a monkey subject to perform a sequential spatial-temporal movement task and recorded LFPs from DLPFC during the behavior. We then trained a neural network classifier to test whether certain features of the LFPs could be used to distinguish outcomes of the upcoming movement under 3 scenarios: a correct trial versus a spatial error trial (Error 1), a correct trial versus a temporal error trial (Error 2), and an Error 1 trial versus an Error 2 trial (see Methods for definition). Our hypothesis was that the neural network classifier could successfully distinguish the correct trials from the error trials, and the type of error trials from one another using only the LFP signals before movement onset.

A. Signal Acquisition and Experimental Design
LFPs were recorded from one male Macaque monkey by a circular microelectrode array of 7 quartz-platinum/tungsten electrodes (Thomas Recording, Microelectrodes ES12ec, 1 um in diameter, spaced 1 mm apart) mounted on a chamber (19 mm in diameter) during an arm-movement task. The neural recordings were performed by inserting the electrode into different sectors of DLPFC using a Microdrive (Thomas Recording, "Eckhorn System") to typically 2000 to 6000 um beneath the dura in daily recording sessions. The position of the chamber is located directly above the DLPFC, confirmed by Magnetic Resonance Imaging scans. The monkey subject performed the task by moving a joystick to control a cursor displayed on a computer monitor. In each trial the subject performed three consecutive movements between visuallydisplayed stimuli; after each movement he was required to hold the joystick stationary for a specific self-timed temporal interval (500ms, 1000ms, 2000ms). The subject was trained to produce four different spatial sequences into each of which was incorporated one of six different temporal interval sequences for a total of 24 distinct spatial-temporal behaviors. The specific spatial temporal in each trial was instructed during a 'center-hold' before the beginning of the movement. The outcome of each trial, correct or error, was binary; the errors could be either spatial (Error 1, subject moved in wrong direction) or temporal (Error 2, subject did not hold for the correct temporal duration). All neural data used in this study were restricted to recordings during the center-hold period before movement.
A complete dataset in daily experimental sessions comprised 120 correct trials; the number of associated error trials varied in the range (82-165) for Error 1 trials and (42-73) for Error 2 trials. In the current report, we examined 10 days of data, which comprises a total number of 1200 correct trials, 1075 Error 1 trials and 535 Error 2 trials (Table I).

B. LFP Signal Analysis and Feature Reduction
Raw LFPs were amplified 10 million times and passed through an analog low pass filter (1-300 Hz) with a sampling frequency of 40000 Hz. The collected LFPs were then filtered offline using a finite impulse response (FIR) filter from 0.1 to 256 Hz, and down-sampled to 2000 Hz to increase processing speed. Spectrograms were generated by taking the Short Time Fourier Transform (Hanning window of 250 ms with % overlapping and 4 times zero-padding). The power spectrum density (PSD) was then calculated using the one-sided modified periodogram method,

PSD(0=%\Z»=Zh n x n e-i^\ 2 (1)
where At is the sampling interval, h is the window function, x is the signal of length N. The calculated PSD was converted to a decibel scale (Fig. la) [7] of 10% was used to improve the appearance and remove outliers on the averaged data series (Fig. lb). Finally, time, frequency bands, and electrode information were gathered for each day of recording. This was achieved by concatenating the data. In this case, the seven frequency bands were concatenated for each electrode. Because the lower bands usually contain more power, the result of this concatenation appears as a "steps-shaped" signal ( Fig. lc,  El, E2...). This concatenation process was then repeated for all electrodes for each day, resulting in a representation of frequency, time and electrode information seen in Fig. lc. The concatenated signal was further reduced in dimensions by using an absolute value two-sample t-test with a pooled variance estimate to rank the most significant features of the data between the two classes of signals (Correct vs. Error 1, Correct vs. Error 2, or Error 1 vs. Error 2). The significantly ranked features were treated as inputs for the classifier. Each feature represents a 250 ms time-bin of a certain frequency band of one electrode (triangles in Fig. lc). Two of the electrodes, number 4 and 7, were eliminated from the final set of data due to substantial artifacts.

C. Neural Network Classifier Construction
A feed-forward pattern recognition neural network classifier (patternnet) was developed. The classifier was generated using the Neural Network Toolbox of MATLAB. The patternnet classifier modulates the input signal by multiplication of a weight value followed by addition of a bias value. The modulated signal then passes through a continuous tan-sigmoid transfer function. This processing element (the hidden layer of neural network) was then repeated again (output layer) to obtain the final output signal [8] (Fig. 2a).
The hidden layer may also contain multiple processing elements (artificial neurons, or "neurons") with different weights and biases assigned to each. The number of neurons can be empirically determined to optimize the output of the classifier.
The neural network classifier's performance was measured using a receiver operator characteristic (ROC) curve and a confusion matrix for all three data sets (training, validation, and testing). Prediction accuracy is defined and calculated by the percentage of data correctly predicted by the classifier. In order for the patternnet classifier to become a reliable high-speed and high-performing classifier, a training algorithm was implemented. The training algorithm must adjust the weights of each artificial neuron in each layer to reduce the discrepancy between the desired output and the actual output. A scaled conjugate gradient backpropagation training algorithm was selected due to its high performance, stability and speed [9]. Training stops when the conjugate gradient value reaches lxlO" 6 , or if the gradient continues to increase after 6 consecutive iterations; because of this, we discarded trials for which the training data prediction accuracy was 50% or below to ensure that the classifier was trained correctly. The data set was divided into 70% for training, 15% for validation, and 15% for testing. All classifiers were run ten times for variance estimates.

A. Feature Reduction and Neural Network Classifier Tuning
One data set (one day, 120 correct trials, 165 Error 1 trials and 45 Error 2 trials) with 5, 10, 20, 50, 100, and 200 ranked features along with the entire data series (blind approach) were fed into the neural network classifier to determine the optimal number of features. All features contain time, frequency, and electrode information. We found that when using 100 ranked features, the neural network classifier produced the best overall prediction accuracy and comparable testing prediction accuracy, with a small variance (Fig. 2b). Within the hidden layer, an empirically determined number of artificial neurons were added to optimize the effectiveness of the classifier.
We found that the overall prediction accuracy remained stable when adjusting the neuron numbers from 1, 3, 5, 7, 10, to 20. We eventually chose 3 neurons for our classifier because it produced the best prediction accuracy for the testing data set (Fig. 2c).
Hence, we determined the classifier functioned optimally using the top 100 ranked features with 3 hidden-layer neurons. All remaining classifications were performed using this condition.

B. Classification
The neural network classifier was able to successfully classify LFPs which contributed to Error 1 trials versus correct trials with an average of 79.0% overall and 73.0% testing prediction accuracy; and Error 2 trials versus correct trials with an average of 84.0% overall and 79.0%. In addition to classifying the correct versus error scenarios, we also tested the classifier on Error 1 trials versus Error 2 trials. The neural network distinguished between the errors with an average of 81.9% overall and 71.8% testing prediction accuracy (Fig. 3).

C Distinguishing Spatial Errors from Temporal Errors
We also examined the features used by the classifier to distinguish correct from error trials. This gives us insightful information on the pattern of the frequency bands' contribution to classification. Significant features used by the classifier to distinguish Error 1 trials versus correct trials tended to occur at lower frequency bands (delta to beta, Fig.  4a), whereas the significant features for Error 2 trials versus correct trials typically fell in higher frequency bands (low gamma to high gamma, Fig. 4b). Features for Error 1 trials versus Error 2 trials were found mostly at lower frequency bands, similar to those of correct versus Error 1 trials (Fig.  4c).
We believe that LFPs occurring at low frequency could possibly be related to working memory and sensory integration since: (1) lower frequencies contain most of the power, and exhibits periodicity that is consistent in frequency across trials and days during the center-hold period [10]; (2) the DLPFC is an integration center, and LFPs exhibit evoked activities when presented with visual stimuli. When the monkey failed the trial due to Error 1, the monkey missed the target by moving to the wrong direction. The monkey could Errorl v Error 2 have possibly stored the wrong set of stereotyped motor patterns, or simply not stored a component of instructions during planning in the instruction phase of the trial. Significant features of integration involved with Error 2 versus correct trials were classified by LFP signals occurring at mostly higher frequencies. We believe that features of temporal behavior may be encoded in the LFP signal, and this hypothesis is currently under further investigation.
Lastly, feature comparison between Error 1 and Error 2 trials shows that the lower frequency bands play a much larger role in distinguishing the two types of errors, which is consistent with our hypothesis that the lower bands are related to accuracy of working memory and sensory integration.
IV. CONCLUSION DLPFC LFPs could be utilized by a neural network classifier to provide successful classifications of behavioral outcomes in the three scenarios: correct versus Error 1 trials, correct versus Error 2 trials, and Error 1 versus Error 2 trials. These classifications can be achieved at the motor planning stage before movement onset. Furthermore, we discovered that between correct and Error 1 trials as well as between Error 1 and Error 2 trials, significant features tend to occur at lower frequency bands; while between correct and Error 2 trials, significant features occur at mostly higher frequency bands. This suggests that the motor planning in DLPFC potentially utilizes information from working memory and other cortical regions to respond appropriately to an instruction stimulus. This result indicates that the LFP signals recorded from DLPFC can be used as a signal for CNP, adding a cognitive control dimension to traditional BMIs. Therefore if abnormality occurs, the CNP will be able to abort the movement after the initialization of the BMI, but before the movement onset to avoid any potential hazards. The differentiation between lower and higher frequency LFP signals associated with Error 1 and Error 2 trials, respectively, also raises the question as to what specific features of behavior these signals are encoding. Do lower frequency LFPs from DLPFC encode something in ■ ■ " ■ ■ ■ ■ ■ i l * ' days ^-_-_-^^H^n ■ days days # of features particular, such as working memory, or a combination of factors? To which neural processes can we attribute signals of particular frequency bands (if we are able to at all)? We aim to investigate these questions in future studies.