Parameters change. Infer their trajectories.

Bayesian inference for time-varying parameters. Superstats combines a model of your observations with a model of how its parameters change. Simulate data, train a neural estimator, and infer trajectories alongside the parameters that stay constant.

A posterior at every trial.

Decisions change as evidence and caution shift. Explore a diffusion decision model with a changing drift rate and boundary separation. Choose a sequence, select a parameter, and move through the trials to inspect its estimated posterior.

Sequence

The speed and direction of evidence accumulation. Both parameters vary across the 100 trials in each recorded sequence.

Drift rate · vₜ

-3.2-0.13.01255075100
Posterior median95% intervalSimulated truth

Sequence 1 · response times by choice (s)

2.50.0-2.51255075100trial →

Posterior at trial 50

p(vₜ | response times, choices)

-3.2-0.13.0vₜ

Median -0.04

95% interval [-0.85, 0.79]

Each trial’s posterior uses the whole sequence. Move through time to inspect how the estimated parameter and its uncertainty vary.

512 neural posterior samples per trial.

Inspect trial · 50

Recorded results from a Superstats workflow trained on simulated choices and response times. Both parameters follow bounded random walks; transition scales, non-decision time, and starting point are fixed for this example. Lines show posterior medians; bands show pointwise 95% credible intervals. Superstats example.

Choose what moves. Infer it together.

A transition model describes how parameters evolve. An observation model generates data from the parameters. Superstats uses BayesFlow to train a neural estimator on simulations, then uses it to infer time-varying and stationary parameters for new datasets within the training scope.

See the Python workflow
  1. 01

    Specify the dynamics.

    Choose which parameters vary over time and give them transition models. Set priors for the remaining unknowns.

  2. 02

    Train on simulations.

    Combine the dynamics with your observation simulator. Train a BayesFlow-based estimator on data generated by that model.

  3. 03

    Infer and check.

    Estimate trajectories and stationary parameters jointly for new datasets within the training scope. Check recovery and calibration before interpreting the results.

Documentation & evidence

  1. superstats repository

    Model structure, transition models, simulator interface, and the BayesFlow-based workflow.

  2. Minimal workflow example

    A Python example covering simulation, estimation, and diagnostics.