TorchLean API

NN.Verification.PINN.Core

PINN Core #

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

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

Run the curated entrypoints instead of importing this file directly:

References:

Parse an object-valued JSON field.

Instances For

    Parse an array-valued JSON field.

    Instances For

      Parse a finite-float-array JSON field.

      Instances For

        A closed interval with finite floating-point endpoints.

        • lower : Float

          Lower endpoint.

        • upper : Float

          Upper endpoint.

        Instances For

          Parse an interval object { "lo": ..., "hi": ... }.

          Instances For

            Parse parallel lower/upper arrays into checked intervals.

            Instances For

              One finite-difference sample from a PINN certificate.

              Instances For

                Parse one finite-difference u_bounds entry.

                Instances For

                  Configuration parsed from a PINN certificate JSON.

                  • pde : String

                    PDE identifier carried by the certificate.

                  • spacing : Float

                    Grid spacing used by the exported finite-difference residual.

                  • radius : Float

                    Input perturbation radius for interval checking.

                  • pointCount : ℕ

                    Number of sample points encoded in points.

                  • Sample points as a length-pointCount 1D tensor.

                    PyTorch analogue: this is the torch.Tensor you would keep in memory after loading a JSON/CSV list of sample coordinates.

                  Instances For

                    A parsed and validated PINN certificate artifact.

                    Instances For

                      Absolute tolerance for PINN artifact replay comparisons through NN.Verification.Util.approxEq. This is a comparison policy, not a proved bound on rounding or finite-difference truncation error.

                      Instances For

                        The reference scalar-output PINN architecture at an arbitrary input dimension.

                        Instances For

                          Build the reference PINN graph at the requested input dimension.

                          Instances For

                            Deterministic reference parameters at an arbitrary input dimension.

                            These values mirror the bundled exporter. They are demonstration parameters, not trained weights; production checks should load the exported state through PINN.PyTorch.

                            Instances For

                              Seed an $\ell_\infty$ input box centered at a typed input tensor.

                              Instances For

                                Read the output box of a propagation pass as a scalar interval.

                                Scalar-output PINN graphs have a length-one output vector, so summing its entries is the exact scalar readout. A missing box is reported with ctx as the message prefix, so callers can name the failing pass.

                                Instances For

                                  Enclose the first and second directional derivatives of the output along one input axis.

                                  The two come back together on purpose. The second derivative is propagated on top of the first, so splitting them into separate entry points would repeat the same sweep. The interval boxes arrive as a parameter instead of being recomputed here, which is what lets a two-dimensional model pay for the IBP pass once and then ask about x and y in turn. A none component means the derivative propagator produced no box at the output node, which happens when the graph contains an operator it does not cover.

                                  Instances For

                                    Parse the JSON certificate consumed by the PINN verification CLI.

                                    Instances For

                                      Finite-difference residual bounds for 1D second derivative.

                                      Instances For