A Spiking Neural Network in sEMG Feature Extraction

We have developed a novel algorithm for sEMG feature extraction and classification. It is based on a hybrid network composed of spiking and artificial neurons. The spiking neuron layer with mutual inhibition was assigned as feature extractor. We demonstrate that the classification accuracy of the proposed model could reach high values comparable with existing sEMG interface systems. Moreover, the algorithm sensibility for different sEMG collecting systems characteristics was estimated. Results showed rather equal accuracy, despite a significant sampling rate difference. The proposed algorithm was successfully tested for mobile robot control.


Introduction
Human machine interface (HMI) development is one of the modern trends in global interdisciplinary sciences and technologies. Generally the HMI is built using biomimetic signals including electroencephalography (EEG) and electromyography (EMG). The HMI is extremely important in the development of control systems for medical rehabilitation devices such as limb prostheses, exoskeletons, training setups, as well as for remote control of autonomous robots and avatars. At present the HMI based only on EEG has a number of limitations related primarily to the OPEN ACCESS need of a large number of recording channels at the input and poor ability to recognize commands on the output. Surface electromyography (sEMG) has advantages in this context.
In the problem of external device control by sEMG one can use several strategies. Simple methods based on single-channel recording permit one to detect thresholds or to implement proportional control in case of continuous monitoring for certain characteristics of the sEMG. Multichannel recording considerably expands the control capabilities based on the sEMG. At the same time, it requires additional signal processing features such as classification (e.g., recognition) of sEMG patterns and multichannel regression proposed in recent studies [1,2]. Pattern classification was combined with command control and, hence, can be used in the case when the control device was equipped with an autonomous, local low-level control system capable of implementing some macro commands.
In streaming classification, one usually does not use row data representing a sensor signal digitized at high sampling frequency. For classification, the sampling rate can be significantly lower than the data acquisition rate. The data stream is segmented into certain time windows, analyzed for each window, and then fed to the classifier. When a large number of features must be detected, different dimension reduction algorithms were applied.
Artificial neural networks (ANN) represent one of the effective tools currently used for pattern recognition in many applications, both as classifiers and for dimension reduction. Moreover, neuron networks can be further implemented in neuro-interfaces providing along with signal processing conditional feedback to the nervous system. In this sense they can be regarded as an artificial continuation or expansion of the nervous system. Note, however, that a natural interface (in terms of analog signal characteristics) between living neurons (projected outside by muscle systems or the peripheral nervous system) requires quite detailed biological models of the artificial neurons used in the ANNs. One of the possible candidates for such models is a spiking neuron providing pulse excitation responding to an incoming stimulus and possessing many important features of living neurons [3]. In recent years researchers have noted the great potential of spiking neurons in many applications [4]. The use of spiking neurons as classifiers in pattern recognition problems of visual information recorded from a silicon retina [5], and in simulation of sound information processing in the auditory cortex [6] has been reported. Evolving spiking networks were also applied for recognition of spatio-temporal patterns [7]. Regarding streaming signal processing, the successful use of spiking neurons was reported in the task of speech recognition [8], in EEG studies with recognition of positive and negative peaks caused by potential P300 [9], as well as in detection of epileptiform conformal activity [10].
In this paper we propose an ANN composed of spiking neurons capable of processing sEMG signals with high degree of fidelity compared with existing algorithmic classifiers. Communicating with spikes the system can be integrated with HMI based on the sEMG. The spiking neurons inter-connected with some perceptron-like architecture provide effective feature extraction with classification based on a back propagation error algorithm.

Models and Methods
The experiments involved 17 healthy research subjects (male and female) aged from 20 to 56 years. The study complied with the Declaration of Helsinki (Finland) adopted in June 1964 and revised in October 2000 (Edinburgh, Scotland) and was approved by the Ethics Committee of Lobachevsky University. All subjects gave their written informed consent.
Surface EMG registration was performed using two wireless MYO™ Thalmic and DELSYS ® Trigno™ myographic setups. The first device targeted daily use by subjects as a sEMG-based HMI without any special training. To test our algorithms with data collected from a specialized myographic setup we used a DELSYS ® Trigno™. The sampling rates in the MYO™ Thalmic and DELSYS ® Trigno™ were 400 Hz and 2000 Hz, respectively. We used eight channel mode for signal registration. Location of the electrodes was determined by the form-factor of the MYO bracelet-a ring around the forearm ( Figure 1). This placement of the electrodes in some sense complicated the task of the sEMG pattern recognition compared with experiments where the electrode position was guided by localization of motor points of the studied muscles (see, for example, [11]).
The classification procedure involves collection of input data in some groups further referred to as classes. At the learning stage the classifier was introduced with a selection of a well-known set of input data and output classes. Then, the recognition process started again with the trained classifier. The goal was to identify certain class among the input data. The sEMG signals were used as the input data, and motor patterns, e.g., static hand gestures, were used as the output ( Figure 2). During the experiment, all participants were asked to produce four series of nine gestures lasting 2-3 s in a random order. Between different gestures the wrist relaxed. For training and testing samples recording motor patterns are logged using the graphical user interface of the MyoClass software.
Root Mean Square (RMS) of the signals was applied to calculate the muscle contraction amplitude. For each channel, we segmented the data into a window size of 40 samples (100 ms). This cropping was performed with a step size of 20 samples (50 ms). Next, RMS for each window was calculated: where N is number of signal values in a time window, xn is signal value at time n.
To extract features from the sEMG signal by this approach we apply a pulse neuron model proposed by Izhekevich [12]: with the auxiliary after-spike resetting: where V accounts for transmembrane potential, u is an auxiliary variable, a, b, c, d are the model parameters, I denotes the current applied to the membrane from the outside. The model can exhibit firing patterns of all known types of neurons with the choice of only four parameters. We used parameters reproducing "regular spiking" neuron dynamics [12]. Figure 3 (upper panel) shows the spike generation of this neuron in response to irregular pulse stimulation. Moreover, Izhikevich's model has high computational efficiency that is important in design of real-time recognition systems [13]. The synaptic resource (implies a neurotransmitter) was used as the output neuronal signal yi(t), while the number of resources released in synapses with each spike was described by the model of short-term frequency-dependent plasticity proposed by Tsodyks (8) where x, y, z denote synaptic resource portion (mediator) located respectively in the reduced, active and inactivated states, tsp is the time moment of spike appearance, u is the variable responsible for the frequency-dependent facilitation/depression, τrec, τI, τfacil account for the characteristic times of the synaptic dynamics. The model can describe the decrease of synaptic responses in the case of high frequency spiking (depression) and the increase in the case of low frequency (facilitation).  Next, we used a multi-layer artificial neural network as the classifier based on the backpropagation learning rule. In a series of preliminary experiments where the RMS was used as a feature, parameters of the classifier were chosen to ensure a better recognition accuracy. As a result, we generated a network consisting of two layers of nine neurons in each layer. We used the sigmoid activation function. The learning rate was 0.01 (arb. units). In the learning process the classification error was calculated for the training and test set. It served as a criterion to stop the error increase for the test sample. It required approximately 1000-4000 iterations (epochs) for the training set, which took about 15-60 s of calculation time on a PC equipped with a processor like the Intel ® Core i3.
To test our feature extraction model in a real-time working HMI we included it in an on-line recognition system controlling a mobile robot. The robot was built from a LEGO NXT Mindstorms ® kit. The wireless communication between the robot, the EMG system and the PC running the MyoClass software was implemented through a Bluetooth ® interface. The on-line recognition system used the classifier preliminary (off-line) trained for the subject. The software generated 10 Hz commands to the robot corresponding to the recognized gesture.

Feature Extraction by Spiking Neurons
To use the spiking neuron as a features extractor, we assign it as a virtual sensory neuron by applying an external current drive directly to it. For this purpose we introduced the current I in Izhekevich's model (2) as the sum of synaptic current, Isyn, and virtual stimulator current Ist. The synaptic current was calculated as the sum of weighted outputs of the neurons. We set the virtual stimulator current as absolute value of sEMG signal multiplying by a coefficient k: where wi is a weight of the connection with i-th neuron, gi is the output current scaling coefficient, yi(t) is the output of the i-th neuron, and EMG(t) denotes a recorded sEMG signal. We assigned all connected neurons to be inhibitory, therefore gi was taken negative. We considered neuron output y(t) as a continuously changing feature which was monitored at certain discrete time steps defined by the classifier sampling frequency. Figure 4 illustrates the example of the input signal applied to the sensory spiking neuron (e.g., the sEMG signal) and its spiking dynamics in the output (e.g., the feature of sEMG signal). Next, we associated each of eight sEMG channels with eight real-time working spiking neurons (2)(3)(4)(5)(6)(7)(8). Each 50 ms values of their outputs were projected to the inputs of formal neurons for learning and classification. In simulations, we fixed the following parameters: a = 0.02, b = 0.2, c = -65, d = 8, U = 0.05, τrec = 1 ms, τI = 200 ms, τfacil = 1 ms and k = 2 × 10 6 ( Figure 4). Primary spiking neurons were not connected with each other. In this model the feature extraction demonstrated a classification accuracy about 1%-3% worse compared with traditional model based on RMS (1).
In sEMG we used the array of electrodes located in a ring with a small distance from each other. To improve signal processing efficiency for such closely located electrodes one can realize lateral inhibition in the detection strategy. The lateral inhibition represents a natural way to identify a desired signal and the widely presented in living organisms. In this mechanism neuron excitation (e.g., spikes) via inhibitory inter-neurons suppress the activity of neighboring neurons. In particular, it permits one to increase the contrast and spatial resolution of signal processing in sensory system [15].
Furthermore, we applied lateral inhibition in sEMG signal detection. We designed the network so that all sensory spiking neurons had equal inhibitory connections with each other. Figure 5 illustrates resulting hybrid neural network system solving the task of detection and classification of sEMG patterns. Use of spiking neurons with mutual inhibition as feature extractors permitted us to achieve a classification accuracy comparable with RMS (see Tables 1 and 2). The inhibitory connections had the following parameters: w = 0.5, g = 60. One can compare the activity of virtual sensory neuron in the network with lateral inhibition (Figure 6) with the activity of equivalent neuron in isolated mode (e.g., in Figure 4). In particular, the background spiking activity (e.g., noise signal) was suppressed in such a network. In addition, the increase of classification accuracy can be explained by suppression of the in-phase activity of different channels because the in-phase component doesn't carry useful information for the pattern recognition problem.   Finally, we have illustrated the proposed approach of feature extraction in a simple on-line recognition system. In this example one can navigate a mobile LEGO robot by static hand gestures. Each gesture (except "Rest") was associated with a command to the robot: "Drive", "Reverse", "Forward Right", "Forward Left", "Reverse Right", "Reverse Left", "Stop", "Fire" (see Supplementary Materials). The recognition system undergoes a learning procedure for each user. Typically, there were one or two problem gestures recognized uncertainly or mismatched with another gesture. Due to the biological feedback mediated by vision users learned to compensate for such problems apparently by tuning their muscle contraction patterns. If such compensation failed, we excluded these gestures and used a reduced command set to achieve a classifier accuracy of 95%-99%.

Discussion
We propose a hybrid network model involving bio-mimetic spiking neurons for feature extraction and a formal neural network for pattern classification. Noticeably, the resulting recognition system displayed high accuracy on data recorded from Trigno and MYO systems (see Tables 1 and 2). Being tested with both systems our model demonstrated equal accuracy despite significant (five-fold) sampling rate differences.
We also illustrated how biologically-based spiking neurons and formal artificial neurons linked in hybrid systems may provide new features to HMI systems enhancing their performance. For example, in our case the activity of virtual neurons in the detector was connected with the generic activity of motor units, and, hence with the activity of motor neurons in the spinal cord. With an increase of the number of registered channels improving the resolution one can expect a better degree of synchronization between individual living neurons and external virtual counterparts. In such an interface the virtual spiking neuron will serve as an artificial expansion of the nervous system that could provide additional functions and degree of flexibility for perspective HMI systems.

Author Contributions
Sergey Lobov and Victor Kazantsev offered the idea and chose mathematical models, Vasiliy Mironov and Victor Kazantsev implemented the computer software, Sergey Lobov and Innokentiy Kastalskiy performed the experiments and analyzed the data. All authors contributed to the manuscript writing and to the interpretation of results.