NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Doubly-Fused ViT: Fuse Information from Vision Transformer Doubly with Local Representation

Li Gao, Dong Nie, Bo Li, Xiaofeng Ren

Introduction

Computer vision currently faces a fundamental trade-off between two dominant architectural paradigms: Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs). CNNs are highly efficient at capturing local textures through limited receptive fields, while ViTs excel at modeling long-range global dependencies via self-attention mechanisms. However, ViTs suffer from quadratic computational complexity relative to image resolution and often lose fine-grained spatial details due to coarse patch-based processing.

This paper introduces Doubly-Fused ViT (DFvT), a hybrid backbone designed to achieve the "best of both worlds." By strategically fusing global reasoning with local efficiency at multiple stages, DFvT maintains high accuracy while significantly improving throughput compared to standard ViTs and classic CNNs.

Methodology: The Double Fusion Strategy

The core innovation of DFvT is its "Double Fusion" architecture, which optimizes the interaction between global context and local spatial details through three primary components:

  1. Context Module (CM): To reduce computational overhead, downsampling is performed before the self-attention operation. This allows the model to process global context on lower-resolution feature maps. To mitigate information loss during downsampling, a Pre-SA Fusion mechanism combines max-pooled features with convolved features, providing translation and rotation invariance.
  2. Spatial Module (SM): Operating in parallel to the CM, the SM utilizes lightweight separable convolutions at the original resolution. This path preserves high-frequency details like edges and textures that are typically lost in downsampled transformer blocks.
  3. Dual AtteNtion Enhancement (DANE): This serves as the "Double Fusion" hub. Instead of simple summation, DANE employs Channel Attention to refine global context and Spatial Attention to refine local details. These features are then adaptively merged based on their relative importance for the specific task.
The proposed DFvT block architecture (d) featuring parallel Spatial and Context modules with pre- and post-SA fusion.

Experimental Results

The DFvT architecture was evaluated on the ImageNet-1K dataset and compared against a wide range of baselines, including ResNet, Swin, and DeiT.

Efficiency and Accuracy

DFvT consistently sits at the top of the Pareto frontier for accuracy versus speed. For instance, DFvT-S (Small) achieves 78.3% Top-1 accuracy, making it approximately 4x faster than ResNet101 while using 90% fewer FLOPs. When compared to modern transformers like Swin-Tiny, the DFvT-B (Base) variant achieves higher accuracy (82.0% vs 81.3%) with nearly double the throughput (962 images/s vs 536 images/s).

Throughput efficiency comparison showing DFvT-S outperforming various CNN and ViT baselines in the accuracy-speed trade-off.

Key Insights

  • Resolution-Agnostic Attention: Self-attention is most effective for global context, which can be captured on downsampled maps without sacrificing the transformer's primary advantage.
  • Heterogeneous Fusion: Treating global context (the "what") and local details (the "where") as distinct data types allows for more effective feature refinement through dual attention.
  • Memory Efficiency: DFvT models generally consume less GPU memory than pure-transformer counterparts, facilitating deployment on mid-range hardware and edge devices.

Conclusion and Future Work

DFvT demonstrates that hybridizing CNN and ViT structures through a double-fusion approach can yield significant gains in throughput efficiency. While the current study focuses on ImageNet-1K classification, future work will explore the scalability of DFvT to larger datasets (e.g., ImageNet-21K) and its performance in dense prediction tasks such as object detection and semantic segmentation.

Summary updated

BibTeX
@inproceedings{gao2022doubly,
  author = {Li Gao and Dong Nie and Bo Li and Xiaofeng Ren},
  title = {{Doubly-Fused ViT: Fuse Information from Vision Transformer Doubly with Local Representation}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20050-2\_43},
}
Figure