Qin, Li, Suarez, Mai, Akin, Wang, Howard, et al. (Google) — ECCV 2024 · arXiv:2404.10518

MobileNetV4: Universal Models for the Mobile Ecosystem

One backbone that is Pareto-optimal across phones, DSPs, GPUs, and Apple/Pixel accelerators — built from a new search-space primitive (the Universal Inverted Bottleneck) and a mobile-friendly attention block (Mobile MQA), wired together by two-phase hardware-aware NAS. The Hybrid-Large model reaches ~87% ImageNet-1K top-1 at a few milliseconds on a Pixel EdgeTPU.

Prerequisites: Convolution + Depthwise separable conv (MobileNetV1) + Softmax attention. We rebuild the rest from zero.
10
Chapters
9
Simulations
2
Code Labs

Chapter 0: The Universality Problem

You ship a single photo-classifier model in an app that runs on a billion phones. One user has a flagship with a Pixel EdgeTPU, another has a mid-range phone where the model falls back to the CPU, a third has a chip with a fixed-point Hexagon DSP, and a fourth is on an iPhone with the Apple Neural Engine. You measure latency on all four. The same model that is fast on the EdgeTPU is slow on the DSP, and the model your colleague tuned for the DSP is mediocre on the GPU. There is no single architecture that is best everywhere — or so everyone assumed.

That is the problem MobileNetV4 (MNv4) attacks. The paper's claim is bold: with the right building blocks, you can design a family of models that sit on or near the latency/accuracy Pareto frontier on every mobile accelerator simultaneously — "mostly Pareto-optimal across the mobile ecosystem." Not one model per device; one design philosophy that generalizes.

Why was this hard before? Earlier MobileNets were tuned implicitly for one cost model. The original inverted bottleneck (IB) from MobileNetV2 was optimized when the bottleneck was memory bandwidth on CPUs. But an EdgeTPU is a systolic-array matrix engine: it loves big dense 1×1 convolutions (matrix multiplies) and is starved by depthwise convolutions, which have almost no arithmetic to amortize their memory traffic. A DSP, by contrast, is the opposite. A block that is cheap on one is expensive on the other.

The same model, four different latencies

Each accelerator weights operations differently. Drag the slider to change how "depthwise-heavy" a block is, and watch the latency bars for four device types diverge — there is no single block that wins everywhere. This is exactly why one fixed search space failed.

Depthwise fraction of the block 0.40

MNv4's answer has three moving parts, and the rest of this lesson builds each one:

UIB — Universal Inverted Bottleneck
A superset block with two optional depthwise convolutions. By turning each on or off, one primitive becomes the inverted bottleneck, a ConvNext-style block, an "ExtraDW" block, or a plain feed-forward block — so the search space contains all the good shapes at once.
Mobile MQA
Multi-query attention with shared keys/values and spatially-reduced K/V, so that accelerators that are starved by depthwise convs can still get a global-receptive-field block that is actually fast.
Two-phase hardware-aware NAS
A coarse search over block placement and depths, then a fine search over each UIB's two depthwise switches and kernel sizes — guided by on-device latency, not a proxy FLOP count.
Common misconception: "Fewer FLOPs means faster on-device." FLOPs (multiply-adds) are a single number; latency is set by whether you are compute-bound or memory-bound on a specific chip. A depthwise conv has very few FLOPs yet can dominate runtime on a matrix engine because it moves a lot of data per multiply. MNv4 optimizes measured latency, and that single shift is why its blocks look "weird" from a FLOP-counting point of view.

Let's make the cost intuition rigorous first — because every design choice in the paper is a response to the roofline.

What is the core problem MobileNetV4 sets out to solve?

Chapter 1: The Roofline and the Real Cost of a Layer

Before we can understand why MNv4's blocks are shaped the way they are, we need the right cost model. FLOPs alone lie. The honest model is the roofline: a layer's achievable speed is capped by whichever runs out first — the chip's arithmetic throughput, or its memory bandwidth.

Define two quantities for a layer:

W = number of multiply-adds (the "work")
Q = bytes of memory traffic (weights + activations read/written)

Their ratio is the operational intensity:

I = W / Q    (multiply-adds per byte)

A chip has a peak compute rate P (ops/s) and a peak bandwidth B (bytes/s). The roofline says the attainable rate for this layer is:

rate = min( P , I · B )

If I is large, the layer is compute-bound (you saturate the math units). If I is small, it is memory-bound (you saturate the bus and the math units idle). The crossover happens at the ridge point I* = P / B. Below I*, adding more FLOPs is nearly free — you have spare math. Above I*, more FLOPs cost time.

Worked example: 1×1 conv vs depthwise conv

Take a feature map of H = W = 28, C = 128 channels. Compare two layers a mobile network uses constantly.

(a) A 1×1 (pointwise) conv mixing 128 → 128 channels. Per output pixel it does C·C = 128·128 = 16,384 multiply-adds, over H·W = 784 pixels:

W = 784 × 128 × 128 = 12,845,056 MACs

Memory: weights = 128·128 = 16,384 values; activations in/out ≈ 2·784·128 = 200,704 values. At 1 byte/value (int8): Q ≈ 217,088 bytes. So

I = 12,845,056 / 217,088 ≈ 59 MACs/byte

(b) A 3×3 depthwise conv on the same map. Each channel is convolved independently, so per output pixel it does only 3·3 = 9 MACs per channel:

W = 784 × 128 × 9 = 903,168 MACs

Memory: weights = 128·9 = 1,152 values; activations ≈ 2·784·128 = 200,704 values. Q ≈ 201,856 bytes.

I = 903,168 / 201,856 ≈ 4.5 MACs/byte

The depthwise conv has 14× fewer FLOPs than the 1×1 conv — and yet its operational intensity is 13× lower. On a Pixel EdgeTPU the ridge point I* is high (it is a matrix engine with enormous P), so the depthwise layer sits deep in the memory-bound regime and runs at a tiny fraction of peak. The 1×1 conv, despite its larger FLOP count, runs near peak. The cheap-looking layer is the slow one. That single inversion of intuition explains most of MNv4.

Roofline: where does each layer land?

Log-log roofline. The slanted line is the memory bound (slope = bandwidth), the flat line is the compute bound. Drag the ridge point I* (different chips have different ridge points). Watch how the 1×1 conv and the depthwise conv fall on different sides — and how moving I* (changing chip) flips which one is bottlenecked.

Ridge point I* (chip compute/bandwidth) 20
Key insight: MNv4's two depthwise switches in the UIB block are a roofline lever. Adding a depthwise conv adds receptive field and a little spatial mixing at very low FLOP cost — but only on a chip where you have spare bandwidth (low ridge point). On a high-ridge matrix engine, the NAS learns to drop those depthwise convs and lean on 1×1 convs instead. The same block, configured differently per stage and per target, lands on the right side of the roofline.
Common misconception: "Operational intensity is a property of the layer." It is a property of the layer and the dtype and the fusion. Fusing a depthwise conv with the surrounding 1×1 convs (so the intermediate activation never leaves on-chip SRAM) collapses Q and raises I dramatically. This is exactly why MNv4 likes ExtraDW: the extra depthwise can be fused into the expansion and is far cheaper in practice than its standalone roofline suggests.

A 3×3 depthwise conv has far fewer FLOPs than a 1×1 conv on the same feature map, yet is often slower on an EdgeTPU. Why?

Chapter 2: The Inverted Bottleneck — the block MNv4 generalizes

To understand MNv4's new block we first need the one it extends: the inverted bottleneck (IB) from MobileNetV2. The name is a deliberate joke. A classic ResNet bottleneck goes wide → narrow → wide; the inverted bottleneck goes narrow → wide → narrow. Why invert it?

The block takes an input with C channels and:

1. Expand
1×1 conv: C → eC, where e is the expansion ratio (typically 4 or 6). Input [H, W, C] → [H, W, eC].
2. Depthwise spatial mix
k×k depthwise conv on the expanded tensor. [H, W, eC] → [H/s, W/s, eC] (stride s). Each of the eC channels is filtered independently — cheap spatial mixing in the wide space.
3. Project
1×1 conv: eC → C'. Back down to a narrow tensor. [H/s, W/s, eC] → [H/s, W/s, C']. A linear projection — no activation here, MobileNetV2's "linear bottleneck."

Plus a residual add when input and output shapes match. The genius is that the expensive spatial work (the depthwise conv) happens in the wide expanded space where it is most expressive, while the data that travels between blocks is kept narrow — small to store and to move. The block is "fat in the middle, thin at the ends."

Worked cost: one IB block

Let C = 64, e = 4 (so eC = 256), k = 3, stride 1, H = W = 28, C' = 64.

Expand 1×1: 28·28·(64·256) = 784·16,384 = 12,845,056 MACs.
Depthwise 3×3: 28·28·(256·9) = 784·2,304 = 1,806,336 MACs.
Project 1×1: 28·28·(256·64) = 784·16,384 = 12,845,056 MACs.

Total ≈ 27.5M MACs, of which the two 1×1 convs are ~93%. The depthwise — the part that does the actual spatial reasoning — is only ~7% of the FLOPs but, per Chapter 1, can be a much larger fraction of the latency on a matrix engine. Notice the asymmetry: the block's expressiveness comes from the cheap part, its FLOPs from the expensive parts, and its latency from a chip-dependent mix.

Inverted Bottleneck: data flow with live shapes

Click "Next Stage" to walk the tensor through expand → depthwise → project. The bar shows the channel width at each point — narrow at the ends, wide in the middle. Adjust the expansion ratio to see the middle balloon.

e Stage 0/3 — input [28, 28, 64]

One more crucial detail: the linear bottleneck. MobileNetV2 removed the activation after the final projection. The argument: a ReLU on a low-dimensional tensor destroys information (it zeroes out roughly half of each narrow vector, and there is no redundant width to recover it). In the wide expanded space ReLU is fine — there is plenty of room — but on the narrow output you keep it linear to preserve the manifold. MNv4 inherits this.

Common misconception: "The depthwise conv is where most of the compute is — that is why MobileNets are cheap." Backwards. The two 1×1 convs dominate the FLOPs (~90%+). The depthwise is cheap in FLOPs; it is the 1×1 projections that make MobileNets work and that a matrix engine runs efficiently. MNv4's whole insight is to make the placement of the (cheap-FLOP, expensive-latency) depthwise convs a searchable choice rather than a fixed one.
Why is the inverted bottleneck "inverted," and why is its final projection kept linear (no activation)?

Chapter 3: The Universal Inverted Bottleneck (UIB)

Here is the paper's central architectural contribution. The inverted bottleneck has exactly one depthwise conv, in a fixed position (after the expansion). Other strong blocks place depthwise convs elsewhere — a ConvNext block puts a large-kernel depthwise first. Each is good for different chips and stages. Instead of committing to one, MNv4 builds a superset with two optional depthwise convolutions and lets the search decide which to keep.

The UIB block, in order:

[optional] Starting DW
A depthwise conv on the input (narrow, C channels), before the expansion. Switch: start_dw ∈ {on, off}. ConvNext-style spatial mixing in the narrow space.
Expand 1×1
C → eC. Always present. [H,W,C] → [H,W,eC].
[optional] Middle DW
A depthwise conv on the expanded (wide, eC channels) tensor. Switch: mid_dw ∈ {on, off}. This is the classic IB depthwise. Carries the stride if the block downsamples.
Project 1×1
eC → C'. Always present, linear. [.,.,eC] → [.,.,C'].

Two binary switches give four named instantiations — a single primitive that covers the whole zoo:

start_dwmid_dwNameWhat it is
offonIB (Inverted Bottleneck)The classic MobileNetV2 block
onoffConvNext-likeDepthwise first, then expand/project
ononExtraDWBoth depthwise convs — MNv4's signature block
offoffFFN (FeedForward)Two stacked 1×1 convs — pure channel mixing, no spatial

The ExtraDW instantiation (both depthwise convs on) is the new and surprisingly powerful member. Why does adding a second depthwise help?

Worked example: the four configs on one input

Input [28, 28, 64], e = 4 (eC = 256), C' = 64, k = 3, stride 1. Compare MAC cost (the always-on 1×1 convs are shared by all four):

ConfigStart DW MACsMid DW MACs1×1 MACs (both)Total
FFN0025.69M25.69M
IB028·28·256·9 = 1.81M25.69M27.50M
ConvNext-like28·28·64·9 = 0.45M025.69M26.14M
ExtraDW0.45M1.81M25.69M27.95M

The four configs differ by at most ~9% in FLOPs — they are nearly interchangeable on a FLOP budget — but they place spatial mixing very differently and therefore land in different spots on each chip's roofline. That is the point: the search has cheap freedom to choose where the receptive field comes from. Note the start-DW is 4× cheaper than the mid-DW here because it runs on 64 channels instead of the expanded 256.

UIB: two switches, four blocks

Toggle the two optional depthwise convs. The pipeline redraws and the block's name updates to IB / ConvNext-like / ExtraDW / FFN. The effective receptive field and FLOP estimate update live.

Block: IB  |  receptive field 3×3

One more subtlety the paper handles carefully: stride placement. When a UIB block downsamples (stride 2), the stride lives on whichever depthwise conv is present (preferring the mid-DW), keeping the 1×1 convs at full resolution-independent matmul shapes. If both depthwise convs are off (FFN config), the block cannot downsample on its own — the search simply won't place an FFN where a stride is required.

Why a superset block is the right abstraction: NAS is only as good as its search space. If the space can't express ExtraDW, the search can never find it. By unifying IB, ConvNext, ExtraDW, and FFN under two binary switches, MNv4 makes the shape of each block a low-dimensional, differentiable-friendly choice — and crucially, all four share the same expensive 1×1 convs, so switching between them is a roofline decision, not a capacity decision.
Common misconception: "ExtraDW is just IB with a bigger kernel." No — it is two depthwise convs in different spaces (narrow input and wide expansion), separated by the 1×1 expansion. Two stacked depthwise convs are not equivalent to one larger-kernel depthwise: they are interleaved with a pointwise channel mix, so they compose spatial and channel reasoning, not just a wider spatial filter.
What makes the UIB block "universal," and what is the ExtraDW configuration?

Chapter 4: Mobile MQA — attention that is actually fast on-device

Convolutions have a local receptive field. To reach genuinely global context (helpful for the largest, highest-accuracy MNv4 models) you want attention. But standard multi-head attention is brutal on mobile: it is memory-bound (low operational intensity, per Chapter 1) and its keys/values blow up memory traffic. MNv4 introduces Mobile MQA, an attention block engineered around the roofline.

Start from standard attention on a feature map flattened to N = H·W tokens of dimension d:

Attention(Q, K, V) = softmax( QKT / √dh ) V

In multi-head attention (MHA) with h heads, each head has its own Q, K, and V projections. Keys and values therefore cost h separate [N, dh] tensors. The K and V tensors dominate the memory traffic, and on a mobile accelerator that traffic — not the matmul FLOPs — is the bottleneck.

Idea 1: Multi-Query Attention (MQA)

MQA (Shazeer 2019) keeps h separate query heads but uses a single shared key and a single shared value across all heads:

headi = softmax( Qi KT / √dh ) V    (same K, V for every i)

This collapses the K/V memory from h projections to 1. The query is still per-head (cheap to compute, the part that gives heads their diversity), but the expensive-to-move K and V are shared. On-device this is a large win precisely because the bottleneck was K/V traffic, not query FLOPs. The paper reports MQA gives a substantial speedup on mobile accelerators with negligible accuracy loss versus MHA.

Idea 2: Spatial reduction of K and V (SR)

Even one K and one V over all N = H·W positions is a lot when the feature map is large. Mobile MQA adds an optional spatial-reduction: downsample the keys and values (a stride-s depthwise conv, typically s = 2) before the attention, so K and V have N/s² rows while the queries keep full resolution N. The attention matrix shrinks from N×N to N×(N/s²):

Q: [N, dh]    K, V: [N/s², dh]    scores: [N, N/s²]

Queries still attend globally (every position gets a global receptive field), but to a coarser summary of the scene. For classification this is nearly lossless — fine detail is already captured by the convolutional stages; attention only needs the global gist.

Worked example: the memory MQA + SR saves

Take a 14×14 feature map, so N = 196, with h = 8 heads and dh = 32, spatial reduction s = 2 (so N/s² = 49).

K/V tensor sizes:

Attention matrix size: MHA computes h·N·N = 8·196·196 = 307,328 scores; MQA+SR computes h·N·(N/4) = 8·196·49 = 76,832 — a 4× shrink in the score matrix too. The combined effect: a global-context block whose cost is dominated by the small per-head query matmuls, with the memory-heavy K/V slashed by ~32×. That is what makes attention viable on a phone.

Mobile MQA: shared K/V and spatial reduction

Left: standard MHA — every head carries its own K and V (lots of memory). Middle: MQA — heads share one K and one V. Right: spatial reduction shrinks K/V further. Drag the head count and SR factor; the K/V memory bar and the score-matrix size update live.

Heads h 8 SR factor s 2

In MNv4 the attention is added only in the deepest, lowest-resolution stages (where N is small, so even attention is affordable) and only in the Hybrid variants. The pure-conv variants skip it entirely — many accelerators run convolution far better than attention, so for those targets a conv-only model is on the frontier. This is the universality philosophy again: attention is one tool offered to the search, not a mandate.

Common misconception: "MQA shares K and V because it saves FLOPs." It saves memory traffic, not primarily FLOPs. Computing per-head keys is cheap arithmetic; the cost is reading/writing h copies of K and V across the memory bus. Mobile attention is memory-bound, so collapsing K/V to a single shared tensor attacks the actual bottleneck. (FLOPs do drop too, but that is the secondary effect.)
What two ideas make Mobile MQA fast on a mobile accelerator?

Chapter 5: Two-Phase Hardware-Aware NAS

We now have a rich search space: a stack of UIB blocks, each with two depthwise switches, kernel sizes, expansion ratios, and channel counts, plus optional Mobile MQA in the deep stages. The combinatorics are enormous. MNv4 searches it with two-phase neural architecture search guided by measured on-device latency.

Why two phases? A flat search over everything at once is sample-inefficient: the search wastes most of its budget on architectures that are the wrong overall size. MNv4 factorizes the decision:

Phase 1 — Coarse-grained search
Fix a simple block (a plain inverted bottleneck) and search the macro structure: how many stages, how deep each stage, channel widths, where to downsample, and roughly where to put attention. This pins down the network's overall size and FLOP/latency budget on the target chip.
Phase 2 — Fine-grained search
With the macro skeleton fixed, search each block's UIB micro choices: the two depthwise switches (IB / ConvNext / ExtraDW / FFN), kernel sizes (3 vs 5), and — in hybrid models — whether to insert Mobile MQA. This is where ExtraDW gets discovered, per-stage, per-target.

The objective is a Pareto search: maximize accuracy subject to a latency target measured by actually running each candidate on the device (or a calibrated latency model of it), not by a FLOP proxy. Per Chapter 1, FLOPs and latency disagree on mobile chips, so a FLOP-guided search would systematically pick the wrong blocks.

Why factorizing helps — a back-of-envelope

Suppose the space has M macro configurations and, for each, F micro configurations per block over B blocks (so FB micro choices). A flat search faces M·FB joint candidates. The two-phase scheme first explores ~M macro candidates (with a fixed cheap block), picks the best skeleton, then explores micro choices around that one skeleton — roughly M + FB work instead of M·FB. With M ≈ 1000 and FB ≈ 106, that is ~106 evaluations instead of ~109. The factorization is a multiplicative-to-additive saving — the same trick as separating concerns in any large search.

Two-phase search: shrinking the space

Phase 1 picks the macro skeleton (stage depths, widths) — shown as the column heights. Phase 2 then colors each block by its discovered UIB type. Click "Run Phase 1" then "Run Phase 2" to watch the search resolve coarse-to-fine. Notice attention (purple) only appears in the deep, low-resolution stages.

Ready — search not started

The latency model and "robust" search

Measuring every candidate on real hardware is slow, so NAS systems build a latency lookup table / cost model: benchmark each primitive (a UIB of a given config, kernel, width, resolution) once on the device, store the measured latency, and estimate a whole network as the sum of its blocks. This makes the inner loop a fast table lookup — which is exactly the "latency/accuracy lookup" we build in the Chapter 8 explorer and the second Code Lab. MNv4 also designs for robustness: it seeks architectures that are good across several target devices, not overfit to one latency table, which is what produces the universal frontier.

Hardware-aware is the whole game. The difference between MNv4 and a generic NAS result is not the search algorithm — it is the objective. By measuring latency on the actual accelerator and by giving the search a space (UIB) whose members trade off cleanly on the roofline, the search discovers device-appropriate blocks: ExtraDW where depthwise is cheap, FFN/IB where the matrix engine dominates, attention only where the map is small.
Common misconception: "NAS found a magic architecture humans couldn't." The contribution is mostly the search space and objective, not an exotic topology. MNv4's networks are clean stacks of UIB blocks; what NAS supplies is the per-stage, per-device assignment of the two depthwise switches and kernel sizes under a real latency budget. Give a human the same space and roofline and they would reach similar choices — the search just does it exhaustively and per-target.
Why does MNv4 use a two-phase NAS, and what guides the search objective?

Chapter 6: Distillation and the Training Recipe

A great architecture is only half of a great model — the training recipe matters as much. MNv4's largest model (Hybrid-Large) reaches ~87% ImageNet-1K top-1, and a big chunk of that final accuracy comes from knowledge distillation, plus a refined data-augmentation and regularization recipe.

Distillation in one equation

A large, accurate teacher network produces soft probability vectors over the 1000 classes. The small student (the MNv4 model) is trained to match the teacher's softened distribution, not just the hard one-hot label. With temperature T, the teacher's softened probabilities are:

piT = exp(zi / T) / ∑j exp(zj / T)

where z are the teacher logits. The student's loss blends a hard-label cross-entropy with a soft-target term that pulls the student's softened distribution qT toward the teacher's:

L = (1 − α) · CE(y, q) + α · T² · KL( pT ∥ qT )

The T² factor rescales the soft-target gradients (which shrink like 1/T²) so they stay comparable to the hard-label term as you raise the temperature. The dark knowledge idea: the teacher's "wrong" probabilities carry information — that a cat image looks 8% like a lynx and 0.001% like a truck tells the student about class geometry that a one-hot label never could.

Why distillation helps small models so much

A mobile-sized student has limited capacity. Hard labels give it one bit of supervision per example ("this is class 7"). Soft targets give it a full 1000-dimensional gradient signal per example — a much richer training set without any new data. Empirically this is worth several points of top-1 for compact models, which is why the headline ~87% figure relies on it. MNv4 also uses an offline-generated set of teacher predictions so distillation is cheap to run at scale.

Distillation: hard label vs soft teacher targets

A one-hot hard label vs the teacher's softened distribution at temperature T. Drag T: at T=1 the teacher is sharp (close to one-hot, little extra info); raising T reveals the "dark knowledge" — the relative probabilities of the runner-up classes the student learns from.

Temperature T 3.0

The rest of the recipe

IngredientRole
Knowledge distillationSoft teacher targets — the single biggest accuracy lever for the small students
Strong augmentation (RandAugment, mixup/CutMix)Regularizes; lets long training schedules avoid overfit
EMA of weightsA smoothed weight average used at evaluation — a cheap accuracy bump
Long schedules + cosine LRCompact models need many epochs to converge fully
Resolution scalingLarger input resolutions for larger models trade latency for accuracy along the frontier
Common misconception: "MNv4's accuracy comes purely from the architecture." The architecture buys you the right latency/accuracy shape; distillation and the augmentation recipe buy you the final points of top-1 within that shape. Strip distillation and the same architecture lands several points lower. Reporting architecture and recipe together is honest — and it means you cannot reproduce ~87% from the block diagram alone.
Why is knowledge distillation especially valuable for a mobile-sized model like MNv4?

Chapter 7: Results and Ablations

The headline result is the Pareto frontier: across a suite of mobile accelerators — Pixel CPU, Pixel EdgeTPU, Samsung/Qualcomm-class GPUs and Hexagon DSPs, and Apple Neural Engine — the MNv4 family sits on or near the best achievable accuracy at each latency. No single competitor backbone matches it on all targets simultaneously; MNv4 is described as "mostly Pareto-optimal across the mobile ecosystem." The Hybrid-Large model reaches around 87% ImageNet-1K top-1, with hybrid models running in the low-single-digit milliseconds on a Pixel EdgeTPU.

The family spans Small / Medium / Large, each in a Conv (pure UIB) and a Hybrid (UIB + Mobile MQA in the deep stages) form. Conv variants win on chips that run attention poorly; Hybrid variants squeeze out the top accuracy where attention is affordable.

Latency / accuracy Pareto frontier (schematic)

A schematic of the latency vs accuracy plane on one accelerator. The MNv4 frontier dominates a prior baseline family — at any latency budget, MNv4 reaches higher accuracy, and at any accuracy, lower latency. Drag the latency budget to read off the best model at that budget.

Latency budget (ms) 4.0

What the ablations show

AblationFinding
Remove UIB (fix to plain IB)Frontier moves down/right — ExtraDW and the per-stage flexibility account for a meaningful efficiency gain on most targets
MHA → MQA in attentionLarge on-device speedup (K/V traffic collapses) at negligible accuracy cost — confirms attention was memory-bound
Add spatial reduction to K/VFurther latency cut on large maps with near-zero accuracy loss for classification
Remove distillationTop-1 drops several points — recipe is not optional for the headline numbers
FLOP-guided vs latency-guided NASFLOP-guided picks worse blocks on matrix-engine targets — measured latency is essential

Reading the frontier like an engineer

Two networks A and B with the same accuracy but different latency: B dominates if it is faster. A whole family Pareto-dominates another if, for every accuracy level, it offers a lower-latency model (and vice versa). Formally, family F dominates family G when for each model g in G there exists f in F with accuracy(f) ≥ accuracy(g) and latency(f) ≤ latency(g), strictly on at least one axis. MNv4's claim is precisely this kind of dominance — replicated across many devices, which is the part nobody had achieved before.

The universality is the result. Any one of these tricks (UIB, MQA, hardware-aware NAS) existed in spirit before. The paper's contribution is composing them into a family that is simultaneously near-optimal on chips with opposite cost models. That cross-device robustness — not a single benchmark number — is what "Universal Models for the Mobile Ecosystem" means.
Common misconception: "~87% top-1 means MNv4 beats big ViTs." No — it means a mobile-latency model reaches that accuracy. Server-scale models go higher. The achievement is the accuracy-per-millisecond-on-a-phone, i.e. the position on the frontier, not the absolute top-1 versus unconstrained models.
What does it mean that MNv4 is "mostly Pareto-optimal across the mobile ecosystem"?

Chapter 8: UIB Explorer — build a stage, read its cost on every chip

This is the payoff. You are now the NAS. Configure a small stack of UIB blocks — choose each block's type (IB / ConvNext / ExtraDW / FFN), kernel size, and whether the deepest block uses Mobile MQA — and the explorer estimates accuracy contribution and latency on four different accelerators from a lookup table, exactly as the hardware-aware search does in its inner loop. Watch how the best configuration differs by target chip.

The estimate combines the per-primitive latency table (Chapter 5) with a roofline weighting (Chapter 1): on the matrix-engine EdgeTPU, depthwise convs are penalized, so ExtraDW costs more latency; on the DSP/CPU they are cheap, so ExtraDW is nearly free accuracy. Mobile MQA adds global context (accuracy) but is only affordable in the deep, low-resolution block. Try to find the configuration on the frontier for each device — you will discover the search's lesson: the best block assignment is device-dependent.

Interactive UIB stage builder + latency/accuracy lookup

Pick the target chip, set each of three blocks' UIB type and kernel, and toggle Mobile MQA on the deepest block. The bars show estimated latency on the selected chip and an accuracy score; the dot shows where your design lands on the frontier. Re-pick the chip and watch the optimal choices change.

Target chip
Block 1 Block 2 Block 3 (deep)
Kernel EdgeTPU — latency 1.0 | acc 0.0

The second Code Lab below implements the engine behind this explorer: a latency lookup that sums per-block measured costs and returns the accuracy/latency pair a NAS would read off. That is the literal inner loop of hardware-aware search — and the thing that makes the whole approach tractable.

Chapter 9: Limitations and Connections

MNv4 is a strong, practical result, but it is honest about its boundaries — and placing it among neighboring ideas is the best way to remember it.

Limitations

Connections — related Veanors

Connections — related Gleams

Cheat sheet

ConceptOne-line takeaway
The problemOne backbone that is near-Pareto-optimal on many mobile chips at once, despite their opposite cost models
Rooflinerate = min(P, I·B); depthwise convs have low operational intensity → memory-bound on matrix engines
Inverted bottlenecknarrow→wide→narrow; cheap depthwise mixing in the wide space, narrow data between blocks; linear projection
UIBtwo optional depthwise convs (start + middle) around the 1×1 expand/project → IB / ConvNext / ExtraDW / FFN
ExtraDWboth depthwise convs on; larger receptive field, spatial mixing in narrow and wide spaces; MNv4's signature
Mobile MQAshared K/V across heads (MQA) + optional spatial reduction of K/V; attacks memory-bound attention
Two-phase NAScoarse macro skeleton, then fine per-block UIB choices; objective = accuracy under measured on-device latency
Distillationsoft teacher targets (dark knowledge), T² gradient rescaling; several points of top-1 for the small students
ResultMNv4 family near the frontier on CPU/EdgeTPU/GPU/DSP/ANE; Hybrid-Large ≈ 87% ImageNet-1K top-1
The one thing to remember: FLOPs are not latency. MNv4's every choice — the two depthwise switches in UIB, the shared K/V in Mobile MQA, the latency-measured NAS objective — is a move on the roofline of a specific chip. Give a search the right space (blocks that trade off cleanly on the roofline) and the right objective (measured latency) and it produces a model that is fast everywhere, not just where FLOPs happened to predict.