The MobileNetV2 / MobileNetV4 backward chains — the ℝ maps the MobileNet ties are about #
The hand-composed reverse of the committed MobileNet forwards, as plain defs on the cotangent:
the batched chains mnv2InputGradB (seventeen bottlenecks, the reverse of mobilenetv2ForwardBFull) and
mnv4InputGradB (MobileNetV4-Conv-M: the fused stage, twenty-one UIB blocks and two head convs,
the reverse of mobilenetv4ForwardBFull), both at a variable batch N and class count. Each
chain keeps its block backwards and its BatchNorm backwards as supplied maps and spells only the
endpoints, so that the certified tie (MobileNetV2WholeBackCertifiedTieB,
MobileNetV4WholeBackCertifiedTieB) is a statement about a NAMED chain of the forward's shape.
Padding: MobileNetV2 is XLA-SAME at its stem (flatConvStride2XlaBack, the odd-phase
scatter decimateOddBack) and its strided depthwises (depthwiseStride2FlatXlaBack), the
TF-origin convention. MobileNetV4 follows timm's mobilenetv4_conv_medium and is SYMMETRIC at
every strided site — its stem is ResNet's flatConvStride2Back.
Neither net has a stem pool, so every batched endpoint is StableHLO.batchMap N of a
per-example leaf; none of ResNet's row-indexed batchMapAux lift is needed here.
Note: mnv4InputGradB is stated to the image, one step past the artifact: MobileNetV4's committed
backward stops at the stem conv's WEIGHT gradient (no render emits a gradient into %x), so this
chain runs one flatConvStride2Back past that point, as EfficientNet-B0's does at its stem.
No number is stated about either chain.
The batched whole-net input-gradient backward of the seventeen-bottleneck MobileNetV2 —
the exact reverse of mobilenetv2ForwardBFull = head ∘ b17 ∘ … ∘ b1 ∘ stem: dense-back →
GAP-back → the head's relu6 mask, BatchNorm back and 1×1 conv back → the seventeen bottleneck
backwards → the stem's relu6 mask, BatchNorm back and XLA-SAME 3×3/s2 conv back. The block
backwards, the two BatchNorm backs and the two relu6 masks' predicates are supplied; the
conv, GAP and dense leaves are concrete and lifted over the N examples.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The batched whole-net input-gradient backward of MobileNetV4-Conv-M — the exact reverse
of mobilenetv4ForwardBFull (timm's mobilenetv4_conv_medium): dense-back, relabelled to
[N, 1280, 1, 1] → conv_head's relu mask, BatchNorm back and 1×1 conv back at 1×1 →
relabelled to [N, 960], GAP-back → the first head conv's relu mask, BatchNorm back and 1×1
conv back at 7×7 → the twenty-one UIB block backwards → the fused stage's → the stem's relu
mask, BatchNorm back and symmetric 3×3/s2 conv back.
The fused stage's and the twenty-one blocks' backwards are supplied, as are the three
BatchNorm backs and the three relu masks' predicates; the conv, GAP, relabel and dense leaves are concrete and lifted over the N
examples. The two relabellings are the head's [N, c] ↔ [N, c, 1, 1] (castIdx in the
graph, no text in the render).
f is the final feature side — the render's own knob (mobilenetv4AdamTrainStepText's f):
7 at the 224 input, 8 at the paper tier's 256 (mnv4in256), the other sides its multiples
(stem 16f, fused 8f, then 4f, 2f, f; the input 2·16f). Added 2026-10-12 so the whole-net tie
covers both renders; every earlier statement is the instance f := 7, and 16 * 7 IS 112
to the kernel.
Equations
- One or more equations did not get rendered due to their size.