Binary Neural Networks (BNNs) are one of the Machine Learning (ML) technologies that have been gaining the most interest in recent studies. In particular, they are the main tool of the EdgeML field, whose goal is to find ways to compress ML algorithms to deploy them on resource constrained devices. The main learning paradigm for such devices is typically continual learning (CL), whose incremental behavior makes it highly suitable for real-world applications. However, one issue of this approach consists in forgetting older tasks as new ones are encountered, a phenomenon known as catastrophic forgetting. The purpose of this study is to compare three different settings of CL learning with binarization, employing a strategy known as replay to mitigate forgetting. The goal is to analyze the trade-off between network binarization and replay buffer size, to understand whether a higher quantization can still ensure good performance by relying on a larger amount of replay samples. The employed architectures include a gradient-free optimization algorithm and a standard algorithm with gradient descent and Adaptive moment estimation. Two levels of binarization were applied in the experiments, first focusing on the network parameters and then, additionally, on the input datasets. Several tests were conducted, adapting the replay buffer size to the binarization strategy: the chosen values of replay samples were 3, 15 and 30 in the case of full-precision datasets, compared to 100, 500 and 1000 for binary datasets. Results showed that the gradient-free approach was able to achieve state-of-the-art accuracy on the given tasks and to properly mitigate forgetting thanks to the higher number of replay samples stored in memory. Conversely, the gradient-based network was not able to learn binary datasets and the smaller buffer size was not enough to improve the accuracy of old tasks in the case of full-precision datasets. The results are in line with the conclusions proposed by other studies, suggesting that the bigger replay buffer obtained with input binarization represents a suitable solution to solve the catastrophic forgetting issue in BNNs.

Le Reti Neurali Binarie sono una delle tecnologie più importanti all'interno degli studi nell'ambito EdgeML, che si occupa di ideare metodi per ridurre l'impatto degli algoritmi di Machine Learning in modo da utilizzarli in dispositivi a risorse limitate. Il paradigma di apprendimento più utilizzato in questo campo è l'apprendimento continuo, che risulta tuttavia essere soggetto al fenomeno noto come "catastrophic forgetting". Numerosi metodi sono stati presentati per risolvere questo problema all'interno delle reti neurali binarie: quello più intuitivo è noto come "replay" e consiste nel presentare parte di esperienze passate durante l'apprendimento di nuovi task. Lo scopo di questo studio è condurre un'analisi del trade-off tra dimensione del buffer per i replay e il livello di binarizzazione di una rete neurale. Per condurre lo studio sono stati svolti numerosi esperimenti di apprendimento continuo, impiegando reti a parametri binarizzati e, in seguito, binarizzando anche i dataset ricevuti in input. I risultati mostrano una performance migliore da parte degli esperimenti con parametri e input binari, nel caso di reti con algoritmi di ottimizzazione senza gradiente.\\ Quanto riscontrato risulta essere in linea con i risultati di altre ricerche, che suggeriscono che un utilizzo più ampio di parametri binari all'interno delle reti neurali permette di sfruttare la diminuzione della memoria occupata, salvando un maggior numero di campioni presi da esperienze passate e ottenendo quindi una maggior resistenza al fenomeno del catastrophic forgetting.

Continual learning in binary neural networks

MARELLI, REBECCA LUDOVICA
2024/2025

Abstract

Binary Neural Networks (BNNs) are one of the Machine Learning (ML) technologies that have been gaining the most interest in recent studies. In particular, they are the main tool of the EdgeML field, whose goal is to find ways to compress ML algorithms to deploy them on resource constrained devices. The main learning paradigm for such devices is typically continual learning (CL), whose incremental behavior makes it highly suitable for real-world applications. However, one issue of this approach consists in forgetting older tasks as new ones are encountered, a phenomenon known as catastrophic forgetting. The purpose of this study is to compare three different settings of CL learning with binarization, employing a strategy known as replay to mitigate forgetting. The goal is to analyze the trade-off between network binarization and replay buffer size, to understand whether a higher quantization can still ensure good performance by relying on a larger amount of replay samples. The employed architectures include a gradient-free optimization algorithm and a standard algorithm with gradient descent and Adaptive moment estimation. Two levels of binarization were applied in the experiments, first focusing on the network parameters and then, additionally, on the input datasets. Several tests were conducted, adapting the replay buffer size to the binarization strategy: the chosen values of replay samples were 3, 15 and 30 in the case of full-precision datasets, compared to 100, 500 and 1000 for binary datasets. Results showed that the gradient-free approach was able to achieve state-of-the-art accuracy on the given tasks and to properly mitigate forgetting thanks to the higher number of replay samples stored in memory. Conversely, the gradient-based network was not able to learn binary datasets and the smaller buffer size was not enough to improve the accuracy of old tasks in the case of full-precision datasets. The results are in line with the conclusions proposed by other studies, suggesting that the bigger replay buffer obtained with input binarization represents a suitable solution to solve the catastrophic forgetting issue in BNNs.
ING - Scuola di Ingegneria Industriale e dell'Informazione
10-dic-2025
2024/2025
Le Reti Neurali Binarie sono una delle tecnologie più importanti all'interno degli studi nell'ambito EdgeML, che si occupa di ideare metodi per ridurre l'impatto degli algoritmi di Machine Learning in modo da utilizzarli in dispositivi a risorse limitate. Il paradigma di apprendimento più utilizzato in questo campo è l'apprendimento continuo, che risulta tuttavia essere soggetto al fenomeno noto come "catastrophic forgetting". Numerosi metodi sono stati presentati per risolvere questo problema all'interno delle reti neurali binarie: quello più intuitivo è noto come "replay" e consiste nel presentare parte di esperienze passate durante l'apprendimento di nuovi task. Lo scopo di questo studio è condurre un'analisi del trade-off tra dimensione del buffer per i replay e il livello di binarizzazione di una rete neurale. Per condurre lo studio sono stati svolti numerosi esperimenti di apprendimento continuo, impiegando reti a parametri binarizzati e, in seguito, binarizzando anche i dataset ricevuti in input. I risultati mostrano una performance migliore da parte degli esperimenti con parametri e input binari, nel caso di reti con algoritmi di ottimizzazione senza gradiente.\\ Quanto riscontrato risulta essere in linea con i risultati di altre ricerche, che suggeriscono che un utilizzo più ampio di parametri binari all'interno delle reti neurali permette di sfruttare la diminuzione della memoria occupata, salvando un maggior numero di campioni presi da esperienze passate e ottenendo quindi una maggior resistenza al fenomeno del catastrophic forgetting.
File allegati
File Dimensione Formato  
2025_12_Marelli.pdf

non accessibile

Descrizione: testo della tesi
Dimensione 3.83 MB
Formato Adobe PDF
3.83 MB Adobe PDF   Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/247233