Abstract
The ability to define the unique features of an input stimulus needed to control switchlike behavior in biological systems is an important problem in computational biology and medicine. We show in this study how highly complex and intractable optimization problems can be simplified by restricting the search to the signal’s extrema as key feature points, and evolving the extrema features towards optimal solutions that closely match solutions derived from gradientbased methods. Our results suggest a modelindependent approach for solving a class of optimization problems related to controlling switchlike state transitions.
Similar content being viewed by others
Introduction
Switchlike transitions play an important regulatory role in biological systems. Cell division, differentiation and apoptosis are controlled by complex molecular signaling networks that can abruptly switch from one pathway to another^{1,2,3,4}. Electrical signaling of multicellular networks switch between distinct electrical states – quiescence, repetitive firing, and bursting patterns – that are essential for controlling normal movement^{5,6}, autonomic function^{7}, and behavioral states^{8} or perhaps triggering pathological states like migraines^{9,10}. Therapeutic interventions work to exploit switchlike shifts from one state to another, for example, inducing immunity through vaccination with small doses of subpathologic viruses^{11}, or applying electrical stimuli to defibrillate the heart^{12,13,14}, suppress parkinsonian tremors^{15,16,17}, and abort epileptic seizures^{18,19}. Normal and pathological switching are typically governed by highly nonlinear mechanisms, with small input signals inducing large and rapid system responses.
This idea that tiny perturbations can induce large state changes has been the focus of a growing interest in critical transitions^{10,20,21,22,23}. Some have examined these critical transitions in the context of moving along parameter continua (e.g. transitioning from a monostable system to a bistable system)^{22}, while others have examined transitions in a single system from one state to another state^{20}. When examining transitions from one state to another, there are a number of different forms, as seen in Fig. 1. Some perturbations induce a specific response trajectory (e.g. an action potential), while others cause a transition from one stable state to another stable state (e.g. limit cycle or fixed point). In all of these cases, an abrupt transition is occurring in the state space caused by a small input stimulus.
A major challenge to understanding these transitions is recognizing what are the key stimulus waveform features that trigger them. While many different stimulus waveforms might push a system across a tipping point to cause a transition in state, they are not all optimal. Defining optimality is highly specific to the system of interest. For electrical stimulation of tissue, clinicians may wish to minimize the peak stimulus intensity to avoid causing tissue damage or energy leakage into neighboring regions, producing detrimental side effects. Other applications may instead seek to minimize total energy consumption, to maximize battery life for implantable devices. In vaccines or chemotherapy, one may seek to minimize the total injected dose to prevent toxicity. In general, therapeutic optimality seeks to achieve a beneficial health outcome while minimizing adverse effects.
Analytical methods for deriving optimal control signals traditionally use calculus of variations^{24,25,26}; broad application of these techniques to biology is limited because validated mathematical models are available in only a few systems, and variational solutions to complex models can be elusive^{27,28}. To deal with complex models, researchers have used phase reduction models^{28,29,30,31,32}, parameterized stimuli^{33}, or simpler conceptual models^{24,25}. The majority of biological systems however, do not have models readily available, and as such empirical approaches have explored the system’s responses to simple stimulus waveforms (e.g., rectangular, sinusoidal)^{34,35,36,37}. The stimulus parameters (e.g., pulse width, frequency) are tuned to achieve the optimal parameters for achieving an outcome. Unfortunately, this approach is also limited because it requires certain assumptions about the optimal shape, leading to a biased search, potentially missing more optimal solutions.
There has been interest in developing unbiased methods to search for optimal stimuli that do not require a priori knowledge of the underlying mechanisms or mathematical equations defining the system^{38,39,40}. Since biological control systems are often highly nonlinear and respond to fluctuations over broad ranges of intensity, duration, and timing, finding the optimal control signal can be challenging. One approach is to encode the stimulus as a vector, representing stimulus amplitude over time^{39}. The number of dimensions a stimulus requires is calculated by multiplying the duration of the stimulus by the resolution of the stimulus generator. For example, the solution space for a 1second stimulus with 1dimensional amplitude generated at a resolution of 1millisecond has a dimension of 1000. Such high dimensionality of the solution space can rapidly exceed the limits of computational tractability, an example of the “curse of dimensionality”^{41,42}.
Here we present a novel evolutionary method for estimating optimal stimuli based on the hypothesis that the optimization problem is vastly simplified by restricting the search algorithm to the signal extrema as key feature points. The algorithm is initially seeded by random signals whose extrema are iteratively perturbed and pruned, thereby sculpting the stimulus waveform towards an optimal shape. We find that this process allows for many degrees of freedom in the early stages, but as the algorithm progresses and extraneous extrema are removed, the degrees of freedom decrease, increasing the probability of finding more optimal solutions. Multiple, independent stochasticallygenerated initial seeds enable the algorithm to search for both local and global optima. By comparing to numerical solutions from analyticallyderived optimal approaches, we demonstrate and validate the algorithm in three models representing different types of transitions (Fig. 1): from quiescence to a single action potential in the HodgkinHuxley model^{43}; between sustained oscillation and quiescence in the FitzHughNagumo model^{44,45}; and between two quiescent states in a genetic toggle switch model^{46}. We also apply the algorithm to a more complex problem of finding an optimal stimulus that desynchronizes a group of coupled HodgkinHuxley neuronal oscillators, which is not readily solved by traditional approaches.
Methods
Stochastic searching with extrema features
This algorithm is based on the hypothesis that optimization of control signals can be aided by restricting the search space to the signal extrema as key feature points, rather than allowing every point of the stimulus to be a unique dimension. The use of extrema in simplifying data has been introduced in other problems in signal processing. In the field of pattern recognition, certain algorithms use the coordinates of robust extrema to decrease the number of points to match^{47}. In computer vision, extrema are used as key feature markers for object recognition and multiscale representation of the original images^{48,49}. In many of these algorithms, the extrema are used to highlight key feature points, and thus construct a simplified representation of the original signal retaining only the most important components. This makes the manipulation and usage of the signals more efficient and simpler. We hypothesize that this concept of using extrema to simplify signals is applicable to stochastic search algorithms.
The steps of our algorithm are as follows:

1.
Let µ_{0} be our initial stimulus, where µ = (µ[1], µ[2], …, µ[M]), M being the product of the number of samples per unit time and the duration of the stimulus. This vector is initially randomly generated using a uniform random number generator at each time point.

2.
Define the function, f, to represent the system in question. Thus, f (µ) is the response of the stimulus to a given stimulus.

3.
Define T to be the set of times {T_{1}, T_{2}, …, T_{N}} at which extrema occur in the stimulus. We define an extremum to be an element such that at time T_{n}:
$${\mu }[{T}_{n}{1}] < {\mu }[{T}_{n}]\,{\rm{and}}\,{\mu }[{T}_{n}+{1}] < {\mu }[{T}_{n}]\,{\rm{or}}\,{\mu }[{T}_{n}{1}] > {\mu }[{T}_{n}]\,{\rm{and}}\,{\mu }[{T}_{n}+{1}] > {\mu }[{T}_{n}].$$(1) 
4.
Create a set of intervals, I, to be defined as T_{n} − T_{n − 1} for n = 2, …, N. Multiply each of these intervals by a random number generated from a Gaussian distribution:
$${I}_{temp,n}={I}_{n}\ast {\mathscr{N}}(1,\,{\sigma }_{I}).$$(2) 
5.
Rescale the new time intervals such that the total duration matches the original duration:
$${I}_{n}\mbox{'}={I}_{temp,n}\ast {\Sigma }I/{\Sigma }{I}_{temp}.$$(3) 
6.
Use these new intervals to redefine a new set of times, \(T^{\prime} \).

7.
Perturb the amplitude of each of the extrema by adding to each peak a randomly generated number:
$${E}_{n}\mbox{'}={E}_{n}\ast {\mathscr{N}}(0,\,{\sigma }_{E})$$(4) 
8.
Linearly transform all the data points between the original extrema using the new perturbed extrema endpoints to generate a “neighboring stimulus” of the starting seed. Mathematically, a point (t, µ (t)) between the two old extrema (T_{n}, µ (T_{n})) and (T_{n + 1}, µ (T_{n + 1})), transforms to
$$((\frac{{T}_{n+1}\text{'}{T}_{n}\text{'}}{{T}_{n+1}{T}_{n}})\ast ((t{T}_{n})+{T}_{n}\text{'}),(\frac{\mu \text{'}({T}_{n+1}\text{'})\mu \text{'}({T}_{n}\text{'})}{\mu ({T}_{n+1})\mu ({T}_{n})})\ast ((\mu (t)\mu ({T}_{n}))+\mu \text{'}({T}_{n}\text{'})))$$(5)where (T_{n}’, µ’(T_{n}’)) and (T_{n + 1}’, µ’(T_{n + 1}’)) are the new perturbed extrema.

9.
Apply this new stimulus to the system and measure its system response.

10.
Calculate the performance metric (e.g. L^{2}norm, J = ∫µ^{2}dt) of the neighboring stimulus, penalizing the performance metric if the stimulus does not successfully cause a state transition. For example, we used L^{2}norm:
$$J=\int {{\mu }}^{2}dt+penalty$$(6) 
11.
Repeat steps 3–7 10 times to produce 10 neighboring solutions based on the starting stimulus.

12.
Compare the original starting stimulus with the neighboring stimulus to find the solution with the best performance.

13.
Repeat steps 2–11 for a predetermined number of iterations, L, using the best performing stimulus found from the previous iteration as the new starting seed in step 2.

14.
After L iterations, output the stimulus with the best performance metric as the optimal stimulus.
Figure 2 illustrates one iteration of the signal perturbation carried out between Steps 3–6 in a search for the optimal stimulus waveform to trigger an action potential in the HodgkinHuxley model. For the uniform random number generator at Step 1, the uniform random number generator should be set such that the noise given to the system just barely causes a switch in states. If an excessive amount of noise is given, state switches may be more easily obtained, but there is a lot more energy to reduce in the iterative process. We used a Gaussian distribution to randomly shift the extrema amplitudes and interextrema intervals. The variance of this distribution, the number of neighboring stimuli generated for each iteration, and the number of iterations used before ending the algorithm were empirically tuned to optimize computational performance of the algorithm. If the variance of the distributions are very large, the neighboring stimuli become more spread out, which may lead to better exploration at the beginning of the process, but fails to converge as smoothly in the later iterations. Conversely, if the variance of the distributions are very small, the iterative perturbations from one solution to the next is much smaller allowing for smoother convergences, but in the early stages the algorithm takes a lot longer to converge.
In most cases, L^{2}norm was used as the optimization metric, for example to achieve an energyoptimal electrical stimulus waveform for causing a single action potential. For other applications described in this study we defined different optimization metrics (e.g., peak or total protein concentration for the genetic toggle switch), which can include multiple performance measures (e.g., combining stimulus L^{2}norm and a desynchronization index for optimizing a stimulus that maximally desynchronizes a group of coupled neurons).
Validation using a stochasticallyseeded gradient algorithm
Calculus of variations^{50} is a wellestablished analytical framework used to address optimization problems. We solved the variational problem directly using a stochasticallyseeded gradient algorithm^{27}, applied to three models (defined in Supplementary Text S1) representing different types of transitions: from quiescence to a spike in the HodgkinHuxley model; between sustained oscillation and quiescence in the FitzHughNagumo model; and between two steady states in a genetic toggle switch model. The stochasticallyseeded gradient algorithm generates a series of random stimuli, and using a gradientbased approach, calculates how the system will respond to minute changes in the stimulus. The algorithm iteratively uses these small gradients, or slopes, to converge towards the optimal solution. Stochastic seeding again enables the algorithm to explore a large solution space, revealing both the global optimal waveform as well as local optima^{27}.
Results
Stochastic search using extrema features convergences quickly
As described in the Methods section, this algorithm began with a stochastically generated stimulus. We first applied the algorithm to the HodgkinHuxley model to find the optimal stimulus waveform necessary to trigger a single action potential. Figure 3 shows the progression of this signal as the algorithm distorted the intervals between and amplitudes of the extrema. It is interesting to note that the algorithm converges very quickly in first few iterations and, within 10–20 iterations, the fundamental shape of the optimal solution appears. The next few thousand iterations further prune extraneous extrema and smooths the signal to converge towards the optimal solution.
From a different perspective, one can observe the extrema, both in terms of their temporal locations and amplitudes as seen in Fig. 4. The algorithm removed extraneous extrema over the course of the algorithm.
Using extrema improves search efficiency
We reasoned that our focus on extrema would improve computational efficiency because it decreased the search space as we approached optimality. To evaluate this idea, we reconfigured our algorithm to use every single data point, i.e., stochastic perturbation of allpoints instead of only the extrema points. As seen in Fig. 5A, the improvement of L^{2}norm across the 35 snippets using just the extrema converged towards an optimal solution faster than the improvement of L^{2}norm when perturbing all the points. The average number of iterations to drop below an L^{2}norm of 25 was 31.9 (S.D.: 5.5) using allpoints versus 19.3 (S.D.: 5.2) using just extrema. To drop below an L^{2}norm of 20 took 51.6 iterations (S.D.: 15.6) using allpoints versus 29.4 (S.D.: 7.8) using just extrema. To get below an L^{2}norm of 18 took 91.7 (S.D.: 34.5) iterations using allpoints while it took only 36.8 iterations (S.D.: 9.4) using extrema only. Moreover, the average L^{2}norm when perturbing all points was 15.902 with a standard deviation of 0.171. The best result had an L^{2}norm of 15.683. Figure 5B shows that the best result in allpoints perturbation retained a considerable level of noise as compared to the best result found when using just extrema.
Both results supported our hypothesis that using extrema features increases efficiency, while maintaining a high level of accuracy.
Validation of stochastic search using extrema features
We applied this technique to three unique models to display the adaptability of this algorithm to a range of different systems. We studied two computational models used in neuroscience: the HodgkinHuxley model for triggering a single action potential, and the FitzHughNagumo model for suppressing repetitive firing. We have also applied this algorithm to a model used in synthetic biology, the genetic toggle switch, for causing a switch from one steady state to another. The methods and models used are described in greater detail in Supplementary Text S1.
We applied the algorithm to each of these models, and compared the resulting waveform obtained using the stochastically seeded gradient algorithm. Figure 6 shows the best solution from multiple runs with different starting seeds.
For the HodgkinHuxley model, this algorithm found solutions that had an average L^{2}norm of 15.6 (standard deviation of 0.149) compared to gradient algorithm at 15.4. For the FitzHughNagumo model, results from focusing on extrema features had a mean of 7.2 × 10^{−3} (standard deviation: 1.8 × 10^{−3}) compared to gradient algorithm’s 1.12 × 10^{−2}. For the genetic toggle switch, the results had a mean of 2.97 × 10^{−8} (standard deviation: 2.25 × 10^{−9}) compared to gradient algorithm’s 2.49 × 10^{−8}.
In the FitzHughNagumo and the HodgkinHuxley models, we noted that in certain instances, stochastic search did better than the gradient algorithm. Exploring the HodgkinHuxley model in greater depth, we noted that this technique only beat the gradient algorithm once in a set of 35 instances, having an L^{2}norm of 15.3. This is possible because the gradient algorithm is an approximation technique, utilizing firstorder gradients to approach the optimal solution, and as such, depending on the topology of the system, it can have difficulty converging tightly to the optimal.
While this explained the discrepancy that occurred rarely with the HodgkinHuxley model, we were surprised that in the FitzHughNagumo model, the stochastic search outperformed the gradient algorithm on a regular basis. As we investigated this further, we noticed that the extrema featured stochastic search found the optimal solution achieving our constraint, the suppression of repetitive firing, without necessarily having reached the mathematical stable point.
The FitzHughNagumo model is interesting in that there is a stable limit cycle and a stable fixed point, with an unstable cycle in between the two states. The basin around the stable fixed point is very shallow, meaning that the system takes a long time within this basin to converge towards the fixed point. If the stimulus caused the system to cross the threshold from repetitive firing into quiescence, there will still be a period of oscillation depending on the state’s proximity to the stable fixed point. The gradient algorithm calculated the optimal solution for the system to reach very close to the fixed point by the end of the simulation, while our algorithm sought to simply cross the threshold from repetitive firing to quiescence in the same time frame. We demonstrated the energy needed to cross the threshold is much smaller than the energy necessary to take the system completely to the fixed point.
Flexibility of stochastic search
Based on what we noticed in the FitzHughNagumo model, we further investigated how changing the constraints affected the results. Could we tighten or loosen the constraints that define a successful suppression, and how would that affect the optimal solution? Fig. 7 shows the results of that experiment. We tightly suppressed the terminal oscillations in one experiment, with a resulting stimulus waveform that matched the gradient algorithm result much more closely. Similar, we also loosened the constraint such that only the bare minimum was required to suppress repetitive firing of action potentials. The result showed that a large energy difference could be achieved by this simple change in constraints. Using the gradient algorithm, we could not make these adjustments without defining the entire unstable limit cycle quantitatively and searched for optimal waveforms to every point along the unstable limit cycle. Here, our algorithm adjusted itself quickly to our changes in constraints.
Not only were we able to adjust our constraints, but we found that we could adjust our performance metrics to more realworld quantities in ways that are difficult to achieve mathematically. For instance, in a genetic toggle switch, the total concentration of molecular substrate used may not be as relevant as the peak dosage at any given point in time. It is difficult to write a mathematical formula defining peak dosage at any given point in time for the purposes of the gradient algorithm, but relatively straight forward with using our algorithm. Instead of using the L^{2}norm in our performance metric, we would use the maximal dosage amount in the stimulus as our performance metric. Figure 8 shows the differences between the two results using our algorithm: optimization for total concentration versus maximal dosage.
Application of stochastic search using extrema features to complex systems – Desynchronization
We were able to also construct compounded requirements for the optimal stimulus waveform necessary to suppress synchronization of multiple repetitively firing neurons. This concept has been hypothesized to be important from a clinical perspective in the suppression of seizure activity^{17,19,28,51}. Finding the optimal waveform for a complete ionic model of multiple coupled neurons is difficult; analytical approaches have attempted to solve simplified phase models^{19,28,29}, but solutions to ionic models have not been reported. Our algorithm approached this easily by constructing a compound performance metric that simultaneously (1) minimized stimulus energy and (2) maximized neuronal desynchronization. In the example shown, the algorithm was programed to maximize neuronal desynchronization with a higher weight over the minimization of stimulus energy. Figure 9 shows the resulting optimal waveform pattern to desynchronize a group of five coupled HodgkinHuxley neurons. We used the mean field voltage as our marker for desynchronization, i.e., the lower the mean field voltage, the greater the neurons are desynchronized^{19}. The model and methods can be found in Supplementary Text S1.
We noted that the optimal stimulus exhibits a rapid reversal of polarity just before the expected burst of action potentials from the synchronized neurons. We believe that this is because the stimulus is being given close to a point of discontinuity on the phase resetting curve. Thus, as seen in Fig. 10, when the stimulus hits the system at this point, the tiny phase differences in the initial conditions are suddenly magnified, and the phases are dispersed.
Previous work has shown that the phase response of nonlinear oscillators to discrete perturbing stimuli can show similar phase dispersion in response to precisely timed stimuli. These studies use topological classification of phaseresetting curves to guide how stimulus strength and timing should be iterated towards a stimulus that induces maximum phase dispersion^{52,53}. One limitation of the topological method is the presence of apparent discontinuities in phase resetting curves, which defies classification and complicates the search for successful stimuli^{54,55,56}. Our results identify critically timed and shaped waveforms that are also optimized energetically, without the need for topological classification of resetting behavior.
Optimal solutions can be phase dependent
It is important to note that in all of our optimization algorithms, the stimulus found is optimized specifically for the parameters by which we set up the problem. In the FitzHughNagumo model, the optimization protocol that we examined is for a particular stimulus of a specified duration starting at a specific phase of the limit cycle. In the coupled oscillator model, the optimization protocol that we examined is for a particular stimulus of a specified duration starting at a particular set of initial conditions for synchronization. In both of these applications, the state transition occurs only within a narrow range of phases. When the stimulus is given at other phases, there is no state transition. Figure 10 illustrates this narrow window by plotting out the phase resetting curves of the five coupled oscillators in response to the stimulus. As we can see from this figure, the stimulus causes the 5 neurons to exhibit highly variable phases following stimulation (cophase, θ), only when the optimized stimulus is given within a narrow window of phases in the cycle (old phase, φ). When the stimulus is given at all other phases, the reset times (θ) of the 5 neurons do not exhibit dispersion of phases. Standard definitions of phase and cophase were used^{52}.
Optimal waveforms are nonrectangular
Using the method we described in our previous work^{27}, we determined an optimal rectangular waveform pulse for each of the models we used. The optimal rectangular pulse energy for inducing an action potential in the HodgkinHuxley model is 49 µJ/cm^{2}, compared to the optimal energy using our algorithm, 15.6 µJ/cm^{2}. Suppressing repetitive firing in the FitzHughNagumo model using an optimal rectangular pulse intensity (L^{2}norm) of 6.4 × 10^{−2} compared to waveform computed from our algorithm, 7.3 × 10^{−3}. In the model of a network of coupled oscillators, the optimal rectangular pulse was 154.88 µJ/cm^{2}, while the optimal we found was 11.80 µJ/cm^{2}.
When examining the optimal stimulus waveform for the HodgkinHuxley model, we do note that there is a hyperpolarizing component followed by a depolarizing component. The ionic mechanisms of this particular shape are explored more fully by Clay et al.^{57}. As previously suggested, these biphasic waveforms in ionic systems have resonantlike properties^{58}.
Video illustrating the evolution of optimal waveforms and the system responses in the four models are available in Supplementary Videos S1–S4.
Discussion
One of the challenges in understanding critical transitions is determining the ideal dynamical features of inputs necessary to induce them. This study sought to determine these ideal features by finding optimal stimulus waveforms necessary to induce state transitions by focusing on extrema features using a stochastic optimization approach. In three separate biological models, our approach developed solutions that closely match those found using traditional variational techniques.
There have been alternative modelindependent techniques used in the past to find these optimal stimulus waveforms. Spiketriggered averaging was one such stochastic technique that computed the average input stimulus preceding each spike generated from broadband stimulation^{26,59}, though it was shown that the topology of the solution space had a large biasing effect away from optimality^{40}. Stochastic search algorithms that leveraged evolutionary computation, like genetic algorithms, have also been applied to finding the optimal stimulus waveform^{39}. This previous study used every point of the stimulus waveform as a distinct dimension, and thus required many iterations to converge towards a solution.
In order to reduce the dimensionality of the solution space, not of the model, we explored the idea of feature extraction. In the field of timeseries analysis, feature extraction is a necessary step in solving problems like time series subsequence data classification^{60,61,62}, signal pattern recognition^{63,64,65}, and anomaly detection^{66,67} as often the data set is so large that huge amounts of computational power would be necessary to compare and analyze every data point in the set. While many studies use features like Fourier coefficients or eigenvectors^{64,68}, there has been increasing interest in the use of extrema because of its ease of capture, relationship to variation in the data, and resilience in the face of disruptions^{49,65,69}. To our knowledge, ours is the first study on the use of extrema applied to search for optimal stimulus waveforms.
As we have shown, extracting the extrema and using them as the key feature points of the stochastic search algorithm has greatly improved the results of the algorithm. From this foundation, we believe that the algorithm can be further developed for greater improvement: initial noise reduction, statistical learning, and further feature analysis and extraction. We discuss in Supplementary Text S2 some of the preliminary work that we did in the reducing the noise of the starting seed, our findings and areas of further exploration. With regards to statistical learning, the algorithm as it currently stands utilizes a memoryless Gaussian distribution in order to choose the next stimulus to try. If we can incorporate memory into the algorithm, we may be more efficient with our search protocols such that the algorithm explores unknown solutions more frequently than repeating waveforms similar to ones that it has tested previously. Finally, in our existing protocol, we utilize only the first order extrema points (e.g. local minima and maxima) causing us to lose some information. We have not characterized or quantified the information loss by using only the firstorder extrema, but future studies may help us gain a better appreciation of how much information is lost, whether greater orders of extrema (such as the inflection points between extrema) are necessary to retain as much characterization of the waveform while still maintaining a certain level of computational efficiency. Furthermore, by gaining a better understanding of the robustness of each data point, we may gain more insight with regards to other potential landmarks to use.
In our exploration into computational biology, we have found many more biological models that can be studied, from cardiology (examining cardioversion or defibrillation from arrhythmias^{70,71,72}) to respiratory (stimulating respiratory rhythms in patients with apnea)^{7}, pharmaceutical sciences (studying optimal dosing patterns for drug treatments^{73,74}). Furthermore, it may be interesting to model not just the behavior of the biological system in response to electrical stimuli, but also the electrical and physical components that interface with it (e.g. electrodes, circuits, chips). As some researchers have noted, while we may be able to cut down on the energy consumption of the signal itself, the energetic requirements of the hardware may overwhelm any energy savings on the stimulus waveform itself^{34}. Searching for optimality in the entire system from electrode to biology may yield further insights into how we can improve the biological response to exogenous stimuli.
The use of extrema features in stochastic search could also potentially be used to not just search for transitions between multiple distinct states, but also perhaps to shift systems along a continuum, like in the phase resetting of clocks. What is the optimal light therapy necessary to minimize jet lag or adverse effects of shift work ^{53,75,76}? While some are tackling this from an analytical and quantitative perspective using models, perhaps different insights may be gained from approaching the problem with a modelindependent perspective.
Change history
18 July 2018
A correction to this article has been published and is linked from the HTML and PDF versions of this paper. The error has not been fixed in the paper.
References
Ferrell, J. E. & Machleder, E. M. The biochemical basis of an allornone cell fate switch in Xenopus oocytes. Science 280, 895–898 (1998).
Weinberg, R. A. The retinoblastoma protein and cell cycle control. Cell 81, 323–330 (1995).
Zhang, D. W. et al. RIP3, an energy metabolism regulator that switches TNFinduced cell death from apoptosis to necrosis. Science (80.). 325, 332–336 (2009).
Tyson, J. J., Chen, K. C. & Novak, B. Sniffers, buzzers, toggles and blinkers: Dynamics of regulatory and signaling pathways in the cell. Curr. Opin. Cell Biol. 15, 221–231 (2003).
Lilly, J. C., Austin, G. M. & Chambers, W. W. Threshold movements produced by excitation of cerebral cortex and efferent fibers with some parametric regions of rectangular current pulses (cats and monkeys). J. Neurophysiol. 15, 319–341 (1952).
Earhart, G. & Bastian, A. Form switching during human locomotion: traversing wedges in a single step. J. Neurophysiol. 84, 605–615 (2000).
BlochSalisbury, E., Indic, P., Bednarek, F. & Paydarfar, D. Stabilizing immature breathing patterns of preterm infants using stochastic mechanosensory stimulation. J. Appl. Physiol. 107, 1017–27 (2009).
Saper, C. B., Fuller, P. M., Pedersen, N. P., Lu, J. & Scammell, T. E. Sleep state switching. Neuron 68, 1023–1042 (2010).
Dahlem, M. A. et al. Towards dynamical network biomarkers in neuromodulation of episodic migraine. Transl. Neurosci. 4, 282–294 (2013).
Scheffer, M., van den Berg, A. & Ferrari, M. D. Migraine strikes as neuronal excitability reaches a tipping point. PLoS One 8, 1–4 (2013).
Segel, L. A., Jäger, E., Elias, D. & Cohen, I. R. A quantitative model of autoimmune disease and Tcell vaccination: Does more mean less? Immunol. Today 16, 80–84 (1995).
Lown, B. Electrical reversion of cardiac arrhythmias. Br. Heart J. 29, 469–89 (1967).
Walcott, G. P. et al. Choosing the optimal monophasic and biphasic waveforms for ventricular defibrillation. J. Cardiovasc. Electrophysiol. 6, 737–750 (1995).
Keener, J. & Panfilov, A. A biophysical model for defibrillation of cardiac tissue. Biophys. J. 71, 1335–45 (1996).
Hammond, C., Bergman, H. & Brown, P. Pathological synchronization in Parkinson’s disease: networks, models and treatments. Trends Neurosci. 30, 357–64 (2007).
Rubin, J. & Terman, D. High frequency stimulation of the subthalamic nucleus eliminates pathological thalamic rhythmicity in a computational model. J. Comput. Neurosci. 16, 211–235 (2004).
Hauptmann, C., Popovych, O. & Tass, P. A. Effectively desynchronizing deep brain stimulation based on a coordinated delayed feedback stimulation via several sites: A computational study. Biol. Cybern. 93, 463–470 (2005).
Loddenkemper, T. & Pan, A. Deep brain stimulation in epilepsy. J. Clin. Neurophysiol. 116, 217–34 (2001).
Tass, P. A. A model of desynchronizing deep brain stimulation with a demandcontrolled coordinated reset of neural subpopulations. Biol. Cybern. 89, 81–88 (2003).
Scheffer, M. Critical Transitions in Nature and Society (Princeton University Press, 2009).
Scheffer, M. et al. Earlywarning signals for critical transitions. Nature 461, 53–59 (2009).
Kuehn, C. A mathematical framework for critical transitions: Bifurcations, fast–slow systems and stochastic dynamics. Physica D: Nonlinear Phenomena 240, 1020–1035 (2011).
Olde Rikkert, M. G. M. et al. Slowing down of recovery as generic risk marker for acute severity transitions in chronic diseases. Crit. Care Med. 44, 1–6 (2016).
Offner, F. Stimulation with minimum power. J. Neurophysiol. 9, 387–390 (1946).
Jezernik, S. & Morari, M. Energyoptimal electrical excitation of nerve fibers. IEEE Trans. Biomed. Eng. 52, 740–743 (2005).
Forger, D. B. & Paydarfar, D. Starting, stopping, and resetting biological oscillators: In search of optimum perturbations. J. Theor. Biol. 230, 521–532 (2004).
Chang, J. & Paydarfar, D. Switching neuronal state: optimal stimuli revealed using a stochasticallyseeded gradient algorithm. J. Comput. Neurosci. 37, 569–582 (2014).
Wilson, D. & Moehlis, J. Locally optimal extracellular stimulation for chaotic desynchronization of neural populations. J. Comput. Neurosci. 243–257 (2014).
Danzl, P., Nabi, A. & Moehlis, J. Chargebalanced spike timing control for phase models of spiking neurons. Discret. Contin. Dyn. Syst. 28, 1413–1435 (2010).
Moehlis, J., SheaBrown, E. & Rabitz, H. Optimal inputs for phase models of spiking neurons. J. Comput. Nonlinear Dyn. 1, 358 (2006).
Nabi, A. & Moehlis, J. Time optimal control of spiking neurons. J. Math. Biol. 64, 981–1004 (2012).
Ellinger, M., Koelling, M. E., Miller, D. A., Severance, F. L. & Stahl, J. Exploring optimal current stimuli that provide membrane voltage tracking in a neuron model. Biol. Cybern. 104, 185–195 (2011).
Tahayori, B. & Dokos, S. Optimal stimulus current waveshape for a hodgkinhuxley model neuron. Proc. Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. EMBS 4627–4630 (2012).
Foutz, T. J. & McIntyre, C. C. Evaluation of novel stimulus waveforms for deep brain stimulation. J. Neural Eng. 7, 66008 (2010).
Barnett, W., O’Brien, G. & Cymbalyuk, G. Bistability of silence and seizurelike bursting. J. Neurosci. Methods 220, 179–89 (2013).
Feng, X. J., Greenwald, B., Rabitz, H., SheaBrown, E. & Kosut, R. Toward closedloop optimization of deep brain stimulation for Parkinson’s disease: Concepts and lessons from a computational model. J. Neural. Eng. 4, L14–L21 (2007).
Kuncel, A. M. et al. Clinical response to varying the stimulus parameters in deep brain stimulation for essential tremor. Mov. Disord. 21, 1920–1928 (2006).
Spall, J. C. Introduction to Stochastic Search and Optimization: Estimation, Simulation, and Control (John Wiley and Sons, 2003).
Wongsarnpigoon, A. & Grill, W. Energyefficient waveform shapes for neural stimulation revealed with a genetic algorithm. J. Neural Eng. 7, 1–20 (2010).
Chang, J. & Paydarfar, D. Optimal stimulus waveforms for eliciting a spike: How close is the spiketriggered average? Int IEEE EMBS Conf Neural Eng. 2015 2015–July, 414–417 (2015).
Donoho, D. L. AideMemoire. Highdimensional data analysis: The curses and blessings of dimensionality. Am. Math. Soc. Lect. Challenges 21st Century 1–33 (2000).
Bertsekas, D. Dynamic Programming. (Athena Scientific, 2005).
Hodgkin, A. L. & Huxley, A. F. A quantitative description of membrane current and its application to conduction and excitation in nerve. J. Physiol. 52, 500–544 (1952).
FitzHugh, R. Impulses and physiological states in theoretical models of nerve membrane. Biophys. J. 1, 445–466 (1961).
Nagumo, J., Arimoto, S. & Yoshizawa, S. An active pulse transmission line simulating nerve axon. Proc. IRE 50, 2061–2070 (1962).
Gardner, T. S., Cantor, C. R. & Collins, J. J. Construction of a genetic toggle switch in Escherichia coli. Nature 403, 339–342 (2000).
Vemulapalli, P. K., Monga, V. & Brennan, S. N. Optimally robust extrema filters for time series data. Proc. Am. Control Conf. 2189–2195 (2012).
Lindeberg, T. Image matching using generalized scalespace interest points. Proc. Int. Conf. Scale Sp. Var. Methods Comput. Vis. 7893, 335–367 (2013).
Witkin, A. Scalespace filtering: A new approach to multiscale description. ICASSP ’84. IEEE Int. Conf. Acoust. Speech, Signal Process. 9, 150–153 (1984).
Gelfand, I., Fomin, S. & Silverman, R. Calculus of Variations (Courier Dover Publications, 2000).
Jaseja, H. EEGdesynchronization as the major mechanism of antiepileptic action of vagal nerve stimulation in patients with intractable seizures: Clinical neurophysiological evidence. Med. Hypotheses 74, 855–856 (2010).
Winfree, A. T. The Geometry of Biological Time: Interdisciplinary Applied Mathematics (SpringerVerlag, 2001).
Forger, D. Biological Clocks, Rhythms, and Oscillations: The Theory of Biological Timekeeping (MIT Press, 2017).
Glass, L. & Winfree, A. Discontinuities in phaseresetting experiments. Am. J. Physiol. 246, R251–R258 (1984).
KroghMadsen, T., Butera, R., Ermentrout, G. B. & Glass, L. Phase resetting neural oscillators: Topological theory versus the real world. Phase Response Curves in Neuroscience 6 (2012).
KroghMadsen, T., Glass, L., Doedel, E. J. & Guevara, M. R. Apparent discontinuities in the phaseresetting response of cardiac pacemakers. J. Theor. Biol. 230, 499–519 (2004).
Clay, J., Forger, D. & Paydarfar, D. Ionic mechanism underlying optimal stimuli for neuronal excitation: Role of Na + channel inactivation. PLoS One 7, e45983 (2012).
Paydarfar, D., Forger, D. B. & Clay, J. R. Noisy inputs and the induction of onoff switching behavior in a neuronal pacemaker. J. Neurophysiol. 96, 3338–3348 (2006).
Forger, D. B., Paydarfar, D. & Clay, J. R. Optimal stimulus shapes for neuronal excitation. PLoS Comput. Biol. 7, e1002089 (2011).
Subasi, A. EEG signal classification using wavelet feature extraction and a mixture of expert model. Expert Syst. Appl. 32, 1084–1093 (2007).
Li, L. et al. Data mining techniques for cancer detection using serum proteomic profiling. Artif. Intell. Med. 32, 71–83 (2004).
Übeyli, E. D. Adaptive neurofuzzy inference system for classification of ECG signals using Lyapunov exponents. Comput. Methods Programs Biomed. 93, 313–321 (2009).
Berg, A. C., Berg, T. L. & Malik, J. Shape matching and object recognition using low distortion correspondences. IEEE Conf. Comput. Vis. Pattern Recognit. 1, 26–33 (2004).
Olszewski, R. T. Generalized feature extraction for structural pattern recognition in timeseries data. (2001).
Vemulapalli, P. K., Monga, V. & Brennan, S. N. Robust extrema features for timeseries data analysis. IEEE Trans. Pattern Anal. Mach. Intell. 35, 1464–1479 (2013).
Yairi, T., Kato, Y. & Hori, K. Fault detection by mining association rules from housekeeping data. Proc. 6th Int Symp on Artificial Intelligence, Robotics, and Automation in Space 18, 21 (2001).
Keogh, E., Lonardi, S. & Chiu, B. ‘Yuanchi’. Finding surprising patterns in a time series database in linear time and space. Proc. 8th ACM SIGKDD Int. Conf. Knowl. Discov. Data Min. 550–556 (2002).
Morchen, F. Time series feature extraction for data mining using DWT and DFT. Tech. Report, No. 33, Dep. Math. Comput. Sci. Univ. Marburg, Ger. 1–31 (2003).
Perng, C.S., Wang, H., Zhang, S. R. & Parker, D. S. Landmarks: A new model for similaritybased pattern querying in time series databases. Data Eng. 2000. Proceedings. 16th Int. Conf. 33–42 (2000).
Fain, E. S., Sweeney, M. B. & Franz, M. R. Improved internal defibrillation efficacy with a biphasic waveform. Am. Heart J. 117, 358–364 (1989).
Fishler, M. G. Theoretical predictions of the optimal monophasic and biphasic defibrillation waveshapes. IEEE Trans. Biomed. Eng. 47, 59–67 (2000).
Kodoth, V. et al. Waveform optimization for internal cardioversion of atrial fibrillation. J. Electrocardiol. 44, 689–693 (2011).
Tzafriri, A. R. et al. Mathematical modeling and optimization of drug delivery from intratumorally injected microspheres. Clin. Cancer Res. 11, 826–834 (2005).
Wong, P. K. et al. Closedloop control of cellular functions using combinatory drugs guided by a stochastic search algorithm. Proc. Natl. Acad. Sci. USA 105, 5105–10 (2008).
Serkh, K. & Forger, D. Optimal schedules of light exposure for rapid correcting circadian misalignment. PLoS Comput. Biol. 10, e1003523 (2014).
Dean, D. A., Forger, D. B. & Klerman, E. B. Taking the lag out of jet lag through modelbased schedule design. PLoS Comput. Biol. 5, e1000418 (2009).
Acknowledgements
We thank Peter Grigg, Premananda Indic and Zhiping Weng for their advice, discussions and guidance through this project. This work was submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy at the University of Massachusetts Medical School. This work was supported by NIH R01 GM104987 and the Clayton Foundation for Research. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Author information
Authors and Affiliations
Contributions
J.C. participated in the algorithm conception and development, wrote the MATLAB code, collected the data, and drafted the manuscript. D.P. participated in the algorithm conception and development and helped draft the manuscript. All authors gave final approval for publication.
Corresponding authors
Ethics declarations
Competing Interests
The authors declare no competing interests.
Additional information
Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Electronic supplementary material
41598_2018_21761_MOESM2_ESM.mp4
Evolution of optimal stimulus in triggering an action potential in the HodgkinHuxley model using the extrema distortion algorithm
41598_2018_21761_MOESM3_ESM.mp4
Evolution of optimal stimulus in suppressing repetitive firing in the FitzHughNagumo model using the extrema distortion algorithm
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Chang, J., Paydarfar, D. Evolution of extrema features reveals optimal stimuli for biological state transitions. Sci Rep 8, 3403 (2018). https://doi.org/10.1038/s41598018217618
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598018217618
This article is cited by

Optimizing stimulus waveforms for electroceuticals
Biological Cybernetics (2019)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.