Skip to main content
QUICK REVIEW

[Paper Review] Vision-RWKV: Efficient and Scalable Visual Perception with RWKV-Like Architectures

Yuchen Duan, Wei‐Yun Wang|arXiv (Cornell University)|Mar 4, 2024
Advanced Image and Video Retrieval TechniquesComputer Science10 citations
TL;DR

Vision-RWKV adapts RWKV to vision with quad-directional shift and bidirectional linear-attention, achieving lower compute/memory than ViT while maintaining strong performance on classification and dense prediction tasks.

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.

Motivation & Objective

  • Motivate a vision encoder that preserves RWKV’s efficiency for long-range/global information processing while reducing visual task-specific complexity.
  • Adapt RWKV to handle high-resolution images without window-based attention.
  • Ensure stable large-scale training via relative positional bias, layer scale, and extra normalization.
  • Demonstrate competitive performance across classification, detection, and segmentation with lower computational costs.

Proposed method

  • Introduce Q-Shift for quad-directional token shifting to expand receptive field in 2D images.
  • Replace causal RWKV attention with bidirectional global attention to achieve linear complexity in a vision setting.
  • Modify attention with relative bias and flexible decay to maintain stability during scaling.
  • Incorporate layer scale and extra layer normalization to stabilize outputs across depths and resolutions.
  • Develop VRWKV variants (Tiny to Large) with fixed architectural blocks and patch-based tokenization.
  • Show MAE-based pre-training compatibility and fine-tuning on downstream tasks.

Experimental results

Research questions

  • RQ1Can Vision-RWKV match or exceed ViT performance on image classification with linear-complexity attention?
  • RQ2Does VRWKV maintain efficiency (FLOPs, memory, speed) at high input resolutions compared to windowed or global ViTs?
  • RQ3Are VRWKV backbones competitive on dense prediction tasks (detection/segmentation) with lower computational cost?
  • RQ4Can VRWKV leverage MAE pre-training for further gains in classification accuracy?

Key findings

  • VRWKV-T achieves 75.1% top-1 accuracy on ImageNet-1K at 224^2 with 6.2M parameters and 1.2G FLOPs, outperforming DeiT-T by 2.9 points.
  • VRWKV-L (384^2) reaches 86.0% top-1 on ImageNet-1K (pre-trained on ImageNet-22K) with 334.9M parameters and 189.5G FLOPs, surpassing ViT-L in accuracy.
  • On COCO object detection, VRWKV-L yields 50.6
  • AP^b
  • and 44.9
  • AP^m
  • (better than ViT-L) with lower backbone FLOPs.
  • VRWKV-S (224^2) achieves competitive detection/segmentation results with notably lower FLOPs than ViT-S.
  • In semantic segmentation (ADE20K), VRWKV backbones outperform ViT with global attention while reducing backbone FLOPs (e.g., VRWKV-S at 512^2 delivers higher mIoU with fewer FLOPs).
  • MAE pre-training with bidirectional shift yields additional small gains (e.g., VRWKV-L from 86.0 to 86.2 on ImageNet-1K).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.