Skip to main content
QUICK REVIEW

[论文解读] Latency-aware Spatial-wise Dynamic Networks

Yizeng Han, Zhihang Yuan|arXiv (Cornell University)|Oct 12, 2022
Advanced Neural Network Applications被引用 11
一句话总结

该论文提出LASNet,一种延迟感知的空间自适应动态网络,通过协同设计粗粒度空间自适应推理与硬件感知延迟预测器,提升实际推理效率。通过优化多核GPU上的算法设计与调度策略,LASNet在Tesla V100上将ResNet-101推理延迟降低36%,在Jetson TX2上降低46%,且无准确率损失。

ABSTRACT

Spatial-wise dynamic convolution has become a promising approach to improving the inference efficiency of deep networks. By allocating more computation to the most informative pixels, such an adaptive inference paradigm reduces the spatial redundancy in image features and saves a considerable amount of unnecessary computation. However, the theoretical efficiency achieved by previous methods can hardly translate into a realistic speedup, especially on the multi-core processors (e.g. GPUs). The key challenge is that the existing literature has only focused on designing algorithms with minimal computation, ignoring the fact that the practical latency can also be influenced by scheduling strategies and hardware properties. To bridge the gap between theoretical computation and practical efficiency, we propose a latency-aware spatial-wise dynamic network (LASNet), which performs coarse-grained spatially adaptive inference under the guidance of a novel latency prediction model. The latency prediction model can efficiently estimate the inference latency of dynamic networks by simultaneously considering algorithms, scheduling strategies, and hardware properties. We use the latency predictor to guide both the algorithm design and the scheduling optimization on various hardware platforms. Experiments on image classification, object detection and instance segmentation demonstrate that the proposed framework significantly improves the practical inference efficiency of deep networks. For example, the average latency of a ResNet-101 on the ImageNet validation set could be reduced by 36% and 46% on a server GPU (Nvidia Tesla-V100) and an edge device (Nvidia Jetson TX2 GPU) respectively without sacrificing the accuracy. Code is available at https://github.com/LeapLabTHU/LASNet.

研究动机与目标

  • 弥合空间自适应动态网络中理论FLOPs与实际推理延迟之间的差距。
  • 克服在多核处理器(如GPU)上进行细粒度像素级自适应推理时因非连续内存访问与调度不佳导致的低效问题。
  • 开发一个可泛化的框架,实现在多种硬件平台与深度学习任务中的实际加速。
  • 将延迟预测集成到算法与调度设计中,以指导动态网络在不同硬件上的高效部署。
  • 在图像分类、目标检测与实例分割基准上,实现显著的实际加速,同时保持模型准确率。

提出的方法

  • 提出一种延迟预测模型,综合考虑算法设计、调度策略与硬件特性,联合估计推理延迟。
  • 引入粗粒度空间自适应推理,将计算分配至特征块而非像素,提升内存访问的连续性。
  • 设计可学习的掩码模块,根据输入内容预测哪些特征块需要计算。
  • 优化动态算子的调度与内核实现,以更好地利用GPU并行性与内存层次结构。
  • 在训练过程中使用延迟预测器,引导网络学习适配目标硬件的高效计算模式。
  • 将该框架集成到多种CNN主干网络(如ResNet、DenseNet、RegNet)中,以实现广泛适用性。

实验结果

研究问题

  • RQ1为何在GPU上,理论FLOPs无法准确预测空间自适应动态网络的实际推理延迟?
  • RQ2空间自适应推理的粒度(像素级 vs. 块级)在多核处理器上如何影响实际延迟?
  • RQ3硬件感知的延迟预测器能否有效指导不同设备上高效动态网络的设计?
  • RQ4粗粒度空间自适应在不牺牲模型准确率的前提下,能在多大程度上提升实际推理速度?
  • RQ5所提出的框架能否在不同深度学习任务与主干网络架构间实现泛化?

主要发现

  • LASNet在NVIDIA Tesla V100上将ResNet-101推理延迟降低36%,在NVIDIA Jetson TX2 GPU上降低46%,且在ImageNet上无准确率下降。
  • 在COCO目标检测任务中,以0.4为训练目标的LAS-ResNet-101在Faster R-CNN中达到40.0% mAP,在RetinaNet中达到39.3%,延迟比静态基线降低25–30%。
  • 在实例分割任务中,以0.5为训练目标的LAS-ResNet-101在AP^mask上提升0.9%,在AP^box上提升1.0%,同时保持更快的推理速度。
  • 延迟预测器可在多种硬件(包括服务器与边缘GPU)上实现精确的延迟估计,促进硬件感知的模型设计。
  • 粗粒度空间自适应显著改善内存访问模式,相比细粒度像素级决策,能更好地利用GPU并行性。
  • 该框架具有良好的泛化能力:可应用于多种主干网络与任务(包括图像分类、目标检测与实例分割),并持续实现效率提升。

更好的研究,从现在开始

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

无需绑定信用卡

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