## 5 Experimental Result
### Execution Time vs. Activity-Factors  
As described in Section 4, the optimised eLSNN algorithm we propose in this paper leverages the sparse nature of the spikes for saving computations. If a neuron does not receive a spike, it does not trigger accumulation in the membrane potential. This means that the computational burden of the eLSNN algorithm depends on the average number of non-zero elements for each inference tick in the recursive/hidden layers. This is true for both current-driven and event-driven eLSNNs. For the event-driven eLSNN only, also the input layer must be considered in this computation. To understand the relevance of these effects on the total eLSNN inference time, we have to analyse different input samples. Each sample corresponds to the FFT coefficients of the accelerations read by the MCU during a passage of a vehicle. More specifically, the number of spikes corresponding to non-zero elements in the recurrent layer during an eLSNN inference (denoted with \(z\)) depends on the specific input sample and network hyper-parameters. Differently from the recurrent/hidden layer activity (\(z\)), the input activity factors vary between the eLSNN flavour. For the current-driven eLSNNs, the input activity depends only on the input number (\(I\)). In contrast, for the event-driven eLSNNs, the input layer activity depends on the input spikes and non-zero elements in the coded inputs for all the ticks (\(x\)). \(x\) depends on the input sample and input number (\(I\)) as it is a property of the spiking input encoding. Figure 10B reports on the y-axis the total number of cycles needed by the eLSNN to complete one inference computation on a given input sample. This number of cycles accounts only for the eLSNN computation after the pre-processing step. On the x-axis, we report the value of \(z\), which corresponds to the number of spikes/events/non-zero elements in the recurrent/hidden layer integrated into all the inference ticks (\(t_{inf}\)). Figure 9: Inference ticks and number of inputs impact on MCC using the Current Input and the Event Input. Each point is a configuration of LSNN, which is characterised by its hyperparameters. The different colours refer to the two different networks selected among the many with acceptable performance. For each type of network, we selected the ones with a number of inputs (\(I\)) leading to the largest (\(z\)) variation among the input samples in the test set. Then, we plot three values of \(z\) chosen for each network corresponding to the minimum, the maximum, and the median sample. From the plot, we can notice that the impact of the \(z\) is negligible with respect to the total execution time of the eLSNN inference. Differently, the inference time for current-driven eLSNN halves when reducing the input number \(I\) from 150 to 50. As the impact of \(z\) is negligible, we can ignore its effect in the following plots. Figure 11B reports on the y-axis the distribution of the non-zero elements in the input layer for each input sample in the test set for event-driven eLSNNs. The distribution depends on the input element and the encoding, which depends on the first-order hyper-parameters, namely the inference ticks (\(t_{inf}\)) and the number of inputs (\(I\)). In the y-axis, we report the different configurations of the first-order hyper-parameters. From the plot, we can see that the number of events/spikes/non-zero elements in the input layer (\(x\)) is more significant and has higher variability than the same quantity in the recurrent/hidden layer (Figure 10B). Moreover, the number of input events/spikes/not-zero elements increases both in average and standard deviation with the increase of the input number and inference ticks. Figure 11: (**A**) cycle count breakdown for the event-driven (event) and current-driven (current) eLSNN best configurations (input number-inference ticks) computed on median activity conditions. (**B**) Distribution of the spikes in input for the event-driven eLSNN with different configurations (input number-inference ticks).