[논문 리뷰] M$^3$ViT: Mixture-of-Experts Vision Transformer for Efficient Multi-task Learning with Model-Accelerator Co-design
M3ViT는 효율적인 다중 작업 학습을 위해 비전 트랜스포머에 Mixture-of-Experts 계층을 통합하고, 학습 및 추론 중 태스크별 희소 라우팅을 가능하게 하며, 메모리 및 에너지 효율적인 온-디바이스 배치를 위한 FPGA 기반 하드웨어 공동 설계를 제공합니다.
Multi-task learning (MTL) encapsulates multiple learned tasks in a single model and often lets those tasks learn better jointly. However, when deploying MTL onto those real-world systems that are often resource-constrained or latency-sensitive, two prominent challenges arise: (i) during training, simultaneously optimizing all tasks is often difficult due to gradient conflicts across tasks; (ii) at inference, current MTL regimes have to activate nearly the entire model even to just execute a single task. Yet most real systems demand only one or two tasks at each moment, and switch between tasks as needed: therefore such all tasks activated inference is also highly inefficient and non-scalable. In this paper, we present a model-accelerator co-design framework to enable efficient on-device MTL. Our framework, dubbed M$^3$ViT, customizes mixture-of-experts (MoE) layers into a vision transformer (ViT) backbone for MTL, and sparsely activates task-specific experts during training. Then at inference with any task of interest, the same design allows for activating only the task-corresponding sparse expert pathway, instead of the full model. Our new model design is further enhanced by hardware-level innovations, in particular, a novel computation reordering scheme tailored for memory-constrained MTL that achieves zero-overhead switching between tasks and can scale to any number of experts. When executing single-task inference, M$^{3}$ViT achieves higher accuracies than encoder-focused MTL methods, while significantly reducing 88% inference FLOPs. When implemented on a hardware platform of one Xilinx ZCU104 FPGA, our co-design framework reduces the memory requirement by 2.4 times, while achieving energy efficiency up to 9.23 times higher than a comparable FPGA baseline. Code is available at: https://github.com/VITA-Group/M3ViT.
연구 동기 및 목표
- 앞선 모델에서의 다중 작업 학습 내 학습 그라디언트 충돌 해결.
- 희소하게 활성화된 태스크별 전문가를 통해 한 태스크 단위 추론의 효율성 확보.
- 에지 디바이스에서 메모리와 에너지 비용을 최소화하도록 하드웨어 인식 MoE-ViT 설계 개발.
제안 방법
- ViT의 Dense MLP를 희소하게 활성화된 Mixture-of-Experts 계층으로 대체.
- 입력 토큰마다 부분적인 전문가를 선택하는 태스크 의존 라우터 사용.
- MTL 라우팅을 위한 태스크 조건부 및 다중 게이트 MoE 변형 도입.
- FPGA에서의 메모리 효율적 계산 재배치를 적용하여 전문가별 처리 가능하게 함.
- 하드웨어 설계로 제로 오버헤드 태스크 전환 시연.
실험 결과
연구 질문
- RQ1MoE 레이어가 다중 작업 학습에서 Dense 비전 트랜스포머의 교차 작업 그라디언트 충돌을 완화할 수 있는가?
- RQ2태스크별 희소 라우팅이 정확도를 해치지 않으면서 단일 태스크 추론의 효율성을 향상시키는가?
- RQ3하드웨어 공동 설계(메모리 인식 계산)가 FPGA에서 다수의 전문가와 태스크에 대해 MoE를 확장할 수 있는가?
- RQ4표준 Dense-예측 벤치마크에서 M3ViT와 인코더 중심 MTl 모델 간의 정확도, FLOPs, 메모리, 에너지의 상대적 향상은 무엇인가?
주요 결과
- M3ViT는 평가된 태스크에서 인코더 중심의 MTl 방법보다 더 높은 정확도를 달성한다.
- M3ViT를 이용한 단일 태스크 추론이 추론 FLOPs를 88% 감소시킨다.
- FPGA에서 메모리 사용량이 2.40× 감소하고 에너지 효율은 FPGA 기준선 대비 최대 9.23×, GPU 기준선 대비 최대 10.79× 향상된다.
- MoE 기반 변형(싱글, 멀티, 태스크 조건부)은 태스크 수가 증가함에 따라 특히 MTl 성능을 향상시키는 태스크 의존 MoE 설계를 보여준다.
- 하드웨어 인식 계산 재배치는 제로 오버헤드 태스크/프레임 전환을 가능하게 하며 전문가 수에 관계없이 확장된다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.