TorchLean API

NN.Verification.Cert.CROWNNodeCertAlphaBeta

CROWNNodeCertAlphaBeta #

Per-node α/β-CROWN certificate checking (graph dialect).

This extends NN.Verification.CROWNNodeCert with an optional β phase vector for ReLU nodes.

Certificate JSON format:

{
  "ctx": { "inputId": 0, "inputDim": 2 },
  "ibp": [ null | { "lo": [...], "hi": [...] }, ... ],
  "crown": [
    null |
      { "loA": [[...], ...], "loC": [...],
        "hiA": [[...], ...], "hiC": [...] },
    ...
  ],
  "alpha": [ null | [...], ... ],
  "beta":  [ null | [-1,0,1,...], ... ]   // optional per-node ReLU phase vector
}

β encoding (per neuron):

As with the α-CROWN checker, the certificate is accepted only if Lean recomputation matches the provided affine bounds up to a small float tolerance.

Helpers for the alpha/beta-CROWN style node certificate checker.

These are the JSON-facing utilities for the checker: they parse imported bounds, compare decimal-serialized floats with an explicit tolerance, and keep shape mismatches from reaching the semantic checker.

Parse a JSON integer (used for beta vectors).

Instances For

    Parse a beta vector from JSON.

    Instances For

      AlphaBetaCROWNNodeCertificate is the in-memory representation of an alpha/beta-CROWN node certificate read from JSON.

      This is part of the public surface of the checker because readAlphaBetaCROWNNodeCertificate returns it, and because the blueprint points to it as the “shape of the artifact” being checked.

      Instances For

        Read an alpha/beta-CROWN node certificate from JSON on disk.

        Instances For

          Check the local alpha/beta-CROWN enclosure condition for one node against a certificate entry.

          Instances For

            Check a per-node α/β-CROWN certificate against Lean's propagation rules.

            Returns true iff every node's certificate affine bounds agree (within tol) with what Lean computes from the certificate parents + ParamStore.

            Instances For