PINN Core #
PINN helper library: reference graphs, seeding, and certificate parsing.
This module is shared by the PINN verification workflows. It provides:
- small CROWN graphs for a tanh MLP (1D and 2D inputs),
- deterministic parameters and input-box seeding helpers,
- a few interval/finite-difference residual helpers,
- JSON parsing for the certificate schema used by the surrounding examples.
Most users should run the curated entrypoints instead of importing this file directly:
lake exe verify -- pinn-cert [NN/Examples/Verification/PINN/pinn_cert.json]lake exe verify -- pinn-dataset-check --dataset=PATH.json [--weights=WEIGHTS.json]
References:
- PINNs (physics-informed neural nets):
https://arxiv.org/abs/1711.10561 - CROWN (linear bound propagation):
https://arxiv.org/abs/1811.00866 - IBP (interval bound propagation):
https://arxiv.org/abs/1810.12715
Configuration parsed from a PINN certificate JSON.
- pde : String
pde.
- h : Float
h.
- eps : Float
eps.
- nPts : ℕ
n Pts.
- pts : Spec.Tensor Float (Spec.Shape.dim self.nPts Spec.Shape.scalar)
Sample points as a length-
nPts1D tensor.PyTorch analogue: this is the
torch.Tensoryou would keep in memory after loading a JSON/CSV list of sample coordinates.
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
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.