ConvNeXt-T — every parameter gradient node IS the loss's derivative in that parameter #
cnx_net_tiedGB says each of the 182 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. cnx_net_lossGrad composes that with the chain: for any loss
L of the logits whose gradient at the net's output is g, every node is ∂L/∂θ of the WHOLE
net cnxNetB with that one parameter varied. cnx_net_lossGrad_smoothedCE discharges hL for
the label-smoothed loss the artifacts ship (smoothedBatchLossDiv, whose gradient is the
softmaxDiv cotangent the render emits).
How. No ConvNeXt op couples examples, so the work is per example and lifted once:
- Per example (at variable widths): the loss read at each activation inside a block, a
downsample, the stem and the head has the tie's own per-example cotangent as its gradient
(
cnxBlk_hasGradAt,cnxDown_hasGradAt, …). Every stage VJP is global — GELU has no kink and LayerNorm needs only0 < ε— so each step is oneHasGradAt.comp_global, and the channel-LN step ischanLNTensor3Back_eq_chanLN_vjp. - Lifted (
HasGradAt.pdiv_param_batchMap_through, ParamGrad): read against the linear loss⟨·, dyₙ⟩per example, those gradients turn each tied node'sΣ_n Σ_j ∂per/∂θ · cotₙinto∂G/∂θof the batched block,Gthe loss at the block's output. - Per net: the loss read after each stage (
cnxSuf*), pulled back through the certified batched block, downsample and head VJPs (cnxBlockCotInB_eq_vjp,cnxDownCotInB_eq_vjp,cnxHeadDyB_eq_vjp), and eachΦidentified with the whole net at updated weights by a standalonecnx_factor_*theorem.
Two nodes are stated differently from the tie. The stem's bias node is emitted as a stride-1
convBiasGradB over a free xstem; its Jacobian in the bias is the channel indicator whatever the
conv, so it equals the patchify conv's (GradNodeB.pdiv_bias_of_split). The classifier bias node
biasGradB is the identity on its operand and the batch reduce is emitted text, so the statement
is the sum over the batch of the node's per-example slices.
Hypotheses. 0 < ε (the LayerNorms' VJPs); no smoothness hypothesis. For the smoothed loss,
every example's target sums to one and 0 < nC. Drop-path and the bf16 nodes are outside this
statement, as they are outside the tie.
The block after the project conv: layer scale, then the identity skip.
Equations
- Proofs.CnxTiePoCGB.cnxPostP h w p y u i = Proofs.layerScale (fun (k : Fin (c * h * w)) => p.sL (Proofs.StableHLO.chanIdx c h w k)) u i + y i
Instances For
The block after the expand conv (pre-GELU).
Equations
- Proofs.CnxTiePoCGB.cnxPostE h w p y u = Proofs.CnxTiePoCGB.cnxPostP h w p y (Proofs.flatConv p.pW p.pB (Proofs.gelu (cExp * h * w) u))
Instances For
The block after the channel LN.
Equations
- Proofs.CnxTiePoCGB.cnxPostN h w p y u = Proofs.CnxTiePoCGB.cnxPostE h w p y (Proofs.flatConv p.eW p.eB u)
Instances For
The block after the depthwise conv.
Equations
- Proofs.CnxTiePoCGB.cnxPostD h w ε p y u = Proofs.CnxTiePoCGB.cnxPostN h w p y (Proofs.chanLNTensor3 c h w ε p.nG p.nB u)
Instances For
The depthwise conv's output.
Equations
- Proofs.CnxTiePoCGB.cnxActD h w p y = Proofs.depthwiseFlat p.aW p.aB y
Instances For
The channel LN's output.
Equations
- Proofs.CnxTiePoCGB.cnxActNl h w ε p y = Proofs.chanLNTensor3 c h w ε p.nG p.nB (Proofs.CnxTiePoCGB.cnxActD h w p y)
Instances For
The GELU's output (the project conv's input).
Equations
- Proofs.CnxTiePoCGB.cnxActG h w ε p y = Proofs.gelu (cExp * h * w) (Proofs.flatConv p.eW p.eB (Proofs.CnxTiePoCGB.cnxActNl h w ε p y))
Instances For
The project conv's output (the layer scale's input).
Equations
- Proofs.CnxTiePoCGB.cnxActP h w ε p y = Proofs.flatConv p.pW p.pB (Proofs.CnxTiePoCGB.cnxActG h w ε p y)
Instances For
A block's cotangents are loss gradients, per example: from the gradient dy at the block
output, the loss read after each activation has the tie's cotangent there — dy at the layer
scale's output, cnxCotP at the project conv's, then blkCotE, blkCotN, blkCotD.
ConvNeXt block, every parameter node a loss derivative — the nine nodes
cnxBlockChTiedGB ties, at the tie's batched activations and cotangents, Φ the loss at the
block's 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
Downsample, every parameter node a loss derivative — the four nodes cnxDownChTiedGB
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 cnxStemChTiedGB ties. The
bias node is the emitted stride-1 convBiasGradB over a free xstem, as in the tie.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The head per example: GAP, then LayerNorm at one row, then the dense classifier.
Equations
- Proofs.CnxTiePoCGB.cnxHeadO h w ε hng hnbt Wfc bfc = Proofs.dense Wfc bfc ∘ Proofs.rowLNVecFlat 1 768 ε hng hnbt ∘ Proofs.globalAvgPoolFlat 768 h w
Instances For
Head, every parameter node a loss derivative — the four nodes cnxHeadChTiedGB ties. The
classifier bias node is the identity on its operand (the batch reduce is emitted text), so its
statement is the batch sum of the node's slices.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pull the loss gradient back through a batched block's certified VJP: the cotangent is the tie's
batchMapAux N (p.cotIn ε) (cnxBlockCotInB_eq_vjp).
…through a batched downsample (cnxDownCotInB_eq_vjp).
…and through the batched head (cnxHeadDyB_eq_vjp).
ConvNeXt-T, batched: the tie's forward, stage by stage — batchMap N of the stem, each
block and downsample, then of the head.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The stem's output — block b1's input (the tie's ib1).
Equations
- Proofs.CnxTiePoCGB.cnxPreS N ε w = Proofs.StableHLO.batchMap N (Proofs.CnxTiePoC.cnxStemFwdO ε w.sW w.sb w.sγ w.sβ)
Instances For
Stage b1's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB1 N ε w = Proofs.StableHLO.batchMap N (w.b1.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreS N ε w
Instances For
Stage b2's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB2 N ε w = Proofs.StableHLO.batchMap N (w.b2.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB1 N ε w
Instances For
Stage b3's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB3 N ε w = Proofs.StableHLO.batchMap N (w.b3.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB2 N ε w
Instances For
Stage d0's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreD0 N ε w = Proofs.StableHLO.batchMap N (w.d0.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB3 N ε w
Instances For
Stage b4's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB4 N ε w = Proofs.StableHLO.batchMap N (w.b4.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreD0 N ε w
Instances For
Stage b5's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB5 N ε w = Proofs.StableHLO.batchMap N (w.b5.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB4 N ε w
Instances For
Stage b6's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB6 N ε w = Proofs.StableHLO.batchMap N (w.b6.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB5 N ε w
Instances For
Stage d1's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreD1 N ε w = Proofs.StableHLO.batchMap N (w.d1.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB6 N ε w
Instances For
Stage b7's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB7 N ε w = Proofs.StableHLO.batchMap N (w.b7.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreD1 N ε w
Instances For
Stage b8's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB8 N ε w = Proofs.StableHLO.batchMap N (w.b8.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB7 N ε w
Instances For
Stage b9's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB9 N ε w = Proofs.StableHLO.batchMap N (w.b9.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB8 N ε w
Instances For
Stage b10's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB10 N ε w = Proofs.StableHLO.batchMap N (w.b10.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB9 N ε w
Instances For
Stage b11's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB11 N ε w = Proofs.StableHLO.batchMap N (w.b11.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB10 N ε w
Instances For
Stage b12's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB12 N ε w = Proofs.StableHLO.batchMap N (w.b12.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB11 N ε w
Instances For
Stage b13's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB13 N ε w = Proofs.StableHLO.batchMap N (w.b13.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB12 N ε w
Instances For
Stage b14's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB14 N ε w = Proofs.StableHLO.batchMap N (w.b14.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB13 N ε w
Instances For
Stage b15's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB15 N ε w = Proofs.StableHLO.batchMap N (w.b15.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB14 N ε w
Instances For
Stage d2's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreD2 N ε w = Proofs.StableHLO.batchMap N (w.d2.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB15 N ε w
Instances For
Stage b16's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB16 N ε w = Proofs.StableHLO.batchMap N (w.b16.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreD2 N ε w
Instances For
Stage b17's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB17 N ε w = Proofs.StableHLO.batchMap N (w.b17.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB16 N ε w
Instances For
Stage b18's output.
Equations
- Proofs.CnxTiePoCGB.cnxPreB18 N ε w = Proofs.StableHLO.batchMap N (w.b18.fwdO ε) ∘ Proofs.CnxTiePoCGB.cnxPreB17 N ε w
Instances For
The net after block b18 — the head.
Equations
- Proofs.CnxTiePoCGB.cnxSufB18 N ε w = Proofs.StableHLO.batchMap N (Proofs.CnxTiePoCGB.cnxHeadO 7 7 ε w.hG w.hT w.Wfc w.bfc)
Instances For
The net after stage b17: stage b18, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB17 N ε w y = Proofs.CnxTiePoCGB.cnxSufB18 N ε w (Proofs.StableHLO.batchMap N (w.b18.fwdO ε) y)
Instances For
The net after stage b16: stage b17, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB16 N ε w y = Proofs.CnxTiePoCGB.cnxSufB17 N ε w (Proofs.StableHLO.batchMap N (w.b17.fwdO ε) y)
Instances For
The net after stage d2: stage b16, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufD2 N ε w y = Proofs.CnxTiePoCGB.cnxSufB16 N ε w (Proofs.StableHLO.batchMap N (w.b16.fwdO ε) y)
Instances For
The net after stage b15: stage d2, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB15 N ε w y = Proofs.CnxTiePoCGB.cnxSufD2 N ε w (Proofs.StableHLO.batchMap N (w.d2.fwdO ε) y)
Instances For
The net after stage b14: stage b15, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB14 N ε w y = Proofs.CnxTiePoCGB.cnxSufB15 N ε w (Proofs.StableHLO.batchMap N (w.b15.fwdO ε) y)
Instances For
The net after stage b13: stage b14, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB13 N ε w y = Proofs.CnxTiePoCGB.cnxSufB14 N ε w (Proofs.StableHLO.batchMap N (w.b14.fwdO ε) y)
Instances For
The net after stage b12: stage b13, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB12 N ε w y = Proofs.CnxTiePoCGB.cnxSufB13 N ε w (Proofs.StableHLO.batchMap N (w.b13.fwdO ε) y)
Instances For
The net after stage b11: stage b12, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB11 N ε w y = Proofs.CnxTiePoCGB.cnxSufB12 N ε w (Proofs.StableHLO.batchMap N (w.b12.fwdO ε) y)
Instances For
The net after stage b10: stage b11, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB10 N ε w y = Proofs.CnxTiePoCGB.cnxSufB11 N ε w (Proofs.StableHLO.batchMap N (w.b11.fwdO ε) y)
Instances For
The net after stage b9: stage b10, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB9 N ε w y = Proofs.CnxTiePoCGB.cnxSufB10 N ε w (Proofs.StableHLO.batchMap N (w.b10.fwdO ε) y)
Instances For
The net after stage b8: stage b9, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB8 N ε w y = Proofs.CnxTiePoCGB.cnxSufB9 N ε w (Proofs.StableHLO.batchMap N (w.b9.fwdO ε) y)
Instances For
The net after stage b7: stage b8, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB7 N ε w y = Proofs.CnxTiePoCGB.cnxSufB8 N ε w (Proofs.StableHLO.batchMap N (w.b8.fwdO ε) y)
Instances For
The net after stage d1: stage b7, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufD1 N ε w y = Proofs.CnxTiePoCGB.cnxSufB7 N ε w (Proofs.StableHLO.batchMap N (w.b7.fwdO ε) y)
Instances For
The net after stage b6: stage d1, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB6 N ε w y = Proofs.CnxTiePoCGB.cnxSufD1 N ε w (Proofs.StableHLO.batchMap N (w.d1.fwdO ε) y)
Instances For
The net after stage b5: stage b6, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB5 N ε w y = Proofs.CnxTiePoCGB.cnxSufB6 N ε w (Proofs.StableHLO.batchMap N (w.b6.fwdO ε) y)
Instances For
The net after stage b4: stage b5, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB4 N ε w y = Proofs.CnxTiePoCGB.cnxSufB5 N ε w (Proofs.StableHLO.batchMap N (w.b5.fwdO ε) y)
Instances For
The net after stage d0: stage b4, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufD0 N ε w y = Proofs.CnxTiePoCGB.cnxSufB4 N ε w (Proofs.StableHLO.batchMap N (w.b4.fwdO ε) y)
Instances For
The net after stage b3: stage d0, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB3 N ε w y = Proofs.CnxTiePoCGB.cnxSufD0 N ε w (Proofs.StableHLO.batchMap N (w.d0.fwdO ε) y)
Instances For
The net after stage b2: stage b3, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB2 N ε w y = Proofs.CnxTiePoCGB.cnxSufB3 N ε w (Proofs.StableHLO.batchMap N (w.b3.fwdO ε) y)
Instances For
The net after stage b1: stage b2, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufB1 N ε w y = Proofs.CnxTiePoCGB.cnxSufB2 N ε w (Proofs.StableHLO.batchMap N (w.b2.fwdO ε) y)
Instances For
The net after the stem: stage b1, then the rest.
Equations
- Proofs.CnxTiePoCGB.cnxSufS N ε w y = Proofs.CnxTiePoCGB.cnxSufB1 N ε w (Proofs.StableHLO.batchMap N (w.b1.fwdO ε) y)
Instances For
The net with the stem's parameters varied is the suffix after the stem at the varied stem.
The net with stage b1's weights varied is the suffix after it at the varied stage.
The net with stage b2's weights varied is the suffix after it at the varied stage.
The net with stage b3's weights varied is the suffix after it at the varied stage.
The net with stage d0's weights varied is the suffix after it at the varied stage.
The net with stage b4's weights varied is the suffix after it at the varied stage.
The net with stage b5's weights varied is the suffix after it at the varied stage.
The net with stage b6's weights varied is the suffix after it at the varied stage.
The net with stage d1's weights varied is the suffix after it at the varied stage.
The net with stage b7's weights varied is the suffix after it at the varied stage.
The net with stage b8's weights varied is the suffix after it at the varied stage.
The net with stage b9's weights varied is the suffix after it at the varied stage.
The net with stage b10's weights varied is the suffix after it at the varied stage.
The net with stage b11's weights varied is the suffix after it at the varied stage.
The net with stage b12's weights varied is the suffix after it at the varied stage.
The net with stage b13's weights varied is the suffix after it at the varied stage.
The net with stage b14's weights varied is the suffix after it at the varied stage.
The net with stage b15's weights varied is the suffix after it at the varied stage.
The net with stage d2's weights varied is the suffix after it at the varied stage.
The net with stage b16's weights varied is the suffix after it at the varied stage.
The net with stage b17's weights varied is the suffix after it at the varied stage.
The net with stage b18's weights varied is the suffix after it at the varied stage.
The net with the head varied is the head at the varied parameters.
The logits the tie's loss cotangent reads are cnxNetB's. The tie spells the head as
three batched ops (batchMap_comp).
Every ConvNeXt-T 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 182 nodes
cnx_net_tiedGB ties, each at the cotangent the tie threads to it from g, stated against
L of cnxNetB with that one parameter varied.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every ConvNeXt-T 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 182 nodes
cnx_net_tiedGB ties — at the same cotangent — is ∂L/∂θ of the WHOLE net, cnxNetB with that
one parameter varied (a stem field, a block's or downsample's record w.bk := p with one slot
changed, or a head field).
Hypothesis: 0 < ε, the LayerNorms' (the tie itself needs none). The loss enters only through
hL; cnx_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 smoothedBatchLossDiv, g the softmaxDiv cotangent the render emits — the
tie's own g, whose logits are cnxNetB N ε w x (cnx_logitsB_eq).