Adaptive Filters to Remove Deep Brain Stimulation Artifacts from Local Field Potentials

Deep Brain Stimulation (DBS) has continuously gained popularity as a symptomatic treatment in diseases such as Parkinson’s Disease (PD), Essential Tremor (ET), and dystonia. For better understanding the mechanisms of DBS, a series of intraoperative Local Field Potential (LFP) recordings are acquired from patients during DBS. These recordings are vastly affected by stimulation artifacts (SAs). Despite the recent advancements in digitaland analog-based processing methods in removing SAs, a common approach in Neuroscience community is to delete an entire time interval affected by such artifact (lasting about 5 milliseconds after the onset of DBS pulse). In this paper, we propose a robust computational framework based on adaptive filtering strategy to automatically estimate the artifact induced by each individual DBS pulse, and to recover the neural response during the artifact. An estimate of the common identical artifact is obtained by fitting a B-Spline smoothing function to the average of all recordings followed by DBS pulse. The common artifact, for each individual pulse, is then fed to a Normalized Least Mean Square (NLMS) adaptive filter whose error is equal to the difference between the recorded data and the adapted artifact i.e., the recovered neural response. This framework is then confirmed using the LFP recorded from patients with PD at the level of Subthalamic Nucleus (STN). The artifact is visibly and quantifiably diminished after ~ 1.5 msec after the onset of DBS pulse. This will allow researchers to peek further into the mechanism of action and health effects of DBS. We believe that this work will broaden window of clarity will pave the way for the development of accurate bidirectional closed-loop DBS techniques.

The major question in DBS research is to understand how such stimulation modulate neural activity in specific parts of the brain, e.g., basal ganglia network (BGN) (Lio, Thobois, Ballanger, Lau, & Boulinguez, 2018). To tackle this question, it is substantial to study how neural activity (neural evoked potential) varies in response to DBS pulses. Nevertheless, DBS generates significant high amplitude electrical artifacts that fully obscure neural activity recorded by neurophysiological recordings like LFP, EEG, etc (Lio et al., 2018). The morphology of these artifacts depend on stimulator architecture, stimulation waveform, and electrode configuration (Zhou, Johnson, & Muller, 2018).
Despite the recent advancements in both digital-and analog-based approaches to alleviate the effect of DBS artifacts, neuroscientists barely access to a clean neural signal right after the DBS pulse. Current methods for signal processing often handle the artifact by removing the noisy interval after the DBS onset. This interval can possibly include valuable information including both cellular and network-level evoked potentials associated with DBS. Some of the work in the literature can also include low-pass filters to remove the frequency of stimulation and higher, which is also flawed as it can remove neural oscillations in higher frequencies (e.g. Mideksa et al., 2016).
In some other methods the recording electrode is simply turned off or turned to sample mode during stimulation. This technique is also flawed as the information in a time period is discarded . In this paper, we propose a novel algorithm based on adaptive filtering strategy to remove the DBS artifacts, and to 328 This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0 recover the neural response for right after the DBS pulse.

Adaptive Filters
Adaptive filters are powerful signal processing tools which have been favorably incorporated in neural time series analysis. These filters iteratively adapt their input signal to the desired noisy observation signal. Adaptive filters are significantly more appropriate than the usual linear filters when the time and frequency windows for information & noise overlap (Tan & Jiang, 2019).

Normalized Least Mean Square (NLMS) filter
NLMS uses a popular technique in data science, titled gradient descent, where the data matrix with the same dimensions as the training dataset changes with each iteration to decrease the difference between them (i.e., descend along the gradient) (Widrow, McCool, Larimore, & Johnson, 1976).

Patient Details & Electrophysiology
The Krembil Brain Institute has unique access to patients with DBS electrodes implanted in the subthalamic nucleus (STN) with externalized leads, allowing stimulation and recording of local field potentials from DBS electrodes 1 to 5 days after electrode implantation in fully awake and cooperative patients. Data were recorded from three male Parkinson's disease patients while they were on their regular Parkinson's disease medication. Two patients were implanted with Medtronic Inc. 3389 leads (4 contact in-line cylindrical lead with 1.5 mm contact height and 0.5 mm intercontact spacing) and one was implanted with Boston Scientific Inc. Vercise leads (8 contact in-line cylindrical lead with 1.5 mm contact height and 0.5 mm intercontact spacing).

Stimulation and LFP Recordings
Monopolar stimulation was delivered via a single macroelectrode contact, the contact as the cathode and an external electrode on the patients' chest wall as the anode. The contact most likely located within the STN based on the intraoperative microelectrode recordings was selected for stimulation. The level of stimulation was adjusted for each patient individually as the highest tolerable stimulation level without side-effects (e.g., parathesia), resulting in an average stimulation intensity of 2.97 ± 0.5 (SD) mA. The stimulation was applied in the form of trains that consisted of 32 pulses (approx. 250 milliseconds, 130Hz (clinical) and 5 Hz (research), monophasic, square waves, pulse width = 100 μs). The trigger pulses for stimulation were prepared using Spike2 software (Cambridge Electronic Design, Cambridge, UK) and delivered through Power 1401 (Cambridge Electronic Design) to a constant current stimulator (Digitimer, Welwyn Garden City, Hertfordshire, UK). The LFP was sampled at 20kHz, 3500 Hz low pass and DC high pass filtered, and amplified using a low gain SynAmps RT amplifier (Compumedics Neuroscan, Dresdan, Germany).

Proposed Algorithm
The theoretical framework of the filter is as follows:

Aligning the neural recordings
Aligning all the individual pulses followed by the DBS onsets is a necessary step toward automating our computational framework. Each DBS spike train comprises several pulses (~ 75 pulses in 5 Hz DBS). Our algorithm finds the peaks of recorded intensity and aligns them accordingly. Each pulse is then normalized to its baseline average.

Estimating the common DBS-induced artifact
The average of all individual aligned pulsesfor about 5 msec after DBS onsetcan be considered as the common artifact. However, this estimate of the artifact might contain an evoked neural response (which appears in the average). To eliminate the occurrence of evoked neural activity in the estimate of the common artifact, we use the B-Spline function (Yang, Ma, & Yu, 2016) to smooth the average of the normalized DBS pulses. This function uses variable-degree polynomials to fit the recorded LFP data over repeating intervals of constant length.

Recovering Neural Response using the Adaptive Filter
The common artifact is fed to the NLMS filter, for each individual pulse, to track the variability of each DBSinduced artifact, hence better recovering the neural activity. The filter was designed and implemented in MATLAB 9.6.0.1114505 (R2019a Update 2) [MathWorks, Natick, MA]. The NLMS filter is part of the DSP System Toolbox (Version 9.8) [Available on MATLAB Add-on Explorer].

Results
The graphical representation of the three steps of the proposed algorithm is shown in Figure 1. As mentioned earlier, all the individual recordings following each DBS pulse are automatically selected, normalized and aligned. The B-spline method is then employed to smooth the average of those individuals, thus providing an approximation of the common DBS artifact. By feeding this common artifact to a NLMS adaptive filter, the neural response corresponding to each individual DBS pulse is estimated. Figure 2 shows the result of applying the proposed algorithm to a segment of LFP recordings during 5 Hz DBS. This segment is composed of 110 DBS pulses followed by neural activity. The objective is to recover the neural activity within 5 msec after each DBS pulse where the neural activity is fully masked by the artifact.

Figure 2.
A) the adaptive filter in action. A) LFP recording during 5Hz DBS stimulation. By finding the maxima of the time-series, the signal peaks are found and indexed. B) The 35 pulses are then aligned from 5 sampling points before, up to 120 sampling points after stimulation. It is then normalized by removing the mean activity to account for spontaneous differences between spikes. C) NLMS filter reconstructs the signal using the Spline model. D) Three different pulses are aligned. This method reconstructs the neural response, allowing for more investigations into the mechanisms of action for DBS.
As it is clear by visual inspection, this method significantly decreases the DBS artifacts to a great extent and recover neural oscillations for about 5 msec after DBS onset.

Discussion
The pronounced SAs shortly following the DBS have jammed the information collected in a short time-period (~ 5 msec) right after DBS. In this paper, we proposed a robust algorithm based on adaptive filtering approach that enables signal recovery in the first few milliseconds after DBS. The neural evoked potentials initiated by neuromodulation are pronounced in this interval.
We demonstrated that the proposed algorithm adaptively matches the common artifact to the recorded data following each individual DBS pulse. This has three main advantages over the existing methods in the literature. First, our algorithm is robust to aliasing. Second, non-stationary changes of DBS-induced artifacts can be discarded from LFP recordings. Third, the oscillatory properties of each trial can be independently recovered.
Furthermore, the NLMS filter benefits from a quick convergence rate (Borisagar, Sedani, & Kulkarni, 2011) which made the proposed algorithm effective to recover neural activity in a vert short time window.
It is to be noted that although this algorithm was developed to remove artifacts from Local Field Potentials, it can be used on a plethora of other recordings such as EEG, ECoG, and fNIRS, and TMS.