轻量级网络用自适应窗口注意力,速度提升5倍且精度更高
Lightweight Backbone Networks Only Require Adaptive Lightweight Self-Attention Mechanisms
- 提出自适应窗口注意力机制,动态生成少量关键序列
- LOLViT在图像分类、检测、分割任务上均超越同级别CNN模型
- 适合对推理速度和精度都有要求的移动端视觉应用
当前轻量级混合骨干网络虽缓解了计算饱和问题,但卷积神经网络(CNN)与注意力机制间计算效率失衡日益显著。尽管线性注意力及其变体在轻量化设计上取得进展,仍难以满足混合模型对长序列建模的需求。现有轻量级SoftMax注意力通常将特征图压缩至固定尺寸以减少序列数,但压缩比例设定繁琐,计算饱和问题依然存在。为此,本文提出一种自适应特征图尺寸的轻量级SoftMax注意力机制——快速窗口注意力(Fast Window Attention, FWA),通过窗口聚合生成少量关键序列(Key和Value)进行注意力计算。同时,解释了在轻量级全局注意力中使用ReLU模拟SoftMax操作的合理性。最后,设计全局-局部特征融合机制,结合GhostNet构建轻量级混合骨干网络LOLViT。在图像分类(ImageNet 1K)、目标检测(COCO 2017)和语义分割(BDD100K)等任务上,经大量消融实验验证,LOLViT在相同级别下优于传统CNN模型,在推理速度和准确率上表现更优。特别地,LOLViT-X的推理速度达到MobileViT-X的5倍。
原文摘要 · Abstract (English)
Currently, lightweight hybrid backbone networks have partially alleviated the issue of computational saturation, but the imbalance in computational efficiencys between convolutional neural networks (CNNs) and attention mechanisms is becoming increasingly apparent. Specifically, although linear attention mechanisms and their variants have made progress in lightweight design, they still fail to meet the demands of hybrid models for long-sequence modeling. On the other hand, existing lightweight SoftMax attention computations typically reduce the feature map to a fixed size to decrease the number of sequences, thereby compressing the computational scale. However, the process of determining the feature map reduction ratio is cumbersome, and computational saturation issues still persist. To address this issue, this paper proposes a lightweight SoftMax attention mechanism with adaptive feature map sizes, named Fast Window Attention (FWA), which generates a small number of key sequences (Key and Value) through window aggregation for attention computation. Additionally, it explains the rationality of using ReLU to simulate SoftMax operations in lightweight global attention mechanisms. Finally, the paper designs a global-local feature fusion mechanism and combines it with GhostNet to propose a lightweight hybrid backbone network, LOLViT. Through visual tasks such as classification (ImageNet 1K), detection (COCO 2017), and segmentation (BDD100K), along with extensive ablation studies, it is demonstrated that LOLViT outperforms CNN models of the same level in both inference speed and model accuracy. Notably, the inference speed of LOLViT-X is 5x that of MobileViT-X.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。