---
title: "NVAE: A Deep Hierarchical Variational Autoencoder (2020)"
description: "NVAE shows how deep hierarchical variational autoencoders combine efficient image generation, careful architecture, and stable training."
canonical: "https://research.elamur.ai/free/en/papers/vahdat-2020-nvae-deep-hierarchical-variational-autoencoder/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/vahdat-2020-nvae-deep-hierarchical-variational-autoencoder/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / NVAE: A Deep Hierarchical Variational Autoencoder

# NVAE: A Deep Hierarchical Variational Autoencoder

Paper · 2020 · Arash Vahdat and Jan Kautz

**Authors:** Arash Vahdat and [Jan Kautz](https://md.research.elamur.ai/free/en/authors/jan-kautz/) · **Year:** 2020 · **Venue:** neural information processing systems · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**350** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3041956526|W3098510582) · [neural information processing systems](https://openalex.org/S4363606243) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [OpenAlex](https://openalex.org/W3098510582)
- [PDF](https://arxiv.org/pdf/2007.03898)
- [arXiv 2007.03898](https://arxiv.org/abs/2007.03898)
- [OpenAlex](https://openalex.org/W3041956526)

Citations: OpenAlex, 2026-10-14.

## Deep dive: NVAE: A Deep Hierarchical Variational Autoencoder

NVAE shows how deep hierarchical variational autoencoders combine efficient image generation, careful architecture, and stable training. · about 35 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Generating a convincing image requires agreement between details that may be far apart. A face needs more than plausible eyes, hair, and skin considered separately: these features must belong together. NVAE investigates how a variational autoencoder, or VAE, can learn that agreement while retaining an explicit way to encode images and a fast way to generate them. Its central claim is that the neural architecture deserves as much attention as the statistical machinery. Better networks can substantially improve image generation without replacing the basic VAE training objective.

A VAE learns a distribution over hidden variables and a decoder that turns those variables into observations. During training, an encoder estimates which hidden variables could explain a particular input. NVAE arranges these variables in a deep hierarchy, with groups operating at different spatial resolutions. Generation begins with a compact spatial representation and proceeds toward increasingly detailed representations. The upper groups primarily organize broad structure, while lower groups supply finer variation. The decoder uses depthwise separable convolutions to gather information across larger image regions without the parameter cost of equally wide conventional convolutions.

The architecture alone does not solve the difficulty of training a deep hierarchy. Each group has a prior distribution used for generation and an approximate posterior used to encode observations. If those distributions move too far apart, their disagreement can produce destabilizing updates. NVAE therefore describes the posterior as a correction to the prior and uses spectral regularization to discourage abrupt changes in the networks. Batch normalization, Swish activations, channel gating, and memory-saving implementation choices complete the design. The authors also examine optional normalizing flows in the encoder, but these yield only modest additional improvements.

On CIFAR-10, NVAE reaches 2.91 bits per dimension, compared with the previous non-autoregressive best of 2.98. The authors report leading results within that comparison category on MNIST and the tested CelebA datasets as well. ImageNet is an exception: Flow++ remains ahead. NVAE also supplies an FFHQ baseline and generates detailed facial images at 256×256 resolution. These findings support a specific conclusion: a carefully engineered hierarchical VAE can be competitive in likelihood estimation and produce convincing large images. They do not establish universal superiority over autoregressive approaches, prove that every proposed component is necessary at every scale, or demonstrate applications beyond the image experiments.

### Ideas worth borrowing

Design for information retention. NVAE begins from the observation that a network built for classification may discard details that a generative system needs. An image generator must explain the observation, including variation that does not affect a class label. This suggests a reusable design question: which information must survive each stage for the actual objective to succeed? The question applies to reconstruction systems, learned representations, and other pipelines in which an apparently irrelevant detail may later become necessary. NVAE’s evidence concerns images, but its broader engineering lesson is to choose architecture around the information demanded by the task.

Express corrections relative to a shared reference. NVAE’s encoder does not independently predict every posterior location and scale. It predicts changes relative to the corresponding prior. When the prior shifts, an unchanged correction preserves the relationship between the distributions. This reduces the burden of coordinating independently moving predictions. A similar parameterization is worth considering wherever a system learns an adjustment to an existing estimate, especially when the objective penalizes disagreement with that estimate. The transferable idea is the choice of coordinates; the exact Gaussian construction and its measured benefits belong to NVAE’s VAE setting.

Assign different machinery to different directions. The bottom-up encoder and top-down generator serve different purposes, so NVAE does not insist that their residual cells match. Depthwise convolutions help the generator, whereas the encoder retains conventional convolutions because the tested alternatives do not improve its result and demand more memory. This is a useful reminder for systems with paired components: architectural symmetry can be convenient without being empirically justified. Search, encoding, decoding, and verification stages may warrant separate efficiency decisions even when they process related representations.

Control sensitivity near an unstable objective. The KL divergence in a VAE has no finite upper limit. NVAE addresses the resulting instability in part by regularizing the networks that produce distribution parameters. Its approach targets the mechanism that creates large disagreements instead of relying only on a response after gradients become extreme. This is relevant when small changes in intermediate values can trigger large objective changes. The paper supports spectral regularization as a practical intervention in its experiments; it does not provide a general guarantee that this intervention bounds every possible training trajectory.

Treat normalization statistics as operational state. NVAE finds that batch normalization behaves differently during training, likelihood evaluation, and temperature-adjusted sampling. The running statistics are therefore part of the system’s behavior, rather than incidental bookkeeping. This lesson applies to any pipeline whose learned transformations depend on estimated population statistics. Evaluation should specify which statistics are used, and changes to the input distribution may require explicit calibration. NVAE also shows why such calibration must be distinguished from the settings used to report benchmark likelihoods.

Optimize stored activations as well as arithmetic. Depthwise convolution reduces parameter and computation costs, yet the expanded intermediate features can still be expensive to retain during training. NVAE combines mixed precision with selective recomputation to make the architecture practical. The reusable idea is to examine what backward computation actually needs to keep in memory. A component that appears inexpensive from its weight count may be costly because of its temporary representations. For systems constrained by accelerator memory, reducing those representations can enable larger batches and improve useful throughput.

### How Mova uses it

For Mova, a small transparent language system written in Rust, NVAE offers research and implementation ideas rather than an established image-generation component. There is no evidence here that Mova already contains NVAE’s hierarchy, Gaussian latent distributions, or convolutional architecture. Any connection to those mechanisms should therefore be understood as a possible experiment. The paper studies images, and its numerical results do not establish benefits for a language system.

The most immediate connection is architectural discipline. Mova’s emphasis on transparency makes it useful to ask what each intermediate representation preserves, what it discards, and which later decision depends on it. NVAE makes that question concrete by separating broad structure from finer variation across a hierarchy. A language system could investigate an analogous separation between a broad contextual representation and more local choices. That would be a new hypothesis about language processing, not a conclusion demonstrated by the face-generation experiments.

The residual parameterization offers a more precise possibility if Mova were to explore probabilistic latent representations. A component could predict a correction relative to an existing conditional distribution rather than producing an unrelated distribution from scratch. The resulting interface would expose both the reference prediction and the adjustment. That could make it easier to inspect whether new evidence changes an estimate slightly or substantially. However, NVAE’s mathematical argument depends on its particular Normal distributions; a different representation would need its own derivation and evaluation.

NVAE’s treatment of training stability also suggests what an experimental Rust implementation should make observable. If several probabilistic stages contribute separate disagreement penalties, recording only a combined loss could hide which stage is becoming unstable or unused. Per-group diagnostics, sensitivity-related penalties, and explicit training schedules would make such behavior easier to examine. These are proposed engineering practices inspired by the study, rather than claims about instrumentation already present in Mova.

The memory work is relevant only if Mova develops a training workload with similarly costly intermediate tensors. In that case, profiling retained activations and testing selective recomputation could be more informative than looking at parameter counts alone. The exact savings reported by NVAE belong to its implementation and hardware setting. They cannot be transferred to Rust or to language processing as expected percentages.

A useful boundary follows from all these possibilities. NVAE can motivate experiments about hierarchy, correction-based prediction, and inspectable optimization. It does not supply evidence that a small language system should adopt a large image VAE, nor that latent groups will acquire human-readable linguistic meanings. For Mova, the most credible borrowing is a way of formulating and measuring design choices.

### The problem and its context

#### Why architecture became the question

The paper situates NVAE among several approaches that learn explicit likelihoods for observations. These include VAEs, normalizing flows, and autoregressive systems. Such approaches aim to assign probability to data, but they differ in how they represent that distribution and how they generate samples.

VAEs offer an attractive combination. They have an encoder that can map an observation into a distribution over latent variables, and they can generate observations without sequentially predicting every image location. The difficulty, as the authors describe it, is that their likelihood results had fallen behind competing approaches. NVAE asks whether part of that gap comes from the neural networks used inside the probabilistic construction.

Much earlier VAE research had concentrated on statistical questions. One concern was the discrepancy between the approximate posterior produced by the encoder and the true posterior implied by the generative distribution. Another was whether a tighter training bound could improve learning. Other work investigated noisy gradients, discrete hidden variables, or posterior collapse, in which some hidden variables stop carrying information about the input.

Those are substantive problems, and NVAE does not argue that they disappear. Its contribution is to investigate another source of performance: the architecture implementing the distributions. The authors observe that VAE networks were frequently adapted from classification. A successful classifier, however, need not retain everything required to reconstruct or generate an observation.

An image classifier can benefit from ignoring variation that does not affect its decision. A generative system must account for variation in the image itself. A detail that leaves an identity or category unchanged can still matter when predicting pixels. This difference motivates the search for cells that preserve and combine information appropriately for generation.

The authors also distinguish the roles of encoder and decoder capacity. The marginal likelihood is defined by the generative side. Increasing decoder capacity can therefore affect generalization differently from increasing encoder capacity. A stronger encoder can improve approximate inference and reduce the amortization gap: the shortfall associated with using a shared inference network rather than separately optimizing inference for each observation.

This is a reason to avoid treating both sides as interchangeable networks. Their relationship is close, but their contributions to the objective differ. NVAE later turns that observation into a practical asymmetry between the convolutional cells used in its bottom-up and top-down paths.

#### Why a hierarchy helps images

Images contain relationships across distances. In facial images, skin appearance should remain coherent across separated regions, and the broad arrangement of features must be compatible. A system that handles only small neighborhoods can produce locally plausible details without adequately coordinating the whole image.

The paper’s solution combines a hierarchy of latent variables with large receptive fields. A receptive field is the region of an input representation that can influence an output feature. Larger receptive fields let a network combine evidence across more distant locations.

A hierarchy adds another route to global coordination. At a small spatial resolution, a representation can organize broad properties of the image. As generation moves towards larger resolutions, later groups can contribute increasingly local detail. The entire image need not be assembled solely from decisions made at its final pixel resolution.

Earlier hierarchical VAEs already used related probabilistic structures. NVAE specifically adopts the conditional organization associated with IAF-VAEs. It does not claim to introduce hierarchy itself. The novelty lies in how that hierarchy is implemented, how its posterior distributions are parameterized, and how training is made practical at larger image sizes.

BIVA provides an important comparison in the paper’s account. It extended inference through a more elaborate bidirectional construction and achieved strong VAE results. NVAE deliberately keeps a simpler hierarchical arrangement and invests in the networks instead. The authors suggest that richer dependencies of the kind used in BIVA might provide further gains, but they do not test that combination.

Earlier recurrent approaches also belong to this context. [DRAW](https://md.research.elamur.ai/free/en/papers/gregor-2015-draw-recurrent-neural-network-image/) and Conv DRAW represented hierarchical dependencies through recurrent networks. NVAE’s account places these alongside the later deep hierarchical constructions, while pursuing a convolutional residual implementation.

#### What distinguishes the comparison with other image generators

The relationship to [VQ-VAE-2](https://md.research.elamur.ai/free/en/papers/razavi-2019-generating-diverse-high-fidelity-images/) is especially useful for understanding the paper’s scope. The authors acknowledge its strong large-image generation results. They distinguish it from NVAE on the basis of objective and sampling structure.

In their account, VQ-VAE-2 is motivated by variational autoencoding but does not optimize a data-likelihood lower bound in the same way as a conventional VAE. It also uses a PixelCNN prior over a substantial latent representation, which introduces a sampling cost. NVAE instead retains the VAE objective and a decoder that does not generate image positions autoregressively.

That last point requires care. NVAE still has sequential dependence across latent groups. A later group depends on earlier groups. Its fast sampling claim concerns the absence of a pixel-by-pixel autoregressive decoder and the ability to sample variables within a group in parallel. It does not mean every operation in the entire hierarchy happens simultaneously.

The paper also revisits normalization. IAF-VAEs and BIVA had avoided batch normalization, in part because randomness introduced through batch statistics was considered harmful. They used [weight normalization](https://md.research.elamur.ai/free/en/papers/salimans-2016-weight-normalization-simple-reparameterization-accelerate/) instead. NVAE finds that batch normalization can help, provided its evaluation behavior and sensitivity are handled carefully.

This reframes the problem. A component that appears unsuitable for a generative system may be failing because of how training statistics are carried into evaluation. Likewise, a statistical construction that seems insufficiently expressive may improve substantially when implemented by a better network. NVAE tests these possibilities together, while using controlled comparisons to separate some of their effects.

### The method, step by step

The easiest way to follow NVAE is to separate what it learns from how it computes. The probabilistic construction defines a hierarchy of hidden variables and an image distribution conditioned on them. Neural networks produce the parameters of those distributions. Training then adjusts the networks so that encoded observations can be reconstructed while their latent distributions remain compatible with generation.

How NVAE learns and generates images The steps in order.

#### Start with an encoder and a generator

The basic VAE construction comes from the line of work represented by [Auto-Encoding Variational Bayes](https://md.research.elamur.ai/free/en/papers/kingma-2013-auto-encoding-variational-bayes/) and [Stochastic Backpropagation](https://md.research.elamur.ai/free/en/papers/rezende-2014-stochastic-backpropagation-approximate-inference-deep/). It introduces latent variables that help explain observed data.

```
p(x, z) = p(z) p(x | z)
```

Here, x is an observation, such as an image, and z denotes its hidden variables. The joint distribution p(x, z) assigns probability to both together. The prior p(z) describes hidden variables before an image is observed. The conditional distribution p(x | z) is the decoder: it specifies observations compatible with a latent sample.

Generation follows this factorization. First draw hidden variables from the prior, then draw an observation from the decoder. Encoding goes in the other direction. Given an image, the system would ideally use the true posterior p(z | x), but that distribution is generally impractical to compute directly.

The encoder therefore supplies an approximation, q(z | x). It is a distribution rather than simply a fixed vector. Training must make it useful for reconstruction and keep it aligned with the latent distribution available during generation.

This alignment matters because generation does not have access to an input image. If the encoder used latent configurations that the prior almost never produced, the decoder could reconstruct training observations without becoming an effective standalone generator. The VAE objective connects these requirements.

#### Divide the latent representation into conditional groups

NVAE partitions the hidden variables into ordered groups. Each group may depend on those already sampled.

```
p(z) = ∏ₗ₌₁ᴸ p(zₗ | z<ₗ)
```

The symbol L is the number of latent groups. The notation zₗ identifies group l, while z\<ₗ refers to all groups before it. The product multiplies the conditional probabilities across the hierarchy. For the initial group, there are no earlier groups to condition on.

The approximate posterior follows the same group ordering but can also consult the observed image.

```
q(z | x) = ∏ₗ₌₁ᴸ q(zₗ | z<ₗ, x)
```

Here, q is the encoder distribution. Each conditional uses the image x and the preceding latent groups. Sharing an ordering between prior and posterior makes their corresponding distributions directly comparable during training.

Within each group, NVAE begins with factorial Normal distributions. “Factorial” means that the coordinates are independent given the conditioning information. This is a local independence assumption, not a claim that all hidden variables are independent across the hierarchy.

That assumption enables parallel sampling within a group. Dependence across groups still gives the overall distribution substantial structure. Optional flows can later enrich the posterior within a group, but the basic hierarchy does not require them.

#### Train reconstruction and agreement together

For the hierarchical construction, the variational lower bound separates reconstruction from disagreement at successive groups.

```
L_VAE(x) = E_q(z|x)[log p(x | z)] − KL(q(z₁ | x) ∥ p(z₁)) − ∑ₗ₌₂ᴸ E_q(z<ₗ|x)[KL(q(zₗ | x, z<ₗ) ∥ p(zₗ | z<ₗ))]
```

L_VAE(x) is the training bound for observation x. The expectation E averages over latent samples from the indicated encoder distribution. The reconstruction term, log p(x | z), rewards hidden configurations that explain the observation.

KL denotes Kullback–Leibler divergence. Each KL term measures disagreement between an encoder conditional and its corresponding prior conditional. The initial group has a direct KL term; later terms are averaged over the earlier hidden groups. Maximizing the bound rewards reconstruction while discouraging latent encodings that depart excessively from the generative prior.

The bound is related to the log probability of the observation, but it should not be confused with an exact computation of that probability. An approximate posterior that poorly matches the true posterior can leave a gap. This is why both inference quality and generative capacity matter.

The authors use the reparameterization approach associated with the original VAE work to train through stochastic latent sampling. NVAE’s main intervention is not a replacement gradient estimator or a new likelihood bound. It is a different implementation of the distributions and their interaction.

#### Reuse the top-down representation during inference

The generative network proceeds downward through the hierarchy. At each group, it predicts the parameters of a prior distribution. A sample from that distribution is combined with deterministic feature maps, and computation continues toward the next group.

Encoding also needs information extracted directly from the image. A bottom-up network computes those features. However, the posterior for a particular group must additionally account for the preceding hidden variables. A purely bottom-up pass does not supply that conditional context.

Bidirectional inference resolves this by combining bottom-up image features with top-down features. NVAE reuses representations from the generative top-down network instead of constructing a entirely separate top-down inference network. This shared computation reduces the additional cost of conditioning inference on the hierarchy.

The resulting system should not be pictured as a simple chain that compresses an image once and then reverses the process. At each latent stage, image evidence and the generative context meet. The posterior can therefore refine what the current prior expects using information from the actual observation.

#### Increase spatial detail gradually

For larger images, the hierarchy begins with spatially small latent groups and expands towards finer resolutions. This gives early stages an economical representation of broad arrangements and later stages a place to express more detailed variation.

On the large facial datasets, the architecture uses 36 latent groups. Their spatial sizes begin at 8×8 and extend to 128×128. Each group has two residual cells. The hierarchy therefore contains several conditional decisions at a given scale as well as transitions between scales.

The authors describe the CelebA HQ configuration as spanning five scales. Their later intervention experiments support a broad division of labor: upper scales capture much of the global organization, while lower groups account mainly for smaller variations.

This arrangement does not force a perfect separation. A lower group can still influence a broad visible property. The convolutional receptive field remains relevant even when the hierarchy already provides a multiscale structure.

#### Build a generator with inexpensive spatial reach

NVAE uses residual networks, drawing on the architectural tradition of [Deep Residual Learning](https://md.research.elamur.ai/free/en/papers/he-2015-deep-residual-learning-image-recognition/). A residual cell adds a learned transformation to a continuing feature path. The particular transformation inside that cell is central to NVAE.

A conventional convolution mixes channels and spatial neighborhoods together. If its kernel becomes larger, its parameter cost grows accordingly.

```
N_regular = k² C²
```

N_regular is the parameter count for the paper’s comparison case: a conventional k×k convolution with C input channels and C output channels. The symbol k is the spatial kernel width, and C is the channel count. The corresponding computation per spatial position scales as O(k² C²).

A depthwise convolution handles each channel separately.

```
N_depthwise = k² C
```

N_depthwise is the parameter count for the depthwise operation under the same spatial and channel assumptions. Its computation per position scales as O(k² C). These expressions concern the individual operations being compared, instead of the complete NVAE residual cell.

The independence between channels makes the depthwise operation economical but less expressive on its own. NVAE surrounds it with conventional 1×1 convolutions. The first expands the channel representation, and the second projects it back to the original width.

The expansion ratio is denoted E. The usual setting is E=6, while some cells use E=3 to reduce memory demand. This design lets the network perform spatial processing in an expanded feature space while retaining a compact representation between cells.

NVAE’s generator cell also includes batch normalization, Swish, and squeeze-and-excitation. It differs from the MobileNetV2-style pattern that motivates it through the placement of additional normalization and the choice of activation and gating components.

#### Use normalization, activation, and gating together

Batch normalization adjusts activations using estimated feature statistics. During training, those estimates come from batches; ordinary evaluation uses accumulated running estimates. NVAE finds that the mismatch between these settings can cause small shifts to grow into substantial output changes.

The authors address that problem by changing the batch-normalization momentum and regularizing the magnitude of its scaling parameters. The goal is to avoid amplifying a modest discrepancy in statistics. This is connected to the broader concern with network sensitivity that also motivates spectral regularization.

The activation is Swish.

```
f(u) = u / (1 + e^(−u))
```

Here, u is an activation value, f(u) is the transformed value, and e is the base of the natural exponential. The formula describes a smooth nonlinear transformation. NVAE tests it in combination with normalization choices rather than treating activation as an isolated default.

Squeeze-and-excitation adds channel-dependent gating. It lets the network modulate feature channels, and the authors find that removing it worsens the tested result. Its presence should therefore be understood as an empirically useful part of the cell, rather than as the main explanation for the hierarchy’s behavior.

The paper relates these ingredients to earlier architecture work, including [EfficientNet](https://md.research.elamur.ai/free/en/papers/tan-2019-efficientnet-rethinking-model-scaling-convolutional/). The contribution is their adaptation and evaluation within a deep VAE, not the invention of every component.

#### Keep the bottom-up encoder different

The bottom-up encoder uses conventional convolutional residual cells. Each cell applies repeated normalization, activation, and convolution stages without the generator cell’s expanded depthwise structure.

This asymmetry follows an empirical comparison. Depthwise cells help on the generative side, but applying them to the bottom-up path does not improve the tested performance. Conventional cells have more favorable memory use and training speed there.

The order of operations matters too. NVAE uses batch normalization before activation and convolution in these encoder cells. The authors find this preferable to the convolution-first arrangement they compare against.

This is a concrete example of the paper’s central method: retain a probabilistic hierarchy while changing the neural implementation according to evidence. The encoder and decoder are designed around their observed requirements rather than a requirement that both use identical cells.

#### Predict the posterior as a correction

The prior distribution for an individual latent coordinate has a mean and a standard deviation.

```
p(zₗⁱ | z<ₗ) = Normal(μᵢ(z<ₗ), σᵢ(z<ₗ))
```

The superscript i identifies a coordinate within group l. The function μᵢ gives its prior mean, and σᵢ gives its prior standard deviation. Both depend on the earlier groups.

NVAE expresses the corresponding posterior relative to those quantities.

```
q(zₗⁱ | z<ₗ, x) = Normal(μᵢ(z<ₗ) + Δμᵢ(z<ₗ, x), σᵢ(z<ₗ) · Δσᵢ(z<ₗ, x))
```

The correction Δμᵢ changes the mean additively. The positive scale factor Δσᵢ changes the standard deviation multiplicatively. Both corrections can depend on the observed image as well as the earlier hidden groups.

This parameterization gives a clear reference point. A zero location correction and a unit scale correction leave the posterior equal to its prior. More broadly, if the prior moves while the encoder’s corrections stay fixed, the posterior moves with that reference.

The resulting coordinate-wise KL has a useful form.

```
KL(q(zⁱ | x) ∥ p(zⁱ)) = ½(Δμᵢ² / σᵢ² + Δσᵢ² − log(Δσᵢ²) − 1)
```

The group index and conditioning arguments are suppressed in this expression. The quantities Δμᵢ and Δσᵢ are the relative parameters, and σᵢ remains the prior standard deviation. The logarithm is natural.

If the prior standard deviation stays away from zero, this expression places much of the optimization burden on the encoder’s corrections. The authors hypothesize that this is easier than coordinating two independently predicted absolute distributions. Their ablation supports a practical improvement, but the expression still permits arbitrarily large KL values.

#### Regularize sensitivity to stabilize the hierarchy

Residual parameterization therefore does not remove the instability problem. NVAE also penalizes large spectral values in the network layers.

```
L_SR = λ ∑ᵢ s⁽ⁱ⁾
```

L_SR is the spectral regularization penalty. The coefficient λ sets its strength, and s⁽ⁱ⁾ is the largest singular value associated with layer i. The summation collects these values across the relevant layers.

The motivation comes from smoothness. A network that reacts sharply to small changes in its inputs can produce large changes in distribution parameters. In a hierarchical VAE, that can lead to large conditional disagreement and destabilizing gradients.

The largest singular values provide a tractable layer-level proxy for this sensitivity. NVAE estimates them with a single power-iteration update. It does not compute the exact Lipschitz constant of the complete network.

The regularization is applied to both encoder and decoder. The authors suggest that an especially sharp decoder could require an equally sharp encoder, creating another route to unstable training. Stronger regularization is particularly useful early in the large-image experiments.

#### Add posterior flexibility without slowing generation

NVAE can augment posterior samples with [normalizing flows](https://md.research.elamur.ai/free/en/papers/rezende-2015-variational-inference-normalizing-flows/). These transformations make the approximate posterior more expressive than the initial within-group independent Normal distribution.

The implemented flow is additive.

```
z′ = z + b(z)
```

The vector z is the latent sample before transformation, z′ is the transformed sample, and b(z) is produced by an autoregressive network. The paper uses a volume-preserving construction, so this transformation does not introduce a nontrivial volume-scaling term.

The authors also examine an affine alternative.

```
z′ = a(z) ⊙ z + b(z)
```

The function a(z) supplies coordinate-wise scaling, b(z) supplies an additive shift, and ⊙ means elementwise multiplication. This more elaborate alternative does not improve their results.

The flow network uses masking to preserve its autoregressive dependencies. Batch normalization and squeeze-and-excitation are omitted from that cell because they would disrupt those dependencies; weight normalization is used instead.

These flows operate only during encoding. They therefore add inference machinery without extending the generation path. Their modest measured benefit is part of the argument that the underlying network architecture already contributes substantially.

#### Warm up the latent penalty and keep groups useful

Training begins with a gradual introduction of the KL penalty.

```
J_β(x) = E_q(z|x)[log p(x | z)] − β KL(q(z | x) ∥ p(z))
```

J_β(x) is the warm-up objective. The reconstruction expectation is unchanged, while β controls how strongly posterior–prior disagreement is penalized. The authors increase β from 0 to 1 during the first 30% of training.

A second mechanism balances the groups during this warm-up period. The ordinary hierarchical KL is a sum of expected conditional divergences. NVAE temporarily changes the weights attached to those contributions.

```
K_γ(x) = ∑ₗ₌₁ᴸ γₗ E_q(z<ₗ|x)[KL(q(zₗ | x, z<ₗ) ∥ p(zₗ | z<ₗ))]
```

K_γ(x) denotes the weighted latent penalty. The coefficient γₗ belongs to group l. A smaller coefficient reduces the immediate cost of using a group that currently carries little information; a larger coefficient increases the cost for a group with a larger KL contribution.

The coefficients also account for group size.

```
γₗ ∝ sₗ E_x∼M[E_q(z<ₗ|x)[KL(q(zₗ | x, z<ₗ) ∥ p(zₗ | z<ₗ))]]
```

The symbol ∝ means proportional to. Here, sₗ is the size of latent group l, and M is the current training batch. This size factor matters because groups at different spatial scales need not contain the same number of variables.

After warm-up, the balancing coefficients become 1. The eventual optimization therefore uses the ordinary variational bound, rather than permanently forcing equalized group contributions. The temporary intervention helps prevent early deactivation from determining the entire later allocation of information.

#### Make the training workload fit

Expanded feature maps create a memory problem even when their convolutional weights are economical. NVAE addresses this with mixed precision and selective recomputation.

The implementation uses NVIDIA APEX to run suitable operations at half precision. The authors report a 40% reduction in accelerator memory from this choice. They then combine batch normalization and Swish so that fewer intermediate feature maps need to be retained for backward computation.

The second change recomputes batch normalization during the backward pass. It yields an additional 18% memory reduction in the CIFAR-10 implementation, with little effect on training time. Together, these changes permit larger batches and raise the reported throughput from 34 images/sec to 64 images/sec.

Optimization uses AdaMax, from the work introducing [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/), with cosine decay of the learning rate. The initial rate is 0.01 for the general experiments and 0.008 for FFHQ. The lower FFHQ rate is another stability measure.

For observations, the decoder uses Bernoulli distributions on MNIST and discretized Logistic mixtures elsewhere. Given the hidden representation, image locations are not generated through a pixel-autoregressive sequence. The authors released the official NVAE implementation, making these architectural and training choices available for further investigation.

### Experiments and results

#### What was evaluated

The evaluation covers both small benchmark images and substantially larger facial images. The smaller-image experiments use dynamically binarized MNIST, CIFAR-10, and ImageNet at 32×32 resolution. The face experiments use CelebA at 64×64, together with CelebA HQ and FFHQ at 256×256.

For datasets other than FFHQ, the authors follow the training and test partitions used by [Glow](https://md.research.elamur.ai/free/en/papers/kingma-2018-glow-generative-flow-invertible-1x1/). For FFHQ, the training partition contains 63K images and the test partition contains 7K. FFHQ and CelebA HQ are downsampled to the evaluated resolution and quantized to 5 bits per pixel/channel for comparison with earlier work.

Those preprocessing details define the task. A likelihood result on the quantized facial datasets is a result for that representation of the images. It should not be silently generalized to a different precision or resolution.

The main quantitative metric is bits per dimension, abbreviated bpd. It normalizes negative log-likelihood by the number of observed dimensions, so smaller values indicate a better probability assignment to held-out observations. MNIST is reported differently: its measure is negative log-likelihood in nats, again with smaller values preferred.

Test likelihood is estimated using importance-weighted sampling through the encoder, with 1000 samples. This connects the evaluation to [Importance Weighted Autoencoders](https://md.research.elamur.ai/free/en/papers/burda-2015-importance-weighted-autoencoders/). The estimate is distinct from simply reading off the training reconstruction loss or a single-sample bound.

#### The main likelihood result

The most explicit headline comparison concerns CIFAR-10. NVAE records a test result of 2.91 bpd against the previous non-autoregressive best of 2.98 bpd.

CIFAR-10 test negative log-likelihood NVAE improves the reported non-autoregressive benchmark.

**The numbers**

| System or setting | bits per dimension |
| --- | --- |
| Previous non-autoregressive best | 2.98 |
| NVAE (this paper) | 2.91 |

The comparison category matters. The authors do not present this as a universal victory over every likelihood-based image generator. Their main claim concerns non-autoregressive likelihood-based approaches, including earlier VAEs and flows.

Across the broader evaluation, the authors report stronger results than IAF-VAE and BIVA. They also report leading non-autoregressive results on MNIST and the tested CelebA settings. The ImageNet result is the stated exception: NVAE ranks behind Flow++ there.

For FFHQ, the contribution is a strong baseline for a difficult facial-image dataset. The authors describe it as the first VAE application to that dataset to their knowledge. This is a statement about the position of their experiment within the work they discuss, rather than evidence that the architecture has been exhaustively optimized for FFHQ.

The authors find that adding flows to the encoder helps only slightly. The version without flows already performs strongly against existing approaches. That result supports the architecture-centered thesis: within this experimental program, a better neural implementation can recover substantial performance without making every posterior conditional statistically elaborate.

#### What the generated images demonstrate

The visual experiments show samples from the different datasets and compare CelebA HQ outputs with images from MaCow and Glow. The authors emphasize facial detail, including hair, and the variety of generated appearances.

Sampling temperature is part of these comparisons. In NVAE, lowering temperature scales down the standard deviations of the prior’s conditional Normal distributions. This concentrates sampling and can improve visual appearance while reducing variation.

The displayed NVAE settings include t=1.0 for MNIST and t=0.7 for CIFAR-10. CelebA and CelebA HQ are shown at t=0.6, while the FFHQ display uses t=0.5. These settings describe how the images were generated; they are not alternative likelihood results.

Batch-normalization calibration introduces another distinction. Using the statistics of the current generated batch produces better-looking and more varied images in the authors’ observations, but it also makes an individual output depend on the other samples in that batch.

To avoid that dependence in final sampling, they recalibrate running statistics by generating from the system 500 times at the chosen temperature. Subsequent samples use the recalibrated statistics. This allows the final output procedure to use fixed statistics suited to that sampling condition.

The reported likelihood experiments retain the ordinary evaluation behavior. Accordingly, improved images after temperature adjustment and recalibration should not be interpreted as a corresponding improvement in the benchmark likelihood. The paper treats the two procedures separately.

Some additional CelebA HQ illustrations use temperatures drawn from t∈{0.6, 0.7, 0.8, 0.9}. The authors explicitly state that those additional samples were manually selected. They demonstrate possible outputs, while the selection limits what they establish about typical sampling behavior.

#### Sampling speed and practical scale

NVAE’s decoder avoids pixel-autoregressive generation, making sampling comparatively fast. On a Titan V with 12-GB memory, the authors generate a batch containing 36 images at 256×256 resolution in 2.03 seconds. They report the corresponding per-image timing as 56 ms/image.

For context, MaCow reports 434.2 ms/image in a similar batched experiment. The qualifier “similar” matters: the comparison is useful operational evidence, but it is not described as a complete standardized timing study with every implementation condition controlled.

The large-image results also depend on substantial training resources. The authors choose configurations that can be trained within about a week. Larger networks, additional groups, and more cells often improve results in their early experiments, but they also reduce feasible batch size and slow training.

The practical achievement is therefore a combination: the architecture reaches a larger image scale, the stabilization makes that training workable, and memory management helps support useful batch sizes. The result cannot be attributed to parameter count or probabilistic structure alone.

### What the ablations show

#### The scope of the controlled comparisons

The principal ablations use CIFAR-10 and a smaller NVAE. The authors halve residual-cell channel counts and remove the optional flows. This makes comparisons more manageable and reduces the number of changing ingredients.

These experiments provide evidence about components within that setting. They are not a complete factorial study across all datasets and image resolutions. A component that helps the smaller CIFAR-10 system may still interact differently with width, resolution, or another architecture.

The paper nevertheless uses these comparisons to address several plausible alternative explanations. Are gains mainly caused by normalization? Does depthwise convolution help everywhere? Does a lower KL simply mean hidden variables have stopped being used? Each question receives a more targeted test than the headline benchmark alone can provide.

#### Normalization and activation interact

The normalization study compares weight normalization and batch normalization alongside ELU and Swish. [ELU](https://md.research.elamur.ai/free/en/papers/clevert-2015-fast-accurate-deep-network-learning/) is relevant because the earlier IAF-VAE and BIVA implementations used it with weight normalization and data-dependent initialization.

Replacing weight normalization with batch normalization improves the tested ELU configuration, particularly in the L=40 setting. The best behavior in the reported comparison comes from pairing batch normalization with Swish.

The interpretation is more specific than saying that batch normalization always helps. Its value depends on how the cell is constructed, how statistics are handled at evaluation, and which activation accompanies it. NVAE’s result challenges an earlier reason for excluding it from deep VAEs, while also showing that simply inserting it without attention to operational details would miss part of the problem.

The evaluation-statistics analysis reinforces this reading. What appears to be harmful randomness during training can be entangled with the change from batch statistics to running estimates. NVAE responds through both architecture and calibration.

#### Depthwise cells help the generator more than the encoder

The residual-cell comparison varies whether the bottom-up and top-down paths use conventional or depthwise-separable cells. The generative side benefits from the depthwise design.

Putting that design into the bottom-up encoder does not produce a corresponding performance improvement. Since the conventional encoder cell uses less memory and trains faster, the final architecture keeps it there.

This result supports an architectural explanation tied to function. The generator must project a latent representation into spatially coherent image structure, and the larger receptive field is useful in that role. The experiment does not establish that depthwise convolution is intrinsically superior for every stage of a VAE.

It also helps explain why a direct transfer of a classifier architecture is not the paper’s answer. Even within a single generative system, the best tested cell differs by direction.

#### Residual distributions improve agreement without emptying the representation

A lower KL can have an unhelpful explanation: the posterior may simply stop using hidden variables to encode observations. NVAE tests that possibility by examining activity and reconstruction alongside the objective.

The study compares the residual posterior parameterization with independent prediction of absolute distribution parameters in a 40-group system. A channel counts as active when its KL, averaged over the batch and spatial positions, exceeds 0.1.

Residual parameterization leaves the final active-channel count and reconstruction loss mostly unchanged. At the same time, it improves the training KL by 0.04 bpd and the test log-likelihood by 0.03 bpd.

This combination is the important evidence. The posterior becomes more compatible with the prior without an accompanying loss of reconstruction quality or a substantial final reduction in used channels. The result is therefore consistent with easier coordination between distributions.

The training-time activity analysis adds nuance. Without residual parameterization, more variables become inactive during the early stage. The residual version keeps more active through the warm-up region, described in the associated analysis as extending to 8K iterations.

The final similarity in active-channel counts and the early difference are compatible. A parameterization can change how information allocation develops even if the eventual number of used channels is similar.

#### Spectral regularization contributes both stability and quality

Removing spectral regularization worsens the tested result. Removing squeeze-and-excitation also worsens it. These are separate comparisons, supporting the usefulness of both components within the ablation configuration.

The spectral penalty has an additional role beyond a small likelihood benefit. The appendix describes an FFHQ comparison in which the same setup is unstable with λ=0.1 and stable with λ=1.0. The changed coefficient is the stated intervention.

The authors also tried gradient clipping and restricting Normal-distribution parameters to a narrow range. They report that these did not stabilize training without damaging performance. This does not prove those alternatives can never work, but it explains why spectral regularization became part of the final design.

For the largest facial experiments, the regularization schedule is stronger initially and then decays. The broader evidence therefore favors an adaptive training design: sensitivity control is especially important while the encoder and generator are still learning to coordinate.

#### The hierarchy is used, but its roles overlap

The posterior-collapse analysis examines KL contributions across 30 CIFAR-10 groups. Most groups carry similar average KL, and only one group is inactive in the displayed analysis.

KL balancing is applied during warm-up, identified in this discussion as roughly 25,000 iterations. Later optimization uses the ordinary objective. Continued use of most groups therefore persists after the temporary balancing mechanism has been removed.

The scale intervention experiments provide another view. Fixing upper-scale latent samples while resampling later groups preserves much of the overall organization. Resampling lower groups mainly changes finer aspects of the image.

The separation is not absolute. The next scale can still alter prominent properties such as face shape, skin appearance, hair color, or eyes. Even the lowest groups can subtly change a property that extends across the image. The authors relate that possibility to the large receptive field of the generator cells.

Finally, the paper shows visually close reconstructions of CelebA HQ inputs and examines nearby training images for generated samples. The similarity search uses downsampling by 4× and an L₂ comparison on central crops. The displayed generated faces differ from the retrieved training examples, offering a useful qualitative check against straightforward copying.

### Limitations

#### Limits the authors identify

Training stability remains a central qualification. Residual posterior parameterization helps optimization but does not make KL finite or eliminate the need for regularization. Deep hierarchies can still become unstable, and the large facial experiments require stronger early smoothing.

The authors also acknowledge limited hyper-parameter exploration. They do not exhaustively search settings across the evaluated datasets. Their configurations reflect both preliminary performance observations and a practical training-time budget.

This matters when interpreting architectural scale. Wider networks and deeper hierarchies frequently help in their early experiments, but the paper does not establish an optimal scaling rule. It also does not determine whether another allocation of memory, cells, groups, or batch size would be best.

Batch normalization remains partly unresolved. The authors identify a useful evaluation correction and a sampling recalibration procedure, but explicitly leave the underlying behavior as a subject for further investigation. An attempted replacement with instance normalization does not reproduce the same quantitative and visual results.

The authors identify richer flows and more elaborate hierarchical structures as possible future directions. NVAE’s deliberately simpler conditional organization makes its architecture study clearer, but it also leaves statistical alternatives unexplored. Larger image resolutions are another stated direction rather than an achieved result.

The impact discussion also sets limits on the promise of diverse generation. Learning a data distribution can reproduce biases introduced when the data were collected. Additional distortion can arise through design, training, or reduced-temperature sampling. The authors’ broader hopes for representation and diversity do not remove those mechanisms.

#### What the experimental design cannot establish

The likelihood results support conclusions about held-out probability assignment under the stated preprocessing and estimation procedure. They do not, on their own, establish superior visual quality on every dataset or for every intended use.

Conversely, attractive samples do not establish a better likelihood. Temperature changes and recalibrated normalization can alter the visible output distribution. Those procedures must remain distinguishable from the standard settings used in quantitative evaluation.

The visual comparisons are also limited in form. Some comparison images come from the original publications of other systems. The paper offers informative side-by-side examples, but it does not present those images as a fully controlled perceptual experiment.

Manual selection in the additional sample figures narrows their meaning further. Selected images show what the generator can produce under the stated conditions. They cannot establish the frequency of poor outputs or the overall distribution of generated quality.

The nearest-training-image analysis is reassuring but not a comprehensive memorization audit. It considers particular generated examples and a particular similarity measure based on aligned facial regions. It does not test every sample, every possible similarity criterion, or every kind of information that could be retained from training.

Held-out likelihood is valuable evidence for generalization, and the authors report no observed overfitting as they enlarge the tested systems. A careful reading should still distinguish successful test performance from proof that no training example or sensitive detail could ever be reproduced.

The hierarchy’s behavior also has interpretive limits. Fixing and resampling scales reveals causal influence on generated appearance, but it does not show that each group has a clean, uniquely named semantic role. Broad and local effects overlap. A group that influences hair color in one intervention need not represent only hair color.

#### Limits on transferring the result

The paper evaluates image generation. It does not test language generation, symbolic reasoning, or transparent linguistic analysis. Applications to those settings require new evidence.

Similarly, the reported memory savings depend on the implementation’s tensor shapes, stored activations, precision choices, and recomputation strategy. The general lesson about activation memory is reusable; the numerical savings are not a forecast for another workload.

The speed comparison depends on hardware and batching conditions. It supports the practical advantage of avoiding pixel-autoregressive decoding in the examined setting. It does not imply the same latency for an individual request on different hardware or under a different batch policy.

Finally, the strongest benchmark claim is category-specific. NVAE improves the reported non-autoregressive results on several datasets, while ImageNet remains an exception and autoregressive competitors remain relevant. The paper’s achievement is substantial precisely when described at that level: it demonstrates how far a deep hierarchical VAE can advance through architecture and stabilization, without claiming that the broader problem of generative image learning is settled.

### What came after

The later citation record connects NVAE to several directions in image and multimodal generation. A citation establishes that a later work refers to NVAE; it does not establish that the later system adopts its residual posterior, depthwise cells, or spectral penalty. The distinction is especially important because the available descriptions of these later works identify their subjects but do not explain their specific use of NVAE.

[Hierarchical Text-Conditional Image Generation with CLIP Latents](https://md.research.elamur.ai/free/en/papers/ramesh-2022-hierarchical-text-conditional-image-generation/) places hierarchy and latent representations in a text-conditioned image-generation setting. Its title identifies a different conditioning problem from NVAE’s image-only experiments. The conceptual connection is the use of an intermediate latent organization in generation. The citation information does not establish that its hierarchy uses NVAE’s Gaussian correction mechanism or its convolutional design, so those details should not be treated as inherited contributions.

[High-Resolution Image Synthesis with Latent Diffusion Models](https://md.research.elamur.ai/free/en/papers/rombach-2021-high-resolution-image-synthesis-latent/) concerns high-resolution synthesis and diffusion in a latent representation. This makes it relevant to the broader question NVAE addresses: how a hidden representation can support detailed image generation. However, a latent-space approach need not use NVAE’s particular hierarchy or objective. The later work’s citation situates NVAE among relevant predecessors, while its title alone does not resolve which architectural or statistical lessons it takes from that predecessor.

[Improved Denoising Diffusion Probabilistic Models](https://md.research.elamur.ai/free/en/papers/nichol-2021-improved-denoising-diffusion-probabilistic-models/) extends the citation connection into diffusion-based generation. NVAE provides a substantial likelihood-based image-generation reference within the surrounding research landscape. The later title identifies improvements to a different generative framework; the citation does not justify attributing those improvements to NVAE’s stabilization method. A responsible comparison would need the later work’s own account of objectives, experiments, and architectural choices.

[NExT-GPT](https://md.research.elamur.ai/free/en/papers/wu-2023-next-gpt-any-any-multimodal/) concerns an any-to-any multimodal language system, placing the citation in the broader area of [multimodal research](https://md.research.elamur.ai/free/en/topics/multimodal/). This is a more distant application context than NVAE’s facial-image experiments. It demonstrates that NVAE appears in later work beyond standalone image generation, but it does not establish that NVAE itself solves cross-modal interaction or supplies the later system’s language machinery. The transferable themes remain representations and generation; the specific technical connection is not described in the citation information.

[Score identity Distillation](https://md.research.elamur.ai/free/en/papers/zhou-2024-score-identity-distillation-exponentially-fast/) focuses on distilling pretrained diffusion systems for one-step generation. Its stated subject makes generation speed an especially relevant point of comparison with NVAE, which also treats sampling cost as an important practical property. The mechanisms should nevertheless remain distinct. NVAE obtains its sampling behavior through its latent hierarchy and non-pixel-autoregressive decoder, whereas the later title identifies a distillation approach. The citation does not show that the later method derives from NVAE’s decoder construction.

These connections leave NVAE with a clear place in the research story. It demonstrates that a familiar variational objective can support much stronger image generation when its neural implementation, distribution parameterization, optimization, and memory use are designed together. The later citations broaden the surrounding conversation to conditioning, latent diffusion, multimodality, and faster generation. They support NVAE’s relevance to that conversation while leaving the details of technical inheritance to the evidence in each later work.

## Cite

Cite as Arash Vahdat and Jan Kautz. 2020. NVAE: A Deep Hierarchical Variational Autoencoder. neural information processing systems.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{vahdat2020nvae,
  title = {{NVAE: A Deep Hierarchical Variational Autoencoder}},
  author = {Arash Vahdat and Jan Kautz},
  booktitle = {neural information processing systems},
  year = {2020},
  eprint = {2007.03898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.03898}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
