Wave-ViT: Unifying Wavelet and Transformers for Visual Representation Learning

Ting Yao, Yingwei Pan, Yehao Li, Chong-Wah Ngo, Tao Mei

Vision Transformers (ViTs) have revolutionized computer vision, yet they face a fundamental challenge: the quadratic computational complexity of self-attention relative to input resolution. To mitigate this, standard hierarchical ViTs employ down-sampling techniques like pooling or strided convolutions to reduce token counts. However, these operations are inherently lossy, discarding high-frequency textures and fine-grained details essential for dense prediction tasks like object detection and segmentation.

Wave-ViT addresses this bottleneck by introducing a novel Wavelets block. This architecture replaces traditional down-sampling with invertible Discrete Wavelet Transforms (DWT), enabling a reduction in computational complexity while preserving critical image details.

The Wavelets Block: Lossless Down-sampling

The core innovation of Wave-ViT is the integration of wavelet theory into the Transformer framework. Traditional pooling "blurs" an image to reduce its size, effectively throwing away high-frequency information. In contrast, the Wavelets block utilizes a three-step process to manage keys and values in the attention mechanism:

  1. Discrete Wavelet Transform (DWT): The input signal is decomposed into four frequency subbands: one low-frequency (LL) and three high-frequency (LH, HL, HH). Because DWT is mathematically invertible, this process reorganizes information into a lower spatial resolution without information loss.
  2. Local Contextualization: These subbands are concatenated and processed through a $3 \times 3$ convolution. This step introduces spatial locality and allows the model to learn the relationships between different frequency components.
  3. Inverse DWT (IDWT): Following self-attention, the model employs IDWT to reconstruct high-resolution feature maps. This "DWT-Convolution-IDWT" sequence effectively expands the receptive field and aggregates local context without the massive FLOP increase associated with dense attention.

Experimental Evaluation

Wave-ViT was evaluated against industry-standard benchmarks, demonstrating superior performance-to-parameter ratios across three major tasks:

  • Image Classification (ImageNet-1K): Wave-ViT-L achieved a top-1 accuracy of 85.5%, outperforming the Pyramid Vision Transformer (PVT) by 1.7% under comparable settings.
  • Object Detection (MS COCO): The model showed significant efficiency gains. Wave-ViT-B outperformed PVT by 1.3% mAP while utilizing approximately 25.9% fewer parameters.
  • Semantic Segmentation (ADE20K): On pixel-level labeling tasks, Wave-ViT-S reached 49.6% mIoU, a notable jump over competitors like Swin-T (45.8%) and Twins-SVT-S (47.1%).

Key Insights and Robustness

The success of Wave-ViT stems from its treatment of images as signals rather than just collections of pixels. By maintaining invertibility through DWT, the self-attention mechanism can interact with fine-grained textures even at reduced resolutions. Furthermore, visualization via Score-CAM indicates that Wave-ViT focuses more accurately on semantically relevant objects compared to other multi-scale ViTs, suggesting higher robustness and better feature representation.

Limitations and Future Work

Despite its empirical success, Wave-ViT faces practical hurdles. Wavelet transforms are mathematically efficient but currently lack the highly specialized hardware kernel optimizations that standard pooling operations enjoy on modern GPUs. Additionally, the DWT-Conv-IDWT pipeline is more complex to implement and tune than standard down-sampling. Future research may focus on optimizing these operations for real-time deployment and scaling the architecture to ultra-high-resolution video data, where the quadratic savings of wavelet-based attention would be most pronounced.

Summary updated

BibTeX
@inproceedings{yao2022wave,
  author = {Ting Yao and Yingwei Pan and Yehao Li and Chong-Wah Ngo and Tao Mei},
  title = {{Wave-ViT: Unifying Wavelet and Transformers for Visual Representation Learning}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19806-9\_19},
}
Figure