Paper Reading: SENet

目录

Introduction(Sec 1)

  1. 形式:SE block, a novel architectural unit
  2. 目的:提升模型的表达能力
  3. 方式:实现动态的channel层面的特征recalibration(重新校准)
  4. 动机:
    1. 传统的方法:卷积操作把channel-wise和spacial的information一起提取到local receptive fields里
    2. 一些增强空间编码的方式可以增强模型的表达能力,如某些嵌入式的学习机制可以捕获空间相关性(spatial correlation)like inception,类似的,SE通过对通道之间的相互依存关系显示建模来重新校准channel-wise feature
  5. 引起关注的原因:
    1. 1st place of ILSVRC 2017 classification contest (Top-5 err = 2.251%)
  6. 优点:
    1. Generalization: SENet是SE Bloaks的堆叠的结构,在不同数据集上、不同task上(分类/OD)表现很好
    2. Drop-In Replacement: SE Block可以直接嵌入到不同的state of art框架中来提升性能(residual or non-residual)
    3. Improvement in Performance: SENet对state of art的深度学习框架的性能有显著提升
    4. Light-Weighted: 同时SENet的额外计算开销很小
    5. Simple-Design: new CNN architecture的设计都十分复杂:需要更多的超参数 & layer的config(e.g. Inception)。然而SE的设计简单。
    6. Greater Representation Power: 模型的表达能力更强
    7. Easy learning process: 使用gloable information来推断channel之间的非线性关系can ease the learning process.
  7. 意义:
    1. (hopefully)对其他有提取strong discriminative features需求的task有帮助
    2. (hopefully)SE blocks对相关领域(如network pruning for compressions)有帮助

相关工作(Sec 2)

  1. 开发 Deep Architecture
    1. 系列1:增加深度
      1. VGGNet: benefit from depth
      2. BN: 通过正则化layer的input来优化gradient propagation. 让学习过程更加稳定
      3. ResNet: 通过identity-based skip connections来充分学习更深的网络结构
      4. Highway networks: use gating mechanism to regulate shortcut connections.
    2. 系列2:着重于modular components
      1. Grouped convolutions 可以增加基数(# filters).
      2. Eg. Muti-branch conv, 让每一层操作的组成成分更加灵活
      3. Cross-channel correlations
        1. 对于空间结构独立
        2. 通过1*1 conv 合并
      4. 系列2的目的:reduction of model, save computational cost
      5. 推论:channel之间的关系可以变为与实例无关的公式,只通过 local receptive fields 相关
  2. Attention and Gating Mechanisms
    1. Attention are usually followed by a gating function(e.g. sigmoid or soft-max) and sequential techniques(e.g. LSTM).
    2. Wang et al. introduce a powerful trunk-and-mask attention mechanism
      1. 这样的Unit应用在中间阶段
      2. SE更加lightweight
      3. SE可以贯穿整个网络

SE block(Sec 3)

  1. 原理
    1. 着重于模型设计中channel之间的关系
    2. SE通过对通道之间的相互依存关系显示建模来重新校准channel-wise feature,以此来选择性强调information features、抑制less useful ones.
    3. 提升了模型的表达能力
  2. 出发点 & 目的:
    1. 每个卷积操作只能学习到局部的receptive field,而不能学习到该区域以外的上下文信息
    1. SE block 让network对informative feature更加敏感,并且抑制没用的feature
  3. 基本结构

    1. Input: Feature map U (H*W*C)
    2. squeeze:
      1. Input: Feature map U (H*W*C)
      2. Method: global average pooling
      3. Output: produce a channel descriptor. (1*C)
    3. excitation: Adaptive Recalibration
      1. 作用:完全捕获channel间的依赖关系
      2. 要求:
        1. flexible: 学习到 non-linear 的依赖关系
        2. 学习到非互斥的依赖关系(0,1,2)
      3. Method:simple gating mechanism with sigmoid func: (W1 demention-reduction [C/r, C]; W2 demention-increasing [C, C/r])
      4. 结构1:sample-specific activations(ReLU)
      5. 结构2:self gating mechanism (sigmoid)
      6. sub-output: (1*C) weight of each channel
    4. Output: re-weighted feature map U
  4. 特征:
    1. lower layer使用SE对于不同类别无大差别 - bolstering the quality of the shared lower level representation。
    2. higher layer使用SE对于不同类别有很大差别
    3. highest layer使用SE会产生相似的channel权重分布  - 可以去掉来换取更少的computational cost (See Sec 6.4)
  5. 模型举例:SE-Inception & SE-ResNet
    1. SE-Inception(Fig 2)
      1. Ftr = Inception layer
      2. 在Inception之间增加SE
    2. SE-ResNet((Fig 3)
      1. Ftr应用在 non-identity branch上
      2. 在合并到 identity branch (skip操作) 之前进行 squeeze and excitation

时间复杂度(Sec 4)

  1. 模型对比:
    1. GPU:
      1. Training time: ResNet-50: 150 ms; SE-ResNet-50: 209 ms (for a single pass forwards and backwards) mini-batch = 256
      2. 时间更慢的原因:global pooling & small inner-product operations 没有在GPU中被充分优化
    2. CPU:
      1. Inference time: Res-50: 164 ms, SE-Res-50: 167 ms (224*224 input)
      2. 虽然有小的计算能耗的增长,但是模型的performance更好了
    3. (why training & testing in GPU vs CPU?)
  2. 计算过程 (Eq. 5)

Implementation(Sec 5)

  1. Training阶段的参数:
    1. 随机裁剪224*224(or 299*299 for Inception-ResNet-v2)
    2. mini-batch sampling strategy: data balancing
    3. 同步SGD (v1用了易步SGD)
    4. momentum = 0.9
    5. mini-batch size =1024
    6. base-lr = 0.6
    7. ls /= 10 for each 30 epochs
    8. r = 16 (见 Sec 6.4 Table 7)
  2. 在Inf阶段:
    1. single crop in testing - centre crop evaluation
    2. 首先resize到短边对应256(352)再裁剪中间的224*224 (299*299 for Inception-ResNet-v2) pixels

实验(Sec 6)

  1. ImageNet Classification
    1. About Dataset:: ImageNet 2012

1.28m 50k 1k Top-5 Error
网络深度递增的性能分析:

    1. 在不同的深度的ResNet中嵌入SE blocks可以持续提升模型性能(both Top-1 & Top-5)
    • GFLOPs只有小幅度的提升
    • Single model的SE-ResNet-50比ResNet-50在Top-5 Error上提升了0.8c6,接近于ResNet-101(GFLOPs只提升了一倍)
    • SE-ResNet-101比ResNet-152性能还要好(6.07% vs 6.34% Top-5 err)
    • 在更深的模型上添加SE block: 收益递减,性能递增
不同模型的性能对比
  1. ResNet vs SE-ResNet

      Original SENet
    Model Top-5 Err GFLOPs Top-5 Err GFLOPs
    ResNet-50 7.48 3.86 6.62 3.87
    ResNet-101 6.52 7.58 6.07 7.60
    ResNet-152 6.34 11.30 5.73 11.32
    1. Single model的SE-ResNet-50比ResNet-50在Top-5 Error上提升了0.86,接近于ResNet-101(GFLOPs只提升了一倍)
    2. SE-ResNet-101比ResNet-152性能还要好(6.07% vs 6.34% Top-5 err) 而且GFLOPs更小

  • ResNeXt vs SE-ResNeXt

ResNetXt-50 5.49% 4.24
ResNetXt-101 5.90% 7.99
SE-ResNetXt-50 5.57% 4.25

比101准确率更高且computational overhead节省了将近50%

Inception-ResNet-v2 vs SE-Inception-v2

    • Inception-ResNet-v2 5.21 11.75
      SE-Inception-ResNet-v2 4.79 11.76

      存在问题:Input image size might be larger (299 resized to 352), Inception-v2没有指明自己的input size. 所以性能的提升的可信度较低


    • Non-Residual Models

        Original SENet
      Model Top-5 Err GFLOPs Top-5 Err GFLOPs
      VGG-16 8.81 15.47 7.70 15.48
      BN-Inception 7.89 2.03 7.14 2.04

      备注:VGG-16和SE implementation都用了batch-norm after each conv layer.


    • Representative efficient architecture: MobileNet & ShuffleNet

        Original SENet
      Model Top-5 Err MFLOPs Top-5 Err MFLOPs
      MobileNet 10.1 569 7.9 572
      ShuffleNet 13.6 140 11.7 142

      只有轻微的computational overhead提升,但是在Top-5 Err上有大幅度下降

    • 模型对比结论:
      • 结论1:SE blocks可以和广泛的architecture结合并达到性能的提升
      • 结论2:可以适用both residual & non-residual foundation

  1. 1st price in ILSRVRC 2017 Classification Competition
    1. Result:

    2. 2.25 Top-5 (1st price)
    3. 更大分辨率结果更好
    4. 在Inf阶段:
      1. single crop in testing - centre crop evaluation
      2. 首先resize到短边对应256(352)再裁剪中间的224*224(299*299)pixels

Scene Classification
  1. Dataset:

  1. 8 m 36500 365
  2. 考验模型generalization和处理抽象的能力:
    1. 需要捕获更加复杂的数据关联性
    2. 需要对更高的appearance variation更加robust
  3. Result
  4. Use ResNet-152 as baseline. SE-ResNet-152 Surpass state of art

Object Detection on COCO
  1. Dataset

    1. 80k 40k 80
    2. Faster R-CNN + SE-ResNet-50/101
    3. [email protected] = 49.2% 时对101更加benificial(0.5% improvement), 对比 SSD512 [email protected] = 46.5%

  1. Analysis and Interpretation
    1. Reduction ration (r)
      1. 实验网络:SE-ResNet-50
      2. 性能分析:
        1. r越大,capacity越小,param数量越少,但是性能没有单调递减(err没有单调递增)
        2. 可能是更大的capacity过拟合了channel的相互依存关系
      3. 选择r = 16作为computational cost和top-5 err的trade off (for all exps)


    2. Excitation在不同layer的作用(Fig5: 6张图, 4个stage)
      1. lower layer features are typically more general (不同class相似)
      2. higher layer features have greater specificity (class分化)
      3. Last Stage:
        1. SE_5_2(last stage block 2)趋向于饱和状态:大多数channel的activation -> 1, 极小部分 -> 0
        2. 如果所有的activation都==1,则跟标准resnet一样
        3. 最后一个blck SE_5_3 不同class的pattern相似!只是scale不同
        4. 说明SE_5_2, SE_5_3不那么重要,可以去掉(牺牲很小的performance)来节省很大的computation cost.

问题

  1. GFLOPs不是越大越好,而是require的越大速度越慢。为什么这样衡量?
  2. VGG-16和SE implementation都用了batch-norm after each conv layer. 可以这样对比嘛?
  3. 对比Crop方法
  4. 同步和异步SGD对GFLOPs有影响吗?
  5. 这些classification/OD模型的性能对比
  6. highest layer使用SE会产生相似的channel权重分布
  7. Easy learning process: 使用gloable information来推断channel之间的非线性关系can ease the learning process. >> how?
  8. why training & testing in GPU vs CPU?

参考

  1. Paper link: https://arxiv.org/pdf/1709.01507.pdf

猜你喜欢

转载自blog.csdn.net/weixin_42148236/article/details/80708372