Two Kinds of Uncertainty
Biochemical predictions carry two distinct sources of uncertainty, and separating them is central to interpreting any band Catalax produces. Epistemic uncertainty reflects the model’s ignorance. It is large where the data were sparse or absent and small where the data constrained the dynamics. Epistemic uncertainty is reducible, since collecting more informative data shrinks it. This is the uncertainty that should grow when a trajectory drifts into regions the model never saw. Aleatoric uncertainty reflects irreducible measurement noise. It is the scatter around the true trajectory caused by pipetting error, instrument drift, and biological variability. Collecting more data does not remove it, although it does pin down its magnitude. A trustworthy predictive band accounts for both. Catalax keeps them conceptually separate so that you can inspect the epistemic component on its own (the honest measure of extrapolation risk) and fold in the aleatoric component when you need a full predictive interval that covers the data scatter.A Common Interface for Every Method
Every uncertainty method in Catalax exposes the same outputs, so they are interchangeable in plotting and analysis. This is formalised by theUncertaintyPredictor base class in catalax.uncertainty, which extends the standard Predictor interface with a single additional method, predict_distribution, that returns a PredictiveDistribution.
A PredictiveDistribution can be backed in one of two ways:
- Sample-backed: an ensemble of trajectories, one per ensemble member or posterior draw. Bands are empirical percentiles across the samples.
- Moment-backed: a mean trajectory and a predictive standard deviation. Bands are Gaussian quantiles around the mean.
hdi="lower"andhdi="upper"bound the 95% intervalhdi="lower_50"andhdi="upper_50"bound the 50% intervalhdi=Nonereturns the central trajectory
UncertaintyPredictor is a Predictor, it slots straight into Dataset.plot. Passing any uncertainty method as the predictor argument renders the mean line together with shaded HDI bands, with no special handling required.
The Methods
Catalax provides three complementary routes to uncertainty, each suited to a different situation. Neural ODE Ensembles train several models independently and treat their disagreement as epistemic uncertainty. Ensembles are sample-backed and require no special inference machinery beyond training multiple models. They are the natural choice when you already train Neural ODEs and want robust predictions with confidence bands. See Neural ODE Ensembles. GAPA (Gaussian Process Activations) wraps a single trained Neural ODE and adds post-hoc epistemic uncertainty without retraining or sampling. It attaches a Gaussian process to the activations of one layer, reads a closed-form variance that grows with distance from the training data, and propagates it along the trajectory. GAPA is moment-backed and mean-preserving, so it never changes the underlying prediction. It is the natural choice when you have one trained model and want calibrated extrapolation bands cheaply. See GAPA. HMC posterior predictive comes from Bayesian inference over a mechanistic or surrogate model. The full posterior is pushed through the model and quantiled in trajectory space, giving bands that reflect both parameter uncertainty and measurement noise. It is the natural choice when you fit parameters withcatalax.mcmc and want a principled predictive interval. See the Bayesian Inference guides.
Choosing a Method
The table below summarises when each method applies.
All three produce the same band outputs, so you can start with whichever fits your workflow and switch later without changing your plotting or analysis code.

