Comparison of Sneo-Based Neural Spike Detection Algorithms for Implantable Multi-Transistor Array Biosensors

: Real-time neural spike detection is an important step in understanding neurological activi-ties and developing brain-silicon interfaces. Recent approaches exploit minimally invasive sensing techniques based on implanted complementary metal-oxide semiconductors (CMOS) multi transistors arrays (MTAs) that limit the damage of the neural tissue and provide high spatial resolution. Unfortunately, MTAs result in low signal-to-noise ratios due to the weak capacitive coupling between the nearby neurons and the sensor and the high noise power coming from the analog front-end. In this paper we investigate the performance achievable by using spike detection algorithms for MTAs, based on some variants of the smoothed non-linear energy operator (SNEO). We show that detection performance beneﬁts from the correlation of the signals detected by the MTA pixels, but degrades when a high ﬁring rate of neurons occurs. We present and compare different approaches and noise estimation techniques for the SNEO, aimed at increasing the detection accuracy at low SNR and making it less dependent on neurons ﬁring rates. The algorithms are tested by using synthetic neural signals obtained with a modiﬁed version of NEUROCUBE generator. The proposed approaches outperform the SNEO, showing a more than 20% increase on averaged sensitivity at 0 dB and reduced dependence on the neuronal ﬁring rate.


Introduction
Neurons communicate by means of electric pulses, called action potentials (APs), or "spikes", a sudden, fast, transitory, and propagating change of the resting membrane potential. These voltage variations are recorded with neural sensors able to sense many neurons at same time. Multielectrode intracortical recording is offering scientists great opportunities to gain a better understanding of the brain, owing to a very good spatial and temporal resolution [1,2]. Among these types of biosensors, the electrolyte oxide semiconductor field effect transistor (EOSFET) multi transistor arrays (MTAs) are very promising, as they allow researchers to integrate, in the same chip recording, signal processing electronics and a communication interface outside the cutis [3,4].
EOSFET MTAs are a minimally invasive sensing technique that detects and records the neural signals through capacitive coupling between the nearby neuron and the electronics. In this extracellular recording technique, there is a space between the cell membrane and the sensor surface (electrodes) which limits the damage of the cell and allows longterm implants. The biocompatibility is guaranteed by the manufacturing process, that neural test data generated by our modified version of NEUROCUBE [24], a well-established Matlab toolbox for generating realistic synthetic extracellular recordings.
A first-order estimate of the number of logic gates required for hardware implementation of the investigated spike detection algorithms is also provided, to find the most suitable technique for an implantable on-chip implementation.

Figures of Merit
The spike detection performance is evaluated by measuring detection accuracy defined as: where TP, FP, and FN are true positive (representing the number of correctly detected spikes), false positive (the number of false spikes due to mis-detecting noise as spikes), and false negative (representing the number of missed spikes), respectively [24]. The accuracy is generally reported as a function of SNR.
Other parameters used to evaluate the quality of detection methods, are the false-alarm rate (FAR) and the true-positive rate (TPR), defined as in [24]: FAR and TPR are calculated in order to plot the receiver operating characteristic (ROC) curve [9]. The area under this curve represents the probability that an ideal observer will correctly classify an event in a two-alternative forced-choice [25].

Extracellular Recordings Datasets
The neural signal used for testing has been generated by a modified version of the toolbox NEUROCUBE [24], a generator for extracellular recording based on detailed models of individuals neurons, which emulates a typical in-vivo scenario. In NEUROCUBE the neurons near the recording electrodes are modelled by detailed biophysics models that accurately take into account the distance between a neuron and each electrode. We added to the generator the possibility to add artifacts and local field potential (LFP) as described in [26]. The LFP characterizes the low frequency content of the background noise (≤300 Hz). Thermal noise, which takes into account the contribution due to the analog front-end and is very important for EOSFET MTAs [7], is simulated by adding a Gaussian noise with zero mean to the extracellular recording.
The NEUROCUBE generator does not allow us to simulate an electrode configuration similar to that of an in vitro recording with an MTA sensor. So, we further modified the toolbox to include the possibility of simulating an array of 7 honeycomb channels, using the sensor dimensions reported in [3]: pixel size of 6 µm, spaced by 2 µm. The simulation parameters are characterized by a sampling rate of 10 kHz and an active neuron firing rate of 10% in 1 mm 3 of virtual brain tissue. The 7-honeycomb pattern is shown in Figure 1a.
Thanks to the small size of the pixels and the reduced pixel spacing, the AP produced by a single neuron is captured by more than 1 pixel, albeit with different amplitudes (related to the neuron-pixel distance). This effect can be observed in the simulation of Figure 1b, which shows signals detected by two sensor pixels, for a neuron positioned on the west side of the sensor (in the absence of interference and noise). In practice, the detected APs are submerged in noise, as shown in Figure 1c, where the AP signal detected from pixel #1 is displayed, for SNR = 3 dB. Figure 2a,b shows the effect of different noise levels (SNR) on the same AP detected by pixel #1. At a lower SNR value, the AP shape is corrupted (see Figure 2a), making the detection procedure more difficult. on the west side of the sensor (in the absence of interference and noise). In practice detected APs are submerged in noise, as shown in Figure 1c, where the AP signal dete from pixel #1 is displayed, for SNR = 3 dB. Figure 2a,b shows the effect of different n levels (SNR) on the same AP detected by pixel #1. At a lower SNR value, the AP shap corrupted (see Figure 2a), making the detection procedure more difficult. In the spike detection pipeline the synthetic signal is firstly filtered with a 4th-o passband Butterworth filter (300-3000 Hz) to eliminate low-frequency LFP and to l high-frequency thermal noise before further processing [27]. Therefore, to reduce C time, we keep the generation of the synthetic data simple and fast, considering only thermal noise superimposed to the noiseless simulated extracellular recording. on the west side of the sensor (in the absence of interference and noise). In practice, the detected APs are submerged in noise, as shown in Figure 1c, where the AP signal detected from pixel #1 is displayed, for SNR = 3 dB. Figure 2a,b shows the effect of different noise levels (SNR) on the same AP detected by pixel #1. At a lower SNR value, the AP shape is corrupted (see Figure 2a), making the detection procedure more difficult. In the spike detection pipeline the synthetic signal is firstly filtered with a 4th-order passband Butterworth filter (300-3000 Hz) to eliminate low-frequency LFP and to limit high-frequency thermal noise before further processing [27]. Therefore, to reduce CPU time, we keep the generation of the synthetic data simple and fast, considering only the thermal noise superimposed to the noiseless simulated extracellular recording. In the spike detection pipeline the synthetic signal is firstly filtered with a 4th-order passband Butterworth filter (300-3000 Hz) to eliminate low-frequency LFP and to limit high-frequency thermal noise before further processing [27]. Therefore, to reduce CPU time, we keep the generation of the synthetic data simple and fast, considering only the thermal noise superimposed to the noiseless simulated extracellular recording.

SNEO Algorithm
Energy operators basically measure the cross energy between a signal and its derivatives [11]. A spike may be described as a short-lived burst with high amplitude and frequency; therefore, this class of operators enhances the differentiation between spikes and noise, improving the signal-to-noise ratio (SNR). This property and the low hardware complexity make the spike detection algorithm based on an energy operator suitable for on-chip implementation [28,29]. A popular technique is the non-linear energy operator (NEO), sometimes known as teager energy operator (TEO) [30]. In discrete time, the NEO ϕ of a signal x(n) is defined as: Equation (4) describes how the NEO emphasizes both localized high energy and frequency on input signal: it is large only when the signal is high in power (i.e., large magnitude) and changing fast (i.e., high frequency) [31].
The multi-resolution version of NEO (k-NEO) [32] is introduced to improve detection performance at a low SNR. The k-NEO operator introduces a resolution parameter k and is described as follows: The k-NEO output is often smoothed by a window such as Bartlett or Hamming [28], which is called Smoothed NEO, or SNEO, as described in Equation (6).
In the following we use the Hamming window of length 4k + 1, as suggested in [32]. Figure 3 shows how the value of k (and hence the window width) affects the SNEO output. In the following we used k = 4 as the best compromise between spike amplification and time resolution.

SNEO Algorithm
Energy operators basically measure the cross energy between a signal and its derivatives [11]. A spike may be described as a short-lived burst with high amplitude and frequency; therefore, this class of operators enhances the differentiation between spikes and noise, improving the signal-to-noise ratio (SNR). This property and the low hardware complexity make the spike detection algorithm based on an energy operator suitable for on-chip implementation [28,29]. A popular technique is the non-linear energy operator (NEO), sometimes known as teager energy operator (TEO) [30]. In discrete time, the NEO φ of a signal x(n) is defined as: Equation (4) describes how the NEO emphasizes both localized high energy and frequency on input signal: it is large only when the signal is high in power (i.e., large magnitude) and changing fast (i.e., high frequency) [31].
The multi-resolution version of NEO (k-NEO) [32] is introduced to improve detection performance at a low SNR. The k-NEO operator introduces a resolution parameter k and is described as follows: The k-NEO output is often smoothed by a window such as Bartlett or Hamming [28], which is called Smoothed NEO, or SNEO, as described in Equation (6).
In the following we use the Hamming window of length 4k+1, as suggested in [32]. Figure 3 shows how the value of k (and hence the window width) affects the SNEO output. In the following we used k = 4 as the best compromise between spike amplification and time resolution.

Thresholding
The threshold in any spike detection algorithm should be selected to maximize the probability of detecting the spikes, while keeping the number of false detections below a

Thresholding
The threshold in any spike detection algorithm should be selected to maximize the probability of detecting the spikes, while keeping the number of false detections below a reasonable limit. The standard approach for SNEO is to take the threshold as a scaled version of the mean of ϕ SNEO : Electronics 2021, 10, 410 where N C is the size of the sliding window used to estimate the mean, and C is the scale factor determined by the experiment with the ROC curves, as suggested in [33]. A schematic of the classical SNEO method is shown in Figure 4. Taking advantage of spatial correlation leads to a higher probability of detecting a true spike and thus improves performance. This is shown by the ROC curves in Figure 5.
reasonable limit. The standard approach for SNEO is to take the threshold as a scaled version of the mean of SNEO where NC is the size of the sliding window used to estimate the mean, and C is the scale factor determined by the experiment with the ROC curves, as suggested in [33]. A schematic of the classical SNEO method is shown in Figure 4. Taking advantage of spatial correlation leads to a higher probability of detecting a true spike and thus improves performance. This is shown by the ROC curves in Figure 5.  Figure 5a displays the ROC when data sampled from a single MTA pixel is employed for spike detection. By reducing the scale factor C, both true-positive rate and false-alarm rates increase, as expected. A FAR lower than 0.02 is obtained for C = 6, with a corresponding TPR of about 0.26. reasonable limit. The standard approach for SNEO is to take the threshold as a scaled version of the mean of SNEO where NC is the size of the sliding window used to estimate the mean, and C is the scale factor determined by the experiment with the ROC curves, as suggested in [33]. A schematic of the classical SNEO method is shown in Figure 4. Taking advantage of spatial correlation leads to a higher probability of detecting a true spike and thus improves performance. This is shown by the ROC curves in Figure 5. Figure 5a displays the ROC when data sampled from a single MTA pixel is employed for spike detection. By reducing the scale factor C, both true-positive rate and false-alarm rates increase, as expected. A FAR lower than 0.02 is obtained for C = 6, with a corresponding TPR of about 0.26.  Figure 5a displays the ROC when data sampled from a single MTA pixel is employed for spike detection. By reducing the scale factor C, both true-positive rate and falsealarm rates increase, as expected. A FAR lower than 0.02 is obtained for C = 6, with a corresponding TPR of about 0.26. Figure 5b shows the ROC obtained when the input of the k-NEO is obtained as the average of the signals coming from the 7 pixels of the sensor, to exploit the spatial correlation. The ROC curve increases much more steeply in this case. For C = 5, a FAR lower than 0.01 is obtained with a TPR of about 0.98. This example clearly shows that Electronics 2021, 10, 410 7 of 17 detection performance largely benefits from the correlation of the signals detected by the MTA pixels.
In the following analysis we consider simulated data for SNR = 0 dB. An example of the ROC curve at SNR = 0 dB and a sliding window of Nc = 5000 samples is shown in Figure 6a. The ROC shows that using C = 5 is a reasonable choice, giving a false-alarm rate of less than 0.02 (2%) and a respectable 60% accuracy even at SNR = 0 dB.  Figure 5b shows the ROC obtained when the input of the k-NEO is obtained as the average of the signals coming from the 7 pixels of the sensor, to exploit the spatial correlation. The ROC curve increases much more steeply in this case. For C = 5, a FAR lower than 0.01 is obtained with a TPR of about 0.98. This example clearly shows that detection performance largely benefits from the correlation of the signals detected by the MTA pixels.
In the following analysis we consider simulated data for SNR = 0 dB. An example of the ROC curve at SNR = 0 dB and a sliding window of Nc = 5000 samples is shown in Figure  6a. The ROC shows that using C = 5 is a reasonable choice, giving a false-alarm rate of less than 0.02 (2%) and a respectable 60% accuracy even at SNR = 0 dB. Unfortunately, computing the threshold from the mean value of the SNEO operator results in performance degradation for high neuron firing rates. Figure 7 shows the accuracy curves for different neuron firing rates. As can be clearly observed, as the firing rate increases the detection performance worsens due to the increment of the threshold value. The accuracy at 0 dB SNR decreases from 60% for a firing rate of 10 Hz to about 25% when the firing rate reaches 200 Hz. Unfortunately, computing the threshold from the mean value of the SNEO operator results in performance degradation for high neuron firing rates. Figure 7 shows the accuracy curves for different neuron firing rates. As can be clearly observed, as the firing rate increases the detection performance worsens due to the increment of the threshold value. The accuracy at 0 dB SNR decreases from 60% for a firing rate of 10 Hz to about 25% when the firing rate reaches 200 Hz.

Proposed Approaches
To reduce the performance degradation for high firing rates, we have investigated two alternatives to the basic SNEO algorithm. Let us assume, for the time being, that the noise standard deviation σ is known beforehand (in practice, the σ value is estimated from

Proposed Approaches
To reduce the performance degradation for high firing rates, we have investigated two alternatives to the basic SNEO algorithm. Let us assume, for the time being, that the noise standard deviation σ is known beforehand (in practice, the σ value is estimated from the recorded neural signal-we will discuss some simple robust estimation techniques in Section 2.6).
In a first approach (that we name the following pre-normalization technique, or pre-norm) the signal coming from each channel, x i , is normalized (divided by) the corresponding channel noise standard deviation σ i . Then, the mean of the normalized channel is calculated: The SNEO operator is applied to x(n), and the result is compared with the threshold C. Figure 8 shows this implementation.  Unfortunately, the pre-norm technique requires a division to be performed for each channel. This increases the computational cost and makes this approach less amenable to hardware implementation.
To alleviate this problem, we developed a second algorithm named in the following post-normalization technique, or post-norm. In this algorithm, the mean of the signals coming from each channel is computed as:   Unfortunately, the pre-norm technique requires a division to be performed for each channel. This increases the computational cost and makes this approach less amenable to hardware implementation.
To alleviate this problem, we developed a second algorithm named in the following Unfortunately, the pre-norm technique requires a division to be performed for each channel. This increases the computational cost and makes this approach less amenable to hardware implementation.
To alleviate this problem, we developed a second algorithm named in the following post-normalization technique, or post-norm. In this algorithm, the mean of the signals coming from each channel is computed as: x i (n) (9) x mean is sent to the SNEO operator, as in the basic algorithm of Section 2.4. The noise variance of x mean is estimated and a spike is detected when: The post-norm algorithm avoids divisions and is depicted in the block diagram in Figure 10. As shown in Figure 11, the accuracy curves remain better and closer than the standard SNEO, with a slight performance decrease (about 1 dB) compared to the pre-norm approach. The post-norm algorithm avoids divisions and is depicted in the block diagram in Figure 10. As shown in Figure 11, the accuracy curves remain better and closer than the standard SNEO, with a slight performance decrease (about 1 dB) compared to the prenorm approach.

Noise Estimation Techniques
Noise estimation techniques aim at estimating the noise distribution's standard devia-  The post-norm algorithm avoids divisions and is depicted in the block diagram in Figure 10. As shown in Figure 11, the accuracy curves remain better and closer than the standard SNEO, with a slight performance decrease (about 1 dB) compared to the prenorm approach.

Noise Estimation Techniques
Noise estimation techniques aim at estimating the noise distribution's standard deviation σ, starting from recorded data that include spikes. Spikes are outliers with respect to background noise and affect the signal distributions, leading to an overestimation of σ [21].

Noise Estimation Techniques
Noise estimation techniques aim at estimating the noise distribution's standard deviation σ, starting from recorded data that include spikes. Spikes are outliers with respect to background noise and affect the signal distributions, leading to an overestimation of σ [21].
Please note that in the following discussion we assume that the signal x has zero mean thanks to the 2nd-order high pass filtering.

Median
The most well-known robust statistical method to estimate the background noise is based on computing the median of absolute value of the signal, scaled by a numerical factor of 0.6745, assuming a Gaussian noise distribution as in [34]: where x(n) is the sample of the waveform at time n. This technique will be named median absolute deviation (MAD) in the following. Please note that the median requires us to sort a large array of neural samples, which requires a lot of computational resources and precludes a low-power hardware implementation [28].

Mean Absolute
A simpler way to estimate the background noise is simply to take the root mean square of x(n), but the main issue of this straightforward technique is its dependency from the spike firing rates, which degrades the overall performance of the spike detection [35]. A viable alternative is using the absolute value of the signal in the moving average. This limits the error in the estimate due to spikes, since spike amplification by the squaring is avoided, while keeping low the complexity of the hardware implementation. The new σ estimation is defined as follows: where M is the length of the moving average window, while the coefficient 1.25 is computed so that σ n is equal to the standard deviation of x, when x is a zero-mean signal with a Gaussian distribution. Considering the main operations required for this estimate, we name this technique absolute average, or AA.

Winsorization
Another, more robust approach we propose is based on a technique called winsorization. The idea is to truncate the high value samples in the signal that come, with high probability, from spike outliers. In this way the clipped signal is mainly composed of noise, and we can obtain a robust estimate of σ from it [36] (a similar technique is the kappa-sigma clipping used in astronomy [37]). Our implementation of winsorization method follows three steps: 1.
An initial noise standard deviation σ is required for the clipping (we used AA for this initial estimate).

2.
σ is then used for the clipping of the absolute value of the signal as follows: 3. from the clipped signal x (n), the standard deviation is finally estimated as: where the coefficient 1.58 is computed so that σ n is equal to the standard deviation of x, when x is a zero-mean signal with a Gaussian distribution.
Since this approach combines winsorization and a moving average operation, we name this technique winsorization average, or WA, in the following.

Performance Results
The values reported in the following have been obtained by averaging the results of 10 independent simulations, for each firing rate and SNR value. In all cases, the scale factor C has been chosen to obtain an accuracy not lower than 60% for a 10 Hz firing rate and a FAR lower than 0.02 at SNR = 0 dB. The detection performances for the standard SNEO and the proposed approaches at SNR = 0 dB for each firing rate are summarized in Tables 1-3, respectively.  Figure 12 compares the performance of the investigated noise estimation techniques applied to the pre-norm algorithm, using the scale factor of 10 Hz (C = 7). As can be observed, the three sigma estimation techniques perform equally well in this case, with results very close to the ones in Figure 9 (that assumes an a-priori knowledge of the sigma). As a result, the simple AA approach is preferred, due to its simplicity. Table 3. Detection performances of post-norm algorithm at different firing rates at SNR = 0 dB (C = 50).

Performance Results
The values reported in the following have been obtained by averaging the results of 10 independent simulations, for each firing rate and SNR value. In all cases, the scale factor C has been chosen to obtain an accuracy not lower than 60% for a 10 Hz firing rate and a FAR lower than 0.02 at SNR = 0 dB. The detection performances for the standard SNEO and the proposed approaches at SNR = 0 dB for each firing rate are summarized in Tables 1-3, respectively. Figure 12 compares the performance of the investigated noise estimation techniques applied to the pre-norm algorithm, using the scale factor of 10 Hz (C = 7). As can be observed, the three sigma estimation techniques perform equally well in this case, with results very close to the ones in Figure 9 (that assumes an a-priori knowledge of the sigma). As a result, the simple AA approach is preferred, due to its simplicity. The accuracy curves for the post-norm algorithm are shown in Figure 13. In this case the sigma estimation technique plays an important role in defining accuracy, and the results are less optimistic than shown in Figure 11. The detection decrease is also evident comparing the performance values of the pre-norm and post-norm approach reported in Tables 2 and 3, respectively. It can be observed from Figure 13 that the WA estimate give remarkably good results, very close to the MAD technique, while being much simpler and more amenable to hardware implementation. The simpler AA estimate, while giving better results compared to the standard SNEO algorithm, is less effective that WA (see Table  3). The accuracy curves for the post-norm algorithm are shown in Figure 13. In this case the sigma estimation technique plays an important role in defining accuracy, and the results are less optimistic than shown in Figure 11. The detection decrease is also evident comparing the performance values of the pre-norm and post-norm approach reported in Tables 2 and 3, respectively. It can be observed from Figure 13 that the WA estimate give remarkably good results, very close to the MAD technique, while being much simpler and more amenable to hardware implementation. The simpler AA estimate, while giving better results compared to the standard SNEO algorithm, is less effective that WA (see Table 3).

Resource Consumption
The hardware complexity of the investigated algorithms can be estimated by considering the required arithmetic operations and their hardware cost, in terms of logic gates.
The cost of each arithmetic operator is assumed as: adder 5N, multiplier 6N 2 , division 13N + 20N 2 , comparator 7N, and register 9N, where N is the number of bits. Table 4 reports the complexity estimate of the blocks in common between the investigated techniques (input filter, the mean of the seven channels, and SNEO), while the resources needed for the noise estimates AA and WA are listed in Table 5. We have not considered the MAD technique that requires the sorting of an array of values and is not suited for hardware implementation [38]. The additional computational resources required to implement each detector are shown in Table 6.    Figure 14 shows the accuracy curves averaged on the four firing rates considered (10 Hz, 50 Hz, 100 Hz, 200 Hz); Figure 14a refers to the pre-norm approach, and Figure 14b to the post-norm approach. Table 7 summarizes the averaged detection performances at SNR = 0 dB and the hardware complexity. The number of logic gates has been estimated considering the SNEO tuning parameter k = 4 and assuming values encoded on N = 8-bit number, which is a typical value for power-constrained applications [3,30].  Figure 14 shows the accuracy curves averaged on the four firing rates considered (1 Hz, 50 Hz, 100 Hz, 200 Hz); Figure 14a refers to the pre-norm approach, and Figure 14 to the post-norm approach. Table 7 summarizes the averaged detection performances a SNR = 0 dB and the hardware complexity. The number of logic gates has been estimate considering the SNEO tuning parameter k = 4 and assuming values encoded on N = 8-b number, which is a typical value for power-constrained applications [3,30].  The results in Figure 14a and in Table 7 show that the accuracy of the pre-norm ap proach outperforms the classic SNEO by a factor of 1.5× at 0 dB SNR. The false-alarm rat is larger that SNEO but still has an acceptable value, lower than 0.6%. The estimated num ber of logic gates for the pre-norm algorithm, however, is more than 1.2× compared to th standard SNEO method (mainly for the need of hardware divider), making this techniqu less attractive when low power is the main concern.  The results in Figure 14a and in Table 7 show that the accuracy of the pre-norm approach outperforms the classic SNEO by a factor of 1.5× at 0 dB SNR. The false-alarm rate is larger that SNEO but still has an acceptable value, lower than 0.6%. The estimated number of logic gates for the pre-norm algorithm, however, is more than 1.2× compared to the standard SNEO method (mainly for the need of hardware divider), making this technique less attractive when low power is the main concern.

Discussion
The post-norm approach shows a decrease of performance compared to pre-norm, and the choice of noise estimate method, moreover, influences the detection results. The MAD and WA estimates provides almost the same performance, while AA sigma estimates result in a 7% accuracy reduction (see Table 7). In any case, post-norm gives a better detection performance than classic SNEO in terms of accuracy and sensitivity (TPR). The MAD/WA accuracy outperforms classic SNEO by a factor of 1.3× at 0 dB SNR, while the AA outperforms SNEO by a factor of 1.1×, as summarized in Table 7. The false-alarm rate is larger that SNEO but remains below 0.5%. The post-norm technique is ideally suited for hardware implementation, not requiring any division. This is clearly shown in Table 7: the post-norm WA requires only 6% more logic gates compared to standard SNEO, while post-norm AA requires only 4% more gates.

Conclusions
In this paper we have investigated the performance achievable by using spike detection algorithms for CMOS multi transistors arrays, based on some variants of smoothed non-linear energy operator. We have shown that detection performance benefits from the correlation of the signals detected by the MTA pixels, but degrades when a high firing rate of neurons occurs. To solve this problem, we have presented two algorithm variants (pre-norm and post-norm) and two noise estimation techniques. In addition, a first order estimate of the number of logic gates required for hardware implementation of the investigated peak detection algorithms has been presented, to find the most suitable technique for an implantable on-chip implementation.
The pre-norm method shows an overall increase of 30% with respect to standard SNEO in terms of accuracy and sensitivity even when the simple AA noise estimation technique is employed. Unfortunately, the use of dividers makes this algorithm less amenable to hardware implementation. Hence, pre-norm can be useful when spike detection is not performed in the sensors themselves and adequate computational resources are available. The post-norm technique, while not as accurate as the pre-norm one, provides an accuracy and sensitivity improvement of 22% compared to the classic SNEO, with a reduced dependence on the neuronal firing rate. For post-norm, the WA noise estimation technique is a good choice, being simple to implement and similar in performance with the median absolute deviation estimate. This makes post-norm with WA noise estimate a suitable candidate for implantable MTA spike detectors.
On the basis of the obtained results, further investigation will be devoted to the VLSI implementation of post-norm algorithms.

Data Availability Statement:
The data presented in this study are available on request from the first author.

Conflicts of Interest:
The authors declare no conflict of interest.