用新型局部注意力机制提升轻量模型速度与精度。
Partial Convolution Meets Visual Attention
- 提出局部视觉注意力(PAT)融合部分卷积与注意力机制。
- PATNet-T2比FasterNet-T2高1.3%准确率,GPU吞吐高25%。
- 适合追求高效高精度的视觉任务应用,如检测与分割。
设计高效且有效的神经网络仍是计算机视觉研究的重要课题。深度可分离卷积(DWConv)虽广泛用于轻量CNN或ViT,但推理时频繁内存访问导致吞吐量低。FasterNet尝试用部分卷积(PConv)替代DWConv,但因通道利用不足牺牲了精度。为弥补此缺陷并考虑特征图通道间的冗余性,我们提出一种新型局部视觉注意力机制(PAT),可高效结合PConv与视觉注意力。探索表明,局部注意力可完全替代全注意力机制,减少模型参数与计算量。PAT衍生出三种模块:局部通道注意力块(PAT_ch)、局部空间注意力块(PAT_sp)和局部自注意力块(PAT_sf)。首先,PAT_ch引入增强高斯通道注意力,将全局分布信息注入未激活通道;其次,在MLP层引入逐空间注意力以提升精度;最后,将最后一阶段的PAT_ch替换为自注意力以扩展全局感受野。基于PAT,我们提出新型混合网络家族PATNet,其在ImageNet-1K分类上优于FasterNet,COCO目标检测与分割任务表现更佳。尤其,PATNet-T2相较FasterNet-T2提升1.3%准确率,同时实现25%更高的GPU吞吐量与24%更低的CPU延迟。
原文摘要 · Abstract (English)
Designing an efficient and effective neural network has remained a prominent topic in computer vision research. Depthwise onvolution (DWConv) is widely used in efficient CNNs or ViTs, but it needs frequent memory access during inference, which leads to low throughput. FasterNet attempts to introduce partial convolution (PConv) as an alternative to DWConv but compromises the accuracy due to underutilized channels. To remedy this shortcoming and consider the redundancy between feature map channels, we introduce a novel Partial visual ATtention mechanism (PAT) that can efficiently combine PConv with visual attention. Our exploration indicates that the partial attention mechanism can completely replace the full attention mechanism and reduce model parameters and FLOPs. Our PAT can derive three types of blocks: Partial Channel-Attention block (PAT_ch), Partial Spatial-Attention block (PAT_sp) and Partial Self-Attention block (PAT_sf). First, PAT_ch integrates the enhanced Gaussian channel attention mechanism to infuse global distribution information into the untouched channels of PConv. Second, we introduce the spatial-wise attention to the MLP layer to further improve model accuracy. Finally, we replace PAT_ch in the last stage with the self-attention mechanism to extend the global receptive field. Building upon PAT, we propose a novel hybrid network family, named PATNet, which achieves superior top-1 accuracy and inference speed compared to FasterNet on ImageNet-1K classification and excel in both detection and segmentation on the COCO dataset. Particularly, our PATNet-T2 achieves 1.3% higher accuracy than FasterNet-T2, while exhibiting 25% higher GPU throughput and 24% lower CPU latency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。