ViG: Linear-complexity Visual Sequence Learning with Gated Linear Attention

Authors

  • Bencheng Liao Huazhong University of Science and Technology
  • Xinggang Wang Huazhong University of Science and Technology
  • Lianghui Zhu Huazhong University of Science and Technology
  • Qian Zhang Horizon Robotics
  • Chang Huang Horizon Robotics

DOI:

https://doi.org/10.1609/aaai.v39i5.32550

Abstract

Recently, linear complexity sequence modeling networks have achieved modeling capabilities similar to Vision Transformers on a variety of computer vision tasks, while using fewer FLOPs and less memory. However, their advantage in terms of actual runtime speed is not significant. To address this issue, we introduce Gated Linear Attention (GLA) for vision, leveraging its superior hardware-awareness and efficiency. We propose direction-wise gating to capture 1D global context through bidirectional modeling and a 2D gating locality injection to adaptively inject 2D local details into 1D global context. Our hardware-aware implementation further merges forward and backward scanning into a single kernel, enhancing parallelism and reducing memory cost and latency. The proposed model, ViG, offers a favorable trade-off in accuracy, parameters, and FLOPs on ImageNet and downstream tasks, outperforming popular Transformer and CNN-based models.

Downloads

Published

2025-04-11

How to Cite

Liao, B., Wang, X., Zhu, L., Zhang, Q., & Huang, C. (2025). ViG: Linear-complexity Visual Sequence Learning with Gated Linear Attention. Proceedings of the AAAI Conference on Artificial Intelligence, 39(5), 5182–5190. https://doi.org/10.1609/aaai.v39i5.32550

Issue

Section

AAAI Technical Track on Computer Vision IV