Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Glow: Generative Flow with Invertible 1x1 Convolutions

Glow makes flow-based models stronger by swapping in learned channel mixing

  • Problem Flow-based generative models offer exact likelihood and parallel synthesis but had received little attention. Earlier flows such as RealNVP used a fixed channel reversal that limited how well they fit data.
  • Method Glow chains actnorm, a learned invertible 1x1 convolution and an affine coupling layer in each step. Instead of a fixed channel reversal, the 1x1 convolution mixes channels, and the steps are stacked in a multi-scale architecture.
  • Results On CIFAR-10, Glow reaches 3.35 bits per dimension, against 3.49 for RealNVP.

Why flows are worth revisiting

Likelihood-based generative models fall into three families: autoregressive models, variational autoencoders and flow-based models. Autoregressive models are simple, but their synthesis length grows with the dimensionality of the data, which is costly for large images and video. Variational autoencoders parallelize training and synthesis well, yet they optimize a lower bound on the log-likelihood and can be hard to optimize.

Flow-based models can be trained on the exact log-likelihood, infer latent variables exactly and run both inference and synthesis in parallel.

Flow-based models had received much less attention than GANs and variational autoencoders, and the earlier flows NICE and RealNVP rely on a fixed permutation that reverses the order of the channels. The question the authors take up is whether replacing that fixed reversal with a learned channel mixing, together with a normalization layer that tolerates small minibatches, improves log-likelihood on standard benchmarks.

They also ask whether the same plain log-likelihood training can produce realistic high-resolution faces with a usable latent space.

How a flow turns a simple density into an exact likelihood

A flow maps a datapoint x through invertible transformations to a latent z, which has a simple density such as a spherical Gaussian. Inference follows the forward direction of the chain, and synthesis runs the inverse direction starting from a sample of z. Under the change of variables, the log-likelihood equals the latent log-density plus the sum of log-determinants of the Jacobian of each transformation, written as \\( \\log p_\\theta(x) = \\log p_\\theta(z) + \\sum_{i=1}^{K} \\log|\\det(dh_i/dh_{i-1})| \\).

The determinant is expensive in general, but transformations whose Jacobian is triangular make it cheap, because it reduces to the sum of the logs of the absolute diagonal entries. For continuous data the objective adds uniform dequantization noise and a constant that depends on the data dimensionality, and the training loss is measured in nats or bits.

The parameters are optimized by stochastic gradient descent on minibatches.

One Glow step and how steps stack

Each step applies actnorm first, then an invertible 1×1 convolution, then an affine coupling layer, and this chain is built on the NICE and RealNVP ideas.

Steps are combined in a multi-scale architecture with a depth of K steps and L levels, and Figure 2 shows the arrangement with splits between levels. The multi-scale design follows RealNVP, and the authors refer to that paper for the details of the split across levels.

Actnorm instead of batch normalization

The authors motivate actnorm by a weakness of batch normalization: the noise it adds grows as the minibatch per processing unit shrinks, so performance degrades for small per-unit minibatches. Large images force a minibatch size of 1 per processing unit because of memory limits, which is the regime where this weakness matters.

Actnorm applies a scale and a bias per channel, similar to batch normalization, and both are set so that post-layer activations have zero mean and unit variance on an initial minibatch. This is a data-dependent initialization, and after it the scale and bias are ordinary trainable parameters that no longer depend on the data.

Learned channel mixing with a 1×1 convolution

Earlier flows use a fixed permutation of channels, and the authors replace it with a learned invertible 1×1 convolution whose c×c weight matrix W is initialized as a random rotation. A 1×1 convolution with equal input and output channels generalizes a permutation, since a permutation matrix is one special choice of W.

A random rotation has log-determinant zero, so training starts from zero log-determinant, and the values move away from zero after the first SGD step.

The initial P is fixed from a sampled random rotation, while L, U and s are then optimized.

The affine coupling layer keeps the forward, reverse and log-determinant computations cheap, and its additive special case has s = 1 and zero log-determinant. Zero initialization of the last convolution of each coupling network makes each affine coupling layer start as an identity function, which the authors found helps training very deep networks.

Splits are made only along the channel dimension, not in the checkerboard pattern used by RealNVP.

Channel mixing against fixed permutations on CIFAR-10

Three permutation choices were compared: channel reversal as in RealNVP, a fixed random permutation and the invertible 1×1 convolution, each combined with either additive or affine coupling layers. All these models use K = 32 and L = 3 with data-dependent initialization, and the comparison is on CIFAR-10 with all training conditions held constant.

The 1×1 convolution reached a lower average negative log-likelihood and converged faster than the other two choices, for both additive and affine coupling, with mean and standard deviation over three random seeds. Affine coupling models converged faster than additive coupling models.

The wallclock time of the 1×1 convolution model rose by about 7%, and the authors describe the operation as computationally efficient. Its parameter count is 0.2% larger than the baseline, which the authors call negligible.

Benchmark gains over RealNVP

Preprocessing follows RealNVP, and each NN() has three convolutional layers, with two ReLU hidden layers of 512 channels, and 3×3 first and last convolutions around a 1×1 center. ImageNet is used at 32×32 and 64×64 downsampled versions, and LSUN is downsampled to 96×96 with random crops of 64×64.

On CIFAR-10, Glow reached 3.35 bits per dimension, against 3.49 for RealNVP. On ImageNet, Glow reached 4.09 at 32×32 and 3.81 at 64×64, against 4.28 and 3.98 for RealNVP.

On LSUN, Glow reached 2.38 for bedroom, 2.46 for tower and 2.67 for church outdoor, against 2.72, 2.81 and 3.08 for RealNVP. Table 2 reports best results per dataset, and the authors describe the improvement as present on all the datasets they tested.

Faces at 256×256: synthesis, interpolation and attributes

The model was trained on CelebA-HQ, which has 30000 high-resolution images, at 256×256 with K = 32 and L = 6, on 5-bit images. Minibatch size is 1 per processing unit and gradient checkpointing is used because of device memory limits.

The authors describe the random samples as extremely high quality for a non-autoregressive likelihood model. To interpolate, two real images are encoded, their latents are linearly interpolated, and the intermediate latents are decoded, with almost all intermediate samples looking like realistic faces.

For attribute editing, the mean latent vector of images with a label is subtracted from the mean latent vector of images without it, and this difference is added to or removed from a latent code.

Temperature and depth in sampling

Sampling at temperature T draws from a distribution proportional to the model density raised to the power T, and for additive coupling this is done by scaling the standard deviation of the latent prior by T. Figure 8 sweeps temperatures from 0 to 1.0 in steps of 0.25 to 0.6, 0.7, 0.8, 0.9 and 1.0.

The highest temperatures give noisy images, which the authors suggest may come from overestimating the entropy of the data distribution. A temperature of 0.7 was chosen as the sweet spot between diversity and quality of samples. Figure 7 shows 5-bit LSUN bedroom samples at temperature 0.875 at resolutions of 64, 96 and 128.

Figure 9 compares a shallow model with L = 4 against a deep model with L = 6 on their ability to learn long-range dependencies. The text gives no metric for this depth comparison, so it is a qualitative observation.

Limitations

Autoregressive synthesis of high-dimensional data is reported to take multiple orders of magnitude longer than synthesis from flow models, and the authors rely on earlier work for that evidence.

Training on 5-bit images trades a slight decrease in color fidelity for better visual quality. The highest sampling temperatures produce noisy images.

The temperature mechanism is described only for additive coupling layers, and the text does not give the equivalent for affine coupling. The permutation comparison is on CIFAR-10 only, over three random seeds. The authors did not measure a large wallclock difference for the LU form in their networks, so its speed benefit is not shown in these experiments.

Paper info

Authors
Diederik P. Kingma, Prafulla Dhariwal
Venue
arXiv · Preprint
First published
2018-7-9
Added
2026-11-6
Updated
2018-7-10
Version
v2
arXiv
1807.03039
Category
stat.ML · cs.AI · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Diederik P. Kingma, Prafulla Dhariwal (2018). Glow: Generative Flow with Invertible 1x1 Convolutions. arXiv:1807.03039v2. https://arxiv.org/abs/1807.03039v2

BibTeX
@misc{kingma2018glow,
  title = {{Glow: Generative Flow with Invertible 1x1 Convolutions}},
  author = {Diederik P. Kingma and Prafulla Dhariwal},
  year = {2018},
  eprint = {1807.03039},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.03039v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up