arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.13492cs.CV
收藏

量化脉冲驱动Transformer

Quantized Spike-driven Transformer

University of Electronic Science and Technology of China(电子科技大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Future Technology, University of Chinese Academy of Sciences(中国科学院大学未来技术学院);China Agricultural University(中国农业大学);University of California, Santa Cruz(加州大学圣克鲁兹分校);Liaoning Technical University(辽宁工程技术大学);Chinese University of Hong Kong (Shenzhen)(香港中文大学(深圳))

Xuerui Qiu, Malu Zhang, Jieyuan Zhang, Wenjie Wei, Honglin Cao, Junsheng Guo, Rui-Jie Zhu, Yimeng Shan, Yang Yang, Haizhou Li

AI总结:

针对大规模脉冲Transformer部署受资源限制、低位宽量化后性能下降的问题,提出基于互信息熵的双层优化策略,校正量化脉冲自注意力的信息分布,在ImageNet上实现80.3% top-1准确率的同时大幅降低功耗与模型尺寸。

摘要:

脉冲神经网络(Spiking Neural Networks, SNN)凭借其脉冲驱动范式,正逐渐成为传统人工神经网络的一种极具潜力的高能效替代方案。然而,当前SNN领域的研究主要聚焦于通过设计大规模Transformer结构来提升精度,这类结构通常依赖大量计算资源,限制了其在资源受限设备上的部署。为解决这一难题,我们提出了量化脉冲驱动Transformer基线(QSD-Transformer),通过采用低位宽参数降低资源需求。但遗憾的是,QSD-Transformer往往会出现严重的性能下降。本文首先通过实证分析发现,量化脉冲驱动自注意力(quantized spike-driven self-attention, Q-SDSA)的双峰分布会导致量化过程中出现脉冲信息失真(spike information distortion, SID),进而引发显著的性能下降。为缓解该问题,我们受互信息熵启发,提出一种双层优化策略来校正Q-SDSA中的信息分布。具体而言,在下层,我们引入信息增强型LIF( leaky integrate-and-fire,漏电积分发放)神经元来校正Q-SDSA的信息分布;在上层,我们为QSD-Transformer提出一种细粒度蒸馏方案,使Q-SDSA的分布与对应的人工神经网络(ANN)中的分布对齐。通过整合该双层优化策略,QSD-Transformer能够在不牺牲高性能优势的前提下提升能效。例如,与ImageNet上已有的SNN基准相比,QSD-Transformer实现了80.3%的top-1准确率,同时功耗和模型尺寸分别显著降低了6.0×和8.1×。代码可在https://github.com/bollossom/QSD-Transformer获取。

英文摘要:

Spiking neural networks are emerging as a promising energy-efficient alternative to traditional artificial neural networks due to their spike-driven paradigm. However, recent research in the SNN domain has mainly focused on enhancing accuracy by designing large-scale Transformer structures, which typically rely on substantial computational resources, limiting their deployment on resource-constrained devices. To overcome this challenge, we propose a quantized spike-driven Transformer baseline (QSD-Transformer), which achieves reduced resource demands by utilizing a low bit-width parameter. Regrettably, the QSD-Transformer often suffers from severe performance degradation. In this paper, we first conduct empirical analysis and find that the bimodal distribution of quantized spike-driven self-attention (Q-SDSA) leads to spike information distortion (SID) during quantization, causing significant performance degradation. To mitigate this issue, we take inspiration from mutual information entropy and propose a bi-level optimization strategy to rectify the information distribution in Q-SDSA. Specifically, at the lower level, we introduce an information-enhanced LIF to rectify the information distribution in Q-SDSA. At the upper level, we propose a fine-grained distillation scheme for the QSD-Transformer to align the distribution in Q-SDSA with that in the counterpart ANN. By integrating the bi-level optimization strategy, the QSD-Transformer can attain enhanced energy efficiency without sacrificing its high-performance advantage. For instance, when compared to the prior SNN benchmark on ImageNet, the QSD-Transformer achieves 80.3% top-1 accuracy, accompanied by significant reductions of 6.0$\times$ and 8.1$\times$ in power consumption and model size, respectively. Code is available at https://github.com/bollossom/QSD-Transformer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑