JAX/FlowJax-based Gaussianization flows, SurVAE transforms, and information-theoretic utilities.
gauss_flows is a specialised extension of FlowJax providing:
Gaussianization transforms — alternating marginal CDF transforms and learned rotations (the RBIG pattern)
SurVAE hierarchy — bijections, surjections, and stochastic transforms with exact or lower-bound likelihoods
Information theory — first-class
entropy,mutual_information,total_correlation,kl_divergence,negentropyNumPyro integration — through pyrox-flows, which wraps a flow as a NumPyro distribution or guide
Package layout¶
gauss_flows is a uv workspace of two packages, cut along the stack’s layers so that libraries which only need invertible maps can import them without the flows and their dependencies:
| Package (import) | Layer | Public modules |
|---|---|---|
gauss-flows-maps (gauss_flows_maps) | Core, tier 1 | bijections, surjections, conditioning, sphere |
gauss-flows-models (gauss_flows_models) | GeoML, tier 0 | flows, filters, distributions, inference, info_theory |
gauss-flows-maps imports only functax among the stack’s libraries; gauss-flows-models adds diffrax and gaussx and imports gauss-flows-maps, never the reverse. Every public name is reached through its module (from gauss_flows_maps.bijections import AffineCoupling); the implementation sits under each package’s private _src/, which follows the SurVAE taxonomy (Nielsen et al. 2020): bijections, surjections and stochastic transforms, each split by technique.
Installation¶
Not yet on PyPI. Install the package you need from source:
pip install "gauss-flows-maps @ git+https://github.com/jejjohnson/gauss_flows#subdirectory=packages/gauss-flows-maps"pip install "gauss-flows-models @ git+https://github.com/jejjohnson/gauss_flows#subdirectory=packages/gauss-flows-models"gauss-flows-models needs gauss-flows-maps; outside the workspace, install both. For development, clone and uv sync:
git clone https://github.com/jejjohnson/gauss_flows && cd gauss_flows
uv sync --all-groupsQuickstart¶
import jax
from gauss_flows_models.flows import gaussianization_flow
from gauss_flows_models.info_theory import entropy
key = jax.random.key(0)
flow = gaussianization_flow(key, n_dims=4, n_layers=8, n_components=8)
# Sample / score
samples = flow.sample(key, (100,))
log_probs = flow.log_prob(samples)
# Information theory
H = entropy(flow, n_samples=10_000, key=key)What’s inside¶
Bijections — coupling, marginal CDFs, linear/rotation, normalisation, periodic, classic residual, and continuous (FFJORD) layers, e.g.
AffineCoupling,MixtureGaussianCDF,HouseholderRotationandFFJORD.Surjections & Stochastic — dimension-changing surjections and VAE-style stochastic transforms with lower-bound likelihoods, e.g.
Slice,SimpleAbsSurjectionandVAE.Base Distributions — Gaussian mixtures, a low-rank Gaussian (probabilistic PCA and factor analysis), conditional diagonals, and sphere distributions, e.g.
GaussianMixtureandVonMisesFisher.Flows & RBIG —
SurVAEFlow, thegaussianization_flow/coupling_gaussianization_flow/iterative_rbigfactories, and thefit_rbigwarm-start.Training —
fit_gaussianization_flow; the NumPyro bridges live in pyrox-flows.Information Theory —
entropy,total_correlation,mutual_information,kl_divergenceandnegentropy(Monte-Carlo, analytical, and RBIG-way).
Links¶
API reference, with a capability index of every public name