QKFormer: Hierarchical Spiking Transformer Using Q-K Attention
Abstract
Spiking Transformers, which integrate Spiking Neural Networks (SNNs) with Transformer architectures, have attracted significant attention due to their potential for low energy consumption and high performance. However, there remains a substantial gap in performance between SNNs and Artificial Neural Networks (ANNs). To narrow this gap, we have developed QKFormer, a direct training spiking transformer with the following features: i) Linear complexity and high energy efficiency, the novel spike-form Q-K attention module efficiently models the token or channel attention through binary vectors and enables the construction of larger models. ii) Multi-scale spiking representation, achieved by a hierarchical structure with the different numbers of tokens across blocks. iii) Spiking Patch Embedding with Deformed Shortcut (SPEDS), enhances spiking information transmission and integration, thus improving overall performance. It is shown that QKFormer achieves significantly superior performance over existing state-of-the-art SNN models on various mainstream datasets. Notably, with comparable size to Spikformer (66.34 M, 74.81\%), QKFormer (64.96 M) achieves a groundbreaking top-1 accuracy of 85.65\% on ImageNet-1k, substantially outperforming Spikformer by 10.84\%. To our best knowledge, this is the first time that directly training SNNs have exceeded 85\% accuracy on ImageNet-1K.
Cite
Text
Zhou et al. "QKFormer: Hierarchical Spiking Transformer Using Q-K Attention." Neural Information Processing Systems, 2024. doi:10.52202/079017-0416Markdown
[Zhou et al. "QKFormer: Hierarchical Spiking Transformer Using Q-K Attention." Neural Information Processing Systems, 2024.](https://mlanthology.org/neurips/2024/zhou2024neurips-qkformer/) doi:10.52202/079017-0416BibTeX
@inproceedings{zhou2024neurips-qkformer,
title = {{QKFormer: Hierarchical Spiking Transformer Using Q-K Attention}},
author = {Zhou, Chenlin and Zhang, Han and Zhou, Zhaokun and Yu, Liutao and Huang, Liwei and Fan, Xiaopeng and Yuan, Li and Ma, Zhengyu and Zhou, Huihui and Tian, Yonghong},
booktitle = {Neural Information Processing Systems},
year = {2024},
doi = {10.52202/079017-0416},
url = {https://mlanthology.org/neurips/2024/zhou2024neurips-qkformer/}
}