[论文解读] ShiftCNN: Generalized Low-Precision Architecture for Inference of Convolutional Neural Networks
ShiftCNN 引入了一种通用的低精度、无乘法 CNN 推理架构,使用 2 的幂权 weight 表示和预计算卷积项来显著降低计算量,ImageNet 上精度损失最小且 FPGA 功耗节省显著。
In this paper we introduce ShiftCNN, a generalized low-precision architecture for inference of multiplierless convolutional neural networks (CNNs). ShiftCNN is based on a power-of-two weight representation and, as a result, performs only shift and addition operations. Furthermore, ShiftCNN substantially reduces computational cost of convolutional layers by precomputing convolution terms. Such an optimization can be applied to any CNN architecture with a relatively small codebook of weights and allows to decrease the number of product operations by at least two orders of magnitude. The proposed architecture targets custom inference accelerators and can be realized on FPGAs or ASICs. Extensive evaluation on ImageNet shows that the state-of-the-art CNNs can be converted without retraining into ShiftCNN with less than 1% drop in accuracy when the proposed quantization algorithm is employed. RTL simulations, targeting modern FPGAs, show that power consumption of convolutional layers is reduced by a factor of 4 compared to conventional 8-bit fixed-point architectures.
研究动机与目标
- 设计一个硬件高效、低精度的 CNN 推理框架,避免乘法运算。
- 提出一种通用量化算法,在不重新训练的前提下,用 2 的幂次方码本表示权重。
- 引入预计算策略,将卷积计算量降低一个数量级。
- 设计 ShiftCNN 架构(ShiftALU)与内存方案以实现 shift-and-add 卷积。
- 在 ImageNet 上评估精度并分析 FPGA 功耗与复杂度。
提出的方法
- 使用非均匀的 2 的幂次方码本对权重进行量化(算法 1),获得连接的权重表示 ˆW_hat,组成来自码本 CN 的分量。
- 预计算卷积项张量 P,以用 2 的幂次方位移替代乘法(ShiftALU 进行位移和符号翻转)。
- 通过以权重索引对预计算的 P 进行索引计算卷积,输出累积,减少乘积运算为 O(PCHW)。
- 提供调度逻辑(算法 2),利用输入通道并行性,并从专用的 P 内存缓冲区进行写/读。
- 针对 N 和 B 设定提供架构变体(二进制/三进制/更高精度),并讨论对稀疏/压缩模型的扩展。
实验结果
研究问题
- RQ1通用的非重新训练量化到 2 的幂权重表示是否能在标准 CNN 中保持精度?
- RQ2预计算卷积项对 CNN 推理的计算成本与能效有何影响?
- RQ3基于 ShiftCNN 的无乘法架构在 FPGA/ASIC 的功耗与资源方面有何影响?
- RQ4不同的 N(项数)和 B(比特宽度)设置对常见 CNN 的精度与硬件复杂度有何影响?
主要发现
- ShiftCNN 的变体在 ImageNet 上,B=4、N>2 时 Top-1 精度降幅小于 1% 。
- N=2、B=4 时,精度降幅在 ~1% 范围内(如 ResNet-50:Top-1 损失 0.67%;GoogleNet:Top-1 损失 0.39%)。
- 卷积层计算量可降至约ˆ(CHfWf)/P 的数量级,P 决定预计算项数量;观察到显著的加速,例如 SqueezeNet 260x、GoogleNet 687x、ResNet-18 1090x。
- FPGA RTL 仿真显示 ShiftCNN 使用的资源约为 现有 8 位定点乘法器的 2.5x,动态功耗约降低 4x;75% 的功率来自加法树,表示乘法自由硬件的显著提升。
- ShiftCNN 支持灵活的码本,可容纳二进制/三进制或更高精度的权重量表示,在精度与复杂度之间提供权衡。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。