[论文解读] Shift-based Primitives for Efficient Convolutional Neural Networks
本文提出了三种针对GPU优化的基于移位的原语——通道移位、地址移位和捷径移位,通过重新组织特征图指针来加速紧凑卷积神经网络(CNN)的推理,而无需内存复制或浮点数运算。所提出的AddressNet与增强版AddressNet架构在CIFAR100和ImageNet上实现了更快的推理速度(相比ShuffleNet的通道混洗最高快12.7倍),同时保持了相当或更优的准确率。
We propose a collection of three shift-based primitives for building efficient compact CNN-based networks. These three primitives (channel shift, address shift, shortcut shift) can reduce the inference time on GPU while maintains the prediction accuracy. These shift-based primitives only moves the pointer but avoids memory copy, thus very fast. For example, the channel shift operation is 12.7x faster compared to channel shuffle in ShuffleNet but achieves the same accuracy. The address shift and channel shift can be merged into the point-wise group convolution and invokes only a single kernel call, taking little time to perform spatial convolution and channel shift. Shortcut shift requires no time to realize residual connection through allocating space in advance. We blend these shift-based primitives with point-wise group convolution and built two inference-efficient CNN architectures named AddressNet and Enhanced AddressNet. Experiments on CIFAR100 and ImageNet datasets show that our models are faster and achieve comparable or better accuracy.
研究动机与目标
- 解决紧凑CNN中FLOPs/参数减少与实际推理时间之间的差距,尤其是在GPU上的表现。
- 克服常见操作(如通道混洗和捷径连接)在FLOPs和参数上几乎为零,却显著消耗推理时间的低效问题。
- 设计适合GPU的原语,最大限度减少内存移动并避免浮点数运算,以加速推理。
- 利用这些移位原语,设计高效、面向推理优化的CNN架构——AddressNet与Enhanced AddressNet。
- 展示移位操作在不同数据集(CIFAR100、ImageNet)和模型规模下的可扩展性与灵活性。
提出的方法
- 提出三种移位原语:通道移位(替代通道混洗)、地址移位(高效的空间特征聚合)和捷径移位(通过预分配内存实现零成本残差连接)。
- 通过操作内存指针而非复制数据来实现所有移位操作,避免内存带宽消耗和浮点数运算。
- 将地址移位与通道移位合并为逐点分组卷积,减少内核调用开销,并支持单内核执行。
- 通过将移位原语与逐点分组卷积结合,设计AddressNet与Enhanced AddressNet,构建紧凑且高效的推理网络。
- 利用地址移位加速MobileNet变体(Address-MobileNet),并增强Enhanced AddressNet以支持ImageNet规模扩展。
- 通过最小化内核启动次数并利用连续内存访问模式来优化GPU性能,从而降低延迟。
实验结果
研究问题
- RQ1基于指针的移位操作是否能在不增加FLOPs或参数的前提下,减少紧凑CNN的推理时间?
- RQ2在GPU上,基于移位的原语与现有操作(如通道混洗和捷径连接)相比,实际推理时间表现如何?
- RQ3移位原语能否有效集成到现有高效CNN架构(如MobileNet和ShuffleNet)中,以提升推理速度?
- RQ4所提出的移位操作在不同数据集和模型复杂度(如CIFAR100与ImageNet)之间,其可扩展性达到何种程度?
- RQ5使用移位原语是否能在保持或提升准确率的同时,实现比当前最先进模型更快的推理速度?
主要发现
- 通道移位操作在保持相同准确率的前提下,比ShuffleNet中的通道混洗快12.7倍。
- 地址移位与通道移位可合并为单个内核调用,减少开销,并实现高效的时空重排。
- 捷径移位通过预分配连续内存空间,实现了零推理时间的残差连接。
- AddressNet与Enhanced AddressNet在CIFAR100上的推理速度优于ShiftNet,其中Enhanced AddressNet-B在ImageNet上以4.3ms实现59.7%的top-1准确率。
- Address-MobileNet变体在ImageNet上的准确率和延迟均优于MobileNet与ShuffleNet,其中Address-MobileNet-160在1.5ms内实现43.6%的top-1准确率。
- 尽管分组卷积在cuDNN中优化有限,所提模型在多个准确率与延迟水平上仍达到或优于当前最先进模型的性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。