## 5 Experimental Result
### Event-Driven vs. Current-Driven  
This section concludes the eLSNN study by comparing the performance of the most performing and energy-efficient current-driven, and event-driven eLSNN averaged on the test set. This is obtained by evaluating the candidate eLSNNs in the median sample with respect to both \(x\) and \(z\). Figure 11A reports on the same plot the breakdown of the total number of cycles taken by the median inference time of both the current-driven and event-driven eLSNNs. For the current-driven networks, all the first-order hyper-parameters combinations are reported, while for the event-driven eLSNNs, we report only the configurations with inference ticks equal to 5, which corresponds to the most energy-efficient networks. By comparing the different networks, we can notice that the two most performing eLSNNs which achieves MCC \(\geq\) 0.75 are the configuration \(I=150,t_{inf}=5\) for the event-driven eLSNN and \(I=50,t_{inf}=5\) for the current-driven eLSNN. The event-driven eLSNN requires less than half of the cycles of the current-driven eLSNN. We can conclude that event-driven eLSNN is significantly more efficient (\(>\)50%) than the current-driven eLSNN. It must be noted that this conclusion does not account for the pre-processing of the input sample (affecting the input number) which is more significant for the selected event-driven eLSNN. It is interesting to notice that the event-driven eLSNN configured with \(I=50,t_{inf}=5\) is the most efficient one, but its MCC is lower (0.72) than the accuracy threshold of MCC \(\geq\) 0.75. Moreover, in the Figure 11A we report with different patterns the number of cycles needed to perform the computational steps described in Section 4. * Phase 0: Compute of \(v^{(a)}\)
* Phase 1: Compute of \(v^{(I)}\)
* Phase 2: Compute of \(v^{(H)}\)
* Phase 3: Compute of \(a^{(\xi)}\)
* Phase 4: Compute of \(a^{(th)}\) and \(a^{(z)}\)
* Phase 5: Compute of \(z\) and insert items in \(z\)
* Phase 6: Compute of \(y\)
* Phase 7: Insert items in \(\tilde{x}\) for next iteration. For the current-driven eLSNN the Phase 1 dominates the computational time since it must compute the \(v^{in}\) vector by means of a complete matrix-vector multiplication. Phase 0 and Phase 3 involves \(N\) multiplications, and at increasing \(t_{inf}\) their execution times become increasingly evident. Figure 12 shows the MCU's current consumption when executing the entire processing steps needed to read the sensor values through the SPI interface, pre-process the sample (FFT + ABS), and compute the eLSNN kernel. We report the current-driven eLSNN in its most efficient configuration on the left plot, and on the right plot, we report the event-driven eLSNN in its most efficient configuration. Even if the event-driven eLSNN kernel costs halves of the cycles than the current-driven eLSNN, it requires three times more sensor's readings to compute an inference for an input sample. This increases the cycles needed to read the sensor's data in SPI and compute the FFT and abs. Moreover, the event-driven eLSNN requires an additional pre-processing step consisting of the coding of the spectral components in spikes/events described in Section 3. As described in Section 4.5 the version of the network with current input needs a matrix-vector multiplication for each input tick \(t_{inp}=t_{inf}/t_{exp}\). In this use case, we have only one input tick and only one matmul is executed, but it is enough to increase the number of cycles considerably. In Figure 12 top it is possible to appreciate this phase because it is visible for a long period (around milliseconds 2 and 3) not present in Figure 12 bottom. Tables 3 and 4 summarises all these effects. We can notice that even if the event-driven eLSNN kernel takes 54% fewer cycles than the current-driven eLSNN network, the total computation time is 1.51\(\times\) longer for the event-driven eLSNN. This is primarily due to the SPI transfer, which is 2\(\times\) longer than for the current-driven eLSNN.