BiSpikCLM: A Spiking Language Model integrating Softmax-Free Spiking Attention and Spike-Aware Alignment Distillation
Organizations: Harbin Institute of Technology, Shenzhen, China · School of Electronic and Computer Engineering, Shenzhen Graduate School, Peking University, Shenzhen, China · Peng Cheng Laboratory, Shenzhen, China
Abstract
Spiking Neural Networks (SNNs) offer promising energy-efficient alternatives to large language models (LLMs) due to their event-driven nature and ultra-low power consumption. However, to preserve capacity, most existing spiking LLMs still incur intensive floating-point matrix multiplication (MatMul) and nonlinearities, or training difficulties arising from the complex spatiotemporal dynamics. To address these challenges, we propose BiSpikCLM, the first fully binary spiking MatMul-free causal language model. BiSpikCLM introduces Softmax-Free Spiking Attention (SFSA), eliminating softmax and floating-point operations in autoregressive language modeling. For efficient training, we introduce Spike-Aware Alignment Distillation (SpAD), which aligns ANN teacher and SNN student across embeddings, attention maps, intermediate features, and output logits. SpAD framework allows BiSpikCLM to reach comparable performance to ANN counterparts using substantially fewer training tokens (e.g., only 5.6% of the tokens for the 1.3B model). As a result, BiSpikCLM achieves competitive performance at only 4.16% - 5.87% of the computational cost on natural language generation tasks. Our results highlight the feasibility and effectiveness of fully binary spike-driven LLMs and establish the distillation as a promising pathway for brain-inspired spiking NLP.
Figures & tables
| Model | Params | Spike Form | Training Method | Architecture | Softmax-Free | Exp-Free | FP-Mul-Free |
| SpikeBERT ( Lv et al., 2023 ) | 109M | Binary | Knowledge distillation | Encoder-only | ✓ | ✓ | |
| SpikingBERT ( Bal and Sengupta, 2024 ) | 50M | Binary | Knowledge distillation | Encoder-only | |||
| SpikeLM (BERT) ( Xing et al., 2024b ) | 110M | Ternary | Train from scratch | Encoder-only | |||
| SpikeLM (BART) ( Xing et al., 2024b ) | 139M | Ternary | Train from scratch | Encoder–Decoder | |||
| SpikeLM (mBART) ( Xing et al., 2024b ) | 680M | Ternary | Train from scratch | Encoder–Decoder | |||
| SpikeGPT ( Zhu et al., 2023 ) | 216M | Binary | Train from scratch | Decoder-only | ✓ |
| Model | Params (B) | Tokens (B) | Spike Form | Time Step | OPs (G) | Firing Rate | Energy (mJ) | Zero - shot Accuracy (%) | ||||||||
| ARC-e | ARC-c | WG | BQ | PIQA | HS | OBQA | HQA | Avg. | ||||||||
| OPT | 0.125 | 180 | — | 125.6 | — | 125.95 | 43.6 | 19.3 | 52.3 | 54.6 | 62.4 | 32.1 | 20.2 | 23.7 | 38.60 | |
| Pythia | 0.160 | 300 | — | 125.7 | — | 126.01 | 43.7 | 19.8 | 52.8 | 55.1 | 62.7 | 33.6 | 20.1 | 24.2 | 39.00 | |
| SpikeGPT | 0.046 | 16.5 | Binary | — | 3.66 | 0.174 | 3.29 | 32.3 | 16.2 | 50.2 | 45.7 | 54.6 | 25.3 | 15.7 | 20.6 | 32.58 |
| SpikeGPT | 0.216 | 16.5 | Binary | — | 18.3 | 0.168 | 16.53 | 35.2 | 17.7 | 50.7 | 47.3 | 55.1 | 27.6 | 17.3 | 23.1 | 34.25 |
| BiSpikCLM | 0.125 | 1.0 | Binary | 2 | 12.1 | 0.196 | 5.24 | 39.1 | 18.9 | 50.3 | 52.7 | 56.7 | 28.1 | 19.8 | 22.9 | 36.05 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Value |
| Teacher ANN model | OPT-family |
| Student SNN model | BiSpikCLM |
| Tokenizer / Vocabulary | Aligned with OPT |
| Batch size (per GPU) | 16 |
| Gradient accumulation steps | 16 |
| Effective batch size | 256 |
| Model | Params (B) | Tokens (B) | Spike Form | Time Step | Avg. Acc.(%) | SNN/ANN Ratio (%) |
| BiSpikCLM | 0.125 | 1.0 | Binary | 2 | 36.05 | 93.39 |
| TriSpikCLM | 0.125 | 1.0 | Ternary | 2 | 36.11 | 93.55 |
| BiSpikCLM | 0.125 | 1.0 | Binary | 4 | 36.50 | 94.56 |
| TriSpikCLM | 0.125 | 1.0 | Ternary | 4 | 36.27 | 93.96 |
| BiSpikCLM | 0.350 | 2.0 | Binary | 2 | 38.48 | 90.16 |
| TriSpikCLM | 0.350 | 2.0 | Ternary | 2 | 38.14 | 89.36 |
| Model | Total Outliers |
| ANN | 18,663 |
| SNN | 5,834 |
| Layer | Component | Model | Mean | Std | Max | Min | Num_Outliers |
| 0 | q_proj | ANN | -3.15E-05 | 7.87E-02 | 0.77 | -0.80 | 596 |
| 0 | q_proj | SNN | 1.30E-04 | 1.14E-02 | 0.06 | -0.06 | 6 |
| 0 | k_proj | ANN | 6.12E-05 | 7.26E-02 | 0.77 | -0.70 | 1154 |
| 0 | k_proj | SNN | -3.36E-05 | 1.10E-02 | 0.06 | -0.06 | 24 |
| 0 | v_proj | ANN | -1.55E-05 | 1.28E-02 | 0.17 | -0.19 | 163 |
| 0 | v_proj | SNN | 2.97E-05 | 1.31E-02 | 0.08 | -0.08 | 34 |
| Model | Params (B) | Time Step | Zero-shot Accuracy (%) | ||||||||
| ARC-e | ARC-c | WG | BQ | PIQA | HS | OBQA | HQA | Avg. | |||
| BiSpikCLM-OPT | 0.125 | 2 | 39.1 | 18.9 | 50.3 | 52.7 | 56.7 | 28.1 | 19.8 | 22.9 | 36.05 |
| BiSpikCLM-OPT | 0.125 | 4 | 39.4 | 19.0 | 51.2 | 53.0 | 57.5 | 29.2 | 19.7 | 23.1 | 36.50 |
| BiSpikCLM-Llama | 0.165 | 2 | 39.3 | 19.2 | 51.3 | 52.8 | 56.8 | 28.3 | 20.3 | 23.2 | 36.40 |
| BiSpikCLM-Llama | 0.165 | 4 | 39.6 | 19.6 | 51.7 | 53.2 | 57.3 | 29.5 | 20.7 | 23.7 | 36.91 |
| BiSpikCLM-OPT | 1.300 | 2 | 45.7 | 23.5 | 54.2 | 56.3 | 62.3 | 40.2 | 24.5 | 24.0 | 41.33 |
| Model | Params (B) | Zero-shot Accuracy (%) | ||||||||
| ARC-e | ARC-c | WG | BQ | PIQA | HS | OBQA | HQA | Avg. | ||
| BiSpikCLM (T=2) | 1.3 | 45.7 | 23.5 | 54.2 | 56.3 | 62.3 | 40.2 | 24.5 | 24.0 | 41.33 |
| BiSpikCLM (T=4) | 1.3 | 46.3 | 24.3 | 55.6 | 56.8 | 63.4 | 41.7 | 25.2 | 24.3 | 42.19 |
| BiSpikCLM-Llama (T=2) | 1.2 | 45.8 | 23.9 | 54.7 | 56.1 | 63.0 | 40.6 | 24.7 | 24.1 | 41.61 |
| BiSpikCLM-Llama (T=4) | 1.2 | 46.5 | 24.4 | 55.9 | 56.6 | 63.6 | 41.8 | 25.4 | 24.4 | 42.33 |
| BitNet (1.58-bit) | 1.3 | 48.7 | 24.1 | 56.8 | 57.4 | 64.2 | 40.6 | 24.6 | 24.9 | 42.66 |
| Model | Params (B) | Tokens (B) | Zero-shot Accuracy (%) | ||||||||
| ARC-e | ARC-c | WG | BQ | PIQA | HS | OBQA | HQA | Avg. | |||
| BiSpikCLM (T=2) | 0.125 | 1.0 | 39.1 | 18.9 | 50.3 | 52.7 | 56.7 | 28.1 | 19.8 | 22.9 | 36.05 |
| BiSpikCLM (T=2) | 0.125 | 5.0 | 41.4 | 19.2 | 51.4 | 53.4 | 58.2 | 30.2 | 19.9 | 23.1 | 37.10 |
| BiSpikCLM (T=2) | 1.300 | 10.0 | 45.7 | 23.5 | 54.2 | 56.3 | 62.3 | 40.2 | 24.5 | 24.0 | 41.33 |
| BiSpikCLM (T=2) | 1.300 | 25.0 | 48.3 | 26.4 | 57.8 | 58.6 | 65.1 | 44.9 | 27.3 | 26.7 | 44.39 |
| Prompt | BiSpikCLM (10B Tokens) | BiSpikCLM (25B Tokens) |
| Hi there! How are you doing today? | Hi! How are you? I’m doing well. How about you? | I’m doing great! I’m just tired as hell. I went to bed at 11pm last night, and now I’m up at 4am. I have a class tomorrow morning at 7:30, so I have to get up and go to class. |
| Where is the capital of the United States? | It’s in the middle of the country. | Washington, D.C. |
| How about the cat? | I think it’s a good idea to have a cat in the house. | I have a cat and he doesn’t like the camera. I’ll send you a picture when he is in the mood. |
| Model | Params (B) | Firing Threshold | Context Length | ||||
| 512 | 1024 | 2048 | 4096 | 8192 | |||
| OPT | 1.300 | - | 16.26 | 13.58 | 11.13 | - | - |
| Llama-3.2 | 1.200 | - | 12.93 | 10.96 | 9.76 | 9.02 | 8.54 |
| BiSpikCLM | 1.300 | 0.70 | 36.72 (0.184) | 32.49 (0.183) | 29.34 (0.181) | - | - |
| 0.85 | 39.75 (0.177) | 36.30 (0.175) | 32.18 (0.174) | - | - | ||
| 1.00 | 43.17 (0.163) | 39.88 (0.162) | 34.62 (0.160) | - | - | ||