TorchLean API

NN.Verification.LiRPA.Gru

LiRPA GRU gate certificate checker #

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

This module 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 mulElem.

Instances For

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

    Instances For

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

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

      Instances For