polito.it
Politecnico di Torino (logo)

Bridging Neuromorphic Platforms for Customized Recurrent Spiking Neural Networks: Human Activity Recognition from snnTorch to Intel Loihi 2

Francesco Guarino

Bridging Neuromorphic Platforms for Customized Recurrent Spiking Neural Networks: Human Activity Recognition from snnTorch to Intel Loihi 2.

Rel. Gianvito Urgese, Vittorio Fra. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering), 2024

[img]
Preview
PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (15MB) | Preview
Abstract:

In recent years, conventional Artificial Neural Networks (ANNs) have become essential in research and industry, serving as the primary solution for a wide range of applications. Simultaneously, there is growing interest in Spiking Neural Networks (SNNs), which offer a more biologically plausible model by emulating the human brain's structure and function. SNNs excel in sparse and parallel processing, associative memory and low power consumption. To fully leverage these advantages, specialized neuromorphic hardware is required, shifting from traditional von Neumann architectures to event-driven, asynchronous computation. This thesis presents a modular approach for designing SNNs suitable for deployment on Intel's Loihi 2 neuromorphic hardware through Intel's own framework, Lava. I utilized mature frameworks like snnTorch and Brevitas to address challenges related to fixed-point arithmetic, weight quantization, and internal state variable quantization inherent in Loihi 2's architecture. My pipeline enables the definition and training of SNNs with recurrent structures, which are crucial for time-series classification tasks. The focus of my work is on Human Activity Recognition (HAR) using the WISDM dataset, which includes accelerometer and gyroscope data from smartphones and smartwatches across 18 activity classes. To ensure comparability with prior studies, I selected subsets of seven classes based on their separability using the Kullback–Leibler divergence metric. The network architecture comprises an input layer, an output layer, and a hidden layer with two neuron populations. This design incorporates recurrence by feeding back spikes from the output of the hidden layer back to its input, passing through a second inhibitory population, allowing the network to retain memory of previous time steps. I addressed data conversion challenges by using the input neuron population as an encoding layer, converting floating-point data into discrete spike outputs distributed over time. For weight quantization, Brevitas was employed to train directly with 8 bit quantized weights, sharing the same quantization range across all connection layers. Internal state quantization was managed by leveraging functions within the Lava framework, which converted floating-point decays and thresholds into fixed-point representations suitable for Loihi 2. The training process was enhanced using the Neural Network Intelligence (NNI), framework for hyperparameter optimization. Sparsity was promoted through dropout layers and a loss function that encouraged low activation frequencies without homogenizing neuron behavior. Results demonstrated that quantization and sparsity enforcement did not adversely affect training; the network achieved high validation accuracy of 96.3%, comparable to ANNs results on the task. While converting states led to some clipping of system dynamics near the quantization range limits, this saturation of internal states had only a minor impact on performance, lowering the accuracy to 95.1%. Future work will focus on enhancing the generalizability of the pipeline across various tasks and network architectures. This includes improving quantization

Relatori: Gianvito Urgese, Vittorio Fra
Anno accademico: 2024/25
Tipo di pubblicazione: Elettronica
Numero di pagine: 94
Soggetti:
Corso di laurea: Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering)
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-32 - INGEGNERIA INFORMATICA
Aziende collaboratrici: NON SPECIFICATO
URI: http://webthesis.biblio.polito.it/id/eprint/33890
Modifica (riservato agli operatori) Modifica (riservato agli operatori)