A lightweight convolution and vision transformer integrated model with multi-scale self-attention mechanism

Yi Zhang, Lingxiao Wei, Bowei Zhang, Ziwei Liu, Kai Yi, Shu Hu

Abstract

Vision Transformers (ViTs) have significantly advanced computer vision by capturing long-range dependencies. However, their high computational cost and lack of inherent inductive bias limit their deployment on resource-constrained edge devices. This paper introduces SAEViT (Sparsely Aggregated Attention Vision Transformer), a hybrid model that integrates the local processing efficiency of Convolutional Neural Networks (CNNs) with the global modeling capabilities of Transformers. By employing a novel Sparsely Aggregated Attention (SAA) mechanism and a Channel-Interactive Feed-Forward Network (CIFFN), SAEViT achieves high accuracy (79.6% on ImageNet-1K) while maintaining a strict computational budget of under 1.5 GFLOPs.

Introduction

While standard ViTs excel at global context modeling, they face two primary challenges for real-time applications: quadratic computational scaling with image resolution and a lack of spatial inductive bias. Existing lightweight models often attempt to mitigate these issues through window-shifting or complex token-pruning strategies, which can inadvertently sacrifice accuracy or ignore critical spatial correlations. SAEViT addresses these limitations by utilizing a hierarchical architecture that balances local feature extraction with a computationally efficient global attention mechanism.

Methodology

Overall Architecture

SAEViT is structured as a hierarchical pyramid with four stages. Each stage begins with a Local Feature Extraction (LFE) module, which uses depth-wise separable convolutions (DWSConv) to provide the model with a convolutional prior, helping it focus on fine-grained textures and suppress noise. This is followed by a series of Transformer blocks containing the SAA and CIFFN modules.

The overall architecture of SAEViT and the detailed internal structure of an SAEViT block, highlighting the LFE and Transformer components.

Sparsely Aggregated Attention (SAA)

The SAA mechanism is designed to reduce the "attention tax" by exploiting spatial redundancy. Instead of computing attention for every pixel, the feature map is down-sampled using average pooling to retain only the most informative tokens. After the attention operation, a learnable deconvolution layer is used to up-sample the features back to their original resolution. This "squeeze-and-recover" approach allows the model to maintain a global view while significantly reducing GFLOPs and preserving high-frequency spatial details like edges.

The Sparsely Aggregated Attention (SAA) mechanism, showing the down-sampling of tokens before attention and the subsequent up-sampling to the original output resolution.

Channel-Interactive Feed-Forward Network (CIFFN)

Standard feed-forward networks (FFNs) treat channels independently, which can lead to feature redundancy. CIFFN introduces a decomposition and redistribution layer that enables cross-channel interaction. This improves feature diversity and representation power without adding substantial parameter overhead.

Key Results and Discussion

Performance Benchmarks

SAEViT was evaluated across multiple computer vision tasks, demonstrating superior efficiency-accuracy trade-offs:

  • ImageNet-1K Classification: The SAEViT-XS variant achieved 79.6% Top-1 accuracy with only 1.3 GFLOPs, outperforming established models like EfficientNet-B1.
  • Object Detection and Segmentation: On the COCO dataset using a Mask R-CNN framework, SAEViT-XS reached 42.6 box AP, surpassing competitors such as RepViT and EfficientFormer.
  • Hardware Throughput: Beyond theoretical FLOPs, SAEViT was optimized for actual hardware performance. On an NVIDIA RTX 3060 Laptop GPU, SAEViT-XS demonstrated a latency of 36.80ms, nearly twice as fast as CMT-Ti despite comparable accuracy.

Efficiency Insights

The success of SAEViT stems from its ability to reconstruct high-frequency details through deconvolution and its focus on maximizing throughput rather than just minimizing operations. By reducing the token count by up to 75% in early stages through SAA, the model effectively manages the computational load while retaining the benefits of global attention.

Conclusion

SAEViT presents a robust solution for deploying high-performance vision models on edge hardware. By integrating local convolutional priors with a sparse global attention mechanism, it bridges the gap between efficiency and accuracy. Future work will explore dynamic sparse attention mechanisms that adaptively adjust sampling rates based on image content complexity and further hardware-specific optimizations for mobile CPUs and NPUs.

Summary updated

BibTeX
@article{zhang2025lightweight,
  author = {Yi Zhang and Lingxiao Wei and Bowei Zhang and Ziwei Liu and Kai Yi and Shu Hu},
  title = {{A lightweight convolution and vision transformer integrated model with multi-scale self-attention mechanism}},
  journal = {Neurocomputing},
  year = {2025},
  doi = {10.1016/j.neucom.2025.131670},
}
Figure