Keywords

1 Introduction

Deep brain stimulation (DBS) is a treatment for movement disorders, such as Parkinson’s disease, dystonia, or essential tremor. It usually consists of the implantation of a stimulator in the infraclavicular region connected to an electrode lead that is placed in a target structure in the basal ganglia (the subthalamic nucleus (STN) or the thalamus). The stimulator delivers electric pulses of a specific frequency, amplitude, and pulse-width to the target via the electrode, which results in symptom improvement [5]. Despite its effectiveness, the exact mechanisms of action of DBS remain elusive, and most of the current understanding of these mechanisms has come from computer simulations [7]. The volume of tissue activated (VTA), the spatial spread of direct neural activation in response to the DBS electric pulses, is a popular concept to partly explain the effects of DBS [2]. The visualization of the VTA as part of anatomically accurate reconstructions of the brain structures surrounding the implanted electrode allows the clinical specialist to observe the areas that are responding directly to the delivered stimulus. This has been proven particularly useful for the post-surgical adjustment of the stimulation parameters, one of the most challenging aspects of the treatment. A faster adjustment of the DBS parameters saves the patient both time and discomfort. However, the computational burden for computing a patient-specific VTA is still tedious [4].

The gold standard for VTA estimation involves the computation of the brain tissue response to the electrical stimulation through a field of multi-compartment axon models [3]. Unfortunately, it is computationally intensive to be used as part of a system that allows the clinical specialist to visualize the VTA generated by a specific combination of stimulation parameters. This has led to machine learning methods that minimize the use of such models by taking advantage of the relation between the location of the axons in space and the electrical stimulation. Authors in [4] proposed the use of two artificial neural networks (ANNs) with the DBS stimulation parameters as inputs and the elliptic profiles defined by the active axons as outputs. Once trained, the neural networks can estimate the VTA for any combination of stimulation parameters. However, the elliptic profiles assumed generate small deviations from the actual contours of activation and this method only works under the assumption of isotropic tissue conductivity. Recently, we presented an alternative method that considers the problem of determining the VTA from a field of axons as equivalent to a binary classification task [6]. So, we use a Gaussian process classifier (GPC) to determine whether an axon at a given position in space is active due to DBS. This approach works independently of the assumed tissue conductivity conditions and cuts down to a tenth the time for VTA estimation. Nonetheless, this reduced computation time, in the range of minutes, is still too high for practical applications.

In this work, we explore a hierarchical K-nearest neighbor approach (HKNN) to accelerate the estimation of the VTA [1, 8]. In this sense, HKNN is a data-driven approximation of an expected squared error functional towards a local weighted VTA averaging. The weights are computed as a softmax gating function applied over a set of features estimated from the DBS stimulation parameter space. Our aim is to reduce the computation time needed to estimate the VTA generated by the electrical stimulation delivered by the DBS electrode, for a specific configuration of stimulation parameters, while trying to reproduce the results that would be obtained with the standard method. Our results show that HKNN outperforms the state of the art approaches in terms of computational cost, achieving fast estimations and low errors with respect to the gold standard simulation. The remainder is as follows: Sect. 2 describes the materials and methods. Sections 3 and 4 describe the experimental set-up and the obtained results, respectively. Finally, the conclusions are outlined in Sect. 5.

2 Materials and Methods

Let \(X \, {{\mathrm{\in }}}\, \mathcal {X}\) and \(Y \, {{\mathrm{\in }}}\, \mathcal {Y}\) be a pair of random variables representing the DBS stimulation parameters and the VTA spaces \(\mathcal {X}\) and \(\mathcal {Y}\), respectively. Here, we introduce a data-driven approach to estimate a new VTA \(y \, {{\mathrm{\in }}}\, Y\) from a given DBS stimulation sample \(x \, {{\mathrm{\in }}}\, X\) through the minimization of the following expected square error functional:

$$\begin{aligned} f^*= \arg \min _f{\pmb {E}_{X}\left\{ \pmb {E}_{Y|X}\left\{ \left( Y-f(g(X))\right) ^2|g(X)\right\} \right\} }, \end{aligned}$$
(1)

where \(g:\mathcal {X}\rightarrow \mathcal {H}\) is a mapping function from the DBS stimulation parameter space \(\mathcal {X}\) to a given feature representation space \(\mathcal {H}\) coding relevant patterns, and \(f:\mathcal {H}\rightarrow \mathcal {Y}\) is a regression function from \(\mathcal {H}\) to the VTA space \(\mathcal {Y}.\) Then, a pointwise solution of Eq. (1) is carried out, yielding:

$$\begin{aligned} f\left( g(x)\right) = \pmb {E}_{Y|X}\left\{ Y|g(X)=g(x)\right\} . \end{aligned}$$
(2)

Now, let \({\varvec{X}}\, {{\mathrm{\in }}}\, \mathbb {R}^{N\times Q}\) and \({\varvec{Y}} \, {{\mathrm{\in }}}\, \{0,1\}^{N\times P}\) be a couple of sample matrices holding Q stimulation parameters, P axons, and N samples (\(\mathcal {X}~{{\mathrm{\subset }}}~\mathbb {R}^{N\times Q}\), \(\mathcal {Y}~{{\mathrm{\subset }}}~\{0,1\}^{N\times P}\)). Namely, each row vector \({\varvec{x}}_i \, {{\mathrm{\in }}}\, \mathbb {R}^Q\) (\(i \, {{\mathrm{\in }}}\, \{1,\dots ,N\}\)) in \({\varvec{X}}\) holds the stimulation parameters employed to compute the i-th VTA \({\varvec{y}}_i \, {{\mathrm{\in }}}\, \{0,1\}^P\), which is stored through axon concatenation. Note that \({y}_{ip}{{\mathrm{=}}}1\) (\(p \, {{\mathrm{\in }}}\, \{1,\dots ,P\}\)) if the p-th axon is activated by the DBS device, otherwise, \({y}_{ip}{{\mathrm{=}}}0\). So, to estimate f in Eq. (2) from \({\varvec{X}}\) and \({\varvec{Y}}\), a weighted average approximation is computed as:

$$\begin{aligned} \hat{f}\left( g({\varvec{x}})\right) = \sum \limits _{{\varvec{y}} \, {{\mathrm{\in }}}\, \Omega _y}{w_k {\varvec{y}}_k},\forall {\varvec{y}}_k \, {{\mathrm{\in }}}\, \Omega _y \end{aligned}$$
(3)

where \(\Omega _y\) is a set containing the K nearest neighbors of \({\varvec{y}}\) in \({\varvec{Y}}\) and \(w_k \, {{\mathrm{\in }}}\, \mathbb {R}^+\) (\(k \, {{\mathrm{\in }}}\, \{1,\dots ,K\}\)). In particular, a hierarchical neighborhood is computed by considering both the feature representation space \(\mathcal {H}\) and the DBS contacts as:

$$\begin{aligned} \Omega _y{{\mathrm{=}}}\{{\varvec{y}}_k: \delta \left( ||{\varvec{c}}||_{1}-||{\varvec{c}}_k||_{1}\right) {{\mathrm{=}}}1,{\text {d}}\left( g({\varvec{x}}),g({\varvec{x}}_k)\right) \le {\text {d}}\left( g({\varvec{x}}),g({\varvec{x}}_K)\right) \}, \end{aligned}$$
(4)

where \({\varvec{c}} \, {{\mathrm{\in }}}\, \{1,0,\)-1\(\}^C\) stores the configuration of the C DBS contacts (1, 0 and \(-1\) represent anodic activation, inactivation or cathodic activation, respectively), \(\delta (\cdot ,\cdot )\) stands for the delta function that selects the contact configuration state (one or two active contacts) in a hierarchical process, and \({\varvec{x}}_K\) is the K-th neighbor of \({\varvec{x}}\) in \({\varvec{X}}\) according to the Euclidean distance operator \({\text {d}}\left( \cdot ,\cdot \right) \). The specific form of \(g(\cdot )\) is given in Sect. 3. Moreover, to assess the relative importance of \({\varvec{y}}_k\), a softmax gating function is used for estimating \(w_k\):

$$\begin{aligned} w_k = \frac{\exp {\left( -{\text {d}}\left( g({\varvec{x}}),g({\varvec{x}}_k)\right) \right) }}{\sum \limits _{{\varvec{x}}_j \, {{\mathrm{\in }}}\, \Omega _x}\exp {\left( -{\text {d}}\left( g({\varvec{x}}),g({\varvec{x}}_j)\right) \right) }}, \end{aligned}$$
(5)

where \(\Omega _x\) is the set containing the corresponding elements of \(\Omega _y\) in the DBS stimulation parameter space. Finally, a thresholding procedure (\(\zeta \, {{\mathrm{\in }}}\, [0,1]\)) is applied to estimate the new VTA \(\hat{{\varvec{y}}} \, {{\mathrm{\in }}}\, \{0,1\}^P\) as follows:

$$\begin{aligned} \hat{y}_p ={\left\{ \begin{array}{ll} 1&{} \hat{f}\left( g({\varvec{x}})\right) > \zeta \\ 0 &{} \text {otherwise}\\ \end{array}\right. }. \end{aligned}$$
(6)

3 Experimental Set-Up

We built a database of the VTAs generated by 1000 randomly selected combinations of realistic stimulation parameters, relevant in the context of VTA estimation, for the Medtronic ACTIVA-RC stimulator [9]. Thereby, the DBS stimulation parameter space is limited as follows: four contacts \({\varvec{c}}=\{c0,c1,c2,\) \(c3\},\) where a maximum of two simultaneously active contacts are analyzed, e.g., monopolar and bipolar configurations, amplitude values \(a \, {{\mathrm{\in }}}\, [0.5,5.5]\) \([\text {V}]\), and pulse-width values \(w \, {{\mathrm{\in }}}\, [60,450]\) \([\mu \text {s}].\) The electric potentials are generated for 200 monopolar (one active contact) and 800 bipolar (two active contacts) stimulation configurations as in [6]. An isotropic and homogenous brain tissue medium, and an encapsulation layer of \(0.5\,\text {[mm]}\) are assumed. This procedure is repeated for three different encapsulation layer conductivities: 0.680 \([\text {Sm}^{-1}]\), 0.128 \([\text {Sm}^{-1}]\), 0.066 \([\text {Sm}^{-1}]\), to represent low (\(\sim 500\) \([\mathrm {\Omega }]\)), medium (\(\sim 1000\) \([\mathrm {\Omega }]\)), and high (\(\sim 1500\) \([\mathrm {\Omega }]\)) impedance conditions [4], yielding a total of 3000 electric potential distributions. Afterwards, the electric potentials are interpolated onto each section of a field of 4144 multi-compartment axon models of diameter 5.7 \([\mu \text {m}]\), which are oriented perpendicularly to the axis of the electrode (see Fig. 1(a)), and positioned into a grid of width 9 \([\text {mm}]\) and height 27.75 \([\text {mm}]\). Furthermore, the axons share a space of 0.25 \([\text {mm}]\) between them in both the vertical and the horizontal directions. The response of the axons to the stimulating potentials defines each VTA: axons that fire an action potential per stimulation pulse are considered active and their positions in space shape the VTA [3]. Figure 1(b) depicts one of such shapes, a VTA for a monopolar configuration, and its spatial interaction with a representation of the STN. The use of multi-compartment axon models coupled to a stimulating electric field to estimate the VTA, as described above, is what we refer to as the gold standard for VTA estimation. All the axonal response simulations are implemented in NEURON 7.3.

Moreover, the g function in HKNN is defined as follows \(g({\varvec{x}}){{\mathrm{=}}}\,[m_x\mathbf c ,\) \(m_x abs(\mathbf c )]\), where \(abs(\cdot )\) is the element-wise absolute value operator, and \(m_x \, {{\mathrm{\in }}}\, \mathbb {N}\) is an approximation of the number of activated axons in \({\varvec{y}}\) given \({\varvec{x}}\). Namely, \(m_x{{\mathrm{=}}}\)  \(\varrho ({\varvec{x}}|a,w,{\varvec{c}}),\) where \(\varrho (\cdot |\cdot )\) is a polynomial function. For concrete testing, the polynomial order of \(\varrho \) is fixed as six aiming to code nonlinear data relations. Unless otherwise is stated, the number of nearest neighbors in Eq. (4) is set to \(K=3\), and the threshold \(\zeta \) in Eq. (6) is set to 0.6 (see Fig. 3 for details).

Two benchmarks are considered for validating the introduced HKNN approach. First, a classifier based on Gaussian processes (GPC) is used to estimate the VTA [6]. To this end, a random sample of 500 axons is taken from the total axonal population. Next, a multi-compartment simulation is executed to determine which of the sampled neural fibers are active during the stimulation. The information provided by the multicompartment simulation is converted to a set of labeled data. These data are used to train the GPC. The classifier is trained using a general purpose kernel (squared exponential covariance function with automatic relevance determination), and using Laplace’s approximation to the posterior. The VTA is estimated by predicting which of the 4144 axonal fibers would be activated by the applied stimulus. Second, an artificial neural networks approach (ANNs) is tested as described in [4]. Hence, the ANN method allows modeling the spread of activation for both monopolar and bipolar stimulation. Particularly, two feed-forward networks are trained to estimate the activation towards an ellipse parametrization. The former describes the size of each activation region and the latter determines their placement along the electrode shaft. The ANNs are trained using one hidden layer with 20 elements, a sigmoid transfer function, and a linear output layer. As quantitative measures both the computational time and the prediction error are considered. With respect to the prediction error, each estimated VTA is compared with the VTA obtained with the gold standard approach as follows \(\varepsilon =(FP+FN)/m\), where FP and FN are the false positives and false negatives with respect to the reference dataset (the VTAs from the database), and m is the reference number of active axons [4]. The errors are computed using a cross-validation scheme.

Fig. 1.
figure 1

(a) DBS electrode and VTA representations (Medtronic, model 3389). (b) 3D depiction of a VTA and its spatial interaction with the STN.

4 Results and Discussion

Figure 2 shows the VTA generated by a stimulation of 2.5 [V], 330 \([\mu s]\), with contacts c3 and c4 configured as an anode and a cathode, respectively. The region of activation is formed by the axons that fired an action potential because of the applied stimulus (green dots). The axons that do not respond to the stimulation are depicted in black. Figure 2(a) shows the extent of activation obtained with the gold standard for VTA estimation. Figure 2(b) to 2(d) show the VTAs predicted by the HKNN approximation, the ANNs, and the GPC. Besides, their corresponding errors with respect to the gold standard are shown. In this regard, the errors for the methods studied arise from different factors: The GPC is based on the assumption that axons are independent from one another while ignoring the clear spatial relationship between active axons. The ANNs take into account the spatial relationships among axons, but in modeling it as ellipses they neglect the fine details of the distribution of active axons. Now, our approach assumes smooth variations in the VTA as a result of small variations in the DBS stimulation parameters space (provided that the activation status and polarity of the electrode contacts is held constant). So, it requires the presence of a set of VTAs similar to the desired VTA, thus, a database coding representative VTA shapes and sizes must be available for a successful estimation of the extent of neural activation. Figure 3 shows the error surfaces obtained with the HKNN algorithm for a parametric sweep over the number of nearest neighbors K and the binarization threshold \(\zeta \), for the (a) monopolar and (b) bipolar cases. The lowest errors occur when \(K<5\) and \(0.4\le \zeta \le 0.6\). That such a small number of neighbors suffices to estimate a new VTA points to the aforementioned smooth variations in the VTA in response to small changes in the stimulation parameters.

Fig. 2.
figure 2

VTA stimulation for 2.5 [V], 330 [\(\mu \)s], and c2 and c3 configured as an anode and a cathode. (a) Gold standard, (B) HKNN, (c) ANNs, and (d) GPC. (Color figure online)

Fig. 3.
figure 3

Median error surfaces obtained with the proposed method for a parametric sweep over K and \(\zeta \) for (a) monopolar case, (b) bipolar case.

Despite these shortcomings, our results show that the proposed HKNN reproduces closely the results of the gold standard. Figure 4 shows the error distributions produced by the different approaches, discriminated by the number of active contacts and by the impedance condition. The top row corresponds to the errors for the monopolar case and the bottom row to the errors for the bipolar case. For all the methods studied, the error tends to grow with the number of active contacts, because of the higher complexity of the shape of the VTA, and with the impedance of the encapsulation tissue. A higher impedance will result in smaller VTAs, that is, a smaller number of active axons, and because of the definition of the error measure, any false positive or false negative will be penalized more heavily. In addition, HKNN presents the lowest median error regardless of the number of active contacts or the impedance condition.

Fig. 4.
figure 4

Distributions of the error between the methods studied and the gold standard for VTA estimation, discriminated by the impedance condition and by the number of active contacts. Top row, monopolar case. Bottom row, bipolar case.

Fig. 5.
figure 5

Average errors versus the evaluation times for VTA estimation (models running in a Dell optiplex 990 with an Intel Core i7-2600 processor, and 8 GB RAM).

Figure 5 shows the average error versus the average evaluation time (computational load) for all the approaches tested across all DBS stimulation conditions considered. As seen, our method reduces the computation time to hundreds of a second, a figure that is well within the range of times needed for practical applications. This reduction also represents a decrease of four orders of magnitude in the VTA estimation time, compared with the gold standard. Hence, the introduced HKNN is faster than the GPC, and its evaluation time is of the same order than that of the ANNs. However, the HKNN outperforms the ANNs in terms of the prediction error.

5 Conclusions

In this study we develop a novel approach, termed HKNN, to speed up the computation of the VTA during DBS. The HKNN estimates a target VTA, given a set of stimulation parameters, from a database of precomputed VTAs. Our approach outperforms the state of the art approach in terms of computational cost, achieving fast estimation (fraction of a second) and low errors with respect to the gold standard simulation. In particular, it outperforms a GPC-based VTA estimation method [6], in terms of its computation time, while matching its prediction errors. In addition, HKNN matched the computation time of an ANN-based method [4], outperforming it in terms of the prediction error. Our method is heavily dependent on the size of the database used to interpolate the VTAs, and can produce larger errors when the VTA is comprised of a small number of active axons. We will tackle this issues exploring most robust machine learning techniques such as support vector machines (SVMs). Testing our approach for VTAs obtained under anisotropic conditions will also be a future line of work.