Vision-LSTM: xLSTM as Generic Vision Backbone
Benedikt Alkin, Maximilian Beck, Korbinian Pöppel, Sepp Hochreiter, Johannes Brandstetter
TL;DR
This paper proposes Vision-LSTM (ViL), a generic vision backbone that adapts the xLSTM architecture to process image patch tokens with alternating directional mLSTM blocks. ViL achieves linear computational and memory scaling with sequence length by replacing self-attention with a matrix-memory mLSTM that exchanges information between patches, while preserving an isotropic, non-downsampling design. Through ImageNet-1K pretraining and transfer to ADE20K and VTAB-1K, ViL demonstrates strong performance across classification, segmentation, and diverse transfer tasks, often outperforming optimized ViTs and Vim on several benchmarks. The work also presents thorough ablations on traversal directions, QK convolution, positional embeddings, and classification design, and discusses current hardware limitations and future avenues, highlighting ViL’s potential as an efficient backbone for high-resolution vision tasks once hardware kernels for mLSTM mature.
Abstract
Transformers are widely used as generic backbones in computer vision, despite initially introduced for natural language processing. Recently, the Long Short-Term Memory (LSTM) has been extended to a scalable and performant architecture - the xLSTM - which overcomes long-standing LSTM limitations via exponential gating and parallelizable matrix memory structure. In this report, we introduce Vision-LSTM (ViL), an adaption of the xLSTM building blocks to computer vision. ViL comprises a stack of xLSTM blocks where odd blocks process the sequence of patch tokens from top to bottom while even blocks go from bottom to top. Experiments show that ViL holds promise to be further deployed as new generic backbone for computer vision architectures.
