(이전의 depth adaptive network에 대한 문제점 지적)
(이전의 depth adaptive network의 아쉬운 점을 개선한 연구를 간략하게 소개)
(관련 연구 1, 문제점 지적)
(관련 연구 2, 문제점 지적)
(이 논문의 아이디어 제시)
우리는 CNNs과 transformers와 같은
다양한 network에 적용 가능한 adaptive depth networks의 training method를 소개.
제안된 adaptive depth networks에서는,
every residual stage는 2개의 sub-paths로 나뉘어 지고,
그들은 서로 다른 properties로 train되어진다.
training 동안에,
second sub-paths의 이러한 속성이 skip-aware self-distillation
(skip 의식적인 자가 증류)를 통해 이루어지고,
이는 Figure 1-(a)에 표시된 것처럼 only one smallest sub-network,
즉 base-net만 jointly trained되어진다.
(self distillation에 대한 짧은 이해 : https://www.youtube.com/watch?v=x74pey3rv14)
이 skip-aware self-distillation은
각 개별 sub-networks의 명시적인 training이 필요하지 않아
이전 adaptive network보다 훨씬 짧은 training time을 갖게 된다.
하지만, 한 번 trained되어진 후에는
device의 resource 조건을 충족하기 위해 single model로부터 즉시 다양한 depth의 subnet를 선택할 수 있다. (Figure 1-(b) 참조)
게다가,
Figure 1-(c)에서 볼 수 있듯이,
이러한 다양한 depths의 sub-networks들은 regularization effect로 인해
개별적으로 trained된 non-adaptive networks보다 우수한 성능을 보인다.
Section 3에서,
더 자세한 architectural parttern and training algorithm을 소개할 것이고,
skip-aware self-distillation을 사용하여 선택된 sub-paths가
input features의 level을 최소한으로 변경하면서
prediction error를 줄이도록 optimized되었음을 formally하게 보여줄 것이다.
Section 4에서,
우리는 CNN 및 vision transformers에서 우리의 adaptive depth networks가
대응하는 개별 network를 능가하며 실제 inference acceleration and energy-saving을 달성한다는 것을 실험적으로 증명할 것이다.
(skip)
(skip)
일반적으로 ResNets과 Swin transformers와 같은 hierarchical residual networks에서,
-th residual stage는 개의 동일한 residual blocks로 이루어져 있다.
그리고 그 -th residual stage는 다음과 같이
input features 를 transform하여 output feature 를 생성한다.
residual function 은 traditional compositional networks와 마찬가지로
hierarchical features를 학습한다.
이전 문헌(Jastrzebski et al., 2018; Greff et al., 2016)에 따르면,
residual function은 같은 feature level에 있는 이미 학습된 features들을
세밀하게 조정하는 기능을 학습하는 경향이 있다고 한다.
만약 residual block이 대부분의 경우 input features의 수준을 변경하지 않으면서도
feature를 세밀하게 조정한다면,
test time에 block을 drop해도 residual network의 성능에는 큰 영향을 미치지 않는다.
그러나 일반적인 residual networks에서는 대부분의 residual block이
새로운 level의 feature를 학습하면서도 feature를 세밀하게 조정하기 때문에,
test time에 임의로 residual block을 삭제하면 performance가 매우 크게 떨어진다.
따라서 우리는 몇개의 selected residual blocks이
feature refinement에 더 집중하도록 명시적으로 training 중에 격려된다면,
이러한 block들은 test time에 computation을 절약하기 위해 skip할 수 있으며,
prediction accuracy의 손실도 미미해질 것이라는 가설을 세웠다.
이를 위해,
우리는 adaptive depth networks를 위한 architectural pattern을 제안한다.
이 pattern에서 각 residual stage는 Equation 1과 Figure 2.에 나와 있는 것처럼
두 개의 연속적인 sub-paths 또는 와 로 나뉘어진다.
Algorithm 1은
skip-aware self-distillation
라고 불리는
우리의 training method를 보여주는데,
여기서 Equation 2가 loss function에 포함되어 있으며,
의 largest sub-networks(=super-net)와 smallest sub-networks(=base-net)가
jointly(함께) trained되어진다.
Algorithm 1에서,
제안된 adaptive depth networks인 은 'skip'이라는 추가의 argument를 받는데,
이는 그들의 skippable sub-paths가 skipped되어지는 residual stage를 제어한다.
예를 들어,
에 4개의 residual stages가 있다면,
'skip=[True, True, True, True]'을 전달하여 base-net가 선택되어진다.
(내 이해가 맞다면, 'skip=[False, False, False, False]'를 전달하면 super-net이 되는 것)
* 을 training하기 위해서 2개의 sub-networks만이 관련되며,
총 훈련 시간은 두 개의 sub networks를 개별적으로 훈련하는 것보다 크지 않음.
test time에는 residual stage에서 sub-paths를 systemical하게 skipping하여
다양한 depth의 sub-networks를 실시간으로 선택할 수 있다.
예를 들어, 4개의 residual stage를 가진 network의 경우,
skip argument를 통해 개의 parameter-sharing sub-networks를 만들 수 있다.
(True or False 경우의 수가 4개의 residual stage에 있으니)
원래,
BN은 non-adaptive networks에서 features를 normalizing하여
training 동안에 internal covariate shift를 다루기 위해 제안되었다.
하지만 our adaptive depth networks에서는,
inference 중에 서로 다른 sub-networks가 선택될 경우,
mandatory sub-paths에서 internal covariate shift가 발생할 수 있다.
potential internal covariate shifts를 처리하기 위해서,
mandatory sub-paths에는 skip-aware BNs
이라고 불리는
switchable BN operators가 사용된다.
이전의 adaptive network는 parameter-sharing sub-network를 지원하기 위해
모든 layer에 대한 sets of switchable BNs이 필요했다.
our adaptive depth network는 지원되는 sub-network의 수에 관계 없이
2개의 switchable BNs만 있으면 된다.
Transformer에서는 BN 대신에 Layer Normalization(LN)을 사용함.
그래서 switchable BNs 대신에 switchable LN operator를 적용.