ResNeXt paper review

2 minute read

Aggregated Residual Transformations for Deep Neural Networks

Saining Xie, Kaiming He, et al. “Aggregated Residual Transformations for Deep Neural Networks.” Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.

Abstract

cardinality라는 새로운 기법을 제시하였다.
cardinality를 쓰는 것이 네트워크가 더 깊어지거나 넓어지는 것보다 효과적이다.
ResNet보다 더 좋은 성능을 갖고 있다.

Introduction

initial

VGG와 같이 동일한 모양의 블록을 쌓는 구조를 갖는다.
하이퍼파라미터의 선택이 많아지면 특정 데이터셋에 대한 over adapting이 발생할 수 있다.
인셉션 모듈은 계산 복잡성이 매우 낮다.
이 논문에서는 VGG/ResNet 전략을 사용하고 split-transform-merge 방법을 사용할 것이다.
ResNet 성능을 능가, 정확도는 높이는 것은 상대적으로 쉽지만 복잡성을 유지하면서 정확도를 높이는 방법은 드물다
ResNeXt는 ImageNet에서 ResNet-101 / 152, ResNet200, Inception-v3 및 Inception-ResNet-v2보다 성능이 뛰어나다.
ResNet-200 보다 더 나은 정확도를 달성 할 수 있지만 복잡성은 50 %에 불과하다

Related Work

  • Multi-branch convolutional networks.
  • Grouped convolutions. : 알렉스넷에서 그룹컨브를 사용하지만 성능향상을 위해 사용하지는 않음
  • Compressing convolutional networks
  • Ensembling. : Resnext는 앙상블이 아니다.

Method initial

VGG / ResNet에서 영감을 얻은 두 가지 규칙

  1. 동일한 사이즈의 spacial map을 사용한다면 블록은 하이퍼파라미터를 공유한다.spatial map이 2배 다운샘플링 될 때마다 폭이 2배 늘어난다.
  2. FLOP(계산적 복잡성)이 모든 블록에 대해 거의 동일하다.
    이 두 가지 규칙을 통해 design space를 줄이고 몇가지 핵심 요소에만 집중할 수 있다.
    계산적 복잡도는 multi-add이다.

split-transform-merge방법

initial

  • Splitting : 그림에서 보듯이 x가 x1, x2, … xd순서로 잘린다.
  • Transforming : 저차원인 x1, x2, …xd에 각각 가중치를 곱하여 크기를 변화시킨다.
  • Aggregating : 변환된 저차원들을 합친다.

network-in-network가 아닌 network-in-neuron으로 깊이대신 새로운 차원으로 확장한다.
bottleneck 모양을 구축 : 차원을 줄였다가 늘렸다 할 때 연산시간을 줄이기위해

initial

y= output, x=input, C = cardinality, Ti = arbitrary function

initial

resnet의 FLOPs은 25664 + 336464 + 34256 = 70 k정도
resnext의 일반식은 C * (256
d + 33dd + d256)이다.
따라서 resnet과 resnext의 FLOPs을 비교하였을 때 C= 32일때는 d 는 4가 되어야 70k 정도이다. 이렇게 FLOPs을 유지함으로써 Cardinality의 영향을 집중하게한다.

Implementation details

  • dataset : imagenet
  • input image size : 224*224
  • augmentation : randomly cropped
  • Short cut : ResNet의 방식
  • batch size : 256 on 8 GPU
  • weight decay : 0.0001
  • momentum : 0.9
  • learning late : 0.1
  • Conv block + Batch Normlization + ReLU

Experiments

cardinality = 32, bottle neck width = 4d를 ResNext-50(32x4d)로 간단하게 나타냄

Cadinality vs Width

initial

cardinality가 증가함에 따라 top-1 error가 낮아지고 있음, resnet과 비교해 보았을때도 성능이 좋음

Increasing Cardinality vs Deeper/Wider

initial

우선 resnet에서 깊은 resnet200과 넓은 resnet wider를 비교 : resnet wider가 더 좋음
위 결과에 따라 넓이와 cardinality 비교
ResNeXt101 (2x64d)와 ResNeXt101(64x4d) 비교 :
cardinality가 높은 것이 성능이 더 좋음

마지막 shortcut의 중요성을 보여주는 실험이다

initial

Code Implement

ResNeXt code : https://github.com/cjf8899/Pytorch_ResNeXt

Leave a comment