# Data-Driven Predictive Modeling of Neuronal Dynamics Using Long Short-Term Memory
## 3 Simulation Results
### Regular Bursting  
In this section, we demonstrate the efficacy of our trained deep LSTM neural network over the range of external current between \(0.24\) nA and \(0.79\) nA in predicting the regular bursting dynamics shown by the biophysiological Hodgkin-Huxley model of CA1 pyramidal neuron in response to the external current \(I\in[0.24,0.79)\) nA. In this range, we observe firing rates between approximately \(8\) Hz and \(52\) 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.3 (see Figures A11-A15). Figure 9: Comparison of predicted membrane potential traces by the deep LSTM neural network (“LSTM Network”) to the irregular bursting spiking patterns exhibited by the Hodgkin-Huxley model (“HH Model”) in response to the external stimulating current \(I=1.5\) nA. (**a**) Prediction using 1 timestep predictive LSTM network (\(N_{p}=1\)). (**b**) Prediction using 50 timesteps predictive LSTM network (\(N_{p}=50\)). (**c**) Prediction using 100 timesteps predictive LSTM network (\(N_{p}=100\)). (**d**) Prediction using 200 timesteps predictive LSTM network (\(N_{p}=200\)). Figure 11 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=0.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 11a-d, respectively. By analyzing the results shown in Figure 11, we found that the LSTM network performance in predicting the timing of spikes during bursts as well as tracking the subthreshold potential improved significantly from \(N_{p}=1\) to \(N_{p}=200\), but the performance substantially degraded in capturing the magnitude of the membrane potentials during spiking. In conclusion, the 200 timesteps prediction horizon based LSTM network (see Figure 11d) predicts the temporal dynamics with reasonable accuracy over the first 300 ms of prediction. Figure 12a shows 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\). As noted in this figure, the root mean squared error decreased substantially between 100 timesteps and 200 timesteps prediction horizon compared to the regimes of regular spiking (Figure 8a) and irregular bursting (Figure 10a), which indicates that a longer predictive horizon based LSTM network is necessary to capture the two different timescales (i.e., short intraburst spiking intervals and long interburst subthreshold intervals) presented in these dynamics. Figure 10: The effect of the prediction horizon of the deep LSTM neural network on the accuracy of irregular bursting dynamics prediction. (**a**) shows the time-averaged root mean squared error (RMSE) versus predictive horizon of the LSTM network (\(N_{p}=1,50,100,200\)) for the simulation results shown in Figure 9. (**b**) shows the RMSE versus simulation time for 5000 independent realizations, drawn from the predicted membrane potential trajectories of 50 randomly selected stimulating currents from a Uniform distribution \(\mathcal{U}(0.79,2.3)\) and 100 random initial conditions for each stimulating current. Figure 11: Comparison of predicted membrane potential traces by the LSTM network (”NN Prediction”) to the irregular bursting spiking patterns exhibited by the Hodgkin-Huxley model (”HH Model”) in response to the external stimulating current \(I=0.5\) nA.