• No results found

5 ECoG Application to a 2-D Kinematic BCI

5.2.3 Decoding Algorithm and Training

where ( ) is the cursor acceleration, ( ) is the neural control signal, and is the viscous damping constant. Initially, the damping constant was set high such that the equations of motion essentially reduce to a velocity control scheme (see section 3.6). The damping constant was then gradually reduced from experimental session to session as the monkey learned that manual “braking” of the cursor with his control signal was necessary to slow down the cursor in a timely manner for hold periods. At the end point of these experiments, the damping constant held a non-negligible value such that the monkey needed to apply his control signal in the opposite direction of the target to slow the cursor, but not to the extent of the peak acceleration signal. Hold A and B times were again gradually increased to 500 ms while the maximum movement time was decreased to a minimum value of 1600 ms.

5.2.3 Decoding Algorithm and Training

The normalized spectral ECoG features, ( ) , were transformed to the two-dimensional BCI control signal, ( ) , through the following linear equation:

( ) ( ) (5.3)

where is the decoding weight vector (160 features x 2 dimensions) and is a

constant bias term for the control signal. The resulting control signal was then mapped to either the two-dimensional velocity or acceleration as in equations (5.1-5.2) and integrated appropriately to the displayed cursor position.

The weight vector and constant terms were adapted to the monkey’s neural strategy during velocity control experiments on a daily basis by observing the displayed

58

target positions for a given set of trials and regressing against the accompanying ECoG feature responses, . No a priori correlations between neural and movement features were used in the training of any decoding model. Instead, each monkey’s initial decoding model consisted of random weights paired with a high bias velocity and used strictly neural and cursor data to train future models.

Training data consisted of 50 consecutive trials to each of the four targets. Since the trials were pseudo-randomly balanced across targets, the 200 total trials were chosen from the block of time with the highest average percentage correct across targets. We chose to train on a limited subset each day under the assumption that the monkey was performing with maximum effort during this period, thus reducing the risk of introducing noise by training on trials during which the monkey was not actively attending to the task.

Using this training set, an ℓ1-regularized least-squares regression model was

formulated using a MATLAB toolbox (SLEP, Arizona State University [68]) to learn the weight vector w and bias b0 within the following optimization problem:

( )∑ (( ( ) ) ̂( )) (5.4)

In this context, ̂( ) is the desired control vector pointing from the cursor to the desired target, and ≥ 0 is the ℓ1 regularization constant that trades off training

accuracy with model complexity. (For simplicity, the magnitude of the desired vector was normalized to a unit vector such that we were primarily interested in correctly modeling directional intent.) Increasing values of drive toward a sparse decoding matrix selective for the most relevant features [69]. This regularization parameter was chosen using either leave-one-out cross-validation (LOOCV) with trial-averaged data from radial choice task experiments, or 10-fold cross-validation with real-time data from center-out task experiments. The regularization constant with the highest cross- validation accuracy was used to train the day's final model over the entire 200 trial subset. This post-hoc decoding model was then employed in the next training day's closed-loop experiments.

59

should be an accurate estimate of the subject’s desired cursor direction for model training. This estimate might become noisy as the cursor closely approaches the target due to the radii of the cursor and target spheres. For example, if the cursor’s trajectory is slightly off course from the center of the target but still likely to result in overlap of the two radii, the monkey may desire to simply continue on a course nearly tangential to the target. This plan would result in an estimated desired vector (cursor-to-target) that is nearly perpendicular to the true desired vector and a dot product between the two vectors near zero.

However, for an acceleration control signal, estimating the directional intent of the subject is more difficult as discrepancies between the estimated and actual desired control vectors can be much greater than in the velocity control scheme. These discrepancies arise due to limited knowledge of the subject’s favored time course for accelerating/decelerating the cursor. An analogous situation to this might be the tendencies of drivers as they approach a red stoplight. One person might tend to keep his/her foot on the gas until the last second before firmly pressing the brake to stop. Another person might let off the gas pedal half a block before reaching the stoplight, begin feathering the brake early on, and only need to lightly depress the brake further to stop at the end. If each person’s desired acceleration model was wrongly applied to the other’s, the dot product between the estimated and true desired control vectors would be negative for a significant period of time before reaching the stoplight. When applied to our BCI model, this scenario would result in a significant proportion of noisy or grossly incorrect training data.

For these reasons, we chose not to use neural and cursor data from acceleration control experiments to update our decoding models. The decoding models used to control acceleration for each monkey were trained on data from the last day of velocity control. The monkeys were then expected to adapt their neural modulation under these static decoding models to produce appropriate acceleration control profiles for completing the center-out task.

60