[论文解读] Dynamic Convolution: Attention over Convolution Kernels
该论文提出 Dynamic Convolution (DY-CNNs),通过输入相关的注意力在每层汇聚多个小卷积核,在额外 FLOPs 最少的情况下提升性能,在 ImageNet 与 COCO 上对 MobileNet 与 ResNet 骨干显示出显著提升。
Light-weight convolutional neural networks (CNNs) suffer performance degradation as their low computational budgets constrain both the depth (number of convolution layers) and the width (number of channels) of CNNs, resulting in limited representation capability. To address this issue, we present Dynamic Convolution, a new design that increases model complexity without increasing the network depth or width. Instead of using a single convolution kernel per layer, dynamic convolution aggregates multiple parallel convolution kernels dynamically based upon their attentions, which are input dependent. Assembling multiple kernels is not only computationally efficient due to the small kernel size, but also has more representation power since these kernels are aggregated in a non-linear way via attention. By simply using dynamic convolution for the state-of-the-art architecture MobileNetV3-Small, the top-1 accuracy of ImageNet classification is boosted by 2.9% with only 4% additional FLOPs and 2.9 AP gain is achieved on COCO keypoint detection.
研究动机与目标
- 在严格计算预算下,激发超高效 CNN 的表示能力需求。
- 提出将动态卷积作为一个可替换的方式,通过注意力汇聚多个小卷积核。
- 演示学习动态卷积核和注意力的训练策略。
- 在 ImageNet 与 COCO 上评估 DY-CNN,以量化不同体系结构的准确性与效率提升。
提出的方法
- 将动态感知器定义为若干线性函数之和,带有输入相关的注意力且总和为一。
- 将动态感知器实现为具有 K 个并行、尺寸相同的卷积核的动态卷积,由注意力π_k(x)聚合。
- 使用挤压-激励 (SE) 风格的模块计算卷积核注意力,采用 softmax(温度可控)以确保凸组合。
- 在内核之间共享输出通道,以在不改变深度/宽度的前提下提升模型容量。
- 提供对训练 DY-CNN 的指南,包括在早期训练阶段使用较高的 softmax 温度并进行温度退火。
- 证明动态卷积可以替换现有体系结构中任何静态卷积(1x1、3x3、深度可分卷积等)。
实验结果
研究问题
- RQ1如何在不增加深度/宽度的情况下,将多个小卷积核动态地组合以提高表达能力?
- RQ2在动态卷积中联合优化卷积核与注意力的有效训练策略是什么?
- RQ3在轻量级架构如 MobileNet 变体和浅 ResNet 上应用动态卷积时,性能与计算量的权衡如何?
- RQ4动态卷积是否对 SE 与 NAS 派生的架构提供互补效益?
主要发现
| 网络 | 参数量 | #Param | MAdds | Top-1 | Top-5 |
|---|---|---|---|---|---|
| MobileNetV2 × 1.0 | 3.5M | 300.0M | 72.0 | 91.0 | |
| DY-MobileNetV2 × 1.0 | 11.1M | 312.9M | 75.2 (3.2) | 92.1 (1.1) | |
| MobileNetV2 × 0.75 | 2.6M | 209.0M | 69.8 | 89.6 | |
| DY-MobileNetV2 × 0.75 | 7.0M | 217.5M | 73.7 (3.9) | 91.3 (1.7) | |
| MobileNetV2 × 0.5 | 2.0M | 97.0M | 65.4 | 86.4 | |
| DY-MobileNetV2 × 0.5 | 4.0M | 101.4M | 69.9 (4.5) | 89.0 (2.6) | |
| MobileNetV2 × 0.35 | 1.7M | 59.2M | 60.3 | 82.9 | |
| DY-MobileNetV2 × 0.35 | 2.8M | 62.0M | 65.9 (5.6) | 86.4 (3.5) | |
| MobileNetV3-Small | 2.9M | 66.0M | 67.4 | 86.4 | |
| DY-MobileNetV3-Small | 4.8M | 68.5M | 70.3 (2.9) | 88.7 (2.3) | |
| ResNet-18 | 11.1M | 1.81G | 70.4 | 89.7 | |
| DY-ResNet-18 | 42.7M | 1.85G | 72.7 (2.3) | 90.7 (1.0) | |
| ResNet-10 | 5.2M | 0.89G | 63.5 | 85.0 | |
| DY-ResNet-10 | 18.6M | 0.91G | 67.7 (4.2) | 87.6 (2.6) |
- 动态卷积在 MobileNetV2、MobileNetV3 和 ResNet 骨干上始终提升 top-1 精度,额外约 4% FLOPs。
- 在 ImageNet 上,DY-MobileNetV2/0.5 在相似 FLOPs 下达到 69.9% top-1(提升 4.5 点),静态为 65.4%;DY-MobileNetV3-Small 达到 70.3% top-1(提升 2.9 点)。
- 与在相似设置下的 CondConv 相比,DY-CNN 在许多配置中使用更少的每层内核数、并在参数量与 FLOPs 更低的情况下实现更高的准确性。
- 在 COCO 关键点检测中,将 DY-CNN 应用到骨干与头部时,获得显著的 AP 提升,例如 DY-ResNet-18 与 DY-MobileNetV2 相对于静态对应物的增益。
- 两个训练洞见至关重要:(1) 约束注意力之和为一以简化学习;(2) 在早期训练阶段接近均匀的注意力(softmax 高温度)以稳定训练,然后进行退火。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。