TorchLean API

NN.Verification.PINN.CLI

PINN CLI #

PINN residual-bounding CLI.

This file implements a small interactive tool for bounding PDE residuals of a trained physics-informed neural network (PINN) over a box input region. Concretely, it:

This CLI is the interactive PINN residual-bound tool:

The stable artifact checker is: scripts/lake.sh exe verify -- pinn-cert [NN/Examples/Verification/PINN/pinn_cert.json]

Run this CLI via the unified verification dispatcher: scripts/lake.sh exe verify -- pinn-cli -- [flags] "<PDE>" x eps or for 2D: scripts/lake.sh exe verify -- pinn-cli -- [flags] "<PDE>" x y eps

Examples:

References:

Backend selection for the PINN CLI. Only the host Float evaluator exists, so the flag is validated but does not change the computation.

Instances For

    Parse the backend flag used by the PINN residual CLI.

    Instances For

      Bound method for the PINN output value, selected by --method: interval-only, forward CROWN, or backward CROWN.

      Instances For

        Compute primitives u, duX, duY, d2uX, d2uY at the graph output node for 1D/2D models. Optionally, replace the u-interval with a tighter CROWN/DeepPoly bound.

        Instances For

          Load optional PyTorch-exported PINN weights for the exploratory CLI.

          Malformed files or mismatched input dimensions fall back to the provided built-in graph and parameters. That permissive behavior is intentional here: pinn-cli is an interactive inspection tool. Stable certificate checkers should reject bad artifacts instead.

          Instances For

            Parse the --method value accepted by the PINN residual checker.

            Instances For

              Parsed options for the PINN residual CLI.

              • method : Method

                Bound propagation method used for the output interval.

              • backend : Backend

                Runtime backend used for interval evaluation.

              • weights? : Option String

                Optional PyTorch-exported PINN weights JSON.

              • splitDepth : ℕ

                Recursive interval split depth for one-dimensional checks.

              Instances For

                Parse recognized flags and return the remaining positional arguments.

                Instances For

                  Entry point for the PINN residual-bounding CLI.

                  This is an interactive tool registered as: scripts/lake.sh exe verify -- pinn-cli -- ...

                  For certificate checking, use: scripts/lake.sh exe verify -- pinn-cert [NN/Examples/Verification/PINN/pinn_cert.json]

                  Run: scripts/lake.sh exe verify -- pinn-cli -- [--method=ibp|crown-fwd|crown-bwd] [--split-depth=N] [--backend=float] [--weights=PATH.json] "<PDE>" x eps or (2D): scripts/lake.sh exe verify -- pinn-cli -- [flags] "<PDE>" x y eps

                  Instances For
                    def NN.Verification.PINN.CLI.main.split1D (x eps : Float) (d : ℕ) (evalAt : Float → Float → IO (Float × Float)) :
                    Instances For
                      def NN.Verification.PINN.CLI.main.split2D (x y eps : Float) (d : ℕ) (evalAt : Float → Float → Float → IO (Float × Float)) :
                      Instances For