SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.03404 · 2021

ResMLP: Feedforward networks for image classification with data-efficient training

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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, 1 violated it and 3 have no contract verdict; 0 failures of our instrument; 2 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/2105.03404.json · badge: /api/ran/2105.03404.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
yeyinthtoon/tf2-resmlp community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
megvii-research/basecls community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
jaketae/res-mlp reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
lucidrains/res-mlp-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
PatchEmbed Ran
ran on a synthesized input
yeyinthtoon/tf2-resmlp/resmlp/layers.py
code served (permissive licence) · get_code("c5a2d135cecde44d")
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 EagerTensor, ndim 3, dtype family float, shape (2, 4, 768) 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 tensorflow as tf

# Create a small input tensor: batch=2, height=32, width=32, channels=3
x = tf.random.normal(shape=(2, 32, 32, 3), dtype=tf.float32)

ARGS = {
    'x': x,
    'patch_width': 16,
    'patch_height': 16,
    'embed_dims': 768,
    'flatten': True,
    'name': 'patch_embedding'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (2, 4, 768) — shape (2, 4, 768) 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
adjust_block_compatibility Ran
ran on a synthesized input
megvii-research/basecls/basecls/layers/wrapper.py
code served (permissive licence) · get_code("6a660e5991846119")
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 tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np
from typing import List, Sequence

# Construct valid arguments for adjust_block_compatibility
# The function takes:
# - ws: Sequence[int] - widths (must be > 0)
# - bs: Sequence[float] - bottleneck multipliers (must be > 0, and either < 1 or integer)
# - gs: Sequence[int] - group widths (must be > 0)

# All three sequences must have the same length
ws = [64, 128, 256, 512]
bs = [0.25, 0.5, 1.0, 2.0]
gs = [32, 64, 128, 256]

ARGS = {
    "ws": ws,
    "bs": bs,
    "gs": gs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
check_sizes Ran
ran, honoured the contract we drafted
jaketae/res-mlp/res_mlp/core.py
code served (permissive licence) · get_code("27cbea18b00696e9")
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 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)

# Analyze the function:
# - image_size: used in divmod(image_size, patch_size), should be an integer
# - patch_size: used in divmod(image_size, patch_size), should be an integer
# - The function checks that image_size is divisible by patch_size
# - It computes sqrt_num_patches = image_size / patch_size
# - Then num_patches = sqrt_num_patches ** 2
# - For valid execution, image_size must be divisible by patch_size

# Example: image_size=16, patch_size=4
# sqrt_num_patches = 16 / 4 = 4
# remainder = 0 (passes assertion)
# num_patches = 4 ** 2 = 16

ARGS = {
    "image_size": 16,
    "patch_size": 4,
}
Setup block drafted by
a language model, Claude Haiku 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
mlp_block Ran
ran on a synthesized input
yeyinthtoon/tf2-resmlp/resmlp/resmlp.py
code served (permissive licence) · get_code("6c615e583ce7944d")
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 KerasTensor. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf
from tensorflow.keras import initializers, layers
import numpy as np

# Create a small input tensor for the mlp_block
# The function expects a tensor input x that will be passed through Dense layers
input_tensor = tf.keras.Input(shape=(4,), batch_size=2)

# Define all arguments needed for mlp_block
ARGS = {
    'x': input_tensor,
    'hidden_units': 8,
    'out_units': 3,
    'activation': 'relu',
    'dropout_rate': 0.2,
    'name': 'mlp_block'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor output has no array shape of its own; none is stated
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
pair Ran
ran, violated the contract we drafted
lucidrains/res-mlp-pytorch/res_mlp_pytorch/res_mlp_pytorch.py
code served (permissive licence) · get_code("e6f9d3b5ad66ee20")
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 tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# The function `pair` takes a single parameter `val` and returns either
# (val, val) if val is not a tuple, or val itself if it is already a tuple.
# We need to test both cases.

# Test case 1: val is not a tuple (e.g., an integer)
val_not_tuple = 5

ARGS = {
    "val": val_not_tuple
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
layers_scale_mlp_blocks Not yet run
unverified (harvested, no recorded run)
yeyinthtoon/tf2-resmlp/resmlp/resmlp.py
code served (permissive licence) · get_code("3099f730f63abb47")
How it ran

no invocation recorded.

resmlp Not yet run
unverified (harvested, no recorded run)
yeyinthtoon/tf2-resmlp/resmlp/resmlp.py
code served (permissive licence) · get_code("87c6692221a5e172")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 2 the same month, 1 later) and 5 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
pair 3 other papers
1 the same month, 2 later
2105.08050 (2021-05)
Pay Attention to MLPs
2402.12192 (2024-02)
Pan-Mamba: Effective pan-sharpening with State Space Model
check_sizes 2 other papers
2 the same month
2105.01601 (2021-05)
MLP-Mixer: An all-MLP Architecture for Vision
2105.08050 (2021-05)
Pay Attention to MLPs

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

We present ResMLP, an architecture built entirely upon multi-layer perceptrons for image classification. It is a simple residual network that alternates (i) a linear layer in which image patches interact, independently and identically across channels, and (ii) a two-layer feed-forward network in which channels interact independently per patch. When trained with a modern training strategy using heavy data-augmentation and optionally distillation, it attains surprisingly good accuracy/complexity trade-offs on ImageNet. We also train ResMLP models in a self-supervised setup, to further remove priors from employing a labelled dataset. Finally, by adapting our model to machine translation we achieve surprisingly good results. We share pre-trained models and our code based on the Timm library.

For agents

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

get_harvested_code_for_paper("2105.03404")
get_code_for_paper("2105.03404")
have("2105.03404")

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

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

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

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

Connect an agent — have() is free.