Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Calibration: exact oracles for the engine

GeoStack · application · 3 December 2026

Abstract

Three state-space problems whose answers are known: a linear-Gaussian state space, Lorenz-63 and Lorenz-96. They test the benchmark engine itself, so they are built first.

describemathax
fitinferax, pyrox
physicsGeoNumerics
dataGeoStack (geotoolz)
assembleGeoModels
orchestratepipekit
dashed, numbered: off the shelf the lens expects, or no library yet
Dhanded to the data-engineering lens
Phas a probabilistic-numerics counterpart

Problems with known answers

Calibration has no domain. Its three problems have posteriors known exactly, or by a long 4D-Var, so any failure is the engine’s, not the science’s. It is the proving ground the other four applications stand on.

A linear-Gaussian state space. With transition A\mat{A}, observation operator H\mat{H} and both noises Gaussian, the Kalman smoother gives the exact posterior p(x1:T∣y1:T)p(\vect{x}_{1:T} \mid \vect{y}_{1:T}):

xt=Axt−1+ηt,    yt=Hxt+εt,    ηt∼N(0,Ση),    εt∼N(0,Σε)\vect{x}_t = \mat{A} \vect{x}_{t-1} + \gvect{\eta}_t, \ \ \ \ \vect{y}_t = \mat{H} \vect{x}_t + \gvect{\varepsilon}_t, \ \ \ \ \gvect{\eta}_t \sim \mathcal{N}(\vect{0}, \gmat{\Sigma}_\eta), \ \ \ \ \gvect{\varepsilon}_t \sim \mathcal{N}(\vect{0}, \gmat{\Sigma}_\varepsilon)

Lorenz-63. Three variables and chaos, with the classic constants (a,r,b)=(10,28,8/3)(a, r, b) = (10, 28, 8/3):

x˙1=a(x2−x1),    x˙2=x1(r−x3)−x2,    x˙3=x1x2−bx3\dot{x}_1 = a (x_2 - x_1), \ \ \ \ \dot{x}_2 = x_1 (r - x_3) - x_2, \ \ \ \ \dot{x}_3 = x_1 x_2 - b x_3

Lorenz-96. DxD_x variables on a ring, with forcing F=8F = 8 and indices taken modulo DxD_x, at Dx=40D_x = 40 and Dx=72D_x = 72:

x˙i=(xi+1−xi−2)xi−1−xi+F,    i=1,…,Dx\dot{x}_i = (x_{i+1} - x_{i-2}) x_{i-1} - x_i + F, \ \ \ \ i = 1, \dots, D_x

Outside the levels

Calibration’s problems run state to state: there is no radiance, grid or product, so no level transition. Each card is a cell with the level fixed and the rung free.

CardTruth → oracleHeadline scoresStatus
cal.lgssa linear-Gaussian state space → the Kalman smoother, exactSBC, coverage, distance to the posterior2a
cal.l63Lorenz-63 → 4D-VarRMSE(t) over about 9 Lyapunov times2a
cal.l96Lorenz-96, 40-D and 72-D → 4D-VarRMSE per block; forecast RMSE2a

All three are in GeoBench’s first build phase, 2a, before any science card.

The stack

StepLibrariesShelf
Simulatorsvardax Lorenz63, Lorenz96, L63Prior, L96Prior; a linear-Gaussian simulator is a few linesfit
Exact oraclegaussx kalman_filter, rts_smootherfit
4D-Var oraclevardax IncrementalFourDVar, GaussNewtonHessian, LaplaceCovariancefit
Ensemble variantsfilterax ensemble filters; pipekit_cycle EnsembleDACyclefit
Fast rungsgeonnax emulators; pipekit_cycle DACycle, NeuralForward; vardax AmortizedPosteriorfit
Scoresvardax simulation_based_calibration; pipekit_evaluate Task, Oracle, Benchmark, evaluateorch

A ladder of difficulty

Calibration’s model is always right, so climbing its ladder tests only the inference.

ProblemRelaxesKind
Linear-Gaussianthe reference: an exact posterior—
Lorenz-63linearity: chaos in three dimensions; the posterior is no longer Gaussiandifficulty
Lorenz-96, 40-Ddimension: ensembles too small for the statedifficulty
Lorenz-96, 72-Dmore dimension at the same ensemble sizedifficulty

The cycle

StepWhat it is here
1 · Modelthe three simulators
2 · Inferencethe Kalman smoother (exact); 4D-Var (the Lorenz oracle)
3 · Emulatora geonnax emulator of the Lorenz step
4 · Emulator inferenceDACycle with NeuralForward
5 · AmortizedAmortizedPosterior, tested on Lorenz
6 · Improveone engine component swapped, scored against the one it replaces

The suite: three cards

Simulation-based calibration

A posterior is calibrated when the truth looks like one more draw from it. Draw θ⋆\theta^\star from the prior, simulate data, run the method for NEN_{\mathcal{E}} posterior draws, and record the rank of θ⋆\theta^\star among them. Over many replicates, the rank is uniform on {0,…,NE}\{0, \dots, N_{\mathcal{E}}\} if and only if the method is calibrated (Talts et al., 2018):

θ⋆∼p(θ),    y∼p(y∣θ⋆),    {θ(e)}e∈E∼q(θ∣y),    rank=∑e∈E1[θ(e)<θ⋆]\theta^\star \sim p(\theta), \ \ \ \ \vect{y} \sim p(\vect{y} \mid \theta^\star), \ \ \ \ \{\theta^{(e)}\}_{e \in \mathcal{E}} \sim q(\theta \mid \vect{y}), \ \ \ \ \mathrm{rank} = \sum_{e \in \mathcal{E}} \mathbf{1}\left[\theta^{(e)} < \theta^\star\right]

A rank histogram that is U-shaped means overconfidence, one that is humped means underconfidence, and a slope means bias. On cal.lgss the exact oracle must pass its own test first: that checks the test before it checks any method.

Sketch

A code sketch of the first card, cal.lgss: the names marked today exist; the arguments are sketched. Nothing here runs yet.

import gaussx
from vardax import simulation_based_calibration

# Shapes: T steps; D_x state dimensions; N_𝓔 posterior draws

# user
# x_t = A x_{t−1} + η_t,  y_t = H x_t + ε_t, with (A, H, Σ_η, Σ_ε) known
truth, observations = simulate_lgss(params, key=key)              # → (T, D_x), (T, D_y)

# today* (gaussx)
# p(x_t | y_{1:t}), then p(x_t | y_{1:T}): exact
filtered = gaussx.kalman_filter(params, observations)
oracle = gaussx.rts_smoother(params, filtered)                    # → (T, D_x) means, (T, D_x, D_x) covariances

# user
# the method under test: any engine variant, N_𝓔 draws
draws = method(observations, key=key)                             # → (N_𝓔, T, D_x)

# today* (vardax)
# the rank of the truth among the draws, per component: uniform if calibrated
ranks = simulation_based_calibration(draws, truth)                # (N_𝓔, T, D_x) → (T, D_x)

Gaps

Where it doesn’t fit