Sequencer: Deep LSTM for Image Classification

Yuki Tatsunami, Masato Taki
5/4/2022
127 citations
cs.CVcs.AIcs.LG
transformer-attention

Official code: huggingface/pytorch-image-models (37,303 stars, Python, Apache-2.0, PyTorch, last commit 2026-04-29). 1 more implementation below.

Abstract

In recent computer vision research, the advent of the Vision Transformer (ViT) has rapidly revolutionized various architectural design efforts: ViT achieved state-of-the-art image classification performance using self-attention found in natural language processing, and MLP-Mixer achieved competitive performance using simple multi-layer perceptrons. In contrast, several studies have also suggested that carefully redesigned convolutional neural networks (CNNs) can achieve advanced performance comparable to ViT without resorting to these new ideas.

Show full abstract

Against this background, there is growing interest in what inductive bias is suitable for computer vision. Here we propose Sequencer, a novel and competitive architecture alternative to ViT that provides a new perspective on these issues. Unlike ViTs, Sequencer models long-range dependencies using LSTMs rather than self-attention layers. We also propose a two-dimensional version of Sequencer module, where an LSTM is decomposed into vertical and horizontal LSTMs to enhance performance. Despite its simplicity, several experiments demonstrate that Sequencer performs impressively well: Sequencer2D-L, with 54M parameters, realizes 84.6% top-1 accuracy on only ImageNet-1K. Not only that, we show that it has good transferability and the robust resolution adaptability on double resolution-band.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
huggingface/pytorch-image-modelsOfficial37,303PythonApache-2.02026-04-29
okojoalg/sequencerOfficial142PythonApache-2.02022-10-07
PyTorchApache-2.0

The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more

37,3035,234Python, MDXFeb 2, 20197 months agoApache-2.0
augmixconvnextdistributed-trainingefficientnetimage-classification+15 more
okojoalg/sequencerOfficial100%
Apache-2.0

Sequencer: Deep LSTM for Image Classification

14224Python, DockerfileApr 24, 20224 years agoApache-2.0

Similar Papers

Cite this paper

@article{tatsunami2022sequencer,
  title  = {Sequencer: Deep LSTM for Image Classification},
  author = {Yuki Tatsunami and Masato Taki},
  year   = {2022},
  eprint = {2205.01972},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.01972}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.01972.svg)](https://codeofpaper.com/paper/2205.01972)

Discussion