TorchLean API

NN.Verification.LiRPA.Cnn

LiRPA convolutional certificate checker #

LiRPA/IBP certificate checker for a convolution followed by a linear head.

This workflow:

References:

Export (Python): python3.12 scripts/verification/lirpa/export_cnn_cert.py

Run (Lean): lake exe verify -- lirpa-cnn [NN/Examples/Verification/LiRPA/cnn_cert.json]

Small fixed graph: input(flattened) -> linear(convolution) -> ReLU -> linear(head).

We keep it flat so the certificate checker works over FlatBox inputs.

Instances For

    Seed deterministic parameters and the input box.

    The convolution is materialized as its exact flattened matrix and bias. ReLU remains an explicit graph node, so IBP applies its interval rule instead of disguising one affine relaxation as an exact linear layer.

    Instances For

      Check an IBP certificate JSON against this CNN graph.

      This is wired into lake exe verify -- lirpa-cnn [path].

      Instances For