Woodbury Transformations for Deep Generative Flows

You Lu, Bert HuangNeurIPS 2020

Overview

Normalizing flows are a powerful class of deep generative models that allow for exact likelihood calculation and efficient sampling. However, they require a sequence of invertible functions where the determinant of the Jacobian is easy to compute. This paper introduces Woodbury transformations, a new class of layers for normalizing flows that efficiently model both channel and spatial dependencies. By leveraging the Woodbury matrix identity and Sylvester’s determinant identity, these layers achieve state-of-the-art likelihood results while remaining significantly faster and more scalable than existing spatial flow operations.

The Expressivity vs. Efficiency Trade-off

In flow-based models, there is a classic trade-off between expressivity and efficiency:

  1. $1 \times 1$ Convolutions: Used in models like Glow, these are very fast but only model dependencies between channels at the exact same pixel location. They are essentially "spatially blind."
  2. Emerging and Periodic Convolutions: These attempt to model spatial dependencies but suffer from major drawbacks. They are either non-parallelizable (leading to slow sampling) or require expensive Fourier transforms that scale poorly to high-resolution images.
Flow architecture showing where invertible convolutions are applied.

The authors seek a "best of both worlds" solution: a layer that captures complex interactions across all dimensions (spatial and channel) without sacrificing the speed that makes flows attractive.

Woodbury Transformations

The core innovation is the Woodbury transformation. Instead of standard convolutions, the authors propose modeling the interaction between variables using a weight matrix $W$ that is a low-rank update to the identity matrix: $$W = I + UV$$ where $U$ and $V$ are thin, tall matrices.

By using this structure, they can invoke two powerful mathematical identities:

  • Woodbury Matrix Identity: Allows for the calculation of the inverse $W^{-1}$ in time proportional to the low rank $d$, rather than the massive dimension of the input.
  • Sylvester’s Determinant Identity: Allows for the calculation of the Jacobian determinant $\det(W)$ by computing the determinant of a much smaller $d \times d$ matrix.

Memory-Efficient (ME) Woodbury

Since a full spatial transformation matrix can still be large for high-resolution images, the authors also introduce ME-Woodbury (Memory-Efficient Woodbury). ME-Woodbury decomposes the spatial transformation into separate height and width operations, reducing space complexity from $O(hw)$ to $O(h + w)$.

Comparison of 1x1 convolution, Woodbury, and ME-Woodbury transformations across tensor dimensions.

Key Insights

  • Global Interactions for Free: Unlike standard convolutions that only look at local neighbors, Woodbury transformations allow every dimension to potentially interact with every other dimension. Because of the low-rank structure, this "global" view avoids quadratic computational costs.
  • Implicit Invertibility: A common challenge in flow research is forcing layers to stay invertible during training. The authors found they do not need to explicitly constrain $U$ and $V$. The maximum likelihood objective naturally pushes the model away from non-invertible states (where the determinant would be zero).
  • Parallelization is King: While autoregressive "Emerging Convolutions" are mathematically sound, they become a bottleneck on modern GPUs. Woodbury transformations are fully parallelizable, making them 100x to 200x faster for sampling large images.

Results and Performance

The models were evaluated on standard image synthesis benchmarks, including CIFAR-10 ($32 \times 32$), ImageNet ($32 \times 32$ and $64 \times 64$), and CelebA-HQ (up to $256 \times 256$).

  • Better Likelihood: Woodbury-Glow consistently outperformed standard Glow ($1 \times 1$ convolutions) and other variants. On ImageNet $64 \times 64$, Woodbury achieved a bits-per-dimension (BPD) of 3.87, compared to 3.94 for $1 \times 1$ convolutions.
  • Efficiency: During training, Woodbury transformations were nearly as fast as $1 \times 1$ convolutions. In sampling, they remained highly efficient, whereas periodic convolutions became exponentially slower as image size increased.
  • Visual Quality: Qualitative results on CelebA-HQ showed that Woodbury-Glow generates smoother, more realistic face shapes much earlier in the training process (e.g., at 100,000 iterations) compared to the standard Glow architecture, which still produced distorted images at that stage.

Limitations and Future Work

  • Lack of Parameter Sharing: Unlike standard convolutional layers, Woodbury transformations do not use weight sharing (sliding kernels). The number of parameters grows with the input resolution, potentially limiting scaling to extremely high-resolution images (e.g., 4K).
  • Low-Rank Assumption: The model assumes that the most important interactions can be captured by a low-rank approximation. While effective for images, it may not suffice for data with extremely high-rank dependencies.
  • Future Directions: The authors suggest exploring "partially shared" Woodbury transformations to combine the benefits of traditional convolutions with their low-rank global modeling.

Summary updated

BibTeX
@inproceedings{lu2020woodbury,
  author = {You Lu and Bert Huang},
  title = {{Woodbury Transformations for Deep Generative Flows}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure