prophys.nn#
Learned surrogates inside the probabilistic graph.
Surrogates are small to medium networks, tree ensembles and field transformers that are pretrained on their own data and then fine tuned jointly with every other parameter of a prophys model. All numerics run in optimized native kernels, with the same numerics on CPU and GPU.
Classes
The whole DPOT network as one surrogate layer. |
|
A field surrogate running a DPOT network. |
|
|
Elementwise activation function applied as its own layer. |
|
Output head squashing into the open interval |
|
Softmax output head giving the choice probabilities of a discrete choice model. |
|
Multi head cross attention from the rows to a context set. |
|
Fully connected layer: an affine map followed by an activation. |
Outputs and input derivatives of a surrogate at collocation points. |
|
A surrogate whose input is a set or field of tokens rather than named scalars. |
|
|
Fourier feature embedding |
|
Mean and scale output head for a heteroscedastic Gaussian likelihood. |
|
Histogram (bar distribution) output head for a full predictive distribution. |
Predictive distribution of a histogram head: a bar (Riemann) distribution with tails. |
|
Prior fitted network that predicts the posterior predictive distribution from a context set in one pass. |
|
|
Input convex neural network (Amos et al. 2017), convex in every input. |
|
Layer normalisation over the columns of each row, with learned gain and bias. |
Gaussian posterior of a surrogate's linear head |
|
|
Dense layer with a bounded Lipschitz constant in the maximum norm. |
|
Gaussian mixture output head for multimodal predictive distributions. |
|
Constrained monotone layer (Runje and Shankaranarayana 2023). |
|
A layer whose body is a prophys symbolic expression. |
A physics informed residual loss term for |
|
|
Attention pooling of the rows with a learned seed query (Lee et al. 2019). |
|
Mean over the rows, a permutation invariant summary of a set. |
|
Self attention in which every row attends only to the first keys rows. |
Training card returned by |
|
One synthetic regression task drawn from the mechanism prior. |
|
Predictive distribution of a quantile head: a piecewise linear quantile function with tails. |
|
|
Noncrossing quantile output head. |
|
Random Fourier features of an RBF kernel (Rahimi and Recht 2007). |
|
Reinterpret each sample's tensor as rows by cols values. |
|
Residual block |
|
Multi head self attention over the rows of a set or field. |
|
Pre norm set transformer block: self attention and a GELU MLP, each with a residual connection. |
|
Transolver physics attention (Wu et al. 2024), linear in the number of rows. |
Region of input space covered by a surrogate's training data. |
|
A trainable neural network surrogate with named, unit checked inputs, usable in a model. |
|
Expression node evaluating a surrogate on input expressions. |
|
|
Pre norm Transolver block: slice attention and a GELU MLP, each with a residual connection. |
A differentiable tree ensemble surrogate with named, unit checked inputs. |
|
Expression node holding a fresh Monte Carlo sample |
Functions
Build a DPOT field surrogate with the hyperparameters of the reference model. |
|
Hyperparameters of a DPOT checkpoint, read from its tensor shapes. |
|
Leaf values of surrogate from a DPOT state dictionary. |
|
Flatten fields |
|
Build a DPOT surrogate carrying the weights of a released checkpoint. |
|
|
Softplus output activation for a positive quantity. |
Token rows of a raster field: cell centre coordinates followed by the cell values. |
|
Find every learned surrogate used by a probabilistic model. |
|
Fit a Bayesian linear regression by maximising the model evidence. |
|
Token rows of a geometry, one row |
|
Copy pretrained tensors from a PyTorch style state dictionary into a surrogate. |
|
Map a SliceAttention layer's leaves to the keys of a Transolver physics attention module. |
|
Token rows of a point set: coordinates followed by optional per point features. |
|
Draw one synthetic regression task from the mechanism prior. |
|
Turn the Monte Carlo sample of an upstream quantity into a token set. |
|
Train an |
|
Map a TransolverBlock layer's leaves to the keys of a Transolver block module. |
|
Fit the support region of a set of training rows. |
|
Train a surrogate on its own data before it enters a model. |
Constants and objects
Probabilistic training losses and distribution targets for surrogates. |