TorchLean API

NN.Examples.Verification.LiRPA.GruVerify

GruVerify #

LiRPA/IBP certificate checker: GRU-style gate fragment.

This example builds a small nonlinear graph with sigmoid, tanh, and an elementwise multiply: x -> linear -> sigmoid x -> linear -> tanh mul_elem(sigmoid(x), tanh(x))

It is a focused fragment that exercises common RNN nonlinearities in the LiRPA certificate checker.

References:

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

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

Small nonlinear graph exercising sigmoid, tanh, and mul_elem.

Instances For

    Seed deterministic linear weights for the two .linear nodes in buildGraph.

    Instances For

      Insert an L∞ input box of radius eps around a fixed center point.

      Instances For

        Check an IBP certificate JSON against this GRU-fragment graph.

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

        Instances For