Documentation

LeanMlir.Proofs.Nets.ViT.ViTStepTieGB

ViT-Tiny's T3 §1a TIE at the BATCHED index, the UN-FUSED gradient and the SMOOTHED loss #

ViTStepTie.lean ties all 200 parameters of the SGD-inline vit_train_step.mlir: each fused θ − lr·g op dens to the certified step at the cotangent the emitted backward chain delivers, per example, at a hard label. This file is that statement re-pointed along the THREE axes ConvNeXtStepTieGB.lean (§4b.6) moved for ConvNeXt, and it is that file's transformation applied to ViT's per-example capstone — the 4b capstone that closes the set at five of five.

Axis 1 — the OPTIMIZER FORM. Every conjunct is at the RAW gradient node (*GradB), which is what vit_adam_train_step.mlir and every vitin_* artifact emit since 4c leg 4; the fused op appears only in the SGD-inline file. One statement covers AdamW, the wx/clip variants, EMA, the 4× accumulation and the data-parallel twins, because they all consume this node. ViTFoldGB.lean (§4c-ter) is the fold each conjunct delegates to.

Axis 2 — the LOSS. g is a binder, instantiated at smoothedLossCotGraphDiv — the six-op chain expe → softmaxDiv → subB → scaleB → addVB → shiftB → divConstB this render emits at the plain width N·K, at a GENERAL target arriving as %onehot. The fused file pins it to softmax − oneHot.

Axis 3 — the INDEX. N is a binder. Every activation is batchMap N of the per-example prefix the fused file threads (patchEmbed_flat, vitBlockFwdOMHV, the final LN, clsSliceFlat) and every cotangent is batchMapAux N of the per-example chain (vitCotB2outV, vitBlockCotInAtMHV, the vitCot* family). Honest for this net because no ViT op couples examples — LayerNorm, attention, GELU and the denses are all per-example, and the *B constructors' den arms say so. nC is a binder too (10 on Imagenette, 1000 on ImageNet).

⭐⭐ The one conjunct the per-example capstone could not state is here. The CLS token is one shared [192] vector; its gradient is the sum of every example's CLS-row cotangent. The fused file's vit_cls_den is at denseBiasSgdB (N := 1) — "sum one thing", correct there because pretty B performed the batch lift outside the AST. vitEmbedTiedGB's third conjunct is ViTPoCGB.clsGrad_denB at the batched node, denseBiasGradB (N := N) on batchMap N clsSliceFlat of the embed cotangent, with the batch sum inside den.

What is NOT new #

Every save, every chain cotangent and every Jacobian witness is ViTStepTie.lean's, lifted; every conjunct's proof is one ViTPoCGB.*_den lemma. The per-example saves and internal cotangents are repackaged as functions of the block INPUT (blkSaves, cAttcM1) so that batchMapAux has something to lift — the let chains of vitBlockTiedAtMHV and vitBlockCotInAtMHV, verbatim. ⚠ ViT has no *BackBatchedGraph_faithful family and needs none here: the lift is the honesty argument, as it was for ConvNeXt.

Conventions carried unchanged from the fused file: the VECTOR LayerNorm (γ β : Vec D) at all 25 sites, 3 heads × d_head 64, depth 12, D 192, MLP 768, 16×16 patches, GELU (no kink — no smoothness hypothesis anywhere). Stated at ViT-Tiny's literal dims; S and B are other nets. ⛔ ONE REPLICA: in vitin_adamdp128x4* every gradient node feeds allReduceMeanF, the collective as an AST node since 4d piece 2 (2026-09-07; DataParallelNode.lean composes the per-replica statement with the replica mean), and the 4× accumulation is momVNextF at its other reading on top. ⛔ Stated at the drop-free chain.

Per-example saves and internal cotangents as functions of a block's INPUT #

vitBlockTiedMHV takes the nine saved activations as arguments; batchMapAux lifts a function of (one saved value, one input), so the batched block tie needs each save as a function of xin and each internal cotangent as a function of (xin, dyOut) — exactly the let chains of ViTTiePoC.vitBlockTiedAtMHV and vitBlockCotInAtMHV, packaged.

structure Proofs.ViTTiePoCGB.BlkSaves (Np1 heads d mlpDim : ) :

The nine saved activations of one multi-head block, flattened.

  • ln1 : Vec (Np1 * (heads * d))
  • q : Vec (Np1 * (heads * d))
  • k : Vec (Np1 * (heads * d))
  • v : Vec (Np1 * (heads * d))
  • att : Vec (Np1 * (heads * d))
  • h : Vec (Np1 * (heads * d))
  • ln2 : Vec (Np1 * (heads * d))
  • m1 : Vec (Np1 * mlpDim)
  • g : Vec (Np1 * mlpDim)
Instances For
    noncomputable def Proofs.ViTTiePoCGB.blkSaves {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (xin : Vec (Np1 * (heads * d))) :
    BlkSaves Np1 heads d mlpDim

    The saves from the block input — vitBlockTiedAtMHV's let chain, verbatim.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def Proofs.ViTTiePoCGB.cAtt {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
      Vec (Np1 * (heads * d))

      Per example, the attention-output cotangent (vitCotAttV), from the block input and output cotangent.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def Proofs.ViTTiePoCGB.cQ {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
        Vec (Np1 * (heads * d))

        Per example, the Q cotangent, per head (vitCotDQmh), from the block input and output cotangent.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def Proofs.ViTTiePoCGB.cK {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
          Vec (Np1 * (heads * d))

          Per example, the K cotangent, per head, from the block input and output cotangent.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Proofs.ViTTiePoCGB.cV {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
            Vec (Np1 * (heads * d))

            Per example, the V cotangent, per head, from the block input and output cotangent.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              noncomputable def Proofs.ViTTiePoCGB.cLn1 {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
              Vec (Np1 * (heads * d))

              Per example, the LN₁-output cotangent: the three-way Q/K/V fan-in (vitCotLn1), from the block input and output cotangent.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                noncomputable def Proofs.ViTTiePoCGB.cH {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
                Vec (Np1 * (heads * d))

                Per example, the MLP-residual fan-in at h (vitCotHV), from the block input and output cotangent.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  noncomputable def Proofs.ViTTiePoCGB.cLn2 {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
                  Vec (Np1 * (heads * d))

                  Per example, the LN₂-output cotangent (vitCotLn2), from the block input and output cotangent.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def Proofs.ViTTiePoCGB.cM1 {Np1 heads d mlpDim : } (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (xin dyOut : Vec (Np1 * (heads * d))) :
                    Vec (Np1 * mlpDim)

                    Per example, the fc1-output cotangent through the GELU mask (vitCotM1), from the block input and output cotangent.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      The multi-head block — all 16 gradient nodes, batched #

                      def Proofs.ViTTiePoCGB.vitBlockTiedGB (N : ) {Np1 heads d mlpDim : } (xN epsStr cotN : String) (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (bfc2 : Vec (heads * d)) (xin dyOut : Vec (N * (Np1 * (heads * d)))) :

                      One multi-head vector-LN transformer block, tied at the batched gradient nodes. Every one of the block's 16 params, fed batchMapAux N of the cotangent the real backward chain delivers at its site, denotes the certified Σ_n gradient — the MLP-residual and attention-residual fan-ins and the three-way LN₁ fan-in, per head, exactly as vitBlockTiedMHV has them per example.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Proofs.ViTTiePoCGB.vit_block_tiedGB (N : ) {Np1 heads d mlpDim : } (xN epsStr cotN : String) (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (bfc2 : Vec (heads * d)) (xin dyOut : Vec (N * (Np1 * (heads * d)))) :
                        vitBlockTiedGB N xN epsStr cotN ε γ1 β1 γ2 β2 Wq Wk Wv Wo bq bk bv bo Wfc1 bfc1 Wfc2 bfc2 xin dyOut
                        @[irreducible]
                        def Proofs.ViTTiePoCGB.vitBlockTiedGBAt (N : ) {Np1 heads d mlpDim : } (xN epsStr cotN : String) (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (bfc2 : Vec (heads * d)) (xin dyOut : Vec (N * (Np1 * (heads * d)))) :
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem Proofs.ViTTiePoCGB.vit_block_tiedGBAt (N : ) {Np1 heads d mlpDim : } (xN epsStr cotN : String) (ε : ) (γ1 β1 γ2 β2 : Vec (heads * d)) (Wq Wk Wv Wo : Mat (heads * d) (heads * d)) (bq bk bv bo : Vec (heads * d)) (Wfc1 : Mat (heads * d) mlpDim) (bfc1 : Vec mlpDim) (Wfc2 : Mat mlpDim (heads * d)) (bfc2 : Vec (heads * d)) (xin dyOut : Vec (N * (Np1 * (heads * d)))) :
                          vitBlockTiedGBAt N xN epsStr cotN ε γ1 β1 γ2 β2 Wq Wk Wv Wo bq bk bv bo Wfc1 bfc1 Wfc2 bfc2 xin dyOut

                          Final LN, classifier and patch embedding — batched #

                          def Proofs.ViTTiePoCGB.vitFinalLNTiedGB (N : ) {nC : } (xN epsStr cotN : String) (ε : ) (γF βF : Vec 192) (Wcls : Mat 192 nC) (b12out : Vec (N * (197 * 192))) (g : Vec (N * nC)) :

                          Final vector-LN γF/βF, tied at the batched classifier-back cotangent vitCotFl per example (the clsPad of Wclsᵀ g_n, exactly what the render's dotOut → clsPad computes).

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem Proofs.ViTTiePoCGB.vit_finalLN_tiedGB (N : ) {nC : } (xN epsStr cotN : String) (ε : ) (γF βF : Vec 192) (Wcls : Mat 192 nC) (b12out : Vec (N * (197 * 192))) (g : Vec (N * nC)) :
                            vitFinalLNTiedGB N xN epsStr cotN ε γF βF Wcls b12out g
                            def Proofs.ViTTiePoCGB.vitHeadTiedGB (N : ) {nC : } (aN cotN : String) (hn : Vec (N * 192)) (Wcls : Mat 192 nC) (bcls : Vec nC) (g : Vec (N * nC)) :

                            Classifier Wcls/bcls, tied at the loss cotangent g — the weight at the batched CLS row, the bias PER EXAMPLE (biasGradB is the identity on its operand; the batch reduce is emitted text — ViTPoCGB.headBGradB_den).

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              theorem Proofs.ViTTiePoCGB.vit_head_tiedGB (N : ) {nC : } (aN cotN : String) (hn : Vec (N * 192)) (Wcls : Mat 192 nC) (bcls : Vec nC) (g : Vec (N * nC)) :
                              vitHeadTiedGB N aN cotN hn Wcls bcls g
                              def Proofs.ViTTiePoCGB.vitEmbedTiedGB (N : ) (xN cotN : String) (Wc : Kernel4 192 3 16 16) (bc cls : Vec 192) (pos : Mat 197 192) (img : Vec (N * (3 * 224 * 224))) (dyEmbed : Vec (N * (197 * 192))) :

                              Patch embed wConv/bConv/cls/pos, tied at the batched embed-output cotangent. ⭐ The third conjunct is the CLS token's gradient with the batch sum INSIDE den — the statement the per-example capstone made only at N = 1.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem Proofs.ViTTiePoCGB.vit_embed_tiedGB (N : ) (xN cotN : String) (Wc : Kernel4 192 3 16 16) (bc cls : Vec 192) (pos : Mat 197 192) (img : Vec (N * (3 * 224 * 224))) (dyEmbed : Vec (N * (197 * 192))) :
                                vitEmbedTiedGB N xN cotN Wc bc cls pos img dyEmbed

                                The whole-net capstone — all 200 params through the REAL batched forward + composed cotangent #

                                The fused file's thread, lifted: ib1 is batchMap N of the patch embedding, ib_{k+1} is batchMap N of the multi-head block forward, the final LN / CLS slice / dense head are batchMap N of theirs, g is the smoothed loss cotangent at a general target, and every cotangent is batchMapAux N of the per-example chain — vitCotB2outV at the top, then twelve vitBlockCotInAtMHV attention-residual fan-ins down to the embed-output cotangent.

                                theorem Proofs.ViTTiePoCGB.vit_net_tiedGB (N : ) {nC : } (xN aN epsStr cotN aStr negAK bStr logN ohN : String) (ε α B : ) (Wc : Kernel4 192 3 16 16) (bc cls : Vec 192) (pos : Mat 197 192) (γF βF : Vec 192) (Wcls : Mat 192 nC) (bcls : Vec nC) (lnG1_1 lnB1_1 lnG2_1 lnB2_1 : Vec 192) (mWq_1 mWk_1 mWv_1 mWo_1 : Mat 192 192) (mbq_1 mbk_1 mbv_1 mbo_1 : Vec 192) (fW1_1 : Mat 192 768) (fb1_1 : Vec 768) (fW2_1 : Mat 768 192) (fb2_1 lnG1_2 lnB1_2 lnG2_2 lnB2_2 : Vec 192) (mWq_2 mWk_2 mWv_2 mWo_2 : Mat 192 192) (mbq_2 mbk_2 mbv_2 mbo_2 : Vec 192) (fW1_2 : Mat 192 768) (fb1_2 : Vec 768) (fW2_2 : Mat 768 192) (fb2_2 lnG1_3 lnB1_3 lnG2_3 lnB2_3 : Vec 192) (mWq_3 mWk_3 mWv_3 mWo_3 : Mat 192 192) (mbq_3 mbk_3 mbv_3 mbo_3 : Vec 192) (fW1_3 : Mat 192 768) (fb1_3 : Vec 768) (fW2_3 : Mat 768 192) (fb2_3 lnG1_4 lnB1_4 lnG2_4 lnB2_4 : Vec 192) (mWq_4 mWk_4 mWv_4 mWo_4 : Mat 192 192) (mbq_4 mbk_4 mbv_4 mbo_4 : Vec 192) (fW1_4 : Mat 192 768) (fb1_4 : Vec 768) (fW2_4 : Mat 768 192) (fb2_4 lnG1_5 lnB1_5 lnG2_5 lnB2_5 : Vec 192) (mWq_5 mWk_5 mWv_5 mWo_5 : Mat 192 192) (mbq_5 mbk_5 mbv_5 mbo_5 : Vec 192) (fW1_5 : Mat 192 768) (fb1_5 : Vec 768) (fW2_5 : Mat 768 192) (fb2_5 lnG1_6 lnB1_6 lnG2_6 lnB2_6 : Vec 192) (mWq_6 mWk_6 mWv_6 mWo_6 : Mat 192 192) (mbq_6 mbk_6 mbv_6 mbo_6 : Vec 192) (fW1_6 : Mat 192 768) (fb1_6 : Vec 768) (fW2_6 : Mat 768 192) (fb2_6 lnG1_7 lnB1_7 lnG2_7 lnB2_7 : Vec 192) (mWq_7 mWk_7 mWv_7 mWo_7 : Mat 192 192) (mbq_7 mbk_7 mbv_7 mbo_7 : Vec 192) (fW1_7 : Mat 192 768) (fb1_7 : Vec 768) (fW2_7 : Mat 768 192) (fb2_7 lnG1_8 lnB1_8 lnG2_8 lnB2_8 : Vec 192) (mWq_8 mWk_8 mWv_8 mWo_8 : Mat 192 192) (mbq_8 mbk_8 mbv_8 mbo_8 : Vec 192) (fW1_8 : Mat 192 768) (fb1_8 : Vec 768) (fW2_8 : Mat 768 192) (fb2_8 lnG1_9 lnB1_9 lnG2_9 lnB2_9 : Vec 192) (mWq_9 mWk_9 mWv_9 mWo_9 : Mat 192 192) (mbq_9 mbk_9 mbv_9 mbo_9 : Vec 192) (fW1_9 : Mat 192 768) (fb1_9 : Vec 768) (fW2_9 : Mat 768 192) (fb2_9 lnG1_10 lnB1_10 lnG2_10 lnB2_10 : Vec 192) (mWq_10 mWk_10 mWv_10 mWo_10 : Mat 192 192) (mbq_10 mbk_10 mbv_10 mbo_10 : Vec 192) (fW1_10 : Mat 192 768) (fb1_10 : Vec 768) (fW2_10 : Mat 768 192) (fb2_10 lnG1_11 lnB1_11 lnG2_11 lnB2_11 : Vec 192) (mWq_11 mWk_11 mWv_11 mWo_11 : Mat 192 192) (mbq_11 mbk_11 mbv_11 mbo_11 : Vec 192) (fW1_11 : Mat 192 768) (fb1_11 : Vec 768) (fW2_11 : Mat 768 192) (fb2_11 lnG1_12 lnB1_12 lnG2_12 lnB2_12 : Vec 192) (mWq_12 mWk_12 mWv_12 mWo_12 : Mat 192 192) (mbq_12 mbk_12 mbv_12 mbo_12 : Vec 192) (fW1_12 : Mat 192 768) (fb1_12 : Vec 768) (fW2_12 : Mat 768 192) (fb2_12 : Vec 192) (img : Vec (N * (3 * 224 * 224))) (t : Vec (N * nC)) :
                                have ib1 := StableHLO.batchMap N (patchEmbed_flat 3 224 224 16 196 192 Wc bc cls pos) img; have ib2 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_1 lnB1_1 lnG2_1 lnB2_1 mWq_1 mWk_1 mWv_1 mWo_1 mbq_1 mbk_1 mbv_1 mbo_1 fW1_1 fb1_1 fW2_1 fb2_1) ib1; have ib3 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_2 lnB1_2 lnG2_2 lnB2_2 mWq_2 mWk_2 mWv_2 mWo_2 mbq_2 mbk_2 mbv_2 mbo_2 fW1_2 fb1_2 fW2_2 fb2_2) ib2; have ib4 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_3 lnB1_3 lnG2_3 lnB2_3 mWq_3 mWk_3 mWv_3 mWo_3 mbq_3 mbk_3 mbv_3 mbo_3 fW1_3 fb1_3 fW2_3 fb2_3) ib3; have ib5 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_4 lnB1_4 lnG2_4 lnB2_4 mWq_4 mWk_4 mWv_4 mWo_4 mbq_4 mbk_4 mbv_4 mbo_4 fW1_4 fb1_4 fW2_4 fb2_4) ib4; have ib6 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_5 lnB1_5 lnG2_5 lnB2_5 mWq_5 mWk_5 mWv_5 mWo_5 mbq_5 mbk_5 mbv_5 mbo_5 fW1_5 fb1_5 fW2_5 fb2_5) ib5; have ib7 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_6 lnB1_6 lnG2_6 lnB2_6 mWq_6 mWk_6 mWv_6 mWo_6 mbq_6 mbk_6 mbv_6 mbo_6 fW1_6 fb1_6 fW2_6 fb2_6) ib6; have ib8 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_7 lnB1_7 lnG2_7 lnB2_7 mWq_7 mWk_7 mWv_7 mWo_7 mbq_7 mbk_7 mbv_7 mbo_7 fW1_7 fb1_7 fW2_7 fb2_7) ib7; have ib9 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_8 lnB1_8 lnG2_8 lnB2_8 mWq_8 mWk_8 mWv_8 mWo_8 mbq_8 mbk_8 mbv_8 mbo_8 fW1_8 fb1_8 fW2_8 fb2_8) ib8; have ib10 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_9 lnB1_9 lnG2_9 lnB2_9 mWq_9 mWk_9 mWv_9 mWo_9 mbq_9 mbk_9 mbv_9 mbo_9 fW1_9 fb1_9 fW2_9 fb2_9) ib9; have ib11 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_10 lnB1_10 lnG2_10 lnB2_10 mWq_10 mWk_10 mWv_10 mWo_10 mbq_10 mbk_10 mbv_10 mbo_10 fW1_10 fb1_10 fW2_10 fb2_10) ib10; have ib12 := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_11 lnB1_11 lnG2_11 lnB2_11 mWq_11 mWk_11 mWv_11 mWo_11 mbq_11 mbk_11 mbv_11 mbo_11 fW1_11 fb1_11 fW2_11 fb2_11) ib11; have b12out := StableHLO.batchMap N (ViTTiePoC.vitBlockFwdOMHV ε lnG1_12 lnB1_12 lnG2_12 lnB2_12 mWq_12 mWk_12 mWv_12 mWo_12 mbq_12 mbk_12 mbv_12 mbo_12 fW1_12 fb1_12 fW2_12 fb2_12) ib12; have flB := StableHLO.batchMap N (fun (b : Vec (197 * 192)) => Mat.flatten fun (r : Fin 197) => layerNormVec 192 ε γF βF (Mat.unflatten b r)) b12out; have hnB := StableHLO.batchMap N (StableHLO.clsSliceFlat 196 192) flB; have logitsB := StableHLO.batchMap N (dense Wcls bcls) hnB; have g := StableHLO.den (smoothedLossCotGraphDiv N nC α B aStr negAK bStr logN ohN logitsB t); have dy12 := StableHLO.batchMapAux N (vitCotB2outV 196 192 nC ε γF Wcls) b12out g; have dy11 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_12 lnB1_12 lnG2_12 lnB2_12 mWq_12 mWk_12 mWv_12 mWo_12 mbq_12 mbk_12 mbv_12 mbo_12 fW1_12 fb1_12 fW2_12) ib12 dy12; have dy10 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_11 lnB1_11 lnG2_11 lnB2_11 mWq_11 mWk_11 mWv_11 mWo_11 mbq_11 mbk_11 mbv_11 mbo_11 fW1_11 fb1_11 fW2_11) ib11 dy11; have dy9 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_10 lnB1_10 lnG2_10 lnB2_10 mWq_10 mWk_10 mWv_10 mWo_10 mbq_10 mbk_10 mbv_10 mbo_10 fW1_10 fb1_10 fW2_10) ib10 dy10; have dy8 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_9 lnB1_9 lnG2_9 lnB2_9 mWq_9 mWk_9 mWv_9 mWo_9 mbq_9 mbk_9 mbv_9 mbo_9 fW1_9 fb1_9 fW2_9) ib9 dy9; have dy7 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_8 lnB1_8 lnG2_8 lnB2_8 mWq_8 mWk_8 mWv_8 mWo_8 mbq_8 mbk_8 mbv_8 mbo_8 fW1_8 fb1_8 fW2_8) ib8 dy8; have dy6 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_7 lnB1_7 lnG2_7 lnB2_7 mWq_7 mWk_7 mWv_7 mWo_7 mbq_7 mbk_7 mbv_7 mbo_7 fW1_7 fb1_7 fW2_7) ib7 dy7; have dy5 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_6 lnB1_6 lnG2_6 lnB2_6 mWq_6 mWk_6 mWv_6 mWo_6 mbq_6 mbk_6 mbv_6 mbo_6 fW1_6 fb1_6 fW2_6) ib6 dy6; have dy4 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_5 lnB1_5 lnG2_5 lnB2_5 mWq_5 mWk_5 mWv_5 mWo_5 mbq_5 mbk_5 mbv_5 mbo_5 fW1_5 fb1_5 fW2_5) ib5 dy5; have dy3 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_4 lnB1_4 lnG2_4 lnB2_4 mWq_4 mWk_4 mWv_4 mWo_4 mbq_4 mbk_4 mbv_4 mbo_4 fW1_4 fb1_4 fW2_4) ib4 dy4; have dy2 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_3 lnB1_3 lnG2_3 lnB2_3 mWq_3 mWk_3 mWv_3 mWo_3 mbq_3 mbk_3 mbv_3 mbo_3 fW1_3 fb1_3 fW2_3) ib3 dy3; have dy1 := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_2 lnB1_2 lnG2_2 lnB2_2 mWq_2 mWk_2 mWv_2 mWo_2 mbq_2 mbk_2 mbv_2 mbo_2 fW1_2 fb1_2 fW2_2) ib2 dy2; have dyEmbed := StableHLO.batchMapAux N (ViTTiePoC.vitBlockCotInAtMHV ε lnG1_1 lnB1_1 lnG2_1 lnB2_1 mWq_1 mWk_1 mWv_1 mWo_1 mbq_1 mbk_1 mbv_1 mbo_1 fW1_1 fb1_1 fW2_1) ib1 dy1; vitBlockTiedGBAt N xN epsStr cotN ε lnG1_1 lnB1_1 lnG2_1 lnB2_1 mWq_1 mWk_1 mWv_1 mWo_1 mbq_1 mbk_1 mbv_1 mbo_1 fW1_1 fb1_1 fW2_1 fb2_1 ib1 dy1 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_2 lnB1_2 lnG2_2 lnB2_2 mWq_2 mWk_2 mWv_2 mWo_2 mbq_2 mbk_2 mbv_2 mbo_2 fW1_2 fb1_2 fW2_2 fb2_2 ib2 dy2 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_3 lnB1_3 lnG2_3 lnB2_3 mWq_3 mWk_3 mWv_3 mWo_3 mbq_3 mbk_3 mbv_3 mbo_3 fW1_3 fb1_3 fW2_3 fb2_3 ib3 dy3 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_4 lnB1_4 lnG2_4 lnB2_4 mWq_4 mWk_4 mWv_4 mWo_4 mbq_4 mbk_4 mbv_4 mbo_4 fW1_4 fb1_4 fW2_4 fb2_4 ib4 dy4 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_5 lnB1_5 lnG2_5 lnB2_5 mWq_5 mWk_5 mWv_5 mWo_5 mbq_5 mbk_5 mbv_5 mbo_5 fW1_5 fb1_5 fW2_5 fb2_5 ib5 dy5 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_6 lnB1_6 lnG2_6 lnB2_6 mWq_6 mWk_6 mWv_6 mWo_6 mbq_6 mbk_6 mbv_6 mbo_6 fW1_6 fb1_6 fW2_6 fb2_6 ib6 dy6 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_7 lnB1_7 lnG2_7 lnB2_7 mWq_7 mWk_7 mWv_7 mWo_7 mbq_7 mbk_7 mbv_7 mbo_7 fW1_7 fb1_7 fW2_7 fb2_7 ib7 dy7 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_8 lnB1_8 lnG2_8 lnB2_8 mWq_8 mWk_8 mWv_8 mWo_8 mbq_8 mbk_8 mbv_8 mbo_8 fW1_8 fb1_8 fW2_8 fb2_8 ib8 dy8 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_9 lnB1_9 lnG2_9 lnB2_9 mWq_9 mWk_9 mWv_9 mWo_9 mbq_9 mbk_9 mbv_9 mbo_9 fW1_9 fb1_9 fW2_9 fb2_9 ib9 dy9 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_10 lnB1_10 lnG2_10 lnB2_10 mWq_10 mWk_10 mWv_10 mWo_10 mbq_10 mbk_10 mbv_10 mbo_10 fW1_10 fb1_10 fW2_10 fb2_10 ib10 dy10 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_11 lnB1_11 lnG2_11 lnB2_11 mWq_11 mWk_11 mWv_11 mWo_11 mbq_11 mbk_11 mbv_11 mbo_11 fW1_11 fb1_11 fW2_11 fb2_11 ib11 dy11 vitBlockTiedGBAt N xN epsStr cotN ε lnG1_12 lnB1_12 lnG2_12 lnB2_12 mWq_12 mWk_12 mWv_12 mWo_12 mbq_12 mbk_12 mbv_12 mbo_12 fW1_12 fb1_12 fW2_12 fb2_12 ib12 dy12 vitFinalLNTiedGB N xN epsStr cotN ε γF βF Wcls b12out g vitHeadTiedGB N aN cotN hnB Wcls bcls g vitEmbedTiedGB N xN cotN Wc bc cls pos img dyEmbed

                                ⭐⭐ The whole depth-12 multi-head ViT-Tiny train step, tied at the BATCHED index, the GRADIENT nodes and the SMOOTHED loss — all 200 parameters. The real forward patchEmbed → 12 multi-head vector-LN blocks → final vector-LN → CLS-slice → dense head as batchMap N of the per-example prefixes, the smoothed loss cotangent at a general target t, and the backward chain as batchMapAux N of the per-example one (the per-block multi-head fan-ins, vitCotB2outV at the top, the embed-output cotangent at the bottom): the twelve blocks' 192 params, the final-LN γ/β, the classifier and the patch-embed wConv/bConv/cls/pos all denote the certified batched Σ_n gradient — at the nodes vit_adam_train_step.mlir and every vitin_* artifact emit. ⭐ The CLS token's gradient sums over the batch INSIDE den, which the per-example capstone could state only at N = 1.

                                N and nC are binders and there is no smoothness hypothesis (GELU, no kink). The batch enters only through batchMap/batchMapAux, honest because no ViT op couples examples. ⛔ ONE REPLICA (4d); the 4× accumulation is momVNextF's other reading on top; stated at the drop-free chain and at ViT-Tiny's literal dims.