Abstract
Rectangular matrix-vector products (MVPs) are used extensively throughout machine learning and are fundamental to neural networks such as multi-layer perceptrons. However, the use of rectangular MVPs in successive normalizing flow transformations is notably missing. This paper identifies this methodological gap and plugs it with a tall and wide MVP change of variables formula. Our theory builds up to a practical algorithm that envelops existing dimensionality increasing flow methods such as augmented flows. We show that tall MVPs are closely related to the stochastic inverse of wide MVPs and empirically demonstrate that they improve density estimation over existing dimension changing methods.
Introduction
Normalizing flows are powerful generative models that learn complex probability distributions by transforming a simple base distribution through a series of bijective (invertible) functions. This allows for exact density estimation using the change of variables formula. However, a major limitation persists: standard flows require input and output dimensions to be identical.
In broader deep learning, rectangular matrices are ubiquitous for expanding or compressing data. Tall matrices (low-to-high dimension) typically assign density only to a thin hyperplane, making them brittle for real-world data. Wide matrices (high-to-low dimension) are non-injective, making their inverse undefined. Existing solutions like "Augmented Flows" rely on zero-padding or computationally expensive Singular Value Decomposition (SVD), which fail to scale to high-dimensional data like images.
The RealMVP Method
The authors propose RealMVP, a scalable framework for incorporating rectangular matrices into normalizing flows by adding learned orthogonal noise.
Instead of a simple product $t = As$, the transformation is defined as $t = As + \gamma_\perp$, where $\gamma_\perp$ is noise constrained to be orthogonal to the image of matrix $A$. This effectively "fills out" missing dimensions, creating a bijective mapping between the input and the combination of output and noise.
To maintain efficiency, RealMVP avoids the $O(N^3)$ cost of SVD by using a projection matrix $A^\perp = I - AA^+$. By projecting sampled noise $\gamma$ through $A^\perp$, the required orthogonal component is obtained without a full basis calculation. For tall MVPs, a closed-form change-of-variables formula is derived; for wide MVPs, the model uses an Evidence Lower Bound (ELBO), treating extra dimensions as latent variables that are stochastically inverted.
Empirical Evaluation
RealMVP was evaluated on synthetic 2D datasets and CIFAR-10 to test its capacity for dimension reduction and expansion.
Scalability
A primary advantage of RealMVP is its computational efficiency. While SVD-based methods fail as dimensions approach $N=20,000$, RealMVP scales linearly with the large dimension $N$, handling $N=50,000$ and beyond with ease. This efficiency stems from the $O(M^3)$ complexity relative to the "short" dimension $M$, rather than the "big" dimension $N$.
Performance
On toy 2D datasets, RealMVP achieved lower negative log-likelihood than standard padding-based "Factored" approaches. In image modeling on CIFAR-10, RealMVP improved multiscale flow architectures, achieving 3.72 bits/dimension, significantly outperforming the baseline (4.67) and the factored approach (3.88).
Conclusion
RealMVP provides a unified theoretical framework for increasing and decreasing dimensionality in normalizing flows. By bypassing the SVD bottleneck through orthogonal projections, it allows flows to naturally model data on low-dimensional manifolds within high-dimensional spaces. Future work may further optimize the pseudo-inverse calculation $A^+$ to handle cases where even the smaller dimension $M$ is very large.
Summary updated