SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.10518 · 2024

MobileNetV4 -- Universal Models for the Mobile Ecosystem

arXiv · PDF · Open in the Atlas

Code that ran

11 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; 5 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2404.10518.json · badge: /api/ran/2404.10518.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
jiaowoguanren0615/MobileNetV4 community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
jaiwei98/MobileNetV4-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
junaidaliop/MobileNetV4 reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
wh1090220084/mobilenetv4_pytorch reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
accuracy_np Ran
ran, honoured the contract we drafted
jiaowoguanren0615/MobileNetV4/onnx_validate.py
code served (permissive licence) · get_code("ce856d9e51a3df05")
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 1, 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

# Create sample outputs and targets for the accuracy_np function
# The function expects:
# - output: shape (batch_size, num_classes) with prediction scores
# - target: shape (batch_size,) with true class indices

batch_size = 2
num_classes = 4

# Create random output scores (logits or probabilities)
output = np.random.randn(batch_size, num_classes).astype(np.float32)

# Create target class indices (must be valid indices in range [0, num_classes-1])
target = np.array([0, 2], dtype=np.int64)

ARGS = {
    "output": output,
    "target": target,
}
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 1, 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
block_spec_values_to_list Ran
ran; our contract draft was wrong, not the code
junaidaliop/MobileNetV4/MobileNetV4.py
code served (permissive licence) · get_code("0e20d40db79fb5c0")
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 list, 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.

from dataclasses import dataclass, fields, astuple
from typing import Any, List, Tuple, Optional

@dataclass
class BlockSpec:
    """A container class that specifies the block configuration for MobileNet."""
    block_fn: str = 'convbn'
    kernel_size: int = 3
    strides: int = 1
    filters: int = 32
    use_bias: bool = False
    use_normalization: bool = True
    activation: str = 'relu6'
    expand_ratio: Optional[float] = 6.0
    se_ratio: Optional[float] = None
    use_depthwise: bool = True
    use_residual: bool = True
    is_output: bool = True
    middle_dw_downsample: bool = True
    start_dw_kernel_size: int = 0
    middle_dw_kernel_size: int = 0
    end_dw_kernel_size: int = 0
    use_layer_scale: bool = True
    use_multi_query: bool = True
    use_downsampling: bool = False
    downsampling_dw_kernel_size: int = 3
    num_heads: int = 8
    key_dim: int = 64
    value_dim: int = 64
    query_h_strides: int = 1
    query_w_strides: int = 1
    kv_strides: int = 1

block_specs = [
    BlockSpec(
        block_fn='convbn',
        kernel_size=3,
        strides=2,
        filters=16,
        use_bias=False,
        use_normalization=True,
        activation='relu6'
    ),
    BlockSpec(
        block_fn='mbconv',
        kernel_size=3,
        strides=1,
        filters=24,
        expand_ratio=1.0,
        se_ratio=0.25,
        use_depthwise=True,
        use_residual=False
    ),
    BlockSpec(
        block_fn='fused_mbconv',
        kernel_size=5,
        strides=2,
        filters=32,
        expand_ratio=4.0,
        se_ratio=None,
        use_depthwise=False,
        use_residual=True,
        is_output=False
    )
]

ARGS = {
    'block_specs': block_specs
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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
conv_2d Ran
ran; our contract draft was wrong, not the code
jaiwei98/MobileNetV4-pytorch/mobilenet/mobilenetv4.py
code served (permissive licence) · get_code("067715c0c5734d87")
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 Sequential. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function conv_2d creates a convolutional layer with optional batch norm and activation
# Parameters:
# - inp: number of input channels
# - oup: number of output channels
# - kernel_size: size of the convolutional kernel (default 3)
# - stride: stride of convolution (default 1)
# - groups: number of groups for grouped convolution (default 1)
# - bias: whether to use bias in conv layer (default False)
# - norm: whether to add batch normalization (default True)
# - act: whether to add activation (default True)

ARGS = {
    'inp': 5,
    'oup': 7,
    'kernel_size': 3,
    'stride': 1,
    'groups': 1,
    'bias': False,
    'norm': True,
    'act': True
}
Setup block drafted by
a language model, Claude Sonnet 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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not 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
make_divisible Ran
ran, honoured the contract we drafted
jaiwei98/MobileNetV4-pytorch/mobilenet/mobilenetv4.py
code served (permissive licence) · get_code("6b65b07f03530a4d")
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.

ARGS = {
    'value': 64.5,
    'divisor': 8,
    'min_value': None,
    'round_down_protect': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — 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
make_divisible Ran
ran, honoured the contract we drafted
wh1090220084/mobilenetv4_pytorch/mobilenetv4.py
pointer only (licence: NONE) · get_code("231ab9d94ccd8ac2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wh1090220084/mobilenetv4_pytorch 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.

make_divisible Ran
ran, honoured the contract we drafted
jiaowoguanren0615/MobileNetV4/models/blocks.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/depthshrinker, is pointer only (licence: NOASSERTION) · get_code("24400bc088ed228d")
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 facebookresearch/depthshrinker, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

max_voting Ran
ran on a synthesized input
jiaowoguanren0615/MobileNetV4/optim_AUC.py
code served (permissive licence) · get_code("968810e99c2743be")
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 ndarray, ndim 2, dtype family float, shape (2, 1) 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 numpy as np

# Create a small 2D numpy array with prediction values
# Shape: (2, 4) - 2 samples, 4 possible values
preds = np.array([[0, 2, 2, 2], [1, 1, 0, 1]], dtype=np.float32)

ARGS = {
    "preds": preds
}
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 ndarray, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) 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
num_groups Ran
ran, honoured the contract we drafted
jiaowoguanren0615/MobileNetV4/models/blocks.py
code served (permissive licence) · get_code("3858599774ed62d7")
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 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 torch.nn as nn

torch.manual_seed(0)

# Analyze the function:
# - group_size: Optional[int] - can be None or an integer
# - channels: int - must be a positive integer
# - The function checks if channels % group_size == 0 when group_size is provided

# Test case 1: group_size is None (should return 1)
# Test case 2: group_size divides channels evenly

# For a valid case where group_size divides channels:
# channels = 16, group_size = 4 -> 16 % 4 == 0, returns 4

ARGS = {
    "group_size": 4,
    "channels": 16
}
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 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
reparameterize_model Ran
ran on a synthesized input
jiaowoguanren0615/MobileNetV4/onnx_export.py
code served (permissive licence) · get_code("57c0e0444e26c7e2")
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 TestModel. 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 torch
import torch.nn as nn
from copy import deepcopy

torch.manual_seed(0)

# Create a custom module with fuse method
class FusableModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def fuse(self):
        # Return a fused version
        return nn.Linear(4, 3)

# Create a custom module with reparameterize method
class ReparameterizableModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(4, 3, 1)
    
    def reparameterize(self):
        pass

# Create a custom module with switch_to_deploy method
class DeployableModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def switch_to_deploy(self):
        pass

# Create a model with nested children that have various reparameterization methods
class TestModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fusable = FusableModule()
        self.reparameterizable = ReparameterizableModule()
        self.deployable = DeployableModule()
        self.regular_linear = nn.Linear(4, 3)
    
    def forward(self, x):
        x = self.fusable(x) if hasattr(self.fusable, '__call__') else x
        return x

model = TestModel()

ARGS = {
    'model': model,
    'inplace': False,
}
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 TestModel — a TestModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TestModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
resolve_act_layer Ran
ran; our contract draft was wrong, not the code
jiaowoguanren0615/MobileNetV4/models/model_utils.py
code served (permissive licence) · get_code("65913dcf1b9ca4d1")
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 type. 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 torch
import torch.nn as nn
from timm.layers import get_act_layer

torch.manual_seed(0)

# resolve_act_layer takes two parameters:
# 1. kwargs: dict that may contain 'act_layer' key
# 2. default: string specifying default activation layer name

# The function pops 'act_layer' from kwargs dict and passes it to get_act_layer
# If 'act_layer' is not in kwargs, it uses the default value

ARGS = {
    'kwargs': {'act_layer': 'relu'},
    'default': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
resolve_bn_args Ran
ran; our contract draft was wrong, not the code
jiaowoguanren0615/MobileNetV4/models/model_utils.py
code served (permissive licence) · get_code("ad5c779c4dbc8362")
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 dict. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'kwargs': {
        'bn_momentum': 0.1,
        'bn_eps': 1e-5
    }
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
build_blocks Not yet run
unverified (harvested, no recorded run)
jaiwei98/MobileNetV4-pytorch/mobilenet/mobilenetv4.py
code served (permissive licence) · get_code("a7ca97f43224d68c")
How it ran

no invocation recorded.

onnx_forward Not yet run
unverified (harvested, no recorded run)
jiaowoguanren0615/MobileNetV4/onnx_export.py
code served (permissive licence) · get_code("657331b58c43b3fc")
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, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 4 later) and 8 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
make_divisible 9 other papers
7 dated earlier, 1 the same month, 1 later
2105.01601 (2021-05)
MLP-Mixer: An all-MLP Architecture for Vision
2203.08392 (2022-03)
Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations?
2203.14509 (2022-03)
Automated Progressive Learning for Efficient Training of Vision Transformers
and 6 more not named here
accuracy_np 2 other papers
2 dated earlier
1905.02244 (2019-05)
Searching for MobileNetV3
2401.17992 (2024-01)
Multilinear Operator Networks
num_groups 1 other paper
1 later
2412.10569 (2024-12)
Learning to Merge Tokens via Decoupled Embedding for Efficient Vision Transformers
resolve_act_layer 1 other paper
1 later
2412.10569 (2024-12)
Learning to Merge Tokens via Decoupled Embedding for Efficient Vision Transformers
resolve_bn_args 1 other paper
1 later
2412.10569 (2024-12)
Learning to Merge Tokens via Decoupled Embedding for Efficient Vision Transformers

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

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 the latest generation of MobileNets, known as MobileNetV4 (MNv4), featuring universally efficient architecture designs for mobile devices. At its core, we introduce the Universal Inverted Bottleneck (UIB) search block, a unified and flexible structure that merges Inverted Bottleneck (IB), ConvNext, Feed Forward Network (FFN), and a novel Extra Depthwise (ExtraDW) variant. Alongside UIB, we present Mobile MQA, an attention block tailored for mobile accelerators, delivering a significant 39% speedup. An optimized neural architecture search (NAS) recipe is also introduced which improves MNv4 search effectiveness. The integration of UIB, Mobile MQA and the refined NAS recipe results in a new suite of MNv4 models that are mostly Pareto optimal across mobile CPUs, DSPs, GPUs, as well as specialized accelerators like Apple Neural Engine and Google Pixel EdgeTPU - a characteristic not found in any other models tested. Finally, to further boost accuracy, we introduce a novel distillation technique. Enhanced by this technique, our MNv4-Hybrid-Large model delivers 87% ImageNet-1K accuracy, with a Pixel 8 EdgeTPU runtime of just 3.8ms.

For agents

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

get_harvested_code_for_paper("2404.10518")
get_code_for_paper("2404.10518")
have("2404.10518")

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

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

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

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

Connect an agent — have() is free.