Papers › Sequencer: Deep LSTM for Image Classification

Sequencer: Deep LSTM for Image Classification

4 May 2022arXiv:2205.01972archive 2025-07-28

Yuki Tatsunami, Masato Taki

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. 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.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 9 code samples harvested from 1 repository linked to this paper: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: official repository: 9 samples from 1 repository, 4 ran (4 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 3 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

okojoalg/sequencer officialmentioned in papermentioned on GitHubpytorchSyntology: 9 samples, 4 ran (0 instrument-failed) · 5 unverified report
rwightman/pytorch-image-models officialmentioned in papermentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to AdamP: Slowing Down the Slowdown for Momentum Optimizers on Scale-invariant Weights (arXiv:2006.08217; that paper's own run record: 4 ran (of which 1 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 0 violated, 1 with no contract checked; 2 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
liuruiyang98/Jittor-MLP mentioned on GitHubjaxSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to S²-MLPv2: Improved Spatial-Shift MLP Architecture for Vision (arXiv:2108.01072; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 4 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
timeseriesAI/tsai mentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to A Time Series is Worth 64 Words: Long-term Forecasting with Transformers (arXiv:2211.14730; that paper's own run record: 17 ran (of which 2 constructed an object rather than computing a result; 16 with no instrument failure: 0 honoured, 0 violated, 16 with no contract checked; 1 where Syntology's instrument failed) · 13 unverified); nothing checks that they implement this paper's method. report
gitlab.com/birder/birder pytorchSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

9 samples harvested: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

4ran
5unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from okojoalg/sequencer. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

okojoalg/sequencer official repository 9 samples, 4 ran (0 instrument-failed) · 5 unverified
Downsample2D models/two_dim_sequencer.py ran · metamorphic tier: invariant Apache-2.0 (permissive) · 71520c22fcd16235 · report fixture: signature x:Tensor/4/float · returned Tensor · level recorded 2026-09-22
PatchEmbed in 123 papers
census: 9 implementations from 9 papers, 6 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 4, kind float, dtype float32
models/two_dim_sequencer.py ran · metamorphic tier: invariant fingerprinted Apache-2.0 (permissive) · d21dc0c3ff2326b2 · report fixture: signature x:Tensor/4/float · returned Tensor · level recorded 2026-09-22
RNN2DBase models/two_dim_sequencer.py ran Apache-2.0 (permissive) · b68d5c2770b76e3e · report fixture: signature x:Tensor/4/float · returned Tensor · level recorded 2026-09-24
RNNIdentity models/two_dim_sequencer.py ran · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) · cee0eb3911fd1719 · report fixture: signature x:Tensor/3/float · returned tuple · level recorded 2026-09-22
LSTM2D models/two_dim_sequencer.py unverified Apache-2.0 (permissive) · e5ad67deb204c7fb · report
Sequencer2D models/two_dim_sequencer.py unverified Apache-2.0 (permissive) · 07c6c53559ef34c9 · report
Sequencer2DBlock models/two_dim_sequencer.py unverified Apache-2.0 (permissive) · 21b70a992bd5f441 · report
_init_weights in 9 papers models/two_dim_sequencer.py unverified Apache-2.0 (permissive) · 58c0c12066377b33 · report
get_stage models/two_dim_sequencer.py unverified Apache-2.0 (permissive) · caa022d5744fcda0 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Sequencer (graph method: Sequencer). 9 bricks; individually on a fixture: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. The assembly has not been run end-to-end.

  1. Sequencer2D entry · level 0 · unverified · 07c6c53559ef34c9
  2. LSTM2D model · level 0 · unverified · e5ad67deb204c7fb
  3. PatchEmbed model · level 1 · ran · d21dc0c3ff2326b2
  4. Sequencer2DBlock model · level 0 · unverified · 21b70a992bd5f441
  5. _init_weights helper · level 0 · unverified · 58c0c12066377b33
  6. get_stage helper · level 0 · unverified · caa022d5744fcda0
  7. RNN2DBase model · level 1 · ran · b68d5c2770b76e3e
  8. Downsample2D model · level 1 · ran · 71520c22fcd16235
  9. RNNIdentity helper · level 1 · ran · cee0eb3911fd1719

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2205.01972") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Domain GeneralizationImage ClassificationInductive Biasimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Domain Generalization ImageNet-A Sequencer2D-L Top-1 accuracy % 35.5 #25 of 39 Archive leaderboard report
Domain Generalization ImageNet-C Sequencer2D-L mean Corruption Error (mCE) 48.9 #25 of 47 Archive leaderboard report
Domain Generalization ImageNet-R Sequencer2D-L Top-1 Error Rate 51.9 #27 of 39 Archive leaderboard report
Domain Generalization ImageNet-Sketch Sequencer2D-L Top-1 accuracy 35.8 #20 of 20 Archive leaderboard report
Image Classification ImageNet Sequencer2D-L↑392 GFLOPs 50.7 #303 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-L↑392 Number of params 54M #303 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-L↑392 Top 1 Accuracy 84.6% #303 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-L GFLOPs 16.6 #432 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-L Number of params 54M #432 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-L Top 1 Accuracy 83.4% #432 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-M GFLOPs 11.1 #500 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-M Number of params 38M #500 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-M Top 1 Accuracy 82.8% #500 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-S GFLOPs 8.4 #552 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-S Number of params 28M #552 of 1060 Archive leaderboard report
Image Classification ImageNet Sequencer2D-S Top 1 Accuracy 82.3% #552 of 1060 Archive leaderboard report
Image Classification ImageNet ReaL Sequencer2D-L Accuracy 87.9 #29 of 57 Archive leaderboard report
Image Classification ImageNet V2 Sequencer2D-L Top 1 Accuracy 73.4 #21 of 33 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamWAverage PoolingBiLSTMDense ConnectionsDropoutGlobal Average PoolingLSTMLayer NormalizationMLP-MixerResidual ConnectionSigmoid ActivationTanh ActivationVision Transformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections