Vision-RWKV: Efficient and Scalable Visual Perception with RWKV-Like Architectures
Yuchen Duan, Weiyun Wang, Zhe Chen, Xizhou Zhu, Lewei Lu, Tong Lu, Yu Qiao, Hongsheng Li, Jifeng Dai, Wenhai Wang
TL;DR
This work addresses the high computational cost of Vision Transformers for high-resolution images by introducing Vision-RWKV (VRWKV), a vision encoder with linear-complexity attention inspired by RWKV. It combines a patch-based architecture with a bidirectional, linear-time attention mechanism (Bi-WKV) and a quad-directional token shift (Q-Shift) to expand receptive fields while maintaining scalability and stability. Across ImageNet classification, COCO detection, and ADE20K segmentation, VRWKV matches or exceeds ViT performance at lower or comparable FLOPs and exhibits strong robustness to input resolution and large-scale pretraining. The results suggest VRWKV as an efficient, scalable alternative to ViT for diverse visual perception tasks, particularly at high resolutions, with code released for replication.
Abstract
Transformers have revolutionized computer vision and natural language processing, but their high computational complexity limits their application in high-resolution image processing and long-context analysis. This paper introduces Vision-RWKV (VRWKV), a model adapted from the RWKV model used in the NLP field with necessary modifications for vision tasks. Similar to the Vision Transformer (ViT), our model is designed to efficiently handle sparse inputs and demonstrate robust global processing capabilities, while also scaling up effectively, accommodating both large-scale parameters and extensive datasets. Its distinctive advantage lies in its reduced spatial aggregation complexity, which renders it exceptionally adept at processing high-resolution images seamlessly, eliminating the necessity for windowing operations. Our evaluations demonstrate that VRWKV surpasses ViT's performance in image classification and has significantly faster speeds and lower memory usage processing high-resolution inputs. In dense prediction tasks, it outperforms window-based models, maintaining comparable speeds. These results highlight VRWKV's potential as a more efficient alternative for visual perception tasks. Code is released at https://github.com/OpenGVLab/Vision-RWKV.
