SNNLP: Energy-Efficient Natural Language Processing Using Spiking Neural Networks
R. Alexander Knipper, Kaniz Mishty, Mehdi Sadi, Shubhra Kanti Karmaker Santu
TL;DR
This work tackles the energy-inefficiency of NLP models by leveraging Spiking Neural Networks (SNNs) and addressing the challenge of encoding text as spike trains. It systematically compares binarized embeddings and rate-coded spike encodings, and introduces a deterministic rate-coding scheme that uses a Self-Accumulate-and-Fire (SAF) neuron variant to improve fidelity without sacrificing spiking efficiency. The results show that deterministic rate-coding improves sentiment and emotion classification performance by about 13% over Poisson rate-coding, narrowing the gap to standard ANNs, while delivering substantial energy savings—roughly 32x during inference and 60x during training—for SNNs. The work also demonstrates that by tuning the inference window, latency can be reduced dramatically (3.7x–7x) with modest accuracy tradeoffs, highlighting the practical potential of neuromorphic NLP for edge devices.
Abstract
As spiking neural networks receive more attention, we look toward applications of this computing paradigm in fields other than computer vision and signal processing. One major field, underexplored in the neuromorphic setting, is Natural Language Processing (NLP), where most state-of-the-art solutions still heavily rely on resource-consuming and power-hungry traditional deep learning architectures. Therefore, it is compelling to design NLP models for neuromorphic architectures due to their low energy requirements, with the additional benefit of a more human-brain-like operating model for processing information. However, one of the biggest issues with bringing NLP to the neuromorphic setting is in properly encoding text into a spike train so that it can be seamlessly handled by both current and future SNN architectures. In this paper, we compare various methods of encoding text as spikes and assess each method's performance in an associated SNN on a downstream NLP task, namely, sentiment analysis. Furthermore, we go on to propose a new method of encoding text as spikes that outperforms a widely-used rate-coding technique, Poisson rate-coding, by around 13\% on our benchmark NLP tasks. Subsequently, we demonstrate the energy efficiency of SNNs implemented in hardware for the sentiment analysis task compared to traditional deep neural networks, observing an energy efficiency increase of more than 32x during inference and 60x during training while incurring the expected energy-performance tradeoff.
