[논문 리뷰] Fast Vision Transformers with HiLo Attention
논문은 HiLo 어텐션을 사용하는 빠른 Vision Transformer 백본인 LITv2를 도입하여 고주파 로컬 패턴과 저주파 글로벌 상호작용을 위해 고주파와 저주파 패턴의 분리를 수행하고, 처리량을 더 빠르게 달성하면서 다양한 태스크에서 경쟁력 있는 정확도를 보인다.
Vision Transformers (ViTs) have triggered the most recent and significant breakthroughs in computer vision. Their efficient designs are mostly guided by the indirect metric of computational complexity, i.e., FLOPs, which however has a clear gap with the direct metric such as throughput. Thus, we propose to use the direct speed evaluation on the target platform as the design principle for efficient ViTs. Particularly, we introduce LITv2, a simple and effective ViT which performs favourably against the existing state-of-the-art methods across a spectrum of different model sizes with faster speed. At the core of LITv2 is a novel self-attention mechanism, which we dub HiLo. HiLo is inspired by the insight that high frequencies in an image capture local fine details and low frequencies focus on global structures, whereas a multi-head self-attention layer neglects the characteristic of different frequencies. Therefore, we propose to disentangle the high/low frequency patterns in an attention layer by separating the heads into two groups, where one group encodes high frequencies via self-attention within each local window, and another group encodes low frequencies by performing global attention between the average-pooled low-frequency keys and values from each window and each query position in the input feature map. Benefiting from the efficient design for both groups, we show that HiLo is superior to the existing attention mechanisms by comprehensively benchmarking FLOPs, speed and memory consumption on GPUs and CPUs. For example, HiLo is 1.4x faster than spatial reduction attention and 1.6x faster than local window attention on CPUs. Powered by HiLo, LITv2 serves as a strong backbone for mainstream vision tasks including image classification, dense detection and segmentation. Code is available at https://github.com/ziplab/LITv2.
연구 동기 및 목표
- ViT의 평가를 FLOPs뿐만 아니라 대상 하드웨어에서의 직접 속도 측정으로 촉진한다.
- 고주파 로컬 디테일과 저주파 글로벌 구조를 각각 모델링하기 위해 HiLo 어텐션을 제안한다.
- HiLo 기반 LITv2가 ImageNet, COCO, ADE20K에서 더 빠른 처리량과 경쟁력 있는 정확도를 달성함을 보인다.
- 최신 ViT 및 일부 CNN 대비 메모리 사용량과 효율성 이점을 감소시키는 것을 시도한다.
제안 방법
- HiLo 어텐션을 도입하여 어텐션 헤드를 고주파(Hi-Fi)와 저주파(Lo-Fi) 그룹으로 분할한다.
- Hi-Fi는 고해상도 맵에서 로컬 윈도우 자기-어텐션을 사용한다(예: 2x2 윈도우).
- Lo-Fi는 각 윈도우에 평균 풀링을 적용하여 저주파 신호를 얻고, 이 풀링된 신호에서 다운샘플링된 키/밸류로 어텐션을 수행한다.
- α 비율로 헤드를 분리하고 (1−α)Nh를 Hi-Fi에, αNh를 Lo-Fi에 할당한 뒤 출력을 연결(concatenate)한다.
- 고정된 상대 위치 인코딩을 대체하여 FFN에 깊이wise 3x3 컨볼루션으로 위치 정보를 주입하고 수용 영역을 확장한다.
- 세 가지 모델 크기(S/M/B)에서 LITv2에 HiLo를 채택하고 ImageNet-1K에서 학습하며 다운스트림 태스크에서 평가한다.
실험 결과
연구 질문
- RQ1HiLo 어텐션이 표준 MSAs 및 다른 효율적 어텐션에 비해 경쟁력 있는 정확도를 유지하면서 속도 향상을 제공할 수 있는가?
- RQ2HiLo의 고주파/저주파 분리가 고해상도 및 밀도 예측 태스크에서 성능에 어떤 영향을 미치는가?
- RQ3구조적 변화(예: 컨볼루션 FFN, RPE 제거)가 비전 태스크의 속도와 정확도를 추가로 향상시키는가?
- RQ4다양한 워크로드 및 해상도에 대해 최적의 헤드 분할 α 및 윈도우 크기 s는 무엇인가?
- RQ5HiLo 기반 백본이 SoTA ViTs에 비해 다운스트림 탐지/세분화 태스크에서 처리량과 메모리 사용량을 개선하는가?
주요 결과
- HiLo가 포함된 LITv2가 FLOPs를 줄이고 처리량을 더 빠르게 달성하면서 Top-1 정확도에서 LITv1을 능가한다.
- HiLo는 GPU에서 측정 시 ImageNet-1K에 대해 LITv1 대비 추론 속도 13%(S), 27%(M), 36%(B) 향상을 보인다.
- 유사한 FLOPs에서 LITv2-S는 ImageNet-1K에서 PVT-S 및 Twins-PCPVT-S보다 더 빠른 처리량을 달성한다.
- COCO 객체 탐지/인스턴스 세분화에서 LITv2 백본은 ResNet 백본보다 더 높은 AP를 제공하며 SoTA ViTs에 비해 경쟁력 있거나 우수한 결과를 보이고 FPS 및 FLOPs도 우수하다.
- ADE20K 의미론적 분할에서 LITv2 변형은 mIoU 및 FPS가 여러 기초선보다 높아 Swin-Ti/Swin-S/Swin-B를 mIoU에서 능가하고 FPS가 증가한다.
- HiLo는 일관되게 FLOPs를 감소시키고 속도를 향상시키며 SRA, W-MSA, T-MSA 등 다른 효율적 어텐션 메커니즘보다 ImageNet-1K 및 다운스트림 태스크에서 우수한 속도를 제공한다.
더 나은 연구,지금 바로 시작하세요
논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.