ViT는 CV task에서 빠르게 발전하며 다양한 benchmarks에서 promising results를 보여주고 있다.
하지만 ViT-based models은 매우 많은 parameters와 attention mechanism과 같은 model deisgn으로 인해, 일반적으로 lightweight CNNs보다 훨씬 느리게 동작한다.
따라서 ViT를 mobile devices와 같은 resource-constrained HW에서 real-time applications에 deploy하는 것은 특히 challenging하다.
최근에는 ViT의 computation comlexity를 줄이기 위해 NAS 또는 MobileNet block을 결합한 hybrid design 등의 시도가 이어지고 있지만, inference speed는 여전히 unsatisfactory이다.
이로 인해 an important question이 제기된다: can transformers run as fast
as MobileNet while obtaining high performance?
이를 탐구하기 위해, 본 연구에서는 먼저 ViT-based model에서 사용되는 network architecture and operators를 재검토하고, inefficient designs을 식별한다.
그 다음, MobileNet blocks 없는 a dimension-consistent pure transformer를 제안한다.
마지막으로, latency-driven slimming을 수행하여 EfficientFormer라는 a series of final models을 완성한다.
Extensive experiments는 EfficientFormer가 mobile devices에서 performance and speed에서 superiority를 보여준다.
Our fastest model, EfficientFormer-L1은 ImageNet-1K에서 Top-1 acc 79.2% 달성하며,
iPhone 12 (compiled with CoreML)에서 1.6ms inference latency로 실행된다.
이는 MobileNetV2 ×1.4 (1.6ms, 74.7% top-1)와 동일한 속도이다.
결론적으로, 이 연구는 적절히 설계된 transformer가
mobile devices에서도 high performance를 유지하면서 extremely low latency를 달성할 수 있다는 것을 입증한다.
(배경)
(ViT-based model의 한계점)
(기존 연구)
the latency of transformers를 경감하기 위해, 많은 방법들이 제안되어 왔다.
예를 들어, some efforts는 linear layers를 CONV로 바꾸거나,
self-attention을 MobileNet block과 결합하거나,
sparse attention을 도입하는 방식으로 연산 비용을 줄이려는 시도를 하고 있다.
또 다른 접근법으로는, NAS나 pruning을 통해 efficiency를 높이려는 방법도 있다.
이처럼 기존 연구들은 computation-performance trade-off를 개선해왔지만,
transformer models의 applicability (실용성)에 관련된 fundamental question은 여전히 답을 얻지 못하고 있다: Can powerful vision transformers run at MobileNet speed and become a default option for edge applications?
본 연구는 이에 대한 해답을 찾기 위해 다음의 contributions을 제시한다:
EfficientFormer는 image detection and segmentation의 backbone으로도 사용해서 superior performance를 보인다.
(skip)
Observation 1
: Patch embedding with large kernel and stride is a speed bottleneck on mobile devices.Observation 2
: Consistent feature dimension is important for the choice of token mixer. MHSA isObservation 3
: CONV-BN is more latency-favorable than LN (GN)-Linear and the accuracy drawback is generally acceptable.Observation 4
: The latency of nonlinearity is hardware and compiler dependent.skip
