EfficientNet-B0 — every parameter gradient node IS the loss's derivative in that parameter #
efficientnet_net_tiedG says each of the 262 parameter gradient nodes denotes its layer's
parameter Jacobian contracted with the cotangent the emitted backward chain threads to it, the
chain's top being the smoothed-loss cotangent and each block's cotangent its certified VJP's
backward. enet_net_lossGrad composes them: for any loss L of the logits whose gradient at the
net's output is g, every node is ∂L/∂θ of the WHOLE net efficientnetForwardBFull with that
one parameter varied. enet_net_lossGrad_smoothedCE discharges hL for the label-smoothed loss
the artifacts ship.
How. MobileNetV2ParamGrad's shape:
- The tail every MBConv block shares (depthwise BN → swish → squeeze-excite → 1×1 project →
project BN, over
EnTail): the loss read at each of its activations and its gradient, the tie's own cotangent (enetTail_hasGradAt). Every stage VJP is global (swish has no kink), and the tie's cotangents are spelled as the certified backwards (bnBackB,swBackB,seInB), so each step is oneHasGradAt.comp. - The SE gate (
enet_se_lossTiedB): with the block inputdrheld fixed, the SE output is the gated productdr ⊙ broadcast(σ(e2))(seB_eq_gateMul), whose VJP in the gate is the emittedgateCotB(seGateMulBHasVJP). The loss read at the excite and reduce pre-activations then has the tie'scotE2andcotE1as its gradients, and the four SE dense nodes are its derivatives. - Per block kind (at variable widths): the expand stage (stride 1 or at the input grid
2h × 2w) or none, the depthwise, then the tail. The stride-1 bundle serves both the skip blocks and the two widenings (b9,b16): a skip block's body sees the lossu ↦ Gn (u + v), whose gradient at the body output is stilldyOut(enet_resid_lossTiedG). - Bias nodes. B0 emits every conv and depthwise bias gradient with the BatchNorm β op
(
ConvBBetaTiedB);GradNodeB.biasBeta_eq_pdivmakes it the bias derivative. - Per net: the loss read after each block (
enetSuf*), pulled back through the sixteen certified block VJPs and the head's, and eachΦidentified with the whole net at updated weights by a standaloneenet_factor_*theorem.
Hypotheses. B0Weights.EpsPos (every BN ε > 0), as in the tie; there is no smoothness
hypothesis. For the smoothed loss, every example's target sums to one and 0 < nCls. Drop-path,
classifier dropout and the bf16 nodes are outside this statement, as they are outside the tie.
The SE block's gated product with the gate read at its pre-broadcast [N, c] value:
x ⊙ broadcast(s), per example.
Equations
- Proofs.EnetTiePoCG.seGateMulB N c h w x s J = x J * s (finProdFinEquiv ((finProdFinEquiv.symm J).1, Proofs.flatChannel c h w (finProdFinEquiv.symm J).2))
Instances For
The gated product is linear in the gate; its backward is gateCotB, the emitted
seReduceB.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The batched SE block, split at the gate. seB is the gated product of the block input
with the sigmoid of the excite dense's output, the squeeze path computed on the whole batch —
the spelling of the tie's SE activations s e1 z e2.
The loss at the excite dense's output (the sigmoid's input), the SE input dr held fixed.
Gse is the loss at the SE output.
Equations
- Proofs.EnetTiePoCG.enetSeGE2 N Gse dr e = Gse (Proofs.EnetTiePoCG.seGateMulB N c h w dr (Proofs.sigmoid (N * c) e))
Instances For
The loss at the reduce dense's output (the swish's input), dr held fixed.
Equations
- Proofs.EnetTiePoCG.enetSeGE1 N Gse dr W₂ b₂ e = Proofs.EnetTiePoCG.enetSeGE2 N Gse dr (Proofs.StableHLO.batchMap N (Proofs.dense W₂ b₂) (Proofs.swish (N * r) e))
Instances For
The SE gate's two cotangents are loss gradients: from the gradient cot at the SE output,
the loss at the excite pre-activation has gradient σ'(e2) · gateCotB dr cot (the tie's
cotE2), and at the reduce pre-activation the tie's cotE1.
SE, every parameter node a loss derivative — the reduce and excite dense W/b nodes the tie
states, Ψ the loss as a function of (W₁, b₁, W₂, b₂) with the SE input dr fixed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The depthwise BN's output.
Equations
- Proofs.EnetTiePoCG.enetTailDn N h w t dc = Proofs.StableHLO.bnBatchLA N mid h w t.dε t.dγ t.dβ dc
Instances For
The depthwise swish's output (the SE input).
Equations
- Proofs.EnetTiePoCG.enetTailDr N h w t dc = Proofs.swish (N * (mid * h * w)) (Proofs.EnetTiePoCG.enetTailDn N h w t dc)
Instances For
The SE output.
Equations
- Proofs.EnetTiePoCG.enetTailSe N h w t dc = Proofs.seB N t.z1 t.zb1 t.z2 t.zb2 (Proofs.EnetTiePoCG.enetTailDr N h w t dc)
Instances For
The project conv's output.
Equations
- Proofs.EnetTiePoCG.enetTailPc N h w t dc = Proofs.StableHLO.batchMap N (Proofs.flatConv t.pW t.pb) (Proofs.EnetTiePoCG.enetTailSe N h w t dc)
Instances For
The tail's output, the project BN's.
Equations
- Proofs.EnetTiePoCG.enetTailB N h w t dc = Proofs.StableHLO.bnBatchLA N oc h w t.pε t.pγ t.pβ (Proofs.EnetTiePoCG.enetTailPc N h w t dc)
Instances For
The loss at the project conv's output.
Equations
- Proofs.EnetTiePoCG.enetTailGPc N h w Gb t z = Gb (Proofs.StableHLO.bnBatchLA N oc h w t.pε t.pγ t.pβ z)
Instances For
The loss at the SE output.
Equations
- Proofs.EnetTiePoCG.enetTailGSe N h w Gb t u = Proofs.EnetTiePoCG.enetTailGPc N h w Gb t (Proofs.StableHLO.batchMap N (Proofs.flatConv t.pW t.pb) u)
Instances For
The loss at the depthwise BN's output.
Equations
- Proofs.EnetTiePoCG.enetTailGDn N h w Gb t u = Proofs.EnetTiePoCG.enetTailGSe N h w Gb t (Proofs.seB N t.z1 t.zb1 t.z2 t.zb2 (Proofs.swish (N * (mid * h * w)) u))
Instances For
The loss at the depthwise conv's output.
Equations
- Proofs.EnetTiePoCG.enetTailGDc N h w Gb t z = Proofs.EnetTiePoCG.enetTailGDn N h w Gb t (Proofs.StableHLO.bnBatchLA N mid h w t.dε t.dγ t.dβ z)
Instances For
The tie's cotPbn: the cotangent at the project conv's output.
Equations
- Proofs.EnetTiePoCG.enetTailCotPbn N h w t hp dc dy = Proofs.BackLinks.bnBackB N oc h w t.pε hp t.pγ t.pβ (Proofs.EnetTiePoCG.enetTailPc N h w t dc) dy
Instances For
The tie's cotSeOut: the cotangent at the SE output.
Equations
- Proofs.EnetTiePoCG.enetTailCotSeOut N h w t hp dc dy = Proofs.BackLinks.cInB N t.pW t.pb (Proofs.EnetTiePoCG.enetTailCotPbn N h w t hp dc dy)
Instances For
The tie's cotDn: the cotangent at the depthwise BN's output.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The tie's cotDc: the cotangent at the depthwise conv's output.
Equations
- Proofs.EnetTiePoCG.enetTailCotDc N h w t hd hp dc dy = Proofs.BackLinks.bnBackB N mid h w t.dε hd t.dγ t.dβ dc (Proofs.EnetTiePoCG.enetTailCotDn N h w t hp dc dy)
Instances For
The tail's cotangents are loss gradients, each stage one HasGradAt.comp through its
certified VJP.
The expand conv's output.
Equations
- Proofs.EnetTiePoCG.enetExpEc N h w p xin = Proofs.StableHLO.batchMap N (Proofs.flatConv p.eW p.eb) xin
Instances For
The expand swish's output (the depthwise input).
Equations
- Proofs.EnetTiePoCG.enetExpEr N h w p xin = Proofs.swish (N * (mid * h * w)) (Proofs.StableHLO.bnBatchLA N mid h w p.eε p.eγ p.eβ (Proofs.EnetTiePoCG.enetExpEc N h w p xin))
Instances For
The depthwise conv's output.
Equations
- Proofs.EnetTiePoCG.enetExpDc N h w p xin = Proofs.StableHLO.batchMap N (Proofs.depthwiseFlat p.dW p.db) (Proofs.EnetTiePoCG.enetExpEr N h w p xin)
Instances For
The loss at the expand conv's output.
Equations
- Proofs.EnetTiePoCG.enetExpGEc N h w Gb p z = Proofs.EnetTiePoCG.enetExpGEn N h w Gb p (Proofs.StableHLO.bnBatchLA N mid h w p.eε p.eγ p.eβ z)
Instances For
Stride-1 expand body, every parameter node a loss derivative — the thirteen nodes
enetExpTiedG ties (its BN pairs split into γ and β), at the tie's forward activations and
cotangents, Φ the loss at the body output as a function of the block's weight record.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The stride-1 expand bundle, from the loss Gb at the body output. A widening block (b9,
b16) is this at Gb := Gn.
A skip block's thirteen nodes. The identity skip is a constant once a body parameter
varies, so the loss at the body output has gradient dyOut there and the body bundle
applies.
The expand conv's output, at the input grid 2h × 2w.
Equations
- Proofs.EnetTiePoCG.enetStrEc N h w p xin = Proofs.StableHLO.batchMap N (Proofs.flatConv p.eW p.eb) xin
Instances For
The strided depthwise conv's output.
Equations
- Proofs.EnetTiePoCG.enetStrDc N h w p xin = Proofs.StableHLO.batchMap N (Proofs.depthwiseStride2Flat p.dW p.db) (Proofs.EnetTiePoCG.enetStrEr N h w p xin)
Instances For
The loss at the expand conv's output.
Equations
- Proofs.EnetTiePoCG.enetStrGEc N h w Gb p z = Proofs.EnetTiePoCG.enetStrGEn N h w Gb p (Proofs.StableHLO.bnBatchLA N mid (2 * h) (2 * w) p.eε p.eγ p.eβ z)
Instances For
Stride-2 block, every parameter node a loss derivative — the thirteen nodes
enetStridedTiedG ties; the depthwise nodes are the symmetric strided ones.
Equations
- One or more equations did not get rendered due to their size.
Instances For
No-expand block, every parameter node a loss derivative — the ten nodes enetNoExpTiedG
ties.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Stem, every parameter node a loss derivative — the four nodes enetStemTiedG ties, Φ
the loss as a function of the stem's (W, b, γ, β).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Head, every parameter node a loss derivative — the six nodes enetHeadTiedG ties, at the
loss cotangent g, Φ the loss as a function of (hW, hb, hγ, hβ, Wfc, bfc).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pull the loss gradient back through the t = 1 block's certified VJP.
…through a stride-2 block.
Block b1's output (the tie's a1).
Equations
- Proofs.EnetTiePoCG.enetPreB1 N w = Proofs.mbNoExpW N 112 112 w.b1 ∘ Proofs.EnetTiePoCG.enetPreB0 N w
Instances For
Block b2's output (the tie's a2).
Equations
- Proofs.EnetTiePoCG.enetPreB2 N w = Proofs.mbStridedW N 56 56 w.b2 ∘ Proofs.EnetTiePoCG.enetPreB1 N w
Instances For
Block b3's output (the tie's a3).
Equations
- Proofs.EnetTiePoCG.enetPreB3 N w = Proofs.mbResidW N 56 56 w.b3 ∘ Proofs.EnetTiePoCG.enetPreB2 N w
Instances For
Block b4's output (the tie's a4).
Equations
- Proofs.EnetTiePoCG.enetPreB4 N w = Proofs.mbStridedW N 28 28 w.b4 ∘ Proofs.EnetTiePoCG.enetPreB3 N w
Instances For
Block b5's output (the tie's a5).
Equations
- Proofs.EnetTiePoCG.enetPreB5 N w = Proofs.mbResidW N 28 28 w.b5 ∘ Proofs.EnetTiePoCG.enetPreB4 N w
Instances For
Block b6's output (the tie's a6).
Equations
- Proofs.EnetTiePoCG.enetPreB6 N w = Proofs.mbStridedW N 14 14 w.b6 ∘ Proofs.EnetTiePoCG.enetPreB5 N w
Instances For
Block b7's output (the tie's a7).
Equations
- Proofs.EnetTiePoCG.enetPreB7 N w = Proofs.mbResidW N 14 14 w.b7 ∘ Proofs.EnetTiePoCG.enetPreB6 N w
Instances For
Block b8's output (the tie's a8).
Equations
- Proofs.EnetTiePoCG.enetPreB8 N w = Proofs.mbResidW N 14 14 w.b8 ∘ Proofs.EnetTiePoCG.enetPreB7 N w
Instances For
Block b9's output (the tie's a9).
Equations
- Proofs.EnetTiePoCG.enetPreB9 N w = Proofs.mbExpW N 14 14 w.b9 ∘ Proofs.EnetTiePoCG.enetPreB8 N w
Instances For
Block b10's output (the tie's a10).
Equations
- Proofs.EnetTiePoCG.enetPreB10 N w = Proofs.mbResidW N 14 14 w.b10 ∘ Proofs.EnetTiePoCG.enetPreB9 N w
Instances For
Block b11's output (the tie's a11).
Equations
- Proofs.EnetTiePoCG.enetPreB11 N w = Proofs.mbResidW N 14 14 w.b11 ∘ Proofs.EnetTiePoCG.enetPreB10 N w
Instances For
Block b12's output (the tie's a12).
Equations
- Proofs.EnetTiePoCG.enetPreB12 N w = Proofs.mbStridedW N 7 7 w.b12 ∘ Proofs.EnetTiePoCG.enetPreB11 N w
Instances For
Block b13's output (the tie's a13).
Equations
- Proofs.EnetTiePoCG.enetPreB13 N w = Proofs.mbResidW N 7 7 w.b13 ∘ Proofs.EnetTiePoCG.enetPreB12 N w
Instances For
Block b14's output (the tie's a14).
Equations
- Proofs.EnetTiePoCG.enetPreB14 N w = Proofs.mbResidW N 7 7 w.b14 ∘ Proofs.EnetTiePoCG.enetPreB13 N w
Instances For
Block b15's output (the tie's a15).
Equations
- Proofs.EnetTiePoCG.enetPreB15 N w = Proofs.mbResidW N 7 7 w.b15 ∘ Proofs.EnetTiePoCG.enetPreB14 N w
Instances For
Block b16's output (the tie's a16).
Equations
- Proofs.EnetTiePoCG.enetPreB16 N w = Proofs.mbExpW N 7 7 w.b16 ∘ Proofs.EnetTiePoCG.enetPreB15 N w
Instances For
The net after block b15: block b16, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB15 N w y = Proofs.EnetTiePoCG.enetSufB16 N w (Proofs.mbExpW N 7 7 w.b16 y)
Instances For
The net after block b14: block b15, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB14 N w y = Proofs.EnetTiePoCG.enetSufB15 N w (Proofs.mbResidW N 7 7 w.b15 y)
Instances For
The net after block b13: block b14, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB13 N w y = Proofs.EnetTiePoCG.enetSufB14 N w (Proofs.mbResidW N 7 7 w.b14 y)
Instances For
The net after block b12: block b13, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB12 N w y = Proofs.EnetTiePoCG.enetSufB13 N w (Proofs.mbResidW N 7 7 w.b13 y)
Instances For
The net after block b11: block b12, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB11 N w y = Proofs.EnetTiePoCG.enetSufB12 N w (Proofs.mbStridedW N 7 7 w.b12 y)
Instances For
The net after block b10: block b11, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB10 N w y = Proofs.EnetTiePoCG.enetSufB11 N w (Proofs.mbResidW N 14 14 w.b11 y)
Instances For
The net after block b9: block b10, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB9 N w y = Proofs.EnetTiePoCG.enetSufB10 N w (Proofs.mbResidW N 14 14 w.b10 y)
Instances For
The net after block b8: block b9, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB8 N w y = Proofs.EnetTiePoCG.enetSufB9 N w (Proofs.mbExpW N 14 14 w.b9 y)
Instances For
The net after block b7: block b8, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB7 N w y = Proofs.EnetTiePoCG.enetSufB8 N w (Proofs.mbResidW N 14 14 w.b8 y)
Instances For
The net after block b6: block b7, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB6 N w y = Proofs.EnetTiePoCG.enetSufB7 N w (Proofs.mbResidW N 14 14 w.b7 y)
Instances For
The net after block b5: block b6, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB5 N w y = Proofs.EnetTiePoCG.enetSufB6 N w (Proofs.mbStridedW N 14 14 w.b6 y)
Instances For
The net after block b4: block b5, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB4 N w y = Proofs.EnetTiePoCG.enetSufB5 N w (Proofs.mbResidW N 28 28 w.b5 y)
Instances For
The net after block b3: block b4, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB3 N w y = Proofs.EnetTiePoCG.enetSufB4 N w (Proofs.mbStridedW N 28 28 w.b4 y)
Instances For
The net after block b2: block b3, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB2 N w y = Proofs.EnetTiePoCG.enetSufB3 N w (Proofs.mbResidW N 56 56 w.b3 y)
Instances For
The net after block b1: block b2, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufB1 N w y = Proofs.EnetTiePoCG.enetSufB2 N w (Proofs.mbStridedW N 56 56 w.b2 y)
Instances For
The net after the stem: block b1, then the rest.
Equations
- Proofs.EnetTiePoCG.enetSufStem N w y = Proofs.EnetTiePoCG.enetSufB1 N w (Proofs.mbNoExpW N 112 112 w.b1 y)
Instances For
The net with the stem's parameters varied is the suffix after the stem at the varied stem.
The net with block b1's weights varied is the suffix after b1 at the varied block.
The net with block b2's weights varied is the suffix after b2 at the varied block.
The net with block b3's weights varied is the suffix after b3 at the varied block.
The net with block b4's weights varied is the suffix after b4 at the varied block.
The net with block b5's weights varied is the suffix after b5 at the varied block.
The net with block b6's weights varied is the suffix after b6 at the varied block.
The net with block b7's weights varied is the suffix after b7 at the varied block.
The net with block b8's weights varied is the suffix after b8 at the varied block.
The net with block b9's weights varied is the suffix after b9 at the varied block.
The net with block b10's weights varied is the suffix after b10 at the varied block.
The net with block b11's weights varied is the suffix after b11 at the varied block.
The net with block b12's weights varied is the suffix after b12 at the varied block.
The net with block b13's weights varied is the suffix after b13 at the varied block.
The net with block b14's weights varied is the suffix after b14 at the varied block.
The net with block b15's weights varied is the suffix after b15 at the varied block.
The net with block b16's weights varied is the suffix after b16 at the varied block.
The net with the head varied is the head at the varied parameters.
Every EfficientNet-B0 parameter gradient node is the derivative of L in that parameter,
for a loss L of the logits and g the cotangent the chain starts from: the 262 nodes
efficientnet_net_tiedG ties, each at the cotangent the certified block VJPs thread to it from
g, stated against L of efficientnetForwardBFull with that one parameter varied.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every EfficientNet-B0 parameter gradient node is the derivative of the loss in that
parameter. For any loss L of the logits with gradient g at the net's output, each of the
262 nodes efficientnet_net_tiedG ties — at the same cotangent — is ∂L/∂θ of the WHOLE net,
efficientnetForwardBFull with that one parameter varied (a stem field, a block's weight
record w.bk := p with one slot changed, or a head field).
Hypothesis: every BN ε positive (B0Weights.EpsPos), as in the tie. The loss enters only
through hL; enet_net_lossGrad_smoothedCE discharges it for the loss the artifacts ship.
The loss the artifacts ship: every node is the derivative of the batched label-smoothed
cross-entropy smoothedBatchLoss, g the six-op cotangent the render emits — the tie's own
g, whose logits headFwdB … a16 are efficientnetForwardBFull N w x.