# Thermodynamic Formalism in Neuronal Dynamics and Spike Train Statistics
## 4 Spiking Neuronal Network Models: The Leaky Integrate-and-Fire and Beyond
### A Discrete Time Version of the Leaky-Integrate and Fire Model  
The time discretisation of the model (25) reads:  
\[\left\{\begin{array}{ll}V_{n+1}^{k}&=\gamma\,V_{n}^{k}+\sum_{j=1}^{N}W_{kj}\,x_ {n}^{j}+S_{n}^{k}+\sigma_{B}\xi_{n}^{k},&\text{if }V_{n}^{k}<\theta,\quad\text{Integrate phase};\\ \\ V_{n+1}^{k}&=0\quad\text{and}\quad x_{n}^{k}=1,&\text{if }V_{n}^{k}\geq \theta,\quad\text{Firing phase}.\end{array}\right. \tag{27}\]  
For simplicity, we have assumed that all neurons have the same capacitance \(C^{k}=C\), and set \(\gamma=1-\frac{dt}{\tau}\), where (\(\tau\) is the characteristic time scale of the membrane response, \(dt\) is an integration time step which has to be much smaller than \(\tau\) to preserve the physical relevance, whereas it has to be strictly positive to have a time-discretization scheme.) \(\tau=R\,C\), with \(0<\gamma<1\), and then taken \(dt=1\). We have assumed that synapses are instantaneous. Subsequently, the synaptic input is \(\sum_{j}W_{kj}x_{n}^{j}\), that correspond to the pre-synaptic neuron \(j\) that acts on the post-synaptic neuron \(k\) whenever \(j\) spikes, \(x_{n}^{j}=1\). If, at some discrete-time \(n\), \(V_{n}^{k}\) exceeds the threshold \(\theta\), the membrane potential is reset at time \(n+1\) and a spike is recorded at \(n\) for neuron \(k\), i.e., \(x_{n}^{k}=1\). Below the threshold, the random dynamical system is ruled by (27). \(S_{n}^{k}\) is the time discretization of the external stimulus. \(\xi_{n}^{k}\) are independent standard Gaussian random variables.  
It is easy to integrate Equation (27) conditionally upon a fixed spike sequence \(x\). A trajectory \(V=\left\{\,V_{n}^{k},k=1\ldots N,n\in\mathbb{Z}\,\right\}\) is compatible with this spike sequence if \(\chi\left(\,V_{n}^{k}>\theta\,\right)=x_{n}^{k}\), \(\forall k=1\ldots N,n\in\mathbb{Z}\), where \(\chi\left(\,A\,\right)\) is the indicator function of the logical event \(A\), \(\chi\left(\,A\,\right)=1\) if \(A\) is true, \(\chi\left(\,A\,\right)=0\) otherwise. We discuss the compatibility condition in more detail in Section 4.4, when dealing with symbolic coding. For the moment, assume that \(V\) and \(x\) are compatible. We note \(\tau_{k}(x,n)=\max\left\{\,l,l<n\,|\,x_{l}^{k}=1\,\right\}\) the last time before \(n\) where neuron \(k\) has spiked, thus whose voltage was reset to \(0\). Then:  
\[V_{n+1}^{k}=\sum_{j=1}^{N}W_{kj}\,\eta_{kj}(n,x)+\sum_{l=\tau_{k}(x,n)}^{n} \gamma^{n-l}S_{l}^{k}+\sigma_{B}\sum_{l=\tau_{k}(x,n)}^{n}\gamma^{n-l}\xi^{k} (l), \tag{28}\]  
where:  
\[\eta_{kj}(n,x)=\sum_{l=\tau_{k}(x,n)}^{n}\gamma^{n-l}\,x_{l}^{j},\]  
integrates the influence of pre-synaptic neuron \(j\) on the time interval \([\,\tau_{k}(x,n)+1,n\,]\). Each spike emitted by this neuron, at times \(l\) in this time interval, contributes with a weight \(\gamma^{n-l}\) and there is no contribution at times where \(x_{l}^{j}=0\). The condition \(\gamma<1\) implies an exponential decay in the spike history dependence with characteristic time:  
\[\tau_{\gamma}=-\left[\,\frac{1}{\log\gamma}\,\right].\]  
Likewise, \(\sum_{l=\tau_{k}(x,n)}^{n}\gamma^{n-l}S_{l}^{k}\) integrates the stimulus influence on neuron \(k\) and \(\sigma_{B}\sum_{l=\tau_{k}(x,n)}^{n}\gamma^{n-l}\xi^{k}(l)\) is the integrated noise term. This is a Gaussian random variable, with mean zero and variance \(\sigma_{B}^{2}\,\frac{1-\gamma^{2(n+1-\tau_{k}(x,n))}}{1-\gamma^{2}}\). In (28), the dependence on the initial condition does not appear because we assume the initial time to be \(n_{0}\to-\infty\). So, either neuron \(k\) has spiked in the time interval \(]-\infty,n]\) and the voltage is reset to \(0\), or it has not spiked, but the initial condition dependence decays like \(\gamma^{n-n_{0}}\) which vanishes when \(n_{0}\to-\infty\).