Skip to main content
QUICK REVIEW

[论文解读] Bridging the Gap Between Neural Networks and Neuromorphic Hardware with A Neural Network Compiler

Yu Ji, Youhui Zhang|arXiv (Cornell University)|Nov 15, 2017
Advanced Memory and Neural Computing参考文献 57被引用 5
一句话总结

本文提出了一种神经网络编译器,可将无限制的、已训练的神经网络编译为适用于脉冲神经网络(neuromorphic)和存算一体(PIM)加速器的等效硬件约束模型。通过计算图抽象将软件与硬件解耦,并应用感知精度的、逐层变换技术,该编译器实现了对人工神经网络(ANNs)和脉冲神经网络(SNNs)的快速、低误差映射,且仅需极少的微调开销。

ABSTRACT

Different from developing neural networks (NNs) for general-purpose processors, the development for NN chips usually faces with some hardware-specific restrictions, such as limited precision of network signals and parameters, constrained computation scale, and limited types of non-linear functions. This paper proposes a general methodology to address the challenges. We decouple the NN applications from the target hardware by introducing a compiler that can transform an existing trained, unrestricted NN into an equivalent network that meets the given hardware's constraints. We propose multiple techniques to make the transformation adaptable to different kinds of NN chips, and reliable for restrict hardware constraints. We have built such a software tool that supports both spiking neural networks (SNNs) and traditional artificial neural networks (ANNs). We have demonstrated its effectiveness with a fabricated neuromorphic chip and a processing-in-memory (PIM) design. Tests show that the inference error caused by this solution is insignificant and the transformation time is much shorter than the retraining time. Also, we have studied the parameter-sensitivity evaluations to explore the tradeoffs between network error and resource utilization for different transformation strategies, which could provide insights for co-design optimization of neuromorphic hardware and software.

研究动机与目标

  • 解决灵活、高精度的神经网络模型与脉冲神经网络加速器硬件约束之间日益扩大的差距。
  • 在无需微调的情况下,实现预训练的、无限制的神经网络在专用脉冲神经网络硬件上的重用。
  • 提供一种通用、可移植的编译解决方案,支持在多种硬件平台上同时支持人工神经网络(ANNs)和脉冲神经网络(SNNs)的编译。
  • 在受限环境中保持高资源利用率的同时,最小化推理误差和转换时间。
  • 通过分析不同转换策略下模型精度与硬件资源使用之间的权衡,为软硬件协同设计提供洞见。

提出的方法

  • 通过计算图(CG)抽象将神经网络应用与目标硬件解耦,实现与平台无关的模型表示。
  • 应用逐层、感知精度的变换技术,将高精度的权重和激活映射到目标硬件的有限精度数据类型(如1位、2位)。
  • 采用动态的、逐层的计算精度配置,以平衡精度与资源效率。
  • 通过统一的编译流水线支持人工神经网络(ANNs)和脉冲神经网络(SNNs)。
  • 采用权重量化、激活缩放和非线性函数近似等优化技术,在硬件约束下保持模型精度。
  • 在一款自研脉冲神经网络芯片和基于PIM的加速器上验证了该编译器,结果表明转换开销极低,且推理误差可忽略不计。

实验结果

研究问题

  • RQ1通用神经网络编译器能否在极低精度损失下,有效将无限制的、预训练的神经网络映射到多种脉冲神经网络硬件上?
  • RQ2所提出的编译器的转换时间与为特定硬件开发模型所需的微调时间相比如何?
  • RQ3在严格的精度和连接性约束下,采用不同转换策略时,模型精度与硬件资源利用率之间的权衡如何?
  • RQ4该编译器在不同类型的脉冲神经网络加速器(包括非线性函数支持有限的设备)上,能在多大程度上保持网络行为的一致性?
  • RQ5该编译器能否通过揭示模型转换中参数敏感性的权衡,实现高效的软硬件协同设计?

主要发现

  • 该编译器在将模型映射到脉冲神经网络硬件时,实现了可忽略的推理误差,显著低于典型微调引起的精度波动。
  • 转换时间远快于微调,与完整微调周期相比,报告的加速倍数达到多个数量级。
  • 该方法同时支持ANNs和SNNs,实现了在多种脉冲神经网络加速器(包括自研芯片和PIM设计)上的跨平台部署。
  • 参数敏感性分析揭示了模型精度与硬件资源使用之间的清晰权衡,为协同设计决策提供了依据。
  • 编译器采用的逐层、可配置精度的转换策略,在1位精度和有限扇入/扇出等严苛硬件约束下,仍能有效保持模型保真度。
  • 该方案在冗余依赖方法之外也具有普适性,使其在低冗余或高精度需求的模型下,于严格硬件限制中依然可行。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。