Glossary#
The canonical vocabulary used across setu’s code, docs, and talk. These terms
are cross-referenced throughout the site; the definitions here are the source of
truth. Reference a term from any page with {term}`NLE`.
- Estimator#
A trained neural model of a simulator’s likelihood (or likelihood-ratio) that can be exported to a PPL. The umbrella term for NLE, DiscreteNLE, MixedNLE, and NRE. “Surrogate” is fine as a description (“a neural surrogate of the likelihood”), but the trained object is an estimator, not “a surrogate”. Avoid “emulator” and “model”.
- NLE#
Neural Likelihood Estimation. Learns the conditional density p(data | parameters) with a normalizing flow (MAF or NSF). Avoid “density estimator”, which is ambiguous with posterior estimation.
- NRE#
Neural Ratio Estimation. Learns a likelihood-to-evidence ratio with a classifier instead of a normalized density.
- DiscreteNLE#
Discrete Neural Likelihood Estimation. NLE for pure-discrete observables: a categorical head (CategoricalMADE) or a count head (CountMADE) instead of a continuous flow. Use this term whenever the observable is a count or category, e.g. survival counts.
- MixedNLE#
Mixed Neural Likelihood Estimation. NLE for genuinely mixed discrete + continuous data: a normalizing flow for the continuous part and a CategoricalMADE for the discrete part. Use this term when an observation has both, e.g. a choice and a reaction time. For a purely discrete observable (a count on its own), use DiscreteNLE instead.
- Simulate → Train → Validate → Export#
The canonical four-phase setu workflow. Always name the phases with these four words; avoid renaming or collapsing them (“fit”, “wrap”, “plug in”).
- Export#
Producing a PPL likelihood term from a trained Estimator via
.to_pymc()/.to_numpyro(). Avoid “bridge” as a verb: setu is the bridge; the estimator is exported through it.- Amortized#
“Train once, infer anywhere.” The estimator is trained once and then reused for inference in any PPL and on any observation, with no per-dataset retraining.
- Trials#
The innermost repeated observations within a subject (e.g. repeated measurements in one tank). Avoid “repeats”, “replicates”.
- Subjects / Groups#
The hierarchical levels above Trials: S subjects, optionally nested in G groups. Avoid “units”, “individuals” when a hierarchy level is meant.
- Conditions#
Per-trial experimental covariates supplied to the estimator alongside parameters. Avoid “covariates”, “features”, “predictors”.
- (G, S, T, *E) convention#
The shape ordering for hierarchical data: groups and subjects outermost, trials (T) next, event dimensions (*E) last. See Shape conventions. Avoid trials-first orderings.
- Validation#
The diagnostic step that confirms a learned likelihood is trustworthy before it is exported to a PPL. A first-class phase, not an afterthought.
- C2ST#
Classifier Two-Sample Test. The accuracy of a classifier trained to distinguish true simulator samples from estimator samples; ≈0.5 means indistinguishable (good), →1.0 means reliably told apart (bad).
- SBC#
Simulation-Based Calibration. In setu, a likelihood-level rank-calibration check on the estimator: it draws synthetic datasets from the learned likelihood, ranks the true data’s log-density among them, and tests rank uniformity. No MCMC, no posterior, unlike classical posterior SBC. Distinct from C2ST: an estimator can pass C2ST (accurate marginals) yet show a non-uniform SBC rank histogram, which is why both are run.
- PPL#
Probabilistic Programming Language. An inference framework that requires an explicit likelihood: here PyMC (whose PyTensor backend can compile to JAX via
nuts_sampler="blackjax"; its default NUTS uses the C backend) and NumPyro (JAX-native). setu’s job is to make an intractable simulator usable inside one.