arXiv:2501.13492cs.CV2025-01ICLR被引 30

低精度脉冲变压器在保持高性能的同时大幅降低功耗和模型大小。

Quantized Spike-driven Transformer

  • 通过双层优化修复量化后脉冲注意力的信息分布失真。
  • ImageNet上达80.3%准确率,功耗和模型尺寸分别降低6.0倍和8.1倍。
  • 适合资源受限设备部署的高效脉冲神经网络设计。

脉冲神经网络因其脉冲驱动机制成为节能替代传统神经网络的有前景方案。然而,近期研究多聚焦于通过大型Transformer结构提升精度,通常依赖大量计算资源,限制了其在资源受限设备上的部署。为此,本文提出一种低比特参数的脉冲驱动变压器基线(QSD-Transformer),以降低资源需求。遗憾的是,该模型常出现严重性能下降。我们首次实证分析发现,量化后的脉冲自注意力(Q-SDSA)呈现双峰分布,导致脉冲信息失真(SID)。为此,受互信息熵启发,提出双层优化策略:底层引入信息增强型LIF神经元修正Q-SDSA信息分布;上层设计细粒度蒸馏方案,使QSD-Transformer的Q-SDSA分布与对应ANN对齐。集成双层优化后,QSD-Transformer在不牺牲高性能的前提下实现显著能效提升。例如,在ImageNet上相比先前SNN基准,达到80.3%的top-1准确率,同时功耗与模型大小分别减少6.0×和8.1×。代码已开源。

原文摘要 · Abstract (English)

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.

脉冲神经网络量化Transformer能效优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。