Scientific machine learning
GeoStack · lens 4 of 5 · 1 December 2026
Abstract¶
A curriculum in five parts on the arc of James-A. Goulet’s Probabilistic Machine Learning for Civil Engineers: representation, the model, the problem, physics in the loop, and evaluation and decisions. Part II is what you believe before any data: how the uncertainty is held and which family holds it. Part III is what you compute once data arrive: the target (after Osvaldo Simeone’s split between estimation and learning, plus bilevel, plus the computation itself, after Hennig, Osborne and Kersting’s Probabilistic Numerics) and the method, from exact to approximate to amortized. Where the numerical-methods lens puts uncertainty on the computation, this one puts it on the world. The pipeline view, from data to evaluation, lives on the applications page.
I · Representation
Bases, fixed functax
Kernelskernellib
Networks, a learned basisgeonnax
II · The model · what you believe
Gaussian formsfour forms of one fieldmoment · precisionspectral · SDE
Beyond Gaussiansamples · transportimplicit simulatorsEnKF · gauss_flows
Families on NumPyroGP, LGM, state space, BNN, extremespyrox-gp · -lgm · -ssm · -nnpyrox-xtreme · pyrox-gauss
III · The problem · what you compute
Target · what is unknown
Estimation per instance, fixedvardax · filteraxargminax · plumax
Learning once, over a datasetpipekit-trainpyrox · geonnax
Bilevel through argminax.adjointpipekit-cycle
The computationprobabilistic numericsno home
Method · exact → approximate → amortized
Exactclosed form: conditioning, Kalman, one solvegaussx · kernellib KRR
ApproximateMAP, Laplace · moment matching · VI · samplingargminax · vardax · pyrox · NUTSSMC and ABC missing
Amortizeda family learned once, one pass per instancevardax AmortizedPosterior · FourDVarNet
IV · Physics in the loop
Differentiable opsgridaxspectraldiffx
Hybrid modelsplumax · radtraxsesmax
V · Evaluate, decide
Scorersthe frameworkpipekit-evaluatekernellib MMD · HSIC
Skill scoresthe scoresdiagnostix
Decisionsvalue of information, where to look nextno home
Part II is the model, which could be sampled before any data; Part III is the problem: a target, and a method that is exact, approximate or amortized. Decisions, probabilistic solvers and two rungs of the ladder have no library.
I · Representation¶
Before any probability, a function has to be written down with finitely many numbers: a field over space, a forward model, a closure. The representation decides which numbers those are and whether the function is linear in them, which in turn decides what is cheap to fit and what the uncertainty is placed on later. The three representations run from fixed to learned: a basis chosen in advance, a basis anchored at the data, and a basis that is itself learned.
Bases¶
A fixed set of functions, chosen before seeing the data, so the function is linear in its coefficients.
The basis functions are fixed, and only the coefficients are fitted. functax holds Chebyshev, B-spline and Fourier bases, spherical harmonics and wavelets, with projection by least squares, Galerkin or a variational fit. Shelf: describe.
Kernels¶
A basis anchored at the data: one function per observation, centred on it by a kernel.
The kernel places one function at each of the data points , and the weights are fitted. kernellib holds the kernels and the random Fourier and Nyström features, and its KernelPCA learns a basis from the data. Shelf: describe 1.
Networks¶
A basis that is itself learned, so the function is nonlinear in its parameters.
The network has weights , and both the features and their combination are fitted. geonnax holds the layers, positional encoders and neural operators. Shelf: describe.
II · The model: what you believe¶
The model is what you believe before any data arrive: a distribution you could sample from. It has two halves. A is how the uncertainty is held, which decides what Part III can compute cheaply; B is which family of models holds it. Expect the same belief to take several forms: a Matérn field is one model, held four ways.
Throughout, is the state or the input, the observations, a latent or the coefficients of a basis, the parameters, the variational parameters, the number of data points, the number of time steps and the number of ensemble members.
A · How uncertainty is held: one Gaussian, four forms¶
One Gaussian can be stored by its covariance, its precision, its spectral weights or a Markov recursion; the distribution is the same in each, but each makes a different operation cheap.
Moment¶
The Gaussian held directly, by its mean and a dense covariance.
The covariance is the kernel matrix over the stacked points , and conditioning on data costs . In the stack: gaussx operators and conditional, and kernellib kernels. Shelf: describe.
Precision¶
The Gaussian held by a sparse inverse covariance, built from a local differential operator.
The field at location is driven by white noise , with length scale and smoothness ; the operator is local, so the precision is sparse. In the stack: gaussx spde_precision and matern_spde_params, pyrox-gauss GMRFDistribution, and pyrox-lgm. Shelf: describe.
Spectral¶
The Gaussian held as weights on a basis drawn from its spectral density.
The feature matrix has one column per spectral feature, so working with the covariance costs . In the stack: kernellib RandomFourierFeatures, LaplaceEigenfunctionFeatures (HSGP), SphericalHarmonicFeatures and NystromFeatures, and pyrox-nn HSGPFeatures. Shelf: describe.
State space¶
The Gaussian held as a Markov recursion in time, from a linear SDE.
The drift and the noise gain act on a Brownian motion , and a filter steps through times at . In the stack: gaussx MaternSDE, sde_autocovariance, kalman_filter and parallel_kalman_filter, and pyrox-ssm MarkovGPPrior. Shelf: describe.
A · Beyond the Gaussian¶
When the belief is not Gaussian it is held by draws, by a map from a simple distribution, or only by a simulator that produces draws.
Samples¶
The distribution held by an ensemble of draws, which allows any nonlinearity but has limited rank.
The members carry any nonlinearity, but their covariance spans at most directions. In the stack: gaussx ensemble_covariance and ensemble_kalman_gain, and pipekit-cycle EnKF; kernellib KernelDensity smooths samples into a density. Shelf: describe.
Transport¶
The distribution held by a map that pushes a simple distribution onto the one wanted.
The map , with parameters , turns standard normal draws into draws of . In the stack: gauss_flows fit_gaussianization_flow and FlowGuide. Shelf: fit.
Implicit¶
Only a simulator: it draws data given parameters, but there is no density to evaluate.
Draws of given are available; itself is not. In the stack: plumax, sesmax and radtrax as simulators. Shelf: assemble.
B · What is modelled¶
The family is the model itself, and A is how it is held.
Families¶
The model families the stack offers, each of which can be held in more than one of the forms above: a Matérn GP is one family in all four Gaussian forms. In the stack, on NumPyro: pyrox-gp GPs, pyrox-lgm latent Gaussian models, pyrox-ssm state-space models, pyrox-nn Bayesian networks and pyrox-xtreme extremes; pyrox-gauss puts the distributions on gaussx. Shelf: fit 2.
III · The problem: what you compute from data¶
Once data arrive, the problem is two choices: the target, which unknown the data inform, and the method, how its posterior is computed. The targets follow Simeone’s split between estimation and learning, plus bilevel problems and the computation itself; the methods run from exact to approximate to amortized. Every target can be solved by every method, as Targets against methods shows.
Target: what is unknown¶
The target is a state per instance, parameters shared across a dataset, parameters learned through the estimates, or the result of a computation.
Estimation¶
The state of one instance, with the model fixed.
The posterior over given the data , or its mode, the minimiser of the cost ; the parameters sit behind the semicolon, fixed. In the stack: vardax, filterax, argminax, and plumax per-plume inversions. In the ocean example it is the state, by 4D-Var; in the sources example it is for one plume. Shelf: fit.
Learning¶
The parameters, learned once over a dataset.
The posterior over given the dataset , or the minimiser of the loss . In the stack: pipekit-train with geonnax, pyrox models and gauss_flows. In the ocean example it is an emulator; in the sources example, a detector. Shelf: fit D.
Bilevel¶
The parameters, learned through the estimates they produce.
The inner problem gives the estimate , and the outer loss scores it, so the gradient runs through the inner solve. In the stack: argminax.adjoint, pipekit-cycle ImplicitAdjoint, diffrax adjoints and vardax FourDVarNet. In the ocean example it is the background covariance or the model error, learned through the DA cycle; in the sources example, the dispersion parameters shared across plumes. Shelf: fit.
The computation¶
The result of a numerical method, inferred from the evaluations it made: a solve from matrix–vector products, an integral from function values, a derivative from nearby values, an ODE trajectory from vector-field evaluations. There is no probabilistic solver yet; the probabilistic-numerics counterparts are marked P on the numerical-methods page. Shelf: gap 6.
Method: how, under any target¶
The method computes the posterior over the target: in closed form, by a cheaper stand-in per instance, or by a stand-in learned once.
Exact¶
The posterior in closed form: Gaussian conditioning, the Kalman filter, one linear solve.
Conditioning a joint Gaussian on needs one solve against ; the Kalman filter does the same one time step at a time. Shelf: fit.
Approximate¶
A cheaper stand-in for the posterior, fitted for each instance.
The stand-in is a point and its curvature (MAP, Laplace, INLA), a projection (moment matching: EKF, UKF, EP, the EnKF), the best member of a family (variational), or draws (MCMC, SMC, ABC). Shelf: fit 7.
Amortized¶
One of those stand-ins, learned once over simulations and run in one pass per instance.
The map from to , with parameters , is trained once and then costs one pass for each new ; it is the six-step cycle’s step 5. In the stack: vardax AmortizedPosterior and FourDVarNet, and pipekit-train. In the ocean example it is learned DA; in the sources example, a network from image to . Shelf: fit 4.
IV · Physics in the loop¶
Physics enters as code that can be differentiated, so that gradients from Part III flow through it. Operators discretise the equations; hybrid models assemble those operators, learned parts and the observation model into one model that can be simulated, fitted and inverted.
Differentiable operators¶
The discretised pieces of the physics, all differentiable: stencils and spectral derivatives for the dynamics, and observation geometry and radiometry for the sensor. In the stack: gridax, spectraldiffx and radiomax. Shelf: physics.
Hybrid models¶
Whole models assembled from those operators, such as plume transport, radiative transfer and ocean dynamics, where learned parts can sit beside the physics and be trained through it. In the stack: plumax, radtrax and sesmax (sesmax_core.train). Shelf: assemble.
V · Evaluate, decide¶
The last part asks whether the result is good enough and what to do with it: scores against a reference, and decisions made under the posterior. Expect the scoring to exist and the deciding not to.
Scorers, skill scores¶
Scores that compare a result with a reference, from point errors to distances between whole distributions.
The maximum mean discrepancy is zero only when and agree, for a characteristic kernel ; it compares an emulator’s outputs with the simulator’s, or a synthetic world with the real one. pipekit-evaluate is the framework and diagnostix holds the scores; kernellib mmd_squared, hsic and cka compare distributions. Shelf: orchestrate 3.
Decisions¶
The action that is best under the posterior, and whether an extra observation is worth making.
Expected utility, the value of information, where to observe next and sequential decisions have no home in the stack yet; Decisions, after Goulet works them through below. Shelf: gap 5.
Targets against methods¶
Every target can be solved on every rung: exact, approximate, amortized. A cell names what exists at the pinned commits; an approximate or amortized cell names its family. Amortized is not a new family: it learns one of the approximate families once, so that each instance costs one pass. It is the six-step cycle’s step 5.
| Target | Exact | Approximate | Amortized |
|---|---|---|---|
| Estimation | today gaussx conditional, kalman_filter, rts_smoother; vardax OptimalInterpolation | MAP, Laplace today argminax laplace_mode; vardax 3D- and 4D-Var with LaplaceCovariance Moment matching today gaussx nonlinear_kalman_filter, UnscentedIntegrator, sigma_point_kalman_update; ensemble_kalman_gain, EnKF; pyrox-ssm ExpectationPropagationMarkov Variational pieces gaussx ELBO terms, NumPyro SVI; no per-instance example Sampling today plumax infer_emission_rate, NUTS per plume gap SMC, particle filters, ABC ⑦ | MAP today geonnax inverse maps, FourDVarNet’s learned solver Variational today vardax AmortizedPosterior Posterior estimation pieces gauss_flows conditioners; ConditionalFlowHead is a stub ⑦ Filtering gap learned filters |
| Learning | today the exact evidence, maximised: gaussx log_marginal_likelihood; kernellib KRR, with Falkon and EigenPro solving it on a Nyström form or iteratively | MAP, Laplace, INLA today pipekit-train + geonnax; EnsembleMAP; fit_gaussianization_flow; pyrox-lgm inla; pyrox-nn last_layer_laplace Variational today pyrox-gp svgp_elbo, MeanFieldGuide, FullRankGuide, CVI; FlowGuide; EnsembleVI Sampling today pipekit-train NumPyro and BlackJAX adapters over pyrox-nn gap ABC for θ ⑦ | gap θ for a new dataset in one pass: neural processes, neural likelihood estimation ⑦ |
| Bilevel | today hyperparameters through the Kalman evidence, markov_gp_factor | MAP today argminax.adjoint, ImplicitAdjoint, optimize_prior_precision Variational today hyperparameters through the collapsed ELBO, svgp_elbo Sampling gap nested or pseudo-marginal sampling | today FourDVarNet learns the solver and the prior together |
| The computation | gap BayesCG, Bayesian quadrature, probabilistic finite differences, linear ODE filters ⑥; gaussx IntegratedWienerSDE and kalman_filter are most of an ODE filter | Point today every classical solver: its answer is the point estimate, with no uncertainty Moment matching gap nonlinear ODE filters ⑥ | pieces geonnax neural operators amortize a solve, as point answers with no uncertainty |
Sequential is not a method. A Kalman filter is the exact rung on a state-space form; EKF, UKF and EP are approximate by moment matching; the EnKF is moment matching with samples; a particle filter is approximate by sampling (SMC); a learned filter is amortized. Amortizing the inverse is not emulating the forward model. plumax’s FootprintEmulator and pipekit-cycle’s NeuralForward replace the forward model and still need an estimation step after them; vardax’s AmortizedPosterior replaces the estimation step itself.
The seam: which form makes which method cheap¶
Part II fixes the form, Part III picks the method, and some pairings are much cheaper than others. One Matérn field shows why: the same Gaussian is dense as a moment, sparse as a precision, diagonal in a spectral basis and Markov in time.
One Matérn fieldlength scale , smoothness the same Gaussian, held four ways
Moment, densecondition: gaussx · kernellib
Precisionsparse spde_precision
SpectralRFF · HSGP
State space, in timeMaternSDE · kalman
Cheapest method per formspectral, state space: exactprecision: Laplace (INLA)moment: variational (SVGP)
One Matérn field, with length scale and smoothness , in the four Gaussian forms. Each makes a different computation cheap.
| Form (II) | Method (III) | Gives | In the stack |
|---|---|---|---|
| State space | exact | Kalman filter and smoother, O(T) | gaussx kalman_filter, rts_smoother |
| State space | approximate: moment matching | EKF, UKF and EP; with samples, the EnKF | nonlinear_kalman_filter, ExpectationPropagationMarkov, EnKF |
| Precision | approximate: Laplace | INLA | pyrox-lgm inla |
| Moment | approximate: variational | SVGP | pyrox-gp svgp_elbo |
| Spectral | exact | Bayesian linear regression on features, O(N D_z²) | kernellib features + gaussx conditional |
| Moment | exact | kernel ridge regression, the GP posterior mean | kernellib KRR; Falkon on a Nyström form |
| Transport | approximate: variational | flow guides | gauss_flows FlowGuide |
| Implicit | approximate: sampling | ABC | gap ⑦ |
| Implicit | amortized | neural posterior estimation | pieces ⑦ |
An approximation that changes the model belongs to Part II; one that changes the posterior belongs to Part III. Inducing points, a truncated spectral basis and a coarser grid change the model; Laplace, VI and MCMC change how its posterior is computed. SVGP does both: its inducing points are a form, its ELBO an approximate method.
Decisions, after Goulet¶
With an action from the set , its utility, the data so far and a candidate observation, the best action and the value of making the observation are
VoI is never negative, so an observation is worth making when its value exceeds its cost. For methane: the action is to flag a site or not, the state includes the emission rate (kg h⁻¹), and the candidate observation is a revisit; task the revisit when its value exceeds the cost of tasking. Over several steps the same question is a Markov decision process, which is where Goulet ends. Nothing in the stack computes either (note ⑤).
Where it doesn’t fit¶
[1] kernellib’s estimators span four parts. KRR is the exact rung of learning, and Falkon and EigenPro solve it on a Nyström form or iteratively;
KernelPCAlearns a basis (Part I);KernelDensityholds a distribution from samples (Part II); MMD, HSIC and CKA score one distribution against another (Part V). They live in mathax with the kernels, and moving them would put kernellib’s primitives on the wrong shelf. Proposed: Keep them in kernellib and name each in its part; give MMD and HSIC a scorer adapter in pipekit-evaluate, so GeoBench can compare an emulator with its simulator.[2] pyrox is split from inferax by framework. pyrox-gp and pyrox-lgm infer too (Laplace, INLA). What sets pyrox apart is NumPyro, a dependency boundary rather than a concept. Proposed: Say so on the layer map.
[3] Evaluation is split. diagnostix’s generic skill scores are the evaluate step, while pipekit-evaluate has the scorer framework and no scores. Proposed: An issue on diagnostix to move its generic scores into pipekit-evaluate.
[4] inferax’s test is too narrow. “An estimate with its uncertainty” fits argminax, filterax and vardax, but not manipy or much of gauss_flows. Part III suggests a sharper test: inferax holds estimation and learning through estimation (bilevel), while pure learning sits in pipekit-train, pyrox and geonnax. manipy and gauss_flows are then the cases to decide, being closer to pure learning. Proposed: Restate the test as “estimation, and learning through estimation”, and decide where manipy and gauss_flows belong under it.
[5] Decisions have no home. Goulet’s arc ends with expected utility, the value of information and sequential decisions. For your applications that means which site to revisit, which sensor to task, and where an extra observation most reduces the uncertainty in an emission rate or a state. Nothing in the stack computes VoI or solves a decision process. Proposed: A design issue on where decision analysis lives: the expected-utility and VoI maths beside the inference in inferax, the tasking in the app layer.
[6] Probabilistic numerics has no home. The computation row is empty: no probabilistic linear solver, Bayesian quadrature, probabilistic finite differences or ODE filter. The pieces exist: gaussx’s
IntegratedWienerSDEis an ODE filter’s prior, and itskalman_filterandnonlinear_kalman_filterare the filter. Proposed: geostack#353 puts each beside its classical method: BayesCG in gaussx, Bayesian quadrature in integrix.expect, the ODE filter in integrix.march on gaussx’s SDE priors and filters, probabilistic stencils in gridax.stencils.[7] Two families are thin: SMC and simulation-based inference. Approximate: there is no particle filter, SMC sampler or ABC. Amortized: neural posterior estimation exists only in pieces (gauss_flows conditioners; vardax’s
ConditionalFlowHeadis a stub). Implicit models, the simulators themselves, have no method that uses them as they are. Proposed: SMC in filterax beside its filters; neural posterior estimation in vardax on gauss_flows conditioners.
Sources and status
Shelves as on the Layer Map (geostack PR #331). “Inherited” marks libraries the stack uses but does not contribute to. The curriculum follows the arc of J.-A. Goulet, Probabilistic Machine Learning for Civil Engineers (MIT Press, 2020), with part III after O. Simeone, Machine Learning for Engineers (Cambridge University Press, 2022).