# Data-Driven Predictive Modeling of Neuronal Dynamics Using Long Short-Term Memory
## 3 Simulation Results
### Irregular Bursting  
In this section, we demonstrate the efficacy of our trained deep LSTM neural network over the range of external current between \(0.79\) nA and \(2.3\) nA in predicting the irregular bursting dynamics shown by the biophysiological Hodgkin-Huxley model of CA1 pyramidal neuron in response to the external current \(I\in[0.79,2.3)\) nA. In this range, we observe firing rates between approximately \(53\) Hz and \(164\) Hz. For clarity, we here show our results only for the membrane potential traces. We provide the complete set of simulation results on the LSTM network performance in predicting the dynamics of all the \(9\) states of the Hodgkin-Huxley model in Appendix B.2 (see Figures A6-A10).  
Figure 9 shows a comparison of the membrane potential traces simulated using the Hodgkin-Huxley model and the \(4\) different predictive horizons of the LSTM network (i.e., \(N_{p}=1,50,100,200\)) for the external stimulating current \(I=1.5\) nA. Note that all the simulations are performed using the initial condition used for \(I=3.0\) nA in Figure 7. Since our LSTM network uses the initial sequence of outputs of appropriate prediction horizon (i.e., \(N_{p}=1,50,100,200\)) from the Hodgkin-Huxley model to make future time predictions, the LSTM network predictions (shown by dashed red line) start after \(0.1\) ms, \(5\) ms, \(10\) ms, and \(20\) ms in Figure 9a-d, respectively.  
As shown in Figure 9, the LSTM performance significantly improved in predicting the timing of the occurrence of spikes up to \(100\) ms with the increased predictive horizon of the LSTM network from \(N_{p}=1\) to \(N_{p}=200\), but the performance degraded in capturing the magnitude of the membrane potentials during spiking with an increased value of \(N_{p}\). Although the time-averaged root mean squared error of the membrane potential traces between the Hodgkin-Huxley model and the LSTM network for \(N_{p}=1,50,100,200\) showed an improved performance with the increased value of \(N_{p}\) (see Figure 10a), none of the LSTM networks showed a reasonable prediction of the timing of the occurrence of spikes in this regime beyond \(100\) ms of the time-horizon.  
To systematically evaluate whether the designed LSTM networks provide reasonable predictions of the membrane potential traces of the regular spiking dynamics across the range of external input currents between \(0.79\) nA and \(2.3\) nA, we performed simulations for \(50\) random stimulating currents drawn from a Uniform distribution \(\mathcal{U}(0.79,2.3)\). For each stimulating current, we chose \(100\) initial conditions drawn randomly from the maximum and minimum range of the Hodgkin-Huxley state variables (note that the network was not trained over this wide range of initial conditions). Figure 10b shows the LSTM network performance, represented in terms of the root mean squared error vs time over \(5000\) realizations, for \(N_{p}=1,50,100,200\). As shown in this figure, the root mean squared error decreased with the increased predictive horizon of the LSTM network for all time, which is consistent with the result shown in Figure 10a.  
In conclusion, these results suggest that our deep LSTM neural network with a longer predictive horizon feature can predict the irregular bursting patterns exhibited by hippocampal CA1 pyramidal neurons with high accuracy over only a short-time horizon.