arXiv:2501.08043cs.LGcs.AR2025-01被引 14

用多项式替代线性层,让FPGA推理更快更省面积。

PolyLUT: Ultra-low Latency Polynomial Inference with Hardware-Aware Structured Pruning

  • 用多项式作为神经网络基础单元,嵌入FPGA查找表中。
  • 相比传统方法,层数减少70%以上,延迟和面积显著降低。
  • 设计专用正则化,自动生成适合硬件的稀疏结构,无需试错。

标准深度神经网络推理依赖交错的线性映射与非线性激活。以往超低延迟实现将这些操作硬编码进FPGA查找表(LUT)中,但LUT可支持更复杂的函数。本文提出一种新方法:以多变量多项式作为DNN的基本构建块,利用FPGA软逻辑的灵活性,将多项式计算隐藏在LUT内,开销极小。使用多项式单元可在保持精度的同时大幅减少软逻辑层级,带来显著的延迟与面积优势。此外,基于LUT的实现面临输入数增长导致表容量指数上升的问题。现有方法依赖预设稀疏性,结果受种子影响大。为此,本文提出一种硬件感知的结构化剪枝策略,采用定制的组正则化,鼓励每神经元输入数较少的稀疏模式。我们在三个任务上验证了PolyLUT的有效性:网络入侵检测、欧洲核子研究中心大型强子对撞机的喷注识别,以及MNIST分类。

原文摘要 · Abstract (English)

Standard deep neural network inference involves the computation of interleaved linear maps and nonlinear activation functions. Prior work for ultra-low latency implementations has hardcoded these operations inside FPGA lookup tables (LUTs). However, FPGA LUTs can implement a much greater variety of functions. In this paper, we propose a novel approach to training DNNs for FPGA deployment using multivariate polynomials as the basic building block. Our method takes advantage of the flexibility offered by the soft logic, hiding the polynomial evaluation inside the LUTs with minimal overhead. By using polynomial building blocks, we achieve the same accuracy using considerably fewer layers of soft logic than by using linear functions, leading to significant latency and area improvements. LUT-based implementations also face a significant challenge: the LUT size grows exponentially with the number of inputs. Prior work relies on a priori fixed sparsity, with results heavily dependent on seed selection. To address this, we propose a structured pruning strategy using a bespoke hardware-aware group regularizer that encourages a particular sparsity pattern that leads to a small number of inputs per neuron. We demonstrate the effectiveness of PolyLUT on three tasks: network intrusion detection, jet identification at the CERN Large Hadron Collider, and MNIST.

FPGA模型压缩多项式低延迟

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