MaxQ:用于N:M稀疏网络的多轴查询
MaxQ: Multi-Axis Query for N:M Sparsity Network
AI总结:
MaxQ提出多轴查询动态生成软N:M掩码,并逐步增加稀疏比例,以提升N:M稀疏网络的性能,在多种视觉任务上超越现有方法。
摘要:
N:M稀疏性因其相较于结构化稀疏和非结构化稀疏在性能和延迟方面的显著权衡而受到越来越多的关注。然而,现有的N:M稀疏方法不区分权重块之间的相对重要性,导致重要权重未得到充分重视。此外,它们直接将N:M稀疏性应用于整个网络,这会造成严重的信息损失。因此,这些方法仍然不是最优的。在本文中,我们提出了一种高效且有效的多轴查询方法,称为MaxQ,以纠正这些问题。在训练过程中,MaxQ采用动态方法生成软N:M掩码,考虑跨多个轴的权重重要性。该方法增强了更重要权重的更新,并确保更有效的更新。同时,应用了一种逐渐增加N:M权重块百分比的稀疏策略,使网络能够逐步从剪枝引起的损伤中恢复。在运行时,N:M软掩码可以预先计算为常量并折叠到权重中,而不会对稀疏模式造成任何扭曲,也不会产生额外的计算开销。综合实验表明,MaxQ在各种计算机视觉任务(包括图像分类、目标检测和实例分割)中的多种CNN架构上均取得了持续改进。对于具有1:16稀疏模式的ResNet50,MaxQ在ImageNet上可以达到74.6%的top-1准确率,并比最先进的方法提高了超过2.8%。代码和检查点可在https://github.com/JingyangXiang/MaxQ获取。
英文摘要:
N:M sparsity has received increasing attention due to its remarkable performance and latency trade-off compared with structured and unstructured sparsity. However, existing N:M sparsity methods do not differentiate the relative importance of weights among blocks and leave important weights underappreciated. Besides, they directly apply N:M sparsity to the whole network, which will cause severe information loss. Thus, they are still sub-optimal. In this paper, we propose an efficient and effective Multi-Axis Query methodology, dubbed as MaxQ, to rectify these problems. During the training, MaxQ employs a dynamic approach to generate soft N:M masks, considering the weight importance across multiple axes. This method enhances the weights with more importance and ensures more effective updates. Meanwhile, a sparsity strategy that gradually increases the percentage of N:M weight blocks is applied, which allows the network to heal from the pruning-induced damage progressively. During the runtime, the N:M soft masks can be precomputed as constants and folded into weights without causing any distortion to the sparse pattern and incurring additional computational overhead. Comprehensive experiments demonstrate that MaxQ achieves consistent improvements across diverse CNN architectures in various computer vision tasks, including image classification, object detection and instance segmentation. For ResNet50 with 1:16 sparse pattern, MaxQ can achieve 74.6\% top-1 accuracy on ImageNet and improve by over 2.8\% over the state-of-the-art. Codes and checkpoints are available at \url{https://github.com/JingyangXiang/MaxQ}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。