Abstract
Normalizing flows attempt to model an arbitrary probability distribution through a set of invertible mappings. These transformations are required to achieve a tractable Jacobian determinant that can be efficiently computed. This paper introduces Linear Rational Splines (LRS) as a highly expressive yet computationally efficient building block for normalizing flows. Unlike previous spline-based methods that require solving complex polynomial equations to invert, LRS offers an analytical inverse with the exact same functional form as the forward pass, making generative modeling both faster and more flexible.
Introduction
Generative modeling aims to learn the underlying probability distribution of data to sample new, realistic examples. Normalizing Flows (NFs) achieve this by transforming a simple base distribution (like a Gaussian) into a complex target distribution using a sequence of invertible mappings. The ideal NF transformation must satisfy three criteria: it must be expressive enough to model multi-modal data, easily invertible for both density estimation and generation, and have a tractable Jacobian determinant.
Early models like Real NVP and Glow relied on affine transformations, which are computationally cheap but lack the flexibility to model intricate distributions. While recent "Neural Spline Flows" improved expressiveness using piecewise polynomials, they often require iterative root-finding or solving higher-order equations for inversion, adding significant computational overhead. LRS addresses these challenges by providing a flexible, analytically invertible alternative.
Methodology: Linear Rational Splines
The core contribution of this work is the replacement of standard affine transformations with Linear Rational Splines. These splines are constructed from piecewise homographic functions of the form:
$$y = \frac{ax+b}{cx+d}$$
Analytical Inversion and the $\lambda$ Parameter
A standout feature of a linear rational function is that its inverse is also a linear rational function. This symmetry ensures that the computational cost of generating a sample (the inverse pass) is identical to the cost of evaluating the density of a data point (the forward pass).
To satisfy continuity and derivative constraints at the boundaries of each spline "bin," the authors introduce an intermediate point in each interval. This adds an extra degree of freedom, parameterized by $\lambda$, allowing the model to adjust the curvature more effectively than previous methods.
These splines are integrated into standard flow architectures, including coupling layers for fast inversion and autoregressive layers for maximum density estimation performance. Because the derivative of a linear rational function does not change sign, the transformation remains naturally monotonic and invertible as long as the derivatives at the knots are positive.
Experimental Results
The authors evaluated LRS flows across synthetic data, tabular benchmarks, and high-dimensional image datasets.
Synthetic and Tabular Data
On synthetic 2D data, LRS demonstrates a superior ability to capture complex, non-linear structures compared to baseline models.
On tabular datasets from the UCI repository (e.g., GAS, HEPMASS), LRS flows performed competitively with state-of-the-art methods like Rational Quadratic Neural Spline Flows (RQ-NSF), often achieving higher log-likelihoods.
Image Modeling
In image modeling benchmarks, LRS showed significant improvements in bits per dimension (BPD):
- MNIST: LRS achieved 0.91 BPD, outperforming Glow (1.05) and Real NVP (1.06).
- CIFAR-10 & ImageNet: The model remained competitive with the most expressive models available, proving its scalability to high-dimensional data.
Conclusion
Linear Rational Splines provide a powerful tool for normalizing flows, balancing expressiveness with computational efficiency. By ensuring the forward and inverse transformations share the same mathematical form, LRS simplifies implementation and ensures consistent performance in both directions. Future work may explore more sophisticated boundary conditions for heavy-tailed distributions and further theoretical stability analysis of the LRS framework.
Summary updated