Documentation

LeanMlir.Proofs.Nets.ConvNeXt.ConvNeXtWholeBackCertifiedTieB

⭐⭐ convnextInputGradB IS the certified whole-net ConvNeXt-T gradient AT A BATCH #

ConvNeXtWholeBackCertifiedTie.lean closed T6 for ONE image: convnextInputGrad, the reverse of convNextForwardTCh, IS the certified gradient at that image. Every shipped ConvNeXt artifact runs a batch — convnext_adam_train_step and the convnextin_* / convnextsin_* / convnextbin_* families — and its batched T3 tie (ConvNeXtStepTieGB.lean) states every activation as StableHLO.batchMap B of the per-example prefix and every cotangent as batchMapAux B of the per-example chain, because LayerNorm is per-example and no ConvNeXt op couples examples. This file closes T6 at that index: the twelve-stage batched chain convnextInputGradB (ConvNeXtBackChains.lean), every slot the per-example slot lifted at the batched saved activation, IS the certified gradient of batchMap B convNextForwardTCh at every batch x, for every B and every class count nC. ConvNeXt was the last net without a batched whole-net tie (planning/archive/renderer_convergence.md leg 3: its ImageNet artifacts never had a batched fold); with this the *InputGradB_eq_*_vjp family covers all seven nets.

Nothing here is new mathematics, and it is ViT's batched tie (ViTWholeBackCertifiedTieB.lean) one architecture over: ConvNeXt is smooth everywhere, so every stage has a GLOBAL HasVJP and its batched witness is batchMap_has_vjp_at over HasVJP.toHasVJPAt at each row — no smooth-point hypothesis anywhere, only the 23 LayerNorm positivities the per-example tie already carries.

  1. cnxSavedB0cnxSavedB10 — the eleven batched stage inputs, as reducible functions of the batch saved STAGE BY STAGE (batchMap B stage ∘ cnxSavedB_{k-1} B w), not as batchMap B of the composed per-example prefix: the two agree only up to batchMap_comp, not rfl, and the apex's vjp_comp_diff_at produces the former. Each is also its apex level's inner map, so the stage witness above it sits at cnxSavedB_k B w x on the nose (item 4).
  2. The twelve batched stage witnesses cnx*B_at, each batchMap_has_vjp_at over the per-example HasVJP at each row — at the dimension spellings the per-example tie normalised (cnxDn1, cnxLNh, cnxSavedA0: ConvNeXtWholeBackCertifiedTie.lean's "two spellings of one numeral" rule holds one batch index over).
  3. The batched leaf ties. GAP's is rfl (its per-example tie is); the others are funext to one example, one rewrite of the per-example leaf tie at that example's row, then rflbatchMapAux's slice and the lift's .backward row are the same term. ⚠ The channel-LN and downsample leaves are proven at VARIABLE dims (cnxChanLNBackB_eq_vjp, cnxDownBackB_eq_vjp) and instantiated by term: at the literal 96 56 56 the same rfl recurses past maxRecDepth 100000 on the numerals, the batched form of the per-example tie's "two spellings of one numeral" rule.
  4. convNextForwardTChB_has_vjp_at — the twelve-stage apex, eleven vjp_comp_diff_ats over the batched stage witnesses, level k's inner map named cnxSavedB_k B w — and convnextInputGradB_eq_convNextForwardTChB_vjp, the tie: twelve leaf rewrites, then the eleven levels peeled by rw [vjp_comp_diff_at_fst_backward]. ⛔ Neither may leave the kernel a definitional step across the chain. A witness point spelled as the composed chain applied to x (what _ elaborates to), or a peel by simp only (the peel lemma is rfl, so simp records no step), makes the kernel unfold saved activations against the chain underneath the witnesses' .backwards. Spelled that way this module took ~18 min on Lean 4.32.2 and does not check at all on 4.34.0 (kernel timeout; tens of GB with the budget raised). As written it checks in seconds.
  5. convNextForwardTChB_eq_chain — the shape check: batchMap B of the per-example twelve-factor chain IS the twelve batched stages, by batchMap_comp eleven times — and convnextInputGradB_eq_batchMap_convNextForwardTCh_vjp, the tie carried to the committed GLOBAL witness batchMap_has_vjp _ (convNextForwardTCh_has_vjp …) through HasVJPAt.backward_unique_of_eq, plus the ∑ pdiv reading on convNextForwardTCh itself.
  6. convnextImagenetInputGradB_eq_vjp — the same statement at nC = 1000, the class count of every convnextin_* artifact, B a binder.
@[reducible, inline]
noncomputable abbrev Proofs.cnxSavedB0 (B : ) {nC : } (w : CnxTWeightsCh nC) :
Vec (B * (3 * 224 * 224))Vec (B * (96 * 56 * 56))

The batched stem-conv output — the stem LayerNorm's saved input at every example.

Equations
Instances For
    @[reducible, inline]
    noncomputable abbrev Proofs.cnxSavedB1 (B : ) {nC : } (w : CnxTWeightsCh nC) :
    Vec (B * (3 * 224 * 224))Vec (B * (96 * 56 * 56))

    Stage 1's batched saved input.

    Equations
    Instances For
      @[reducible, inline]
      noncomputable abbrev Proofs.cnxSavedB2 (B : ) {nC : } (w : CnxTWeightsCh nC) :
      Vec (B * (3 * 224 * 224))Vec (B * (96 * 56 * 56))

      Downsample 1's batched saved input.

      Equations
      Instances For
        @[reducible, inline]
        noncomputable abbrev Proofs.cnxSavedB3 (B : ) {nC : } (w : CnxTWeightsCh nC) :
        Vec (B * (3 * 224 * 224))Vec (B * (192 * 28 * 28))

        Stage 2's batched saved input.

        Equations
        Instances For
          @[reducible, inline]
          noncomputable abbrev Proofs.cnxSavedB4 (B : ) {nC : } (w : CnxTWeightsCh nC) :
          Vec (B * (3 * 224 * 224))Vec (B * (192 * 28 * 28))

          Downsample 2's batched saved input.

          Equations
          Instances For
            @[reducible, inline]
            noncomputable abbrev Proofs.cnxSavedB5 (B : ) {nC : } (w : CnxTWeightsCh nC) :
            Vec (B * (3 * 224 * 224))Vec (B * (384 * 14 * 14))

            Stage 3's batched saved input.

            Equations
            Instances For
              @[reducible, inline]
              noncomputable abbrev Proofs.cnxSavedB6 (B : ) {nC : } (w : CnxTWeightsCh nC) :
              Vec (B * (3 * 224 * 224))Vec (B * (384 * 14 * 14))

              Downsample 3's batched saved input.

              Equations
              Instances For
                @[reducible, inline]
                noncomputable abbrev Proofs.cnxSavedB7 (B : ) {nC : } (w : CnxTWeightsCh nC) :
                Vec (B * (3 * 224 * 224))Vec (B * (768 * 7 * 7))

                Stage 4's batched saved input.

                Equations
                Instances For
                  @[reducible, inline]
                  noncomputable abbrev Proofs.cnxSavedB8 (B : ) {nC : } (w : CnxTWeightsCh nC) :
                  Vec (B * (3 * 224 * 224))Vec (B * (768 * 7 * 7))

                  GAP's batched saved input.

                  Equations
                  Instances For
                    @[reducible, inline]
                    noncomputable abbrev Proofs.cnxSavedB9 (B : ) {nC : } (w : CnxTWeightsCh nC) :
                    Vec (B * (3 * 224 * 224))Vec (B * 768)

                    The head LayerNorm's batched saved input.

                    Equations
                    Instances For
                      @[reducible, inline]
                      noncomputable abbrev Proofs.cnxSavedB10 (B : ) {nC : } (w : CnxTWeightsCh nC) :
                      Vec (B * (3 * 224 * 224))Vec (B * 768)

                      The classifier's batched saved input.

                      Equations
                      Instances For
                        noncomputable def Proofs.cnxStemB_at (B : ) {nC : } (w : CnxTWeightsCh nC) (x : Vec (B * (3 * 224 * 224))) :

                        The batched stem-conv witness at x.

                        Equations
                        Instances For
                          noncomputable def Proofs.cnxChanLNB_at (B c h w : ) (ε : ) ( : 0 < ε) (γ β : Vec c) (v : Vec (B * (c * h * w))) :

                          The batched channel-LayerNorm witness at v, at any c h w.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def Proofs.cnxStemLNB_at (B : ) {nC : } (w : CnxTWeightsCh nC) (hsε : 0 < w.) (v : Vec (B * (96 * 56 * 56))) :

                            The batched stem-LayerNorm witness at v.

                            Equations
                            Instances For
                              noncomputable def Proofs.cnxStageB_at (B : ) {c cExp h w kH kW : } (k : ) (ps : Fin kCnxBlockParamsCh c cExp h w kH kW) ( : ∀ (i : Fin k), 0 < (ps i).εn) (v : Vec (B * (c * h * w))) :

                              The batched depth-k stage witness at v — one definition for all four stages.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                noncomputable def Proofs.cnxDownB_at (B h w : ) {cin cout : } (p : CnxDownParamsCh cin cout) ( : 0 < p.ε) (v : Vec (B * (cin * (2 * h) * (2 * w)))) :

                                The batched downsample witness at v, at any resolution and channel pair.

                                Equations
                                Instances For
                                  noncomputable def Proofs.cnxDn1B_at (B : ) {nC : } (w : CnxTWeightsCh nC) (hd1 : 0 < w.d1.ε) (v : Vec (B * (96 * 56 * 56))) :

                                  The batched downsample-1 witness at v, at the chain's dimension spelling (cnxDn1).

                                  Equations
                                  Instances For
                                    noncomputable def Proofs.cnxDn2B_at (B : ) {nC : } (w : CnxTWeightsCh nC) (hd2 : 0 < w.d2.ε) (v : Vec (B * (192 * 28 * 28))) :

                                    The batched downsample-2 witness at v, at the chain's dimension spelling (cnxDn2).

                                    Equations
                                    Instances For
                                      noncomputable def Proofs.cnxDn3B_at (B : ) {nC : } (w : CnxTWeightsCh nC) (hd3 : 0 < w.d3.ε) (v : Vec (B * (384 * 14 * 14))) :

                                      The batched downsample-3 witness at v, at the chain's dimension spelling (cnxDn3).

                                      Equations
                                      Instances For
                                        noncomputable def Proofs.cnxGapB_at (B : ) (v : Vec (B * (768 * 7 * 7))) :

                                        The batched GAP witness at v.

                                        Equations
                                        Instances For
                                          noncomputable def Proofs.cnxLNhB_at (B : ) {nC : } (w : CnxTWeightsCh nC) (hhε : 0 < w.) (v : Vec (B * 768)) :

                                          The batched head-LayerNorm witness at v.

                                          Equations
                                          Instances For
                                            noncomputable def Proofs.cnxDenseB_at (B : ) {nC : } (w : CnxTWeightsCh nC) (v : Vec (B * 768)) :

                                            The batched classifier witness at v.

                                            Equations
                                            Instances For
                                              theorem Proofs.cnxStemBackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (x : Vec (B * (3 * 224 * 224))) :

                                              The batched stem tie. batchMap B of the reversed-kernel conv at the zero-extended 4×4 kernel IS the lift's backward: flatConvStride4Back_padOdd_eq_vjp_backward at one example's row. ⛔ padOdd is load-bearing here exactly as in the per-example tie: w.sW is 4×4.

                                              theorem Proofs.cnxChanLNBackB_eq_vjp (B c h w : ) (ε : ) ( : 0 < ε) (γ β : Vec c) (v : Vec (B * (c * h * w))) :
                                              StableHLO.batchMapAux B (chanLNTensor3Back c h w ε γ) v = (cnxChanLNB_at B c h w ε γ β v).backward

                                              The batched channel-LayerNorm tie, at any c h wchanLNTensor3Back_eq_chanLN_vjp at one example's row. ⚠ Generic on purpose: stated at the literal 96 56 56 the closing rfl recurses past maxRecDepth 100000 on the numerals; at variables it is ViT's vitLNBackB_eq_vjp and closes at once. The stem instance below is a term.

                                              theorem Proofs.cnxStemLNBackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hsε : 0 < w.) (v : Vec (B * (96 * 56 * 56))) :

                                              The batched stem-LayerNorm tiecnxChanLNBackB_eq_vjp at 96 56 56.

                                              theorem Proofs.cnxStageBackB_eq_vjp (B : ) {c cExp h w kHd kWd : } (hkHd : 2 * ((kHd - 1) / 2) + 1 = kHd) (hkWd : 2 * ((kWd - 1) / 2) + 1 = kWd) (k : ) (ps : Fin kCnxBlockParamsCh c cExp h w kHd kWd) ( : ∀ (i : Fin k), 0 < (ps i).εn) (v : Vec (B * (c * h * w))) :

                                              The batched stage tiecnxStageChKBack_eq_vjp at one example's row, for every depth.

                                              theorem Proofs.cnxDownBackB_eq_vjp (B h w : ) {cin cout : } (p : CnxDownParamsCh cin cout) ( : 0 < p.ε) (v : Vec (B * (cin * (2 * h) * (2 * w)))) :
                                              StableHLO.batchMapAux B (fun (u : Vec (cin * (2 * h) * (2 * w))) => cnxDownBack (padOdd p.W) (chanLNTensor3Back cin (2 * h) (2 * w) p.ε p.γ u)) v = (cnxDownB_at B h w p v).backward

                                              The batched downsample tie, at any resolution — cnxDownChBack_eq_vjp at one example's row. Generic for the same reason as cnxChanLNBackB_eq_vjp; the three instances below are terms at the chain's dimension spellings (cnxDn1 … cnxDn3), which is the per-example tie's cnxDn1Back_eq_vjp … cnxDn3Back_eq_vjp one batch index over. ⛔ padOdd is load-bearing: p.W is 2×2.

                                              theorem Proofs.cnxDn1BackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hd1 : 0 < w.d1.ε) (v : Vec (B * (96 * 56 * 56))) :
                                              StableHLO.batchMapAux B (fun (u : Vec (96 * 56 * 56)) => cnxDownBack (padOdd w.d1.W) (chanLNTensor3Back 96 56 56 w.d1.ε w.d1.γ u)) v = (cnxDn1B_at B w hd1 v).backward

                                              The batched downsample-1 tiecnxDownBackB_eq_vjp at 28 28.

                                              theorem Proofs.cnxDn2BackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hd2 : 0 < w.d2.ε) (v : Vec (B * (192 * 28 * 28))) :
                                              StableHLO.batchMapAux B (fun (u : Vec (192 * 28 * 28)) => cnxDownBack (padOdd w.d2.W) (chanLNTensor3Back 192 28 28 w.d2.ε w.d2.γ u)) v = (cnxDn2B_at B w hd2 v).backward

                                              The batched downsample-2 tiecnxDownBackB_eq_vjp at 14 14.

                                              theorem Proofs.cnxDn3BackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hd3 : 0 < w.d3.ε) (v : Vec (B * (384 * 14 * 14))) :
                                              StableHLO.batchMapAux B (fun (u : Vec (384 * 14 * 14)) => cnxDownBack (padOdd w.d3.W) (chanLNTensor3Back 384 14 14 w.d3.ε w.d3.γ u)) v = (cnxDn3B_at B w hd3 v).backward

                                              The batched downsample-3 tiecnxDownBackB_eq_vjp at 7 7.

                                              theorem Proofs.cnxGapBackB_eq_vjp (B : ) (v : Vec (B * (768 * 7 * 7))) :

                                              The batched GAP tie is rfl, as the per-example gapBack_eq_vjp_backward is.

                                              theorem Proofs.cnxLNhBackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hhε : 0 < w.) (v : Vec (B * 768)) :

                                              The batched head-LayerNorm tiecnxLNhBack_eq_vjp at one example's row.

                                              theorem Proofs.cnxDenseBackB_eq_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (v : Vec (B * 768)) :

                                              The batched classifier tiedense_transpose_eq_vjp_backward at one example's row (the head is linear, so the saved v is free).

                                              noncomputable def Proofs.convNextForwardTChB_has_vjp_at (B : ) {nC : } (w : CnxTWeightsCh nC) (hsε : 0 < w.) (h1 : ∀ (i : Fin 3), 0 < (w.s1 i).εn) (hd1 : 0 < w.d1.ε) (h2 : ∀ (i : Fin 3), 0 < (w.s2 i).εn) (hd2 : 0 < w.d2.ε) (h3 : ∀ (i : Fin 9), 0 < (w.s3 i).εn) (hd3 : 0 < w.d3.ε) (h4 : ∀ (i : Fin 3), 0 < (w.s4 i).εn) (hhε : 0 < w.) (x : Vec (B * (3 * 224 * 224))) :

                                              The batched whole-net witness, twelve batched stages composed by vjp_comp_diff_at, each at the batched saved activation the chain uses (cnxSavedB0cnxSavedB10). Level k's inner map is named cnxSavedB_k B w rather than left to the unifier, which would fill it with the composed chain and put every witness at the chain applied to x (see the module note, item 4).

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                theorem Proofs.vjp_comp_diff_at_fst_backward {m n p : } (f : Vec mVec n) (g : Vec nVec p) (x : Vec m) (hf : HasVJPAt f x ×' DifferentiableAt f x) (hg : HasVJPAt g (f x) ×' DifferentiableAt g (f x)) (dy : Vec p) :
                                                (vjp_comp_diff_at f g x hf hg).fst.backward dy = hf.fst.backward (hg.fst.backward dy)

                                                One vjp_comp_diff_at level's backward, unfolded: the composite runs g's backward, then f's. Definitional, stated so that a chain of eleven levels peels by rw rather than by a rfl that has to find the same unfolding through twelve concrete witnesses. ⛔ Not by simp only: simp would use it as a dsimp step and record nothing for the kernel to replay.

                                                theorem Proofs.convnextInputGradB_eq_convNextForwardTChB_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hsε : 0 < w.) (h1 : ∀ (i : Fin 3), 0 < (w.s1 i).εn) (hd1 : 0 < w.d1.ε) (h2 : ∀ (i : Fin 3), 0 < (w.s2 i).εn) (hd2 : 0 < w.d2.ε) (h3 : ∀ (i : Fin 9), 0 < (w.s3 i).εn) (hd3 : 0 < w.d3.ε) (h4 : ∀ (i : Fin 3), 0 < (w.s4 i).εn) (hhε : 0 < w.) (x : Vec (B * (3 * 224 * 224))) :
                                                convnextInputGradB B w.Wd (padOdd w.sW) (chanLNTensor3Back 96 56 56 w. w.) (cnxSavedB0 B w x) (rowLNVecFlatBack 1 768 w. w.) (cnxSavedB9 B w x) (cnxStageChKBack 3 w.s1) (cnxSavedB1 B w x) (fun (u : Vec (96 * 56 * 56)) => cnxDownBack (padOdd w.d1.W) (chanLNTensor3Back 96 56 56 w.d1.ε w.d1.γ u)) (cnxSavedB2 B w x) (cnxStageChKBack 3 w.s2) (cnxSavedB3 B w x) (fun (u : Vec (192 * 28 * 28)) => cnxDownBack (padOdd w.d2.W) (chanLNTensor3Back 192 28 28 w.d2.ε w.d2.γ u)) (cnxSavedB4 B w x) (cnxStageChKBack 9 w.s3) (cnxSavedB5 B w x) (fun (u : Vec (384 * 14 * 14)) => cnxDownBack (padOdd w.d3.W) (chanLNTensor3Back 384 14 14 w.d3.ε w.d3.γ u)) (cnxSavedB6 B w x) (cnxStageChKBack 3 w.s4) (cnxSavedB7 B w x) = (convNextForwardTChB_has_vjp_at B w hsε h1 hd1 h2 hd2 h3 hd3 h4 hhε x).backward

                                                ⭐⭐ THE BATCHED TIE. convnextInputGradB with every slot the per-example slot at the batched saved activation IS the batched apex's backward. Twelve leaf rewrites, the chain's eleven s applied, then the eleven composition levels peeled by vjp_comp_diff_at_fst_backward — every step a rw, so the kernel replays rewrites.

                                                The shape check. batchMap B of the per-example twelve-factor chain — the function convNextForwardTCh_has_vjp is stated on — IS the twelve batched stages the apex is stated on: batchMap_comp eleven times, and the normalised spellings (cnxLNh, cnxDn1 … cnxDn3, cnxSavedA0) unfold to the chain's.

                                                theorem Proofs.convnextInputGradB_eq_batchMap_convNextForwardTCh_vjp (B : ) {nC : } (w : CnxTWeightsCh nC) (hsε : 0 < w.) (h1 : ∀ (i : Fin 3), 0 < (w.s1 i).εn) (hd1 : 0 < w.d1.ε) (h2 : ∀ (i : Fin 3), 0 < (w.s2 i).εn) (hd2 : 0 < w.d2.ε) (h3 : ∀ (i : Fin 9), 0 < (w.s3 i).εn) (hd3 : 0 < w.d3.ε) (h4 : ∀ (i : Fin 3), 0 < (w.s4 i).εn) (hhε : 0 < w.) (x : Vec (B * (3 * 224 * 224))) :
                                                convnextInputGradB B w.Wd (padOdd w.sW) (chanLNTensor3Back 96 56 56 w. w.) (cnxSavedB0 B w x) (rowLNVecFlatBack 1 768 w. w.) (cnxSavedB9 B w x) (cnxStageChKBack 3 w.s1) (cnxSavedB1 B w x) (fun (u : Vec (96 * 56 * 56)) => cnxDownBack (padOdd w.d1.W) (chanLNTensor3Back 96 56 56 w.d1.ε w.d1.γ u)) (cnxSavedB2 B w x) (cnxStageChKBack 3 w.s2) (cnxSavedB3 B w x) (fun (u : Vec (192 * 28 * 28)) => cnxDownBack (padOdd w.d2.W) (chanLNTensor3Back 192 28 28 w.d2.ε w.d2.γ u)) (cnxSavedB4 B w x) (cnxStageChKBack 9 w.s3) (cnxSavedB5 B w x) (fun (u : Vec (384 * 14 * 14)) => cnxDownBack (padOdd w.d3.W) (chanLNTensor3Back 384 14 14 w.d3.ε w.d3.γ u)) (cnxSavedB6 B w x) (cnxStageChKBack 3 w.s4) (cnxSavedB7 B w x) = (batchMap_has_vjp (dense w.Wd w.bd rowLNVecFlat 1 768 w. w. w. globalAvgPoolFlat 768 7 7 convNextStageChK 3 w.s4 cnxDownChW 7 7 w.d3 convNextStageChK 9 w.s3 cnxDownChW 14 14 w.d2 convNextStageChK 3 w.s2 cnxDownChW 28 28 w.d1 convNextStageChK 3 w.s1 chanLNTensor3 96 56 56 w. w. w. flatConvStride4 w.sW w.sb) (convNextForwardTCh_has_vjp w hsε h1 hd1 h2 hd2 h3 hd3 h4 hhε) ).backward x

                                                ⭐⭐ THE APEX, at the committed batched witness. convnextInputGradB IS (batchMap_has_vjp _ (convNextForwardTCh_has_vjp …) …).backward x — the certified gradient of the per-example net lifted whole over B examples, for every B, every nC and every batch x. Carried from the chain-shaped apex by HasVJPAt.backward_unique_of_eq along the shape check. Only the 23 LayerNorm positivities.

                                                theorem Proofs.convnextInputGradB_correct (B : ) {nC : } (w : CnxTWeightsCh nC) (hsε : 0 < w.) (h1 : ∀ (i : Fin 3), 0 < (w.s1 i).εn) (hd1 : 0 < w.d1.ε) (h2 : ∀ (i : Fin 3), 0 < (w.s2 i).εn) (hd2 : 0 < w.d2.ε) (h3 : ∀ (i : Fin 9), 0 < (w.s3 i).εn) (hd3 : 0 < w.d3.ε) (h4 : ∀ (i : Fin 3), 0 < (w.s4 i).εn) (hhε : 0 < w.) (x : Vec (B * (3 * 224 * 224))) (dy : Vec (B * nC)) (i : Fin (B * (3 * 224 * 224))) :
                                                convnextInputGradB B w.Wd (padOdd w.sW) (chanLNTensor3Back 96 56 56 w. w.) (cnxSavedB0 B w x) (rowLNVecFlatBack 1 768 w. w.) (cnxSavedB9 B w x) (cnxStageChKBack 3 w.s1) (cnxSavedB1 B w x) (fun (u : Vec (96 * 56 * 56)) => cnxDownBack (padOdd w.d1.W) (chanLNTensor3Back 96 56 56 w.d1.ε w.d1.γ u)) (cnxSavedB2 B w x) (cnxStageChKBack 3 w.s2) (cnxSavedB3 B w x) (fun (u : Vec (192 * 28 * 28)) => cnxDownBack (padOdd w.d2.W) (chanLNTensor3Back 192 28 28 w.d2.ε w.d2.γ u)) (cnxSavedB4 B w x) (cnxStageChKBack 9 w.s3) (cnxSavedB5 B w x) (fun (u : Vec (384 * 14 * 14)) => cnxDownBack (padOdd w.d3.W) (chanLNTensor3Back 384 14 14 w.d3.ε w.d3.γ u)) (cnxSavedB6 B w x) (cnxStageChKBack 3 w.s4) (cnxSavedB7 B w x) dy i = j : Fin (B * nC), pdiv (StableHLO.batchMap B (convNextForwardTCh w)) x i j * dy j

                                                The batched apex, read as the Jacobian of the committed forward. convnextInputGradB is the pdiv-contracted Jacobian transpose of batchMap B (convNextForwardTCh w) — the nested-application forward the graph faithfulness convNextFwdGraphTCh_faithful is about — at EVERY batch and EVERY cotangent, through convNextForwardTCh_eq_chain.

                                                theorem Proofs.convnextImagenetInputGradB_eq_vjp (B : ) (w : CnxTWeightsCh 1000) (hsε : 0 < w.) (h1 : ∀ (i : Fin 3), 0 < (w.s1 i).εn) (hd1 : 0 < w.d1.ε) (h2 : ∀ (i : Fin 3), 0 < (w.s2 i).εn) (hd2 : 0 < w.d2.ε) (h3 : ∀ (i : Fin 9), 0 < (w.s3 i).εn) (hd3 : 0 < w.d3.ε) (h4 : ∀ (i : Fin 3), 0 < (w.s4 i).εn) (hhε : 0 < w.) (x : Vec (B * (3 * 224 * 224))) :
                                                convnextInputGradB B w.Wd (padOdd w.sW) (chanLNTensor3Back 96 56 56 w. w.) (cnxSavedB0 B w x) (rowLNVecFlatBack 1 768 w. w.) (cnxSavedB9 B w x) (cnxStageChKBack 3 w.s1) (cnxSavedB1 B w x) (fun (u : Vec (96 * 56 * 56)) => cnxDownBack (padOdd w.d1.W) (chanLNTensor3Back 96 56 56 w.d1.ε w.d1.γ u)) (cnxSavedB2 B w x) (cnxStageChKBack 3 w.s2) (cnxSavedB3 B w x) (fun (u : Vec (192 * 28 * 28)) => cnxDownBack (padOdd w.d2.W) (chanLNTensor3Back 192 28 28 w.d2.ε w.d2.γ u)) (cnxSavedB4 B w x) (cnxStageChKBack 9 w.s3) (cnxSavedB5 B w x) (fun (u : Vec (384 * 14 * 14)) => cnxDownBack (padOdd w.d3.W) (chanLNTensor3Back 384 14 14 w.d3.ε w.d3.γ u)) (cnxSavedB6 B w x) (cnxStageChKBack 3 w.s4) (cnxSavedB7 B w x) = (batchMap_has_vjp (dense w.Wd w.bd rowLNVecFlat 1 768 w. w. w. globalAvgPoolFlat 768 7 7 convNextStageChK 3 w.s4 cnxDownChW 7 7 w.d3 convNextStageChK 9 w.s3 cnxDownChW 14 14 w.d2 convNextStageChK 3 w.s2 cnxDownChW 28 28 w.d1 convNextStageChK 3 w.s1 chanLNTensor3 96 56 56 w. w. w. flatConvStride4 w.sW w.sb) (convNextForwardTCh_has_vjp w hsε h1 hd1 h2 hd2 h3 hd3 h4 hhε) ).backward x

                                                ⭐⭐ ConvNeXt-T's BATCHED whole-net backward tie at the ImageNet head — tier T6 at the paper net and the shipped index. convnextInputGradB_eq_batchMap_convNextForwardTCh_vjp at nC = 1000, the class count of every convnextin_* / convnextsin_* / convnextbin_* artifact, at a variable batch B — 64 or 128 per device in those runs, and neither number appears here. The dims are the paper's (3×224², [3,3,9,3] at 96→192→384→768), so this is the whole statement at the artifact and not an instance of it. ConvNeXt's entry in the batched T6 column beside r34InputGradB_eq_r34B_full_vjp, mnv2InputGradB_eq_mobilenetv2B_full_vjp and vitTinyInputGradB_eq_vitTiny_vjp.