One ConvNeXt block with its drop site, per example — forward, VJP, input cotangent #
The *drop* ConvNeXt renders put one stochastic-depth site per block on the residual branch,
between LayerScale and the skip add (ConvNeXtRenderB's block forward), and the backward puts the
same op on the block-output cotangent before the WHOLE branch reads it — LayerScale γ's node
included — while the skip fan-in reads the raw one (ConvNeXtRenderB.bwdBlockB;
dropPath_vjp_is_self). Per example the site is a scalar or absent (dropScalarOpt,
Foundation.Batched.Indexed).
CnxTieBlk.fwdOD— the block forward with the site,siteScale s (body x) + x; atnoneit ISfwdO(fwdOD_none,rfl).CnxTieBlk.cotInD— the render's input cotangent:cnxBlockCotInChAt's chain feds ⊙ dy, the skip raw;cotInatnone(cotInD_none,rfl).CnxTieBlk.fwdODHasVJP/cotInD_eq_vjp— the block is the residual overdropScalarOpt s ∘ body, and the chain IS that witness's backward; the branch backward is read offcnxBlockCotInChAt_eq_vjpwith its skip taken off.
A ConvNeXt block's input cotangent is its certified VJP's backward. The chain's
per-op pieces (depthwiseFlatHasVJP, the 1×1 conv2dHasVJP3s, the GELU mask, layer scale,
chanLNTensor3Back) are rewritten into cnxBlockChBack_eq_vjp's form, which ties the block.
The block's weights as ConvNeXtFullT's record, at the shared ε.
Equations
Instances For
The block's residual branch, flat: depthwise → channel LN → expand → GELU → project →
LayerScale (cnxBodyWith at the record).
Equations
- Proofs.CnxTie.CnxTieBlk.bodyF gf p ε = Proofs.cnxBodyWith gf (Proofs.chanLNTensor3 c h w ε p.nG p.nB) p.aW p.aB p.eW p.eB p.pW p.pB (Proofs.cnxGlsCh (p.toCh h w ε))
Instances For
The block forward at its drop site: the branch through siteScale s, then the skip.
Equations
- Proofs.CnxTie.CnxTieBlk.fwdOD gf p ε s xin i = Proofs.siteScale s (Proofs.CnxTie.CnxTieBlk.bodyF gf p ε xin i) + xin i
Instances For
With no site rendered the block is the drop-free one.
The block's input cotangent at its drop site — cnxBlockCotInChAt's let chain with the
branch fed s ⊙ dyOut and the skip fan-in the raw dyOut.
Equations
- One or more equations did not get rendered due to their size.
Instances For
With no site rendered the chain is the drop-free one.
The chain at the site is the drop-free chain at the dropped cotangent, with the skip's
s ⊙ dy swapped back for dy.
The branch's VJP — the one cnxBlockChWHasVJP puts under its residual.
Equations
- Proofs.CnxTieGB.bodyFHasVJP gf ε hε p = Proofs.cnxBodyWithHasVJP gf ⋯ (Proofs.chanLNTensor3HasVJP c h w ε p.nG p.nB hε) p.aW p.aB p.eW p.eB p.pW p.pB (Proofs.cnxGlsCh (p.toCh h w ε))
Instances For
The branch's backward is the render's chain without its skip (cnxBlockCotInChAt_eq_vjp
minus the residual's identity).
The block's VJP at its drop site: the residual over the dropped branch; its backward is
body.back x (s ⊙ dy) + dy by definition.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The chain's block-input cotangent at the site is the block VJP's backward.