Skip to main content
QUICK REVIEW

[论文解读] Searching for Winograd-aware Quantized Networks

Javier Fernández-Marqués, Paul N. Whatmough|arXiv (Cornell University)|Feb 25, 2020
Advanced Neural Network Applications参考文献 69被引用 14
一句话总结

本文提出Winograd感知量化网络,将Winograd变换引入模型训练过程以整合数值误差,实现在移动CPU上的高精度INT8推理。通过在训练中学习变换矩阵,并结合延迟感知的神经架构搜索框架(wiNAS),该方法在CIFAR-10上实现相较于im2row高达2.66倍的加速,且准确率无损失,同时相比FP32 Winograd实现仍快1.32倍。

ABSTRACT

Lightweight architectural designs of Convolutional Neural Networks (CNNs) together with quantization have paved the way for the deployment of demanding computer vision applications on mobile devices. Parallel to this, alternative formulations to the convolution operation such as FFT, Strassen and Winograd, have been adapted for use in CNNs offering further speedups. Winograd convolutions are the fastest known algorithm for spatially small convolutions, but exploiting their full potential comes with the burden of numerical error, rendering them unusable in quantized contexts. In this work we propose a Winograd-aware formulation of convolution layers which exposes the numerical inaccuracies introduced by the Winograd transformations to the learning of the model parameters, enabling the design of competitive quantized models without impacting model size. We also address the source of the numerical error and propose a relaxation on the form of the transformation matrices, resulting in up to 10% higher classification accuracy on CIFAR-10. Finally, we propose wiNAS, a neural architecture search (NAS) framework that jointly optimizes a given macro-architecture for accuracy and latency leveraging Winograd-aware layers. A Winograd-aware ResNet-18 optimized with wiNAS for CIFAR-10 results in 2.66x speedup compared to im2row, one of the most widely used optimized convolution implementations, with no loss in accuracy.

研究动机与目标

  • 为解决量化网络中Winograd卷积的数值不稳定性问题,该问题限制了其在低精度推理中的应用。
  • 通过将数值误差暴露于学习过程,使快速Winograd卷积能够在INT8量化模型中使用。
  • 联合优化网络架构与卷积算法选择,以实现在移动CPU上的准确率与延迟的平衡。
  • 开发一种神经架构搜索框架(wiNAS),以选择最优的Winograd感知层,实现速度与准确率的兼顾。
  • 证明在量化设置下,可学习的Winograd变换可优于标准的固定变换。

提出的方法

  • 提出一种Winograd感知卷积层,将变换矩阵作为网络可学习参数,使模型能够适应Winograd变换引入的数值误差。
  • 对标准Winograd变换矩阵形式进行松弛,以减少量化下的数值误差。
  • 采用梯度检查点技术,以管理Winograd计算图中中间输出导致的高内存占用问题。
  • 开发wiNAS,一种可微分的神经架构搜索框架,利用移动CPU(A73/A53)上的实测推理时间,联合优化准确率与延迟。
  • 采用多目标损失函数,并引入延迟加权项(λ₂),在搜索过程中平衡准确率与速度。
  • 采用混合精度量化,早期层使用更高位宽以缓解准确率下降。

实验结果

研究问题

  • RQ1通过在训练中学习变换矩阵,是否能有效在INT8量化模型中使用Winograd卷积?
  • RQ2对Winograd变换矩阵形式的松弛如何影响量化网络中的数值稳定性和准确率?
  • RQ3wiNAS这类NAS框架能否有效选择Winograd感知层,实现在移动CPU上低延迟且高准确率的推理?
  • RQ4在量化模型中使用可学习与固定Winograd变换时,延迟、准确率与数值误差之间的权衡如何?
  • RQ5Winograd感知层在INT8推理中,相较于标准im2row与FP32 Winograd实现,能多大程度上实现性能超越?

主要发现

  • Winograd感知ResNet-18在INT8量化下,相较于im2row在A73上实现2.66倍加速,且与全精度模型相比准确率无下降。
  • 该方法相比FP32 Winograd实现最高可实现1.32倍更快的推理速度,证明INT8 Winograd在实际中可超越FP32。
  • 使用可学习Winograd变换后,CIFAR-10上的准确率最高提升10%,优于标准固定变换。
  • wiNAS结合延迟感知搜索,使CIFAR-100在A53上延迟降低最多9ms,同时INT8准确率提升1.1%。
  • 经wiNAS WA-Q优化的模型可弥补与全精度模型的准确率差距,在CIFAR-10和CIFAR-100上分别实现0.32%和1.1%更高的INT8准确率。
  • 该方法在A73上保持显著加速,ResNet-18模型比优化后的im2row实现快1.54倍。

更好的研究,从现在开始

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

无需绑定信用卡

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