zuko.transforms module provides a collection of parameterizable transformations that serve as the building blocks for normalizing flows. All transforms are compatible with PyTorch’s distribution framework.
Overview
Transforms in Zuko are bijective mappings that can compute:- Forward transformation:
y = f(x) - Inverse transformation:
x = f^{-1}(y) - Log absolute determinant of the Jacobian:
log |det J_f(x)|
torch.distributions.Transform and can be composed, inverted, and combined with distributions.
Transform Categories
Autoregressive Transforms
Transforms that apply autoregressive conditioning, where each output dimension depends on previous dimensions.- AutoregressiveTransform - Autoregressive transformation scheme
Coupling Transforms
Transforms that split inputs and apply transformations to subsets conditioned on others.- CouplingTransform - Coupling transformation scheme
Spline Transforms
Monotonic spline-based transformations for flexible, continuous mappings.- MonotonicRQSTransform - Rational quadratic spline transformation
Polynomial Transforms
Transformations based on polynomial functions.- SOSPolynomialTransform - Sum-of-squares polynomial transformation
- BernsteinTransform - Bernstein polynomial transformation
- BoundedBernsteinTransform - Bounded Bernstein polynomial transformation
Neural Transforms
Transforms constructed from neural networks and learned functions.- UnconstrainedMonotonicTransform - Monotonic transformation via integration
- MonotonicTransform - General monotonic transformation wrapper
- GaussianizationTransform - Gaussianization via learned CDFs
- FreeFormJacobianTransform - Free-form Jacobian transformation (FFJORD)
Utility Transforms
Basic transformations for common operations.- IdentityTransform - Identity transformation
- AdditiveTransform - Translation transformation
- MonotonicAffineTransform - Affine transformation with positive scale
- RotationTransform - Orthogonal rotation transformation
- PermutationTransform - Permutation transformation
- LULinearTransform - LU decomposition linear transformation
- CircularShiftTransform - Circular shift on bounded interval
- CosTransform - Cosine transformation
- SinTransform - Sine transformation
- SignedPowerTransform - Signed power transformation
- SoftclipTransform - Soft clipping to bounded interval
Composition Transforms
Transforms for combining and modifying other transforms.- ComposedTransform - Composition of multiple transforms
- DependentTransform - Treats dimensions as dependent
Basic Usage
Composing Transforms
Next Steps
Autoregressive
Learn about autoregressive transformations
Coupling
Explore coupling transformations
Spline
Discover spline-based transformations
Polynomial
Work with polynomial transformations
