The PAPER-SPEC MobileNetV2 at INFERENCE — all 17 bottlenecks, forward + graph + faithfulness #
The eval twin of MobileNetV2FullPaper.lean. That file states the seventeen-block [t,c,n,s] net
at TRAINING BatchNorm, the world its VJP and its typed graph live in; this file states the same
ladder at INFERENCE BatchNorm — frozen running statistics at all 52 sites, one shared ε, as
the shipped mobilenetv2_fwd_eval does — and proves its
typed SHlo graph denotes it — T2 at inference BatchNorm for the paper net, the graph of
mobilenetv2_fwd_eval.mlir and its 1000-class twin. (Built 2026-09-05 so the whole-net float
budget could end at a graph; the budget was deleted 2026-09-08 and the graph statement stays —
planning/archive/proofs_tier_to_paper_nets.md 3.2(e).)
Pure enumeration and chaining of MobileNetV2RenderPCEval.lean's four inference stage
abbreviations (ivExpandPCEval / ivDepthwisePCEval / ivDepthwiseStridedPCEval /
ivProjectPCEval) and its two bodies, generic in the class count. No new mathematics and no new
tokens: every BatchNorm node's den is bnPerChannelEvalTensor3, proved once.
⭐ The SSA names are the committed ones, and that is the point of this file's graph. The
seventeen-block TRAINING graph names its parameters %b17gp/%b17btp, where the render emits %gp17/%btp17. This
file's graph carries bnSiteP's names verbatim: %stnmu/%stnvar for the stem, %b{k}enmu,
%b{k}dnmu, %b{k}pnmu and their nvar peers per block, %hnmu/%hnvar for the head, around
irSig/irSigNoExp's %We{k}/%ge{k}/%bte{k}/%Wd{k}/%gd{k}/%btd{k}/%Wp{k}/%gp{k}/
%btp{k}. Names are pretty-printing metadata and do not enter den; matching them is what lets a
reader diff the typed graph against the committed text line for line.
What it is tied to. mobilenetv2_fwd_eval.mlir is THIS net: 263 inputs — %x, 158 parameter
tensors (paperSig at convBias := false, which is why the graph's bias slots %bs/%bd{k}/…
have no argument: the render folds each conv bias into the BatchNorm that follows it) and 104
statistic slots (52 sites × μ, var) — with mobilenetv2in_fwd_eval.mlir its 1000-class twin. The
classifier here is generic in nCls, so one theorem covers both.
Paper [t,c,n,s] spec (stem 3×3-s2 3→32 at the XLA-SAME phase; head 1×1 320→1280 → GAP → dense):
(1, 16,1,1) (6, 24,2,2) (6, 32,3,2) (6, 64,4,2) (6, 96,3,1) (6,160,3,2) (6,320,1,1)
Weights and running statistics of one MobileNetV2 bottleneck at inference. ⚠ No per-site ε:
the eval forward takes ONE shared ε, as the
render emits (a single eps constant), where the training bundle IVW carries one per site.
- eW : Kernel4 mid ic 1 1
- eb : Vec mid
- eγ : Vec mid
- eβ : Vec mid
- eμ : Vec mid
- ev : Vec mid
- dW : DepthwiseKernel mid 3 3
- db : Vec mid
- dγ : Vec mid
- dβ : Vec mid
- dμ : Vec mid
- dv : Vec mid
- pW : Kernel4 oc mid 1 1
- pb : Vec oc
- pγ : Vec oc
- pβ : Vec oc
- pμ : Vec oc
- pv : Vec oc
Instances For
All paper-spec MobileNetV2 parameters and running statistics at inference: stem (3×3-s2 3→32)
- the 17 bottlenecks of the
[t,c,n,s]table + head (1×1 320→1280) + dense (1280→nCls). 52 BatchNorm sites, each with its frozenμandv.
- sW : Kernel4 32 3 3 3
- sb : Vec 32
- sγ : Vec 32
- sβ : Vec 32
- sμ : Vec 32
- sv : Vec 32
- b1 : IVWNoExpEval 32 16
- b2 : IVWEval 16 96 24
- b3 : IVWEval 24 144 24
- b4 : IVWEval 24 144 32
- b5 : IVWEval 32 192 32
- b6 : IVWEval 32 192 32
- b7 : IVWEval 32 192 64
- b8 : IVWEval 64 384 64
- b9 : IVWEval 64 384 64
- b10 : IVWEval 64 384 64
- b11 : IVWEval 64 384 96
- b12 : IVWEval 96 576 96
- b13 : IVWEval 96 576 96
- b14 : IVWEval 96 576 160
- b15 : IVWEval 160 960 160
- b16 : IVWEval 160 960 160
- b17 : IVWEval 160 960 320
- hW : Kernel4 1280 320 1 1
- hb : Vec 1280
- hγ : Vec 1280
- hβ : Vec 1280
- hμ : Vec 1280
- hv : Vec 1280
- fcW : Mat 1280 nCls
- fcb : Vec nCls
Instances For
t=1 bottleneck at inference (no expand, no skip): project ∘ depthwise.
Equations
Instances For
Stride-1 bottleneck WITHOUT skip (ic ≠ oc) at inference.
Equations
Instances For
Stride-1 bottleneck WITH the identity skip at inference.
Equations
Instances For
Stride-2 downsampling bottleneck at inference (XLA-SAME depthwise).
Equations
Instances For
The seventeen-block MobileNetV2 inference forward — the paper [t,c,n,s] ladder with
frozen running statistics at all 52 BatchNorm sites, at one shared ε. Nested-application
form (NOT ∘), as the training twin, so the faithfulness proof closes by simp and rfl.
Equations
- One or more equations did not get rendered due to their size.
Instances For
t=1 bottleneck inference graph: bnEval ∘ conv1×1 ∘ relu6 ∘ bnEval ∘ depthwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Stride-1 no-skip bottleneck inference graph: expand → depthwise → project.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Stride-1 skip bottleneck inference graph: the body + the addV identity skip.
Equations
- Proofs.StableHLO.ivResidGraphEvalW k epsStr h w ε p e = (Proofs.StableHLO.ivExpOnlyGraphEvalW k epsStr h w ε p e).addV e
Instances For
Stride-2 downsampling bottleneck inference graph: expand at 2h×2w → XLA-SAME strided
depthwise → project.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The full paper-spec MobileNetV2 inference forward graph (3×224² → nCls): XLA-SAME
strided stem → the 17 bottlenecks of the [t,c,n,s] table → 1×1 conv-bn-relu6 head → GAP →
dense, every one of the 52 BatchNorm sites reading frozen running statistics through
bnPerChannelEvalF. The typed form of the shipped mobilenetv2_fwd_eval.
Equations
- One or more equations did not get rendered due to their size.
Instances For
⭐ Seventeen-block inference MobileNetV2 forward faithfulness. The typed graph denotes
mobilenetv2ForwardPaperEval — chained from the per-block-kind *GraphEvalW_faithful lemmas
and then a structural rfl, the training twin's recipe with bnPerChannelEvalF_faithful in
place of bnPerChannelF_faithful.