Flowing Backwards: Improving Normalizing Flows via Reverse Representation Alignment

Yang Chen, Xiaowei Xu, Shuai Wang, Chenhui Zhu, Ruxue Wen, Xubin Li, Tiezheng Ge, Limin Wang

TL;DR

Normalizing Flows (NFs) are mathematically elegant generative models, but they often lag behind diffusion models in image quality because standard log-likelihood training fails to capture high-level semantic structures. This paper introduces Reverse Representation Alignment (R-REPA), a novel strategy that injects semantic guidance from a vision foundation model directly into the generative (reverse) pass of the flow. This approach accelerates training by over 3.3$\times$ while simultaneously boosting both image generation quality and classification accuracy to new state-of-the-art levels for NFs.

What Problem Does This Paper Address?

Normalizing Flows (NFs) possess a unique architectural advantage: exact mathematical invertibility. A forward pass maps complex data to a simple latent distribution (like a Gaussian) for density estimation, while a mathematically precise reverse pass generates new data from that same latent space.

However, standard NFs are optimized solely using Maximum Likelihood Estimation (MLE) on the forward pass. This rigid objective forces the network to focus heavily on low-level pixel statistics rather than high-level semantic structures. As a result, standard NFs suffer from mediocre image generation quality and poor representation learning. The authors aim to unlock the inherent dual-pathway synergy of NFs, forcing them to learn semantically meaningful features without breaking their exact likelihood framework.

Overview of the training, generation, and classification pipelines along with FID vs. Accuracy performance.

Methods

The core innovation is Reverse Representation Alignment (R-REPA). Instead of regularizing the forward pass, the authors leverage the invertibility of NFs to align intermediate features during the reverse (generative) pass with a powerful, pre-trained vision foundation model (DINOv2).

To make this computationally viable, they address a major bottleneck: the reverse pass of an autoregressive flow is inherently sequential and slow, making standard backpropagation during training highly inefficient. The authors introduce an Accelerated Pseudo-Reverse Pass. By caching intermediate features during the parallelized forward pass and detaching them from the gradient graph, they break the sequential dependency, allowing the inverse transformation for all tokens to be computed in parallel. This parallelized method yields a substantial 50$\times$ speedup for the alignment pass and reduces the peak memory footprint by nearly 50%.

Comparison of different representation alignment backpropagation strategies.

Additionally, the paper introduces a Training-Free Classification algorithm to probe the model's internal semantic knowledge. Instead of training an auxiliary linear classifier, it reframes classification as an inference-time optimization problem, calculating a single-step gradient of the log-likelihood with respect to a "soft" class conditioning vector at initialization. The class corresponding to the largest gradient component becomes the predicted label.

To scale the architecture to high-resolution synthesis ($256 \times 256$), the authors transition the model from pixel space to the compact latent space of a pre-trained Variational Autoencoder (VAE).

Datasets

The method is trained and evaluated on the standard ImageNet-1K dataset at two resolutions:

  • 64$\times$64: Modeled directly in pixel space.
  • 256$\times$256: Modeled within the latent space of a pre-trained VAE.

Key Insights and Ideas

  • Flowing Backwards is Superior: Aligning the reverse pass is significantly more effective than aligning the forward pass. Forward alignment creates a destructive tension between the MLE objective and the semantic loss in early blocks. Reverse alignment acts as a generative guide, refining how abstract latents transform into concrete data without disrupting the core density model.
  • The Block Trade-off: Aligning different blocks yields different benefits. Aligning later blocks (which execute first during generation) establishes strong high-level image structure and yields the best generative quality (FID). Conversely, aligning early blocks (which process the input image first during encoding) optimizes feature extraction and yields the best classification accuracy.
  • Likelihood and Semantics Can Coexist: Rich semantic awareness typically reserved for discriminative foundation models can be successfully injected into exact likelihood frameworks using a balanced alignment loss weight ($\lambda_{align} = 0.1$).

Key Results

  • 3.3$\times$ Training Acceleration: R-REPA models at just 400k training iterations surpass the generative and discriminative performance of a vanilla TARFlow baseline trained for a full 1 million iterations.
  • State-of-the-Art Generation: On ImageNet 64$\times$64, R-REPA reduces the FID from 4.21 to 3.69, outperforming established GANs (like BigGAN's 4.06) and closing the gap with diffusion models—all while requiring just two sampling steps.
  • Massive Discriminative Boost: The training-free classification accuracy on ImageNet 64$\times$64 skyrocketed from the baseline's 39.97% to 57.02%.
  • High-Resolution Scaling: On ImageNet 256$\times$256, combining R-REPA with a 1$\times$1 patch size adjustment achieved a highly competitive FID of 4.18.

Limitations and Future Work

  • Objective Tension: There is a delicate balance between density estimation and semantic alignment. Setting the alignment weight too high ($\lambda_{align} = 0.5$) degrades final sample fidelity because it interferes with the primary MLE task.
  • Task Disconnect: The optimal configuration for generation (aligning blocks 7 & 8) is not the optimal configuration for classification (aligning blocks 1 & 2). Future work could explore multi-scale or dynamic alignment strategies to maximize both capabilities simultaneously.

Summary updated

BibTeX
@inproceedings{chen2026flowing,
  author = {Yang Chen and Xiaowei Xu and Shuai Wang and Chenhui Zhu and Ruxue Wen and Xubin Li and Tiezheng Ge and Limin Wang},
  title = {{Flowing Backwards: Improving Normalizing Flows via Reverse Representation Alignment}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i4.37300},
}
Figure