TorchLean API

NN.MLTheory.CROWN.Proofs.DirectedBackwardTransfers

Soundness of the executable directed transfers #

These lemmas connect the interval kernels with the exact objective at a sweep frontier. All scalar operations in the coefficient and constant accumulators are the engine's directed operations; the real identities describe the graph computed by the stored parameters.

theorem NN.MLTheory.CROWN.Graph.DirectedBackward.dotBox_row_encloses {α : Type} [TorchLean.Storage α] [Context α] [BoundOps α] [LawfulBoundOps α] {n : ℕ} {aB xB : FlatBox α} {a x : ℕ → ℝ} (ha : RowEncloses aB n a) (hx : RowEncloses xB n x) {lo hi : α} (hresult : Internal.directedDotBox aB xB = some (lo, hi)) :

A flat interval inner product encloses the ordinary real inner product.

theorem NN.MLTheory.CROWN.Graph.DirectedBackward.represents_consume {α : Type} [TorchLean.Storage α] [Context α] [BoundOps α] [LawfulBoundOps α] {dims : ℕ → ℕ} {v : ℕ → ℕ → ℝ} {input k n : ℕ} {st : Internal.DirectedBackwardState α} {z : ℝ} (h : Represents dims v input k st z) {aB xB : FlatBox α} {a x : ℕ → ℝ} (ha : RowEncloses aB n a) (hx : RowEncloses xB n x) :

Discharging an enclosed node value either fails or adds its exact objective to the constant.

The exact coefficient produced by transposing a stored matrix.

Instances For

    The exact constant split off by a stored linear bias.

    Instances For

      The flat linear-transfer result encloses its transposed coefficient and bias contribution.

      theorem NN.MLTheory.CROWN.Graph.DirectedBackward.dot_linear {α : Type} [TorchLean.Storage α] [Context α] [BoundOps α] [LawfulBoundOps α] {m n : ℕ} (W : TorchLean.Tensor α [m, n]) (b : TorchLean.Tensor α [m]) (a x y : ℕ → ℝ) (hy : ∀ (i : Fin m), y ↑i = ∑ j : Fin n, LawfulBoundOps.toReal (Spec.get2 W i j) * x ↑j + LawfulBoundOps.toReal (b.getScalar i)) :
      dot m a y = dot n (transposedCoeff W a) x + biasDot b a

      Reassociating a linear node is an exact real identity before interval approximation.

      theorem NN.MLTheory.CROWN.Graph.DirectedBackward.represents_linear {α : Type} [TorchLean.Storage α] [Context α] [BoundOps α] [LawfulBoundOps α] {dims : ℕ → ℕ} {v : ℕ → ℕ → ℝ} {input k m n : ℕ} {st : Internal.DirectedBackwardState α} {z : ℝ} (h : Represents dims v input k st z) (pid : ℕ) (hp : pid < st.coeffs.size) (hlive : pid ∈ pending input k) (hdim : dims pid = n) {aB : FlatBox α} {a y : ℕ → ℝ} (ha : RowEncloses aB m a) (W : TorchLean.Tensor α [m, n]) (b : TorchLean.Tensor α [m]) (hy : ∀ (i : Fin m), y ↑i = ∑ j : Fin n, LawfulBoundOps.toReal (Spec.get2 W i j) * v pid ↑j + LawfulBoundOps.toReal (b.getScalar i)) {aX : FlatBox α} {lo hi : α} (hresult : Internal.directedBackwardLinear aB W b = some (aX, lo, hi)) :

      A successful linear transfer preserves the represented objective and the coefficient table size, including accumulation into an already-active parent.