[논문 리뷰] QuadTree Attention for Vision Transformers
QuadTree Attention은 토큰 피라미드를 구축하고 거친-세밀한 어텐션을 수행함으로써 비전 트랜스포머의 복잡도를 제곱에서 선형으로 줄이고, 특성 매칭, 스테레오, 이미지 분류 및 객체 탐지 전반에서 더 낮은 계산으로 최첨단 성능을 달성한다.
Transformers have been successful in many vision tasks, thanks to their capability of capturing long-range dependency. However, their quadratic computational complexity poses a major obstacle for applying them to vision tasks requiring dense predictions, such as object detection, feature matching, stereo, etc. We introduce QuadTree Attention, which reduces the computational complexity from quadratic to linear. Our quadtree transformer builds token pyramids and computes attention in a coarse-to-fine manner. At each level, the top K patches with the highest attention scores are selected, such that at the next level, attention is only evaluated within the relevant regions corresponding to these top K patches. We demonstrate that quadtree attention achieves state-of-the-art performance in various vision tasks, e.g. with 4.0% improvement in feature matching on ScanNet, about 50% flops reduction in stereo matching, 0.4-1.5% improvement in top-1 accuracy on ImageNet classification, 1.2-1.8% improvement on COCO object detection, and 0.7-2.4% improvement on semantic segmentation over previous state-of-the-art transformers. The codes are available at https://github.com/Tangshitao/QuadtreeAttention.
연구 동기 및 목표
- Dense prediction 태스크를 위한 표준 비전 트랜스포머의 제곱 복잡도 문제를 동기부여하고 해결한다.
- 관련 없는 영역을 건너뛰고 계산을 줄이기 위한 거친-세밀한 쿼드트리 어텐션 메커니ism을 제안한다.
- 하나의 효율적인 프레임워크에서 교차-어텐션과 자신-어텐션을 모두 가능하게 한다.
- 특성 매칭, 스테레오, 이미지 분류 및 객체 탐지에서 최첨단 성능 향상을 입증한다.
제안 방법
- 쿼리, 키, 값의 다운샘플링을 통해 L 수준의 토큰 피라미드를 구성한다.
- 각 레벨에서 상위 K개 패치를 선택해 미세 레벨 어텐션을 해당 영역으로 제한한다.
- 두 가지 아키텍처를 통해 레벨 간 메시지를 축적한다: QuadTree-A(레벨별 메시지의 합)와 QuadTree-B(레벨별 메시지의 가중 합).
- s_ij^l = s_ij^{l-1} t_ij^l 및 2x2 로컬 패치에서 얻은 t_ij^l로 재귀적으로 어텐션 점수를 계산하여 N에서 선형 복잡도를 가능하게 한다.
- 다단계 위치 인코딩(LePE)을 도입하고, 레벨 간 위치 정보를 보존하기 위해 비공유 깊이별 컨볼루션을 사용한다.
실험 결과
연구 질문
- RQ1QuadTree Attention이 Dense 비전 태스크에서 성능 손실 없이 비전 트랜스포머의 제곱 복잡도를 선형으로 감소시킬 수 있는가?
- RQ2거친-세밀한 선택적 어텐션 방식이 교차-및 자신-어텐션 시나리오에서 장거리 의존성을 유지하면서도 효율성을 보장하는가?
- RQ3두 가지 집계 방식(QuadTree-A 및 QuadTree-B)이 정확도와 효율성 측면에서 어떻게 비교되는가?
- RQ4QuadTree Attention이 기존의 효율적 트랜스포머와 비교하여 특징 매칭, 스테레오, 분류 및 탐지 작업에서 최첨단 결과를 얻을 수 있는가?
주요 결과
- QuadTree Attention은 특징 매칭 및 스테레오에서 선형 트랜스포머에 비해 FLOPs와 메모리가 크게 감소하면서 비슷하거나 우월한 성능을 달성한다.
- 특징 매칭(ScanNet)에서 QuadTree-B는 설정에 따라 선형 및 SR 어텐션 변형에 비해 AUC@20를 1.8–4.0포인트 향상시킨다.
- 스테레오에서 QuadTree-B는 일반 STTR에 비해 EPE와 유사한 성능을 보이며 FLOPs는 약 52%, 메모리는 약 63%를 사용한다.
- ImageNet 분류에서 QuadTree-B-b2는 상위 1% 정확도 84.0%를 달성하며 PVTv2 및 Swin Transformer 베이스라인을 상회한다.
- COCO 객체 탐지에서 QuadTree Attention + RetinaNet은 47.9 AP를 달성하여 PVTv2보다 약 1.8포인트 높고 FLOP은 더 적다.
- 시맨틱 세분화는 기존 트랜스포머에 비해 0.7–2.4%의 개선을 보인다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.