{"title":"重新考虑尖峰神经网络的能效","authors":"Zhanglu Yan, Zhenyu Bai, Weng-Fai Wong","doi":"arxiv-2409.08290","DOIUrl":null,"url":null,"abstract":"Spiking neural networks (SNNs) are generally regarded as more\nenergy-efficient because they do not use multiplications. However, most SNN\nworks only consider the counting of additions to evaluate energy consumption,\nneglecting other overheads such as memory accesses and data movement\noperations. This oversight can lead to a misleading perception of efficiency,\nespecially when state-of-the-art SNN accelerators operate with very small time\nwindow sizes. In this paper, we present a detailed comparison of the energy\nconsumption of artificial neural networks (ANNs) and SNNs from a hardware\nperspective. We provide accurate formulas for energy consumption based on\nclassical multi-level memory hierarchy architectures, commonly used\nneuromorphic dataflow architectures, and our proposed improved spatial-dataflow\narchitecture. Our research demonstrates that to achieve comparable accuracy and\ngreater energy efficiency than ANNs, SNNs require strict limitations on both\ntime window size T and sparsity s. For instance, with the VGG16 model and a\nfixed T of 6, the neuron sparsity rate must exceed 93% to ensure energy\nefficiency across most architectures. Inspired by our findings, we explore\nstrategies to enhance energy efficiency by increasing sparsity. We introduce\ntwo regularization terms during training that constrain weights and\nactivations, effectively boosting the sparsity rate. Our experiments on the\nCIFAR-10 dataset, using T of 6, show that our SNNs consume 69% of the energy\nused by optimized ANNs on spatial-dataflow architectures, while maintaining an\nSNN accuracy of 94.18%. This framework, developed using PyTorch, is publicly\navailable for use and further research.","PeriodicalId":501347,"journal":{"name":"arXiv - CS - Neural and Evolutionary Computing","volume":"15 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Reconsidering the energy efficiency of spiking neural networks\",\"authors\":\"Zhanglu Yan, Zhenyu Bai, Weng-Fai Wong\",\"doi\":\"arxiv-2409.08290\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Spiking neural networks (SNNs) are generally regarded as more\\nenergy-efficient because they do not use multiplications. However, most SNN\\nworks only consider the counting of additions to evaluate energy consumption,\\nneglecting other overheads such as memory accesses and data movement\\noperations. This oversight can lead to a misleading perception of efficiency,\\nespecially when state-of-the-art SNN accelerators operate with very small time\\nwindow sizes. In this paper, we present a detailed comparison of the energy\\nconsumption of artificial neural networks (ANNs) and SNNs from a hardware\\nperspective. We provide accurate formulas for energy consumption based on\\nclassical multi-level memory hierarchy architectures, commonly used\\nneuromorphic dataflow architectures, and our proposed improved spatial-dataflow\\narchitecture. Our research demonstrates that to achieve comparable accuracy and\\ngreater energy efficiency than ANNs, SNNs require strict limitations on both\\ntime window size T and sparsity s. For instance, with the VGG16 model and a\\nfixed T of 6, the neuron sparsity rate must exceed 93% to ensure energy\\nefficiency across most architectures. Inspired by our findings, we explore\\nstrategies to enhance energy efficiency by increasing sparsity. We introduce\\ntwo regularization terms during training that constrain weights and\\nactivations, effectively boosting the sparsity rate. Our experiments on the\\nCIFAR-10 dataset, using T of 6, show that our SNNs consume 69% of the energy\\nused by optimized ANNs on spatial-dataflow architectures, while maintaining an\\nSNN accuracy of 94.18%. This framework, developed using PyTorch, is publicly\\navailable for use and further research.\",\"PeriodicalId\":501347,\"journal\":{\"name\":\"arXiv - CS - Neural and Evolutionary Computing\",\"volume\":\"15 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-29\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Neural and Evolutionary Computing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2409.08290\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Neural and Evolutionary Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.08290","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
由于尖峰神经网络(SNN)不使用乘法运算,因此通常被认为更节能。然而,大多数 SNNworks 在评估能耗时只考虑加法运算,而忽略了其他开销,如内存访问和数据移动操作。这种疏忽可能会导致对效率的误解,尤其是当最先进的 SNN 加速器以非常小的时间窗口尺寸运行时。在本文中,我们从硬件角度详细比较了人工神经网络(ANN)和 SNN 的能耗。我们根据经典的多级内存分层架构、常用的超形态数据流架构以及我们提出的改进型空间数据流架构,提供了精确的能耗公式。我们的研究表明,为了达到与人工神经网络相当的精度和更高的能效,人工神经网络需要严格限制时间窗口大小 T 和稀疏度 s。例如,在 VGG16 模型和固定 T 为 6 的情况下,神经元稀疏率必须超过 93%,才能确保大多数架构的能效。受这一发现的启发,我们探索了通过增加稀疏性来提高能效的策略。我们在训练过程中引入了两个正则化项,对权重和激活进行约束,从而有效提高了稀疏率。我们在 CIFAR-10 数据集上使用 6 T 进行的实验表明,我们的 SNN 所消耗的能量是空间数据流架构上优化 ANN 所消耗能量的 69%,同时保持了 94.18% 的 SNN 准确率。该框架使用 PyTorch 开发,可公开使用和进一步研究。
Reconsidering the energy efficiency of spiking neural networks
Spiking neural networks (SNNs) are generally regarded as more
energy-efficient because they do not use multiplications. However, most SNN
works only consider the counting of additions to evaluate energy consumption,
neglecting other overheads such as memory accesses and data movement
operations. This oversight can lead to a misleading perception of efficiency,
especially when state-of-the-art SNN accelerators operate with very small time
window sizes. In this paper, we present a detailed comparison of the energy
consumption of artificial neural networks (ANNs) and SNNs from a hardware
perspective. We provide accurate formulas for energy consumption based on
classical multi-level memory hierarchy architectures, commonly used
neuromorphic dataflow architectures, and our proposed improved spatial-dataflow
architecture. Our research demonstrates that to achieve comparable accuracy and
greater energy efficiency than ANNs, SNNs require strict limitations on both
time window size T and sparsity s. For instance, with the VGG16 model and a
fixed T of 6, the neuron sparsity rate must exceed 93% to ensure energy
efficiency across most architectures. Inspired by our findings, we explore
strategies to enhance energy efficiency by increasing sparsity. We introduce
two regularization terms during training that constrain weights and
activations, effectively boosting the sparsity rate. Our experiments on the
CIFAR-10 dataset, using T of 6, show that our SNNs consume 69% of the energy
used by optimized ANNs on spatial-dataflow architectures, while maintaining an
SNN accuracy of 94.18%. This framework, developed using PyTorch, is publicly
available for use and further research.