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.

gauss_flows

JAX/FlowJax-based Gaussianization flows, SurVAE transforms, and information-theoretic utilities.

gauss_flows is a specialised extension of FlowJax providing:

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)LayerPublic modules
gauss-flows-maps (gauss_flows_maps)Core, tier 1bijections, surjections, conditioning, sphere
gauss-flows-models (gauss_flows_models)GeoML, tier 0flows, 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-groups

Quickstart

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