SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.08391 · 2021

AS-MLP: An Axial Shifted MLP Architecture for Vision

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 1 has no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2107.08391.json · badge: /api/ran/2107.08391.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
svip-lab/AS-MLP canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
GET_BLOCKS Ran
ran, violated the contract we drafted
svip-lab/AS-MLP/models/shift_cuda.py
code served (permissive licence) · get_code("c5acf386fe00c470")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function GET_BLOCKS takes a single parameter N (an integer representing number of elements)
# and calculates how many blocks are needed given CUDA_NUM_THREADS = 1024

N = 2048  # Example: number of elements to process

ARGS = {
    'N': N
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
MyNorm Ran
ran; our contract draft was wrong, not the code
svip-lab/AS-MLP/models/as_mlp.py
pointer only (licence: MIT); the stored copy get_code serves, from ggjy/Hire-Wave-MLP.pytorch, is pointer only (licence: NONE) · get_code("c3f4c265067c1717")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ggjy/Hire-Wave-MLP.pytorch, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

auto_resume_helper Ran
ran; our contract draft was wrong, not the code
svip-lab/AS-MLP/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from leaplabthu/inline, is pointer only (licence: NONE) · get_code("0c32459bef92ff8c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from leaplabthu/inline, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_optimizer Ran
ran; our contract draft was wrong, not the code
svip-lab/AS-MLP/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from CBalance/SSD, is pointer only (licence: NONE) · get_code("e35a4b2e4114b1a5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from CBalance/SSD, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_scheduler Ran
ran; our contract draft was wrong, not the code
svip-lab/AS-MLP/lr_scheduler.py
pointer only (licence: MIT); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("c02cc4e0b5720211")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ghrua/seqpe, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_keywords_in_name Ran
ran, violated the contract we drafted
svip-lab/AS-MLP/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from leaplabthu/inline, is pointer only (licence: NONE) · get_code("b0a5beb34716d5a6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from leaplabthu/inline, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_logger Ran
ran; our contract draft was wrong, not the code
svip-lab/AS-MLP/logger.py
pointer only (licence: MIT); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("80450600f7f09b0a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ghrua/seqpe, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_grad_norm Ran
ran, honoured the contract we drafted
svip-lab/AS-MLP/utils.py
code served (permissive licence) · get_code("eec1e7cba51d5e8e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters that have gradients
model = nn.Linear(4, 3)

# Forward pass to create some gradients
x = torch.randn(2, 4)
y = model(x)
loss = y.sum()
loss.backward()

# Now model.parameters() have gradients attached
parameters = list(model.parameters())

ARGS = {
    "parameters": parameters,
    "norm_type": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_checkpoint Ran
ran on a synthesized input
svip-lab/AS-MLP/utils.py
code served (permissive licence) · get_code("640408a0715e42c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from unittest.mock import Mock, MagicMock
import logging

torch.manual_seed(0)

# Create a minimal model
class TinyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = TinyModel()

# Create optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create lr_scheduler
lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=10)

# Create a mock config with required attributes
class Config:
    def __init__(self):
        self.MODEL = Mock()
        self.MODEL.RESUME = '/tmp/checkpoint.pth'
        self.EVAL_MODE = True
        self.AMP_OPT_LEVEL = 'O0'
        self.TRAIN = Mock()
        self.TRAIN.START_EPOCH = 0
        self._frozen = False
    
    def defrost(self):
        self._frozen = False
    
    def freeze(self):
        self._frozen = True

config = Config()

# Create a mock logger
logger = Mock(spec=logging.Logger)
logger.info = MagicMock()

# Create a checkpoint file (mock by using torch.save)
checkpoint_data = {
    'model': model.state_dict(),
    'optimizer': optimizer.state_dict(),
    'lr_scheduler': lr_scheduler.state_dict(),
    'epoch': 5,
    'max_accuracy': 0.95,
    'config': config,
    'amp': {}
}

# Since we can't do real file I/O, we'll mock torch.load
original_torch_load = torch.load
def mock_torch_load(path, map_location=None):
    return checkpoint_data

torch.load = mock_torch_load

ARGS = {
    'config': config,
    'model': model,
    'optimizer': optimizer,
    'lr_scheduler': lr_scheduler,
    'logger': logger
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
set_weight_decay Ran
ran; our contract draft was wrong, not the code
svip-lab/AS-MLP/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ztx-100/efficient_vit_with_dw, is pointer only (licence: NONE) · get_code("b33222a09fc93bec")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ztx-100/efficient_vit_with_dw, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Dtype Not yet run
unverified (harvested, no recorded run)
svip-lab/AS-MLP/models/shift_cuda.py
pointer only (licence: MIT); the stored copy get_code serves, from thomasverelst/dynconv, is pointer only (licence: NONE) · get_code("1e624f979ea53ae4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from thomasverelst/dynconv, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
svip-lab/AS-MLP/models/build.py
code served (permissive licence) · get_code("2f65366bea62ccc7")
How it ran

no invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
svip-lab/AS-MLP/config.py
code served (permissive licence) · get_code("02a9e80c2bb81815")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 12 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 12 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_config 51 other papers
5 dated earlier, 46 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 48 more not named here
create_logger 35 other papers
4 dated earlier, 31 later
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 32 more not named here
check_keywords_in_name 31 other papers
4 dated earlier, 27 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 28 more not named here
get_grad_norm 23 other papers
4 dated earlier, 19 later
1910.13616 (2019-10)
Multimodal Model-Agnostic Meta-Learning via Task-Aware Modulation
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
and 20 more not named here
auto_resume_helper 20 other papers
3 dated earlier, 17 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 17 more not named here
set_weight_decay 14 other papers
4 dated earlier, 10 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 11 more not named here
build_scheduler 13 other papers
3 dated earlier, 10 later
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 10 more not named here
build_optimizer 8 other papers
3 dated earlier, 5 later
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 5 more not named here
GET_BLOCKS 5 other papers
2 dated earlier, 3 later
1710.10903 (2017-10)
Graph Attention Networks
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
2204.07143 (2022-04)
Neighborhood Attention Transformer
and 2 more not named here
Dtype 4 other papers
2 dated earlier, 2 later
1912.03203 (2019-12)
Dynamic Convolutions: Exploiting Spatial Sparsity for Faster Inference
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 1 more not named here
MyNorm 4 other papers
4 later
2108.13341 (2021-08)
Hire-MLP: Vision MLP via Hierarchical Rearrangement
2210.08823 (2022-10)
Scaling & Shifting Your Features: A New Baseline for Efficient Model Tuning
2307.11342 (2023-07)
Tuning Pre-trained Model via Moment Probing
and 1 more not named here
load_checkpoint 2 other papers
1 dated earlier, 1 later
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2207.09455 (2022-07)
To update or not to update? Neurons at equilibrium in deep models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

An Axial Shifted MLP architecture (AS-MLP) is proposed in this paper. Different from MLP-Mixer, where the global spatial feature is encoded for information flow through matrix transposition and one token-mixing MLP, we pay more attention to the local features interaction. By axially shifting channels of the feature map, AS-MLP is able to obtain the information flow from different axial directions, which captures the local dependencies. Such an operation enables us to utilize a pure MLP architecture to achieve the same local receptive field as CNN-like architecture. We can also design the receptive field size and dilation of blocks of AS-MLP, etc, in the same spirit of convolutional neural networks. With the proposed AS-MLP architecture, our model obtains 83.3% Top-1 accuracy with 88M parameters and 15.2 GFLOPs on the ImageNet-1K dataset. Such a simple yet effective architecture outperforms all MLP-based architectures and achieves competitive performance compared to the transformer-based architectures (e.g., Swin Transformer) even with slightly lower FLOPs. In addition, AS-MLP is also the first MLP-based architecture to be applied to the downstream tasks (e.g., object detection and semantic segmentation). The experimental results are also impressive. Our proposed AS-MLP obtains 51.5 mAP on the COCO validation set and 49.5 MS mIoU on the ADE20K dataset, which is competitive compared to the transformer-based architectures. Our AS-MLP establishes a strong baseline of MLP-based architecture. Code is available at https://github.com/svip-lab/AS-MLP.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2107.08391")
get_code_for_paper("2107.08391")
have("2107.08391")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2107.08391.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2107.08391.svg)](https://syntology.ai/paper/2107.08391)

Connect an agent — have() is free.