
FrEIA_GLOWCouplingBlock
Diffusion and generative2,208 ops7.9M params
A normalizing flow for images that swaps fixed channel permutations for learned invertible 1x1 convolutions.
Diffusion and generative · 2,208 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
About this model's family
Glow is a flow-based generative model for images built around a learned invertible 1x1 convolution. Flows of this kind give exact log-likelihoods and exact latent inference, and both training and sampling parallelize. Its headline claim is that a model trained on the plain log-likelihood objective can synthesize and manipulate large images that look realistic.
Each step of flow is an actnorm layer, then the invertible 1x1 convolution, then an affine coupling layer. Steps are stacked inside a multi-scale architecture with a depth of flow K and a number of levels L. Actnorm is a per-channel scale and bias whose parameters are initialized so that activations have zero mean and unit variance on an initial minibatch of data. The 1x1 convolution replaces the fixed channel-reversing permutation of NICE and RealNVP with a learned weight matrix initialized as a random rotation. The last convolution of each coupling network is initialized to zero so every coupling layer starts as the identity, which the authors found helps when training very deep networks. Splits are only along the channel dimension, dropping the checkerboard spatial split of RealNVP to simplify the architecture.
On CIFAR-10 with K = 32 and L = 3, the invertible 1x1 convolution reached a lower negative log-likelihood and converged faster than either a channel reversal or a fixed random permutation, for both additive and affine couplings. In bits per dimension Glow reached 3.35 on CIFAR-10 against 3.49 for RealNVP, 4.09 against 4.28 on ImageNet 32x32, and 3.81 against 3.98 on ImageNet 64x64. Attribute manipulation needs no labels during training: the difference between the average latent of images with an attribute and without it gives a direction to move along. Generating one 256x256 image at batch size 1 took about 130ms on a single 1080 Ti.
All eight captured members here were built from the normflows library, a PyTorch implementation of discrete normalizing flows. Each is traced on a single 3x32x32 image, the CIFAR-10 resolution of the normflows Glow example, with L = 3, K = 16, 256 hidden channels and channel splits, and emits one scalar. That K = 16 is half the K = 32 the paper used for its CIFAR-10 runs. The roster names point at several code bases, among them the chaiyujin PyTorch port that describes its modules as adapted from the official TensorFlow version, but every captured graph comes from the same normflows adapter and configuration.
Key idea. Glow replaces the fixed channel permutation of NICE and RealNVP with a learned invertible 1x1 convolution whose weight matrix is initialized as a random rotation. Trained on the plain log-likelihood objective, it improves on RealNVP across standard image benchmarks and can synthesize and manipulate large images.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{kingma2018glowgenerativeflowinvertible,
title={Glow: Generative Flow with Invertible 1x1 Convolutions},
author={Diederik P. Kingma and Prafulla Dhariwal},
year={2018},
eprint={1807.03039},
archivePrefix={arXiv},
primaryClass={stat.ML},
url={https://arxiv.org/abs/1807.03039},
}