TorchLean API

NN.API.Verification.Lowering

Explicit Verification Lowering #

Low-level access to TorchLean's verifier graph. Most applications should import NN.API.Verification, train with trainer.train, then call trained.verify center (radius := r) (norm := .inf); import this module only when constructing or inspecting graph-level IBP/CROWN workflows directly.

Lower a sequential model into checked verifier IR with one distinguished input.

Instances For
    def TorchLean.Verification.lowerProgramToIR {α : Type} [Storage α] [Context α] {paramShapes : List Shape} {σ τ : Shape} (forwardProgram : Runtime.Autograd.Model.Program α (paramShapes ++ [σ]) τ) (state : nn.State α paramShapes) :

    Lower a custom forward program into checked verifier IR with one distinguished input.

    Instances For

      Dimensions of the distinguished verifier input node.

      Instances For
        def TorchLean.Verification.runAffine {α : Type} [Storage α] [Context α] [NN.MLTheory.CROWN.BoundOps α] (lowered : LoweredIR α) (parameters : ParamStore α) (intervalBounds : Array (Option (FlatBox α))) :

        Compute upper affine bounds after validating the lowered verifier input.

        The engine retains both sides internally so negative coefficients use the correct parent bound.

        Instances For

          Compute nodewise CROWN bounds after validating the lowered verifier input.

          Instances For