Jekyll2023-12-08T10:20:14-08:00https://benedetta-mariani.github.io/feed.xmlBenedetta Marianipersonal descriptionBenedetta MarianiBlog Post number 12021-10-30T00:00:00-07:002021-10-30T00:00:00-07:00https://benedetta-mariani.github.io/posts/2021/10/blog-post-1<h1 id="the-phase-response-curve-and-its-relevance-for-neuroscience">The Phase Response Curve and its relevance for Neuroscience</h1> <p><em>The source for this post is mainly the book <strong>Dynamical Systems in Neuroscience</strong> by Eugene M. Izhikevich</em></p> <p>We start considering a dynamical system that describes an oscillator of the form</p> <p>dx/dt = f(x(t)) + Aδ(t - t<sub>s</sub>), x ∈ R<sup>m</sup> (1)</p> <p>i. e. it admits an exponentially stable limit cycle and experiences pulse stimulation at times t<sub>s</sub>, that istantaneously increase the state variable by amplitude A. We can imagine it as a periodically spiking neuron that experiences pulse stimulations at certain times. Many types of oscillators can be described by a single variable, i. e. the phase θ (for example in the case in which couplings are weak and effects on the amplitudes can be disregarded). The phase is usually taken as the time since the last spike, so the phase is taken equal to zero in correspondence of the peak of the spike. We say that a function x(t) is periodic if there is a costant T &gt; 0 such that x(T + t) = x(t) for any t. The minimum value of T is called the period. Periodic functions appear in dynamical systems having limit cycle attractors. As t increases, past T, 2T, the phase variable wraps around the interval [0,T]. We can treat the interval [0,T] as a circle, where the θ variable is defined.</p> <p>Consider a periodically spiking neuron (1) that receives a single brief pulse of current. Such a perturbation may change the timing of the spike, that is, the phase of the following spikes. The magnitude of the phase shift of the spike train depends on the exact timing of the stimulus relative to the phase of oscillation θ. Stimulating the neuron at different phases we can measure the <em>phase response curve</em></p> <p>PRC(θ) = θ<sub>new</sub> - θ</p> <p>Positive (negative) values of the function correspond to phase advances (delays) in the sense that they advance (delay) the timing of the next spike.</p> <p>We want now to reduce the system described by eq. (1) to a phase model exploiting the phase response curve, following the method of Winfree (A. Winfree, 1967). We can actually be more general and consider a generic stimulation, i. e. not just described by a δ function but by a continuous function p(t).</p> <p>dx/dt = f(x) + εp(t)</p> <p>This equation describes a self sustained oscillator forced by a time-dependent input εp(t). ε is assumed to be sufficiently small that the trajectory of the weakly perturbed oscillator remains near the limit cycle attractor but greater than zero. If ε = 0 we can trasform dx/dt = f(x) to dθ/dt = 1, exploiting the fact that θ is defined in the interval [0,T] as θ = t. Now we are going to apply the same trasformation in the case in which ε ≠ 0.</p> <p>Linear scaling of the PRC with respect to the strength of the pulse motivates the substitution PRC(θ,A) = AZ(θ), where Z(θ) is the linear response or sensitivity function, describing alteration of istantaneous frequency of oscillation after application of a small stimulus. It is informative to call it the <em>infinitesimal PRC</em>. Now let us substitute εp(t) with the equivalent train of pulses of strength A = εp(t<sub>n</sub>)h where h is a small interpulse interval (the continuous function p(t) is approximated by an equivalent train of pulses of variable amplitudes).</p> <p>We can write the corresponding Poincaré map, that relates the phase when pulse at time t<sub>n + 1</sub> arrives (θ(t<sub>n + 1</sub>)) to the phase when the pulse at time t<sub>n</sub> arrives (θ(t<sub>n</sub>)) (one can verify indeed that θ(t<sub>n+1</sub>) = (θ(t<sub>n</sub>) + PRC(θ(t<sub>n</sub>)) + T<sub>s</sub>)mod T = (θ(t<sub>new</sub>) + T<sub>s</sub>)mod T for periodic stimulations with period T<sub>s</sub>). The following Poincaré phase map thus holds:</p> <p>θ(t<sub>n+1</sub>) = (θ(t<sub>n</sub>) + Z(θ(t<sub>n</sub>))εp(t<sub>n</sub>)h + h)mod T</p> <p>hence, dividing by h and taking the limit for h that goes to 0, we obtain</p> <p>dθ/dt = 1+ εZ(θ)p(t) (3)</p> <p>We have so obtained a powerful reduction of the system of equation (1) or (2) to a phase model that exploits the Phase Response Curve, and that can predict the behavior of the oscillator to any kind of perturbation. The PRC gives important information on the synchronization properties of an oscillator, and depends on the bifurcations of the spiking limit cycle. For example, when the oscillations appear via <a href="http://www.scholarpedia.org/article/Saddle-node_bifurcation">saddle-node on invariant circle bifurcation</a> the PRC has only positive values (Class 1 oscillator), while in the case of a <a href="http://www.scholarpedia.org/article/Andronov-Hopf_bifurcation">supercritical Andronov-Hopf bifurcation</a> it changes sign (Class 2 oscillator).</p> <p>We can consider as an example <a href="http://www.scholarpedia.org/article/Morris-Lecar_model">the Morris Lecar Model</a>, that, depending on the parameters’ values, behaves either as a Class I or a Class II oscillator.</p> <p>The code to simulate such a model is below (where the package <code class="language-plaintext highlighter-rouge">numba</code> is used for computational ease), and where <code class="language-plaintext highlighter-rouge">T0</code> is the observed period (in units of dt) between spikes.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Morris Lecar model # PRC of type II import numpy as np import matplotlib.pyplot as plt from numba import njit trials = 300 time = 500 dt = 0.001 N = int(time/dt) C = 5 g_L = 2 V_l = -60 g_ca = 4 V_ca = 120 g_K = 8 V_K = -80 phi = 1/15 V_1 = -1.2 V_2 = 18 V_3 =4 V_4 = 17.4 I_ext = 45 T0 = 62612 times = [] currents = np.ones((trials,N))*I_ext for s in range(trials): trand = np.random.randint(0,T0) currents[s,T0*3 + trand] = 3000 times.append(T0*3 + trand) @njit def sim(T,dt,trials, currents): V = np.zeros((trials,int(T/dt))) N = np.zeros((trials,int(T/dt))) num = int(T/dt) for s in range(trials): for t in range(num - 1): M_inf = 1/2*(1 + np.tanh((V[s,t]-V_1)/V_2)) N_inf = 1/2*(1 + np.tanh((V[s,t]-V_3)/V_4)) tau = phi*np.cosh((V[s,t] - V_3)/(2*V_4)) V[s,t+1] = V[s,t] + (currents[s,t] -g_L*(V[s,t]-V_l) - g_ca*M_inf*(V[s,t]-V_ca) - g_K*N[s,t]*(V[s,t]-V_K))*dt/C N[s,t + 1] = N[s,t] + tau*(N_inf -N[s,t])*dt return V,N V,N = sim(time,dt,trials,currents) </code></pre></div></div> <p>In order to get the PRC, in the above lines of codes the value of the external current is increased at random times in order to simulate istantaneous stimulations. After simulating the model, for each phase at which the stimulation arrives one studies the value of the induced phase shift. In this case the obtained phase response curve is <a href="https://raw.githubusercontent.com/benedetta-mariani/benedetta-mariani.github.io/master/images/PRCtypeII.png">this</a>.</p> <p>Since it has also negative values, it is a type II PRC.</p> <p>Changing the value of the parameter V<sub>3</sub> to 15 and I<sub>ext</sub> to 39 (and, since changing the parameters affects the period, T0 is changed to the observed value, which is 106380 - in units of dt), the <a href="https://raw.githubusercontent.com/benedetta-mariani/benedetta-mariani.github.io/master/images/PRCtypeI.png">PRC</a> now obtained is of type I.</p> <p>Thus one could now model the Morris Lecar model with equation (3) and the obtained PRCs and predict its behavior to generic perturbation. Given the important implications and predictive power of the PRC, it is very promising to reconstruct it from data, as done <a href="https://journals.aps.org/pre/abstract/10.1103/PhysRevE.76.061912">here</a> or <a href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.94.158101">here</a>.</p>Benedetta MarianiThe Phase Response Curve and its relevance for Neuroscience