TorchLean API

NN.Verification.Cert.AbCrownLeafCert

AbCrown Leaf Artifact #

Alpha-beta-CROWN (AbCrown) leaf-artifact checker.

This module checks a small TorchLean JSON schema (abcrown_leaf_artifact_v0_1). Vanilla alpha-beta-CROWN does not emit this TorchLean schema directly; use scripts/verification/abcrown/export_leaf_artifact.py to convert terminal leaf/domain data from an external verifier into the checked schema.

The checker does not run bound propagation itself. It validates only the finite claims present in the artifact:

The lower bounds lb are the producer's claims and are not recomputed, so a passing artifact is consistent, not verified. The output says so.

This is useful for:

References:

Run: lake exe verify -- abcrown-leaf [path/to/artifact.json]

Bundled sample alpha-beta-CROWN-style leaf artifact.

Instances For

    Sorted distinct values of one coordinate across the root and leaf endpoints.

    Instances For
      def NN.Verification.Cert.AbCrownLeafCert.leavesCoverRoot (rootLo rootHi : Array Float) (leaves : Array (Array Float × Array Float)) (maxCells : ℕ := 1000000) :

      Check that the closed leaf boxes cover the closed root box, assuming every leaf is inside the root.

      Along each coordinate, the root and leaf endpoints cut the root into a grid of closed cells. Every leaf is a union of cells, so the leaves cover the root exactly when each cell lies inside one leaf. Coordinates on which every leaf spans the whole root are skipped. The grid is refused, with an error, when it has more than maxCells cells.

      Instances For

        Parse and validate a abcrown_leaf_artifact_v0_1 JSON artifact.

        Structural problems with the document itself (wrong format tag, missing fields, inconsistent dimensions) throw IO.userError immediately. A leaf that parses but fails one of the three accepted predicates is counted, and the reason is printed for that leaf before the summary line, because the three failure modes call for different responses: a leaf outside the root box means the exporter built the wrong region, a failed prune inequality means the producer's bound does not clear the threshold, and a stale witness_margin means the document disagrees with itself.

        Instances For

          CLI entry point: lake exe verify -- abcrown-leaf [artifact.json].

          If no path is provided, checks a small bundled sample artifact under NN/Examples/Verification/AbCrown/.

          Instances For