# Training Spiking Neural Networks with Metaheuristic Algorithms
## 1 Introduction

Table 1: Comparison of SNNs and ANNs. Figure 1: Three generations of ANNs: multilayer perceptron, McCulloch–Pitts neuron, and SNNs. neurons [23; 24]. This method is often referred to as rate-based learning, since, commonly, the analog outputs of traditional ANNs are converted to spike trains through rate encoding. The advantage here is that training happens in the ANN domain, leveraging widely used machine learning frameworks, such as PyTorch and TensorFlow, which have short training times and can be applied to complex datasets. Although some progress in SNN conversion has been made, such as threshold balancing [25; 26], weight normalization [27], and a soft-reset mechanism [28], all of these methods require a large number of time steps, which significantly increases the latency and energy consumption of the SNN. Another disadvantage of such a learning approach is that it is not biologically plausible. The second category is direct training methods, which include unsupervised and supervised learning rules; in either case, they utilize the full advantage of spiking neurons. Spike Timing Dependent Plasticity (STDP), an unsupervised learning mechanism, is a biologically plausible mechanism for synaptic learning in SNNs [29; 30]. STDP-based learning rules modify the weight of a synapse connecting a pair of pre-and post-synaptic neurons based on the degree of correlation between the respective spike times [31]. [PERSON] and [PERSON] [32] utilized STDP to train a two-layer SNN with lateral inhibitions in an unsupervised learning style. [PERSON] and [PERSON] [33] applied STDP to multilayer neural networks inspired by ventral visual pathways to enable unsupervised feature learning. Although unsupervised STDP training is attractive for the real-time hardware implementation of several emerging and non-von Neumann architectures, it is not yet suitable for challenging cognitive tasks due to its inaccuracy/scalability issues. Supervised learning is the most widely used learning algorithm in traditional ANNs. However, directly training SNNs with backpropagation-based supervised learning methods is challenging due to the discontinuous and non-differentiable nature of the spiking neuron [34]. To circumvent this problem, several approaches, such as SpikeProp [35], the Tempotron learning rule [36], and ReSuMe [37], have been proposed. SpikeProp [35] is the primary spike-based method for backpropagating multilayer SNNs. Tempotron [36] can perform binary classification tasks in analogy to a perceptron. The remote supervised method (ReSuMe) [37] and the spike pattern association neuron (SPAN) [38] are classical spike sequence learning rules. However, these methods suffer from two major drawbacks, namely, overfitting problems and falling into local minima, which limit the practical usage of SNNs. In recent years, metaheuristic algorithms have emerged as promising methods for training ANNs and deep learning [39]. In contrast to gradient-based algorithms, they can easily escape the local minimum, since their design considers two contradictory criteria: exploring a search space and exploiting the most efficient one [40]. They can accurately formulate the optimal estimation of ANN components, such as hyperparameters, weights, number of layers, number of neurons, and learning rate. To overcome the drawbacks of gradient descent in training SNNs, using metaheuristic algorithms for the learning process of SNNs has received increasing attention. [PERSON] et al. (2005) applied the parallel differential evolution strategy for training supervised SNNs [41]. They tested their model for solving the XOR problem, which did not reveal its advantages. For a linear and non-linear classification challenge, [PERSON] and [PERSON] (2011) used the PSO algorithm to train SNNs [42]. They observed that the same class of input patterns produced the same rate of fire. In another work, [PERSON] and [PERSON] (2015) used an artificial bee colony algorithm to train SNNs [43]. However, the accuracy was still lower than state-of-the-art performance on benchmark datasets.