Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 Jan 8;16:4027. doi: 10.1038/s41598-025-34046-8

Enhancing time scalability of spiking neural networks with dynamic time constants

Takaya Hirano 1,, Kyo Kutsuzawa 1, Dai Owaki 1, Mitsuhiro Hayashibe 1,
PMCID: PMC12855951  PMID: 41507387

Abstract

In recent years, Spiking Neural Networks (SNNs) have received attention due to their high biological plausibility. They are expected to have superior temporal information processing capabilities because they describe the dynamics of brain neurons in a form suitable for neuromorphic computing. The time constant in the neuron model is important for enhancing the temporal representation of SNNs. Although algorithms that allow the time constant to be learned have often been proposed, they face challenges in generalizing performance to input patterns executed at speeds not seen during training, such as gestures performed at different speeds. This paper aims to develop a robust SNN capable of generalizing to diverse input speeds from training at a single reference speed. We introduce a mechanism that dynamically adapts the time constant of the SNN in response to the input speed. By applying this mechanism to SNNs, we showed that the membrane potential could be approximated by time-scaling according to the input speed. Additionally, we demonstrated experimentally that the relationship between the input and membrane potential holds in SNNs with a general network structure. Using this method, gesture classification and manipulator trajectory prediction were conducted. The experimental results indicate that the proposed method improves the generalization performance of the classification and prediction even for input patterns performed at speeds not seen during training, thereby enhancing the time scalability of SNNs.

Subject terms: Computational biology and bioinformatics, Engineering, Mathematics and computing, Neuroscience

Introduction

Spiking neural networks (SNNs) are gaining attention as next-generation neural networks that are more biologically plausible compared to conventional Artificial Neural Networks (ANNs)1,2. When implemented on neuromorphic hardware, SNNs can operate with low power consumption3,4 and are highly robust against input noise5,6. Recently, research on learning algorithms for SNNs has become increasingly active, and improvements in accuracy have been reported7. Consequently, research on SNNs is actively being conducted in a wide range of fields, including object recognition8, self-localization and mapping (SLAM)9, and reinforcement learning10.

Furthermore, SNNs are advantageous in processing temporal information, as they possess the dynamic characteristics of biological neural circuits as a mathematical model11. The leaky integrate-and-fire (LIF) model is often used to model neurons in SNNs owing to its mathematical simplicity and low computational cost. The LIF model represents the relationship between the spike inputs and the membrane potential of the neuron. When the membrane potential exceeds a certain threshold, the neurons output a spike. By constructing a network structure with such neurons, SNNs enable spike-based information transmission, similar to that of the human brain. In SNNs, the membrane potential is calculated based on the accumulation of current input to the neuron and the forgetting of past information. Therefore, the membrane potential is important for capturing the temporal features of the input. Typically, the time constant that determines the dynamic characteristics of the membrane potential is a hyperparameter and the same value is used for all neurons. However, biological neural circuits exhibit different membrane time constants12,13. Moreover, the diversity of these time constants has proven to be important for the memory and learning of temporal information14. Therefore, treating the time constant of SNNs as a hyperparameter can lead to a decrease in temporal representation capability.

In response to the challenges of time constants and temporal characteristics in SNNs, prior research has adopted approaches that make the time constants learnable. Fang et al. proposed the parametric-SNN as an algorithm that enables the learning of time constants in SNNs15. It has been shown that different regions of the brain have different membrane time constants12, which are necessary for representing and learning at various time scales16. The parametric-SNN optimizes time constants during training, similar to neural network weights and biases, to represent the heterogeneity of membrane time constants in the brain. In addition, the time constants are learned to have different values for each layer, reflecting the fact that adjacent neurons in the brain have similar temporal properties, thereby enhancing biological plausibility. Zheng et al. focused on the heterogeneity of dendritic time constants in biological neural circuits and introduced the LIF-based spiking neuron with dendritic heterogeneity (DH-SNN)11. Even though some researchers such as Fang et al. modeled membrane time constant heterogeneity, they did not include dendritic heterogeneity. Therefore, the DH-SNN models branches of dendrites connected to a single neuron, allowing each dendrite to learn different time constants. This enables a more complex representation of the temporal characteristics of the inputs to the neuron. Consequently, improvements in the accuracy and robustness have been demonstrated in tasks such as video, speech, and EEG recognition.

Prior research has improved the temporal representation of SNNs by making the time constants learnable. These approaches allow the time constants to vary during training while remaining fixed during inference. Therefore, to accommodate temporal information across diverse speed ranges, it is necessary to use diverse speed range data during training. Here, “speed range” refers to the variation in the execution speed of input patterns, such as the same gesture performed at different speeds. Training data that covers a wide range of execution speeds often results in datasets that share similarities in aspects other than temporal characteristics, such as spatial features or content. This redundancy can lead to decreased learning efficiency. Therefore, it is necessary to develop an algorithm that enhances the temporal representation of SNNs while efficiently accommodating diverse speed ranges.

The objective of this research is to construct an SNN that is robust across diverse speed ranges with high temporal representation, depending only on learning a single reference speed. In this study, “robustness across diverse speed ranges” specifically means the ability to generalize to input patterns executed at speeds not seen during training, such as gestures performed at different speeds. To achieve this objective, we propose a method to dynamically change SNN parameters, including time constants, during inference. Previous methods had fixed time constants during inference, leading to an inference time-scale reliant on the training data’s time-scale. Addressing diverse time scales required extensive data covering a wide range of time scales. The proposed method improves SNN time scalability by dynamically adjusting time constants in response to the time-scale of inputs during inference, using only a single time-scale of training data. The contributions of this study are as follows:

  1. A proposal of an SNN that includes parameters with variable time constants during inference, in addition to training to address time scalability. The parameters of the SNN are formulated so that the membrane potential is approximated by time scaling according to the input’s time scaling. This allows the inference results of the SNN to minimize dependence on input speed.

  2. Application of the proposed SNN to video classification and temporal prediction problems. In both tasks, it is shown that robustness to changes in input speed has improved compared to conventional SNNs by learning only a single reference speed.

Related work

Spiking neural networks

SNNs have higher biological plausibility than conventional ANNs because they mimic information processing in neural circuits more accurately. Information is transmitted between neurons in neural circuits through pulse-like electrical signals and then transmitted through the dendrites, axons, and synapses (Fig. 1). On receiving an input, the membrane potential of a neuron changes, and when it exceeds a certain threshold, its output pulse signals the connected neurons. In SNNs, an electrical pulse signal is represented as a spike of either zero or one. Additionally, by modeling changes in the membrane potential as differential equations, SNNs can achieve an elevated level of biological plausibility.

Fig. 1.

Fig. 1

Biological neuron structure. Spike inputs are transmitted through dendrites and axons, synapses17.

Research on learning SNNs has primarily focused on three approaches. The first approach involves converting a pre-trained ANN into an SNN1821. This conversion is performed by utilizing the similarity between the output of the rectified linear unit (ReLU) function in the ANNs and the spike output probabilities of the SNN neurons, thereby replacing the ReLU function with a neuron model. The second approach uses an unsupervised algorithm known as spike-timing dependent plasticity (STDP)2224. STDP is a learning rule in which the synaptic weights change based on the timing difference of activation between presynaptic and postsynaptic cells. The third approach is called direct learning algorithms, where the loss function is directly defined on the SNN outputs and the parameters are updated based on gradients. This category includes methods such as spatio-temporal backpropagation (STBP)7,25,26, which uses backpropagation through time. In this study, we trained the SNNs using STBP, similar to previous studies.

LIF model

The LIF model1 describes the relationship between the input spikes and changes in membrane potential as a first-order differential equation. Spike-based information processing using the LIF model is illustrated in Fig. 2.

Fig. 2.

Fig. 2

Spike-based information processing using the LIF model. Input spikes Inline graphic are converted to input current Inline graphic through the weights w and biases b. The membrane potential Inline graphic is updated according to the input current Inline graphic. The neuron outputs a spike when the membrane potential Inline graphic exceeds a threshold Inline graphic.

The relationship between the input spikes Inline graphic and the membrane potential Inline graphic in the LIF model of layer l is expressed in Eq. 1 and Eq. 2.

graphic file with name d33e371.gif 1
graphic file with name d33e375.gif 2

Here, t represents time. Inline graphic and Inline graphic denote the synaptic weights and biases, respectively. Additionally, Inline graphic, Inline graphic, and r represent the resting membrane potential, time constant, and membrane resistance of the neuron, respectively. The LIF model outputs a spike when v exceeds the threshold Inline graphic (Eq. 3), and subsequently resets the membrane potential (Eq. 4).

graphic file with name d33e417.gif 3
graphic file with name d33e421.gif 4

Here, H represents the Heaviside step function. This model allows the SNNs to transmit spike-based information.

Parametric LIF model

Existing research explores learning the time constants of SNNs to enhance their temporal representations11,27, and the parametric leaky integrate-and-fire (PLIF) model15 is one such approach. When the LIF model (Eq. 2) is expressed as a differential equation, it becomes Eq. 5.

graphic file with name d33e450.gif 5

In this case, Inline graphic represents the forgetting rate of the membrane potential which must satisfy the condition Inline graphic. However, if Inline graphic is learned in the same way as the weights and biases of ANNs, it may not fulfill this requirement, leading to instability in the training of SNNs. Therefore, in the PLIF model, the learning of Inline graphic is performed using a clamping function k(a) (Eq. 6).

graphic file with name d33e482.gif 6
graphic file with name d33e486.gif 7

Here, a represents the parameters optimized through the learning of the neural network. Using such an algorithm ensures that Inline graphic, allowing for stable learning of the time constants in SNNs.

Methodology

We aim to improve the generalization performance of SNNs for various speed ranges using the learning of a reference speed. Here, the reference speed refers to the baseline execution speed of input patterns used during training. Only data at this speed is used for training, while during testing, the SNN is evaluated on data with various speeds, including those not seen during training. To achieve this goal, we propose neuron models that dynamically change Inline graphic and r during inference. An overview of the learning and testing of the SNN method is shown in Fig. 3. In the learning phase, the SNN is trained in the same manner as the PLIF approach, including learning the time constants, and the training data utilizes only the reference speed. In the testing phase, inference is performed while dynamically changing Inline graphic and r in response to the input speed. In this case, their values are estimated using the parameter estimator Inline graphic. By adopting this approach, we enhanced the generalization performance of the SNN for various speed ranges using only the reference speed.

Fig. 3.

Fig. 3

Train and test scheme in the proposed method. (a) Train phase. o(t) are input spikes and require only the reference speed. The SNN constructed by PLIF neurons is trained by STBP. The train rule of the proposed method is general and can be applied to any SNN. (b) Test phase. o(t) are input spikes that are changed to various speeds. The parameter estimator estimates the time constant Inline graphic and membrane resistance Inline graphic of the SNN. The time constant Inline graphic and membrane resistance r are changed to Inline graphic and Inline graphic dynamically regarding the input speed.

Proposed neuron model

We aim to derive how the parameters should change with changes in the input time-scale. We propose a neuron model in which the membrane potential is simply scaled in time in response to time-scaled input spikes. Here, scaling by a factor of a means that an input spike o(t) occurring at time t is shifted to o(at), effectively multiplying the time coordinate by at. Time-scale changes in the input spike o(t) and membrane potential v(t) are illustrated in Fig. 4. The membrane potential of SNNs does not simply follow time-scale changes in the input. It is believed that the disruption of membrane potential dynamics leads to a decrease in the generalization performance of SNNs with respect to the input speed. Therefore, in the proposed neuron model, we dynamically apply conditions that allow the membrane potential to approximate the ideal time-scale in response to input speed changes. By adopting this approach, we can obtain membrane potential dynamics independent of the input speed. Consequently, the robustness of the SNN to input speed changes is expected to improve.

Fig. 4.

Fig. 4

Relationship between input spikes and membrane potential when the input timescale is scaled by a. o(t), v(t) are input spikes and membrane potential, and their speed is reference one. v(at) is the membrane potential after the input speed is scaled by a, and the ideal timescaled membrane potential. o(at) is the input spikes after the input speed is scaled by a. Inline graphic is the membrane potential of general LIF model when o(at) is input. Generally, the dynamics of Inline graphic is not the same as v(at). Inline graphic is the membrane potential of proposed neuron model when o(at) is input. Inline graphic is approximated to v(at) by the dynamic application of time constant Inline graphic and membrane resistance r.

First, we formulated the membrane potential v(at) which is simply scaled by a factor of a over time. In the LIF model (Eq. 2), when both the input spikes and the membrane potential are scaled by a factor of a, it can be expressed by Eq. 8.

graphic file with name d33e723.gif 8

Here, o(at) and v(at) represent the input spikes and membrane potential, respectively, scaled by a factor of a over time. u is the step function that is one when Inline graphic and zero when Inline graphic. For simplicity, we considered a single neuron. By applying the Laplace transform, Eq. 8 can be expressed in the s-domain by Eq. 9.

graphic file with name d33e765.gif 9
graphic file with name d33e769.gif 10

Here, O(s) and V(s) represent the Laplace transforms of o(t) and v(t), respectively. The input spike o(t) is a discrete pulse value of either zero or one, represented by the Dirac delta function Inline graphic28. Therefore, its Laplace transform O(s) is approximated using a constant A as shown in Eq. 10.

Next, we formulate the membrane potential in the actual LIF model in response to the time-scale input o(at). Similar to Eq. 8, this can be expressed as Eq. 11.

graphic file with name d33e840.gif 11

It is important to note that the actual membrane potential is not scaled by a factor of a over time; therefore it is described as v(t). Additionally, Inline graphic and Inline graphic represent the time constant and membrane resistance, respectively, in the actual LIF model. By applying the Laplace transform to Eq. 11, we obtain Eq. 12. The intermediate steps of Eq. 12 are shown in Supplementary Material.

graphic file with name d33e873.gif 12

Furthermore, substituting s with s/a and applying Inline graphic in Eq. 12 gives Eq. 13.

graphic file with name d33e898.gif 13

By comparing the relationship between the ideal time-scaled membrane potential (Eq. 9) and actual membrane potential (Eq. 13), the following approximation condition can be obtained.

graphic file with name d33e910.gif 14
graphic file with name d33e914.gif 15
graphic file with name d33e918.gif 16

Eq. 14 indicates that a LIF model can be constructed using a neural network with zero bias. Furthermore, equations Eq. 15 and Eq. 16 demonstrate that by Inline graphic and r by a factor of a in response to the a-fold time scaling of the input spikes, the membrane potential of the LIF model can be approximated to follow the ideal time scaling. In this study, we propose a neuron model that can be applied to these three conditions. The neurons in the SNN are implemented through discretization using the forward Euler method. The forward Euler method is used as the simplest case to approximate the membrane potential of neurons represented in continuous time29.

Neuron parameter estimation

The proposed neuron model requires the dynamic adjustment of Inline graphic and Inline graphic in response to the input spikes. We therefore utilize a parameter estimator, denoted by p, to estimate Inline graphic and Inline graphic according to the time-scale changes of the input o(t). The estimator uses the reference spike density Inline graphic during training and the input spike density Inline graphic during testing to estimate the time-scale a of the input.

graphic file with name d33e991.gif 17
graphic file with name d33e996.gif 18

The spike density fr represents the number of spikes per unit time. The input spikes change in density according to time-scale variations. Therefore, the time-scale a of the input can be estimated from the ratio of Inline graphic to Inline graphic. Inline graphic and Inline graphic are then calculated using the estimated value of a.

graphic file with name d33e1027.gif 19
graphic file with name d33e1031.gif 20

Inline graphic is the time constant obtained from training at the reference speed, and Inline graphic is the membrane resistance used at the training phase. Using Inline graphic and Inline graphic, we dynamically Inline graphic and r of the LIF model. It is required that Inline graphic as it is the forgetting rate of the membrane potential. Therefore, Inline graphic is clipped to be Inline graphic if Inline graphic. This estimation method does not use optimization calculations or neural networks, hence allowing the estimation of the LIF model parameters with minimal computational resources.

Experiments

We conducted two experiments: first, we applied the proposed neuron model to SNNs with various network structures to validate its effectiveness, and next, we performed gesture recognition and manipulator trajectory estimation using the proposed method. We varied the input speed to evaluate the effectiveness of the proposed method.

Experiment 1: Verification of the proposed theory

Experimental setting

In the derivation of the proposed method, we approximated that the Laplace transform of the input spikes is a constant a, as shown in Eq. 10. For simplicity, we formulated the relationship between the input spikes and the membrane potential considering a single neuron. Verifying whether the membrane potential is ideally time-scaled is crucial when constructing SNNs using the proposed neuron model. In this experiment, we reproduced the state shown in Fig. 4 and confirmed that the proposed neuron model allows for an approximation close to ideal time scaling.

We generate the input spikes o(t) at the reference speed using the Poisson process30.

graphic file with name d33e1107.gif 21

P[1] represents the probability of a spike occurring once in an infinitesimal time Inline graphic and Inline graphic denotes the rate of spike occurrence. In this experiment, we set Inline graphic and Inline graphic. The generated reference spikes o(t) are fed into the SNN to obtain v(t) of the final layer, and we obtained v(at) by linearly interpolating v(t). This v(at) corresponds to the membrane potential that exhibits ideal time scaling as described in section Methodology. Next, we calculate the membrane potential in the actual SNNs. By time-scaling the generated reference spikes o(t) by a factor of a, we obtained o(at) which corresponded to the spike input when the input speed changed. Additionally, we fed o(at) into the standard and proposed SNN to obtain Inline graphic and Inline graphic, respectively. The effectiveness of the proposed method is validated by calculating the mean squared error (MSE) between Inline graphic and Inline graphic with respect to v(at).

The network structures evaluated were Linear, CNN, CNN + Dropout, and ResNet which are commonly used in neural networks. For ResNet, we used the Membrane Shortcut ResNet (MS-ResNet)31, which extends the ResNet architecture to SNNs. The parameters for each network structure and the LIF model are provided in Supplementary Material.

Result

The results regarding the changes in membrane potential in response to time-scale variations are shown in Fig. 5. The upper graph compares the MSE of v(at) with Inline graphic and Inline graphic. The lower graph illustrates the temporal changes in each membrane potential when Inline graphic. These results indicate that using the proposed method, the membrane potential of SNNs with various network structures can approximate the ideal time scaling. From Fig. 5a, Fig. 5c, Fig. 5e, and Fig. 5g, the proposed method is observed to exhibit a smaller MSE compared to the standard SNN. Notably, when the timescale a is greater than 1.0 (indicating slower input), the error decreases. In addition, Fig. 5b, Fig. 5d, Fig. 5f, and Fig. 5h show that the temporal changes in the membrane potential of the proposed method align more closely with the ideal time-scale membrane potential. In a standard SNN, when the input time-scale changes, the dynamics of the membrane potential are disrupted. This occurs because the membrane potential remains unchanged despite the variations in the time intervals of the spikes. In contrast, the proposed method maintains the dynamics of the membrane potential regardless of changes in the input time-scale. This is possible because Inline graphic and r are dynamically adjusted, allowing the change in membrane potential to be calibrated according to the variations in spike time intervals. These results suggest that by applying the proposed method to Linear, CNN, CNN+Dropout, and ResNet structures, achieving time scaling of the membrane potential in response to time-scale variations is feasible.

Fig. 5.

Fig. 5

upper: MSE between the ideal time-scaled membrane potential and the actual membrane potential. lower: The membrane potential of ideal time-scaled, SNN, and proposed SNN. v(at) is the ideal time-scaled membrane potential. Inline graphic is the membrane potential of the standard SNN when the timescale of input spikes is Inline graphic. Inline graphic is the membrane potential of the proposed SNN when the timescale of input spikes is Inline graphic. (a): MSE of Linear architecture. (b): Membrane potential of Linear architecture. (c): MSE of CNN architecture. (d): Membrane potential of CNN architecture. (e): MSE of CNN+Dropout architecture. (f): Membrane potential of CNN+Dropout architecture. (g): MSE of ResNet architecture. (h): Membrane potential of ResNet architecture.

Experiment 2: gesture recognition

Experimental setting

The proposed method was applied to the gesture classification problem, and the accuracy of the model was evaluated against unseen input speeds. The dataset used for the gesture videos was DVSGesture32. It records the brightness changes in each pixel as an event and contains recordings of eleven gestures. Event data were denoised as noise if no other event occurred within a spatial neighborhood of 1 pixel for 10 ms. Additionally, the event data were converted into frame data every 3 ms for input into the model. The flow of learning for gesture classification is shown in Fig. 6.

Fig. 6.

Fig. 6

Gesture classification flow. Inline graphic is the input spikes of event frames of DVSGesture. Inline graphic is the output spikes of the final layer. fr is the event density of Inline graphic. Cross Entropy Loss is calculated by fr and the one-hot vector of the correct label.

Time-series data of event frames and gesture class labels were used as input and output, respectively. The outputs of the SNNs were spike trains. Therefore, the SoftMax function was applied to the event density of the output spikes to obtain the classification probability Inline graphic. The loss function used was the cross entropy loss.

Model training was conducted for three types of SNNs: standard SNN, parametric-SNN15, and SNN using the proposed method. The parameters for each training session are listed in Appendix at Supplementary Material. The model evaluation assessed the change in accuracy in response to variations in the input time-scale a.

Model training was conducted for three types of SNNs: standard SNN, parametric-SNN15, and SNN using the proposed method. The parameters for each training session are listed in Supplementary Material. The model evaluation assessed the change in accuracy in response to variations in the input time-scale a.

Result

The results of the changes in classification accuracy in response to time-scale variations are presented in Fig. 7. These results indicate that the proposed method improved the robustness against time-scale variations for gesture classification. Fig. 7a illustrates that at the training speed (Inline graphic), most models achieve an accuracy of around Inline graphic, indicating that sufficient learning had occurred. However, it is evident that both the standard parametric-SNN experience a decline in classification accuracy as the input time-scale deviates from Inline graphic. In addition, Fig. 7b shows that this decline in the classification accuracy is significant. Specifically, for Inline graphic (10 times faster), a decrease of approximately Inline graphic to Inline graphic is observed, while for Inline graphic (0.1 times slower), a decrease of Inline graphic to Inline graphic is noted. In contrast, the SNN using the proposed method suppressed the decline in classification accuracy in response to time-scale changes. For Inline graphic, the decrease was limited to approximately Inline graphic, and for Inline graphic, the decline was restricted to Inline graphic to Inline graphic. These results suggest that the proposed method effectively mitigates the reduction in classification accuracy due to time-scale variations.

Fig. 7.

Fig. 7

Gesture classification accuracy and its change in response to input time-scale. Inline graphic is learnable in Parametric-SNN and proposed SNN. Inline graphic of these models are initialized to 0.008, 0.012 or 0.024. (a): Accuracy vs Timescale. (b): Inline graphicAccuracy vs Timescale. Inline graphicAccuracy is defined as the difference in accuracy between the training speed (Inline graphic) and the test speed. The accuracy and p-value are shown in Supplementary Material.

Fig. 8 shows the membrane potentials at the final layer of the standard SNN and the proposed method’s SNN when a certain gesture video is provided. The neuron index corresponds to the label for each gesture and the neuron with the highest membrane potential activation is the predicted label for that model. In Fig. 8a, Fig. 8c, Fig. 8e, and Fig. 8g, when the time-scale is set to Inline graphic, the membrane potential of the neuron corresponding to the true label is the most activated, indicating correct classification. However, for a standard SNN, as shown in Fig. 8b and Fig. 8f, the activation patterns of the membrane potential change as the time-scale of the input varies. Consequently, incorrect labels are predicted. On the other hand, in the case of the proposed method, observations from Fig. 8d and Fig. 8h show minimal changes in the activation patterns of the membrane potential with variations in the input time-scale. SNN using the proposed method therefore achieves a robust inference regardless of the input speed variations.

Fig. 8.

Fig. 8

Heatmaps of the membrane potential in the gesture recognition task. left (a,b,c,d) : the membrane potentials given the gesture input whose true label is 1. right (e,f,g,h) : the membrane potentials given the gesture input whose true label is 3. Inline graphic is learnable and initialized to 0.012 in all cases. In the heatmaps, y-axis represents the neuron index of the final layer and each index corresponds with the gesture class. The most activated neuron is the predicted label.

Experiment 3: manipulator trajectory estimation

Experimental setting

The proposed method was applied to a manipulator trajectory estimation problem, and the accuracy of the model was evaluated against unseen input speeds. The experiments utilized the physics simulator Mujoco33 and the 6DOF manipulator UR5e. The manipulator is controlled by solving the inverse kinematics from the target coordinates Inline graphic of the end effector.

The flow of trajectory estimation using the model is shown in Fig. 9.

Fig. 9.

Fig. 9

Manipulator trajectory estimation flow. Inline graphic is the joint angle of the manipulator. The encoder e(q) converts the joint angle into spikes Inline graphic. Inline graphic converts the spikes into the membrane potential Inline graphic. Inline graphic converts the membrane potential Inline graphic into the estimated target movement Inline graphic. The manipulator is controlled by the estimated target position Inline graphic using inverse kinematics.

The processing flow is divided into three steps. First, the model receives the joint angle trajectory Inline graphic of the manipulator as input. Here, the joint angles are converted into a spike train Inline graphic using the encoder Inline graphic. Next, the spike train is fed into the SNN represented by Inline graphic, and the membrane potential Inline graphic of the final layer is obtained. Finally, Inline graphic is fed into the ANN represented by Inline graphic to obtain the estimated target movement Inline graphic.

Spike conversion is performed by Inline graphic using a threshold. A spike is generated when the input exceeds a certain threshold Inline graphic. Furthermore, the threshold is divided into N values within the range from Inline graphic to Inline graphic. Hence, Inline graphic converts the 6-dimensional joint angle vector into a Inline graphic dimensional spike train.

We trained the models using a trajectory that traced a figure-eight pattern on the xy-plane as the training data. The training data were normalized to a range of 0 to 1. Additionally, Gaussian noise with a mean of 0 and a standard deviation of 0.05 was added to the training data. The MSE was used as the loss error. The model structure utilized a parametric-SNN15 and the proposed method’s SNN. The network structure and the training parameters are presented in Appendix at Supplementary Material. The model was evaluated by varying the target trajectory speed according to Eq. 22.

graphic file with name d33e1725.gif 22

Here, a represents the target time-scale of the trajectory. The root mean squared error (RMSE) between the target and estimated trajectories is evaluated when the target time-scale a is varied. In the proposed method, Inline graphic is normalized a before being input into Inline graphic. This is because when using spike conversion with Inline graphic, the proposed method exhibited a characteristic where both the time scaling of the membrane potential and the values were scaled. Inline graphic and r in the proposed SNN are changed to Inline graphic and Inline graphic regarding the target time-scale a.

Result

The results regarding the changes in trajectory prediction due to time-scale variations are shown in Fig. 10. These results indicate that the proposed method improves the robustness of time-series predictions against time-scale changes. It is noticeable from Fig. 10, that at the time-scale of Inline graphic, both the parametric-SNN and the proposed method’s SNN have a small RMSE with respect to the reference trajectory. Besides, Fig. 11b and Fig. 11e show that the trajectory predicted by the model aligns with the reference trajectory. However, as a moves away from 1.0, the error between the predicted and the reference trajectories increases for the parametric-SNN. Fig. 11a and Fig. 11c indicate that over time, the model’s predicted trajectory deviates significantly from the reference trajectory. On the other hand, the SNN of the proposed method shows a suppression of the error owing to time-scale changes. Fig. 11d and Fig. 11f show that even when the time-scale changes, the deviation between the model’s predicted and reference trajectory remains minimal. These results indicate that the proposed method can enhance the robustness of time-series predictions against time-scale variations.

Fig. 10.

Fig. 10

RMSE between the predicted trajectory and the reference trajectory. Inline graphic of Parametric-SNN and proposed SNN is learnable and initialized to 0.06, 0.6 or 1.0.

Fig. 11.

Fig. 11

End-effector trajectory prediction results. Inline graphic of Parametric-SNN and proposed SNN is initialized to 0.6. The red line is the reference trajectory. (a): SNN, Inline graphic. (b): SNN, Inline graphic. (c): SNN, Inline graphic. (d): Proposed SNN, Inline graphic. (e): Proposed SNN, Inline graphic. (f): Proposed SNN, Inline graphic.

The changes in the membrane potential and trajectory of the end effector are shown in Fig. 12. During the time period when Inline graphic, the membrane potentials of both the parametric-SNN and proposed SNN change at a certain periodicity. This corresponds to the period of the learned target trajectory. At Inline graphic, both models periodically predict the position of the end effector. However, in the standard SNN, when the time-scale changes to Inline graphic or 3.0, the trajectory of the end effector loses its periodicity. Furthermore, over time, the predicted trajectory deviates from the target trajectory at Inline graphic. It is evident from Fig. 12a that there is no noticeable change in the membrane potential pattern when transitioning from Inline graphic to 0.5. As shown in Fig. 12b, the membrane potential pattern is disrupted when changing from Inline graphic to 3.0. However, in the proposed SNN, only the periodicity of the end-effector trajectory changed according to the time-scale. From Fig. 12c and Fig. 12d, it is seen that in the proposed SNN, as the time-scale changes to 0.5 and 3.0 times, the periodicity of the membrane potential also changes accordingly. These results suggest that using the proposed method, the periodicity of the membrane potential changes in response to time-scale variations, leading to a reduction in the error of the predicted trajectory.

Fig. 12.

Fig. 12

Manipulator trajectory and membrane potential. The membrane potentials are output from Inline graphic. Inline graphic is learnable and initialized to 0.6 in all cases. Inline graphic is the position of the manipulator’s end effector on the xy plane. The target timescale a is changed from 1.0 to 0.5 or 3.0 by the linear interpolation.

Discussion

The experimental results indicate that by using the proposed method, it is possible to approximate the activation patterns of the membrane potential using simple time scaling according to the input spike time-scale. Similar characteristics were observed in the classification and time-series prediction models, resulting in a robust model against input changes in speed or against the case of unlearned speed ranges. This suggests that the proposed method can maintain the time-scaling characteristics of the membrane potential regardless of model structure or task purpose. This outcome is believed to be primarily due to the dynamic adjustment of Inline graphic in response to input speed. In the LIF model, Inline graphic is a parameter that relates to the amount of past forgotten membrane potentials. When the input speed changes, the intervals between spikes change, it is then necessary to adjust the amount of membrane potential that is forgotten to maintain its dynamics. For example, when the input speed decreases, the intervals between spikes increase; thus, the model must retain the past membrane potential for a longer duration. However, in conventional SNNs, Inline graphic after training is fixed and so, the model cannot select an appropriate amount of membrane potential to forget in response to changes in the input speed, leading to an inability to maintain the dynamics of the membrane potential. Consequently, the inference accuracy for untrained speeds is believed to decrease. The proposed method, however, allows for adjustment of Inline graphic according to the input speed. This enables the model to set an appropriate membrane potential to forget according to the input speed, thereby maintaining its dynamics. Furthermore, using the dynamics of the membrane potential in the proposed SNNs for classification and time-series prediction problems, we can construct time-scalable SNNs against input speed variations.

The experimental results showed that when the input speed is high (Inline graphic), there is a phenomenon where the error from the ideal membrane potential is large and the inference accuracy decreases compared to when the input speed is low (Inline graphic). This is believed to occur because the spike data undergoes information compression owing to an increase in speed. In this study, changes in information speed are represented by time shifts of the spikes. Therefore, in the case of low input speed, the data change such that the intervals between spikes widen. The spikes are then less likely to interfere with each other, and no data loss due to a decrease in speed will occur. However, in the case of a high input speed, the data change such that the intervals between spikes become narrower and hence, spikes at different times may shift to the same time and interfere with each other. Moreover, as spikes are binary data (zero or one), it is difficult to retain information through operations such as averaging. As a result, when the input speed increases, there is a higher likelihood of information loss compared with the original data. Consequently, for high-speed inputs, the error from the ideally time-scaled membrane potential increased, leading to a larger decrease in the classification accuracy and trajectory prediction error. Integrating a mechanism to mitigate information loss during preprocessing can potentially enhance the SNN’s robustness against high-speed inputs.

Conclusion

This study aimed to enhance the time-scaling robustness of SNNs against input speed variations, even in the case of unlearned speed. To achieve this goal, we proposed a neuron model that dynamically changes the time constant and membrane resistance. By applying the proposed method to SNNs with a general network structure, we demonstrated that the membrane potential of SNNs can be approximated to ideal time scaling in response to input speed variations. Furthermore, applying the proposed method to video classification and time-series prediction problems showed that the robustness against input speed changes was improved. In future work, the application of this method to neuron models with more complex expressions than the LIF model will be investigated. By employing this method in these neuron models, we believe that we can construct time-scalable SNNs with the characteristics of the proposed method while enabling more complex temporal representations in a systematic manner. Moreover, the proposed method has the potential to be applied to control systems that respond to dynamic environments in robotics and to energy-efficient pattern recognition in neuromorphic hardware with bioinspired spiking neural networks.

Supplementary Information

Author contributions

T.H. contributed to the learning structure of SNN, implementation, experiments, data analysis, and writing the manuscript. K.K. and D.O contributed to the supervision of the research direction, and reviewed the manuscript. M.H. directed the whole research and contributed to the SNN learning structure, and editing of the manuscript.

Funding

This work was funded by the Support Center for Advanced Telecommunications Technology Research (SCAT), Japan.

Data availability

The code and the data for training and testing is available at the following URL: https://github.com/takaya-hirano-hayashibeLabo/DynamicTimeConstantSNN.git.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Takaya Hirano, Email: takaya.hirano.p5@dc.tohoku.ac.jp.

Mitsuhiro Hayashibe, Email: hayashibe@tohoku.ac.jp.

Supplementary Information

The online version contains supplementary material available at 10.1038/s41598-025-34046-8.

References

  • 1.Maass, W. Networks of spiking neurons: the third generation of neural network models. Neural Netw.10, 1659–1671 (1997). [Google Scholar]
  • 2.Wang, X., Lin, X. & Dang, X. Supervised learning in spiking neural networks: A review of algorithms and evaluations. Neural Netw.125, 258–280 (2020). [DOI] [PubMed] [Google Scholar]
  • 3.Balaji, A. et al. Mapping spiking neural networks to neuromorphic hardware. IEEE Trans. Very Large Scale Integr. (VLSI) Syst.28, 76–86 (2019). [Google Scholar]
  • 4.Rathi, N. et al. Exploring neuromorphic computing based on spiking neural networks: Algorithms to hardware. ACM Comput. Surv.55, 1–49 (2023). [Google Scholar]
  • 5.Zhao, D., Li, Y., Zeng, Y., Wang, J. & Zhang, Q. Spiking capsnet: A spiking neural network with a biologically plausible routing rule between capsules. Inf. Sci.610, 1–13 (2022). [Google Scholar]
  • 6.Patel, D., Hazan, H., Saunders, D. J., Siegelmann, H. T. & Kozma, R. Improved robustness of reinforcement learning policies upon conversion to spiking neuronal network platforms applied to atari breakout game. Neural Netw.120, 108–115 (2019). [DOI] [PubMed] [Google Scholar]
  • 7.Wu, Y., Deng, L., Li, G., Zhu, J. & Shi, L. Spatio-temporal backpropagation for training high-performance spiking neural networks. Front. Neurosci.12, 331 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Kim, S., Park, S., Na, B. & Yoon, S. Spiking-yolo: spiking neural network for energy-efficient object detection. Proc. AAAI Conf. Artif. Intell.34, 11270–11277 (2020). [Google Scholar]
  • 9.Tang, G., Shah, A. & Michmizos, K. P. Spiking neural network on neuromorphic hardware for energy-efficient unidimensional slam. In 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 4176–4181 (IEEE, 2019).
  • 10.Naya, K., Kutsuzawa, K., Owaki, D. & Hayashibe, M. Spiking neural network discovers energy-efficient hexapod motion in deep reinforcement learning. IEEE Access9, 150345–150354 (2021). [Google Scholar]
  • 11.Zheng, H. et al. Temporal dendritic heterogeneity incorporated with spiking neural networks for learning multi-timescale dynamics. Nat. Commun.15, 277 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Mattia, M. & Del Giudice, P. Population dynamics of interacting spiking neurons. Phys. Rev. E66, 051917 (2002). [DOI] [PubMed] [Google Scholar]
  • 13.Deco, G., Cruzat, J. & Kringelbach, M. L. Brain songs framework used for discovering the relevant timescale of the human brain. Nat. Commun.10, 583 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Hasselmo, M. E. & Stern, C. E. Mechanisms underlying working memory for novel information. Trends Cogn. Sci.10, 487–493 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Fang, W. et al. Incorporating learnable membrane time constant to enhance learning of spiking neural networks. In Proceedings of the IEEE/CVF international conference on computer vision, 2661–2671 (2021).
  • 16.Han, B., Srinivasan, G. & Roy, K. Rmp-snn: Residual membrane potential neuron for enabling deeper high-accuracy and low-latency spiking neural network. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 13558–13567 (2020).
  • 17.Lobo, J. L., Del Ser, J., Bifet, A. & Kasabov, N. Spiking neural networks and online learning: An overview and perspectives. Neural Netw.121, 88–100 (2020). [DOI] [PubMed] [Google Scholar]
  • 18.Huang, Z. et al. Towards high-performance spiking transformers from ann to snn conversion. In: Proceedings of the 32nd ACM International Conference on Multimedia. 10688–10697 (2024).
  • 19.Deng, S. & Gu, S. Optimal conversion of conventional artificial neural networks to spiking neural networks. arXiv preprintarXiv:2103.00476 (2021).
  • 20.Bu, T. et al. Optimal ann-snn conversion for high-accuracy and ultra-low-latency spiking neural networks. arXiv preprintarXiv:2303.04347 (2023).
  • 21.Cao, Y., Chen, Y. & Khosla, D. Spiking deep convolutional neural networks for energy-efficient object recognition. Int. J. Comput. Vis.113, 54–66 (2015). [Google Scholar]
  • 22.Huang, S. et al. Associative hebbian synaptic plasticity in primate visual cortex. J. Neurosci.34, 7575–7579 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Kheradpisheh, S. R., Ganjtabesh, M., Thorpe, S. J. & Masquelier, T. Stdp-based spiking deep convolutional neural networks for object recognition. Neural Netw.99, 56–67 (2018). [DOI] [PubMed] [Google Scholar]
  • 24.Meliza, C. D. & Dan, Y. Receptive-field modification in rat visual cortex induced by paired visual stimulation and single-cell spiking. Neuron49, 183–189 (2006). [DOI] [PubMed] [Google Scholar]
  • 25.Zheng, H., Wu, Y., Deng, L., Hu, Y. & Li, G. Going deeper with directly-trained larger spiking neural networks. Proc. AAAI Conf. Artif. Intell.35, 11062–11070 (2021). [Google Scholar]
  • 26.Zhang, W. & Li, P. Temporal spike sequence learning via backpropagation for deep spiking neural networks. Adv. Neural Inf. Process. Syst.33, 12022–12033 (2020). [Google Scholar]
  • 27.Perez-Nieves, N., Leung, V. C., Dragotti, P. L. & Goodman, D. F. Neural heterogeneity promotes robust learning. Nat. Commun.12, 5791 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Henkes, A., Eshraghian, J. K. & Wessels, H. Spiking neural networks for nonlinear regression. R. Soc. Open Sci.11, 231606 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Eshraghian, J. K. et al. Training spiking neural networks using lessons from deep learning. Proc. IEEE111, 1016–1054. 10.1109/JPROC.2023.3308088 (2023). [Google Scholar]
  • 30.Heeger, D. et al. Poisson model of spike generation. Handout, University of Standford5, 76 (2000). [Google Scholar]
  • 31.Hu, Y., Wu, Y., Deng, L. & Li, G. Advancing residual learning towards powerful deep spiking neural networks. CoRRarXiv:2112.08954 (2021).
  • 32.Amir, A. et al. A low power, fully event-based gesture recognition system. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 7243–7252 (2017).
  • 33.Todorov, E., Erez, T. & Tassa, Y. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ international conference on intelligent robots and systems, 5026–5033 (IEEE, 2012).

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

The code and the data for training and testing is available at the following URL: https://github.com/takaya-hirano-hayashibeLabo/DynamicTimeConstantSNN.git.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES