TorchLean API

NN.Verification.PINN.Core

PINN Core #

PINN helper library: reference graphs, seeding, and certificate parsing.

This module is shared by the PINN verification workflows. It provides:

Most users should run the curated entrypoints instead of importing this file directly:

References:

Configuration parsed from a PINN certificate JSON.

Instances For
    def NN.Verification.PINN.approxEq (x y : Float) (tol : Float := 1e-5) :

    Approximate equality for Float (used for lightweight sanity checks).

    Instances For

      Reference tanh-MLP graph for u : R -> R used by the compact PINN certificate workflow.

      Instances For

        Same reference architecture as buildGraph, but with a 2D input u : R^2 -> R.

        Instances For

          Deterministic weights matching the exporter convention (1D input).

          Instances For

            Deterministic weights for the 2D variant buildGraph2D.

            Instances For

              Seed a 1D input box [x - eps, x + eps] at node id 0.

              Instances For

                Seed a 2D input box [(x,y) - eps, (x,y) + eps] at node id 0.

                Instances For

                  Compute (d2u/dx2, d2u/dy2) intervals at node id=5 when available. Returns a pair of Options for X and Y directions respectively.

                  Instances For

                    Laplacian upper/lower interval: Δu = u_xx + u_yy. For 1D inputs, returns u_xx.

                    Instances For

                      Finite-difference residual bounds for 1D second derivative.

                      Instances For

                        Generic param seeding (1D).

                        Instances For

                          2D generic param seeding (first layer 16x2).

                          Instances For

                            Generic input seeding for 1D.

                            Instances For

                              Generic input seeding for 2D.

                              Instances For