[Paper Review] Spiking Convolutional Neural Networks for Text Classification
The paper introduces a two-step training method (conversion then fine-tuning) to build spiking neural networks (SNNs) for text classification that leverage pre-trained word embeddings and achieve competitive accuracy with substantially lower energy use, also showing improved adversarial robustness.
Spiking neural networks (SNNs) offer a promising pathway to implement deep neural networks (DNNs) in a more energy-efficient manner since their neurons are sparsely activated and inferences are event-driven. However, there have been very few works that have demonstrated the efficacy of SNNs in language tasks partially because it is non-trivial to represent words in the forms of spikes and to deal with variable-length texts by SNNs. This work presents a "conversion + fine-tuning" two-step method for training SNNs for text classification and proposes a simple but effective way to encode pre-trained word embeddings as spike trains. We show empirically that after fine-tuning with surrogate gradients, the converted SNNs achieve comparable results to their DNN counterparts with much less energy consumption across multiple datasets for both English and Chinese. We also show that such SNNs are more robust to adversarial attacks than DNNs.
Motivation & Objective
- Motivate energy-efficient NLP with spiking neural networks and address the challenge of text representation and variable-length inputs.
- Propose a two-step training recipe (conversion + fine-tuning) to train SNNs for NLP tasks.
- Develop a method to convert pre-trained word embeddings into spike trains to enable SNNs to utilize large-scale language representations.
- Demonstrate that SNNs achieve competitive accuracy on English and Chinese datasets with reduced energy consumption and enhanced adversarial robustness.
Proposed method
- Tailor a conventional TextCNN into a DNN suitable for conversion by replacing max-pooling with average-pooling, removing biases, and ensuring positive activations.
- Convert pre-trained word embeddings into positive-valued vectors to allow spike-based input representation.
- Convert the tailored DNN to a spiking neural network by duplicating architecture/weights and replacing activations with leaky integrate-and-fire neurons.
- Fine-tune the converted SNN with surrogate-gradient backpropagation (through time) using Poisson-generated spike trains from embeddings.
- Use a cross-entropy spike-rate loss (KL-divergence style) to train the SNN across time steps, employing a Softmax at each step for prediction.
- Evaluate energy efficiency and robustness, including ablation studies on embedding usage and conversion necessity.

Experimental results
Research questions
- RQ1Can a two-step conversion + fine-tuning strategy train effective SNNs for text classification?
- RQ2Do pre-trained word embeddings, when converted to spike trains, provide significant benefits to SNN performance?
- RQ3How do converted + fine-tuned SNNs compare to DNN counterparts in accuracy and energy efficiency across languages (English and Chinese) and datasets?
- RQ4Are SNNs more robust to adversarial attacks than traditional DNNs in NLP tasks?
- RQ5What is the impact of hyper-parameters (time steps, membrane threshold, decay) on performance and energy use?
Key findings
- Conv SNN + FT achieves competitive accuracy close to the original TextCNN across six datasets, with a small average drop of 2.51% in English and 1.78% in Chinese.
- Fine-tuned SNNs show up to 1.32% improvement over non-fine-tuned conversions and reduced output variance.
- SNNs trained with conversion + fine-tuning demonstrate substantial energy savings, reportedly over 10x reduction on average compared to TextCNNs.
- SNNs exhibit improved robustness to adversarial attacks, with average robust accuracy gains of 13.55% and attack-success rate reductions of about 17% across evaluated datasets.
- Ablation shows conversion is essential; using pre-trained embeddings yields measurable performance benefits (up to ~1.39% gains) over random embeddings.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.