Learning Generative ConvNets via Multi-Grid Modeling and Sampling

Ruiqi Gao, Yang Lu, Junpei Zhou, Song-Chun Zhu, Ying Nian Wu

Abstract

This paper proposes a multi-grid method for learning energy-based generative ConvNet models of images. For each grid, we learn an energy-based probabilistic model where the energy function is defined by a bottom-up convolutional neural network (ConvNet or CNN). Learning such a model requires generating synthesized examples from the model. Within each iteration of our learning algorithm, for each observed training image, we generate synthesized images at multiple grids by initializing the finite-step MCMC sampling from a minimal 1 x 1 version of the training image. The synthesized image at each subsequent grid is obtained by a finite-step MCMC initialized from the synthesized image generated at the previous coarser grid. After obtaining the synthesized examples, the parameters of the models at multiple grids are updated separately and simultaneously based on the differences between synthesized and observed examples. We show that this multi-grid method can learn realistic energy-based generative ConvNet models, and it outperforms the original contrastive divergence (CD) and persistent CD.

Introduction

Energy-Based Models (EBMs) represent a powerful class of generative models that define a probability distribution directly through an energy function. In the context of computer vision, this energy function is typically parameterized by a bottom-up Convolutional Neural Network (ConvNet). Unlike Generative Adversarial Networks (GANs), which rely on a generator network to map latent noise to data space, EBMs utilize an "Analysis by Synthesis" approach.

The primary bottleneck in training EBMs is the sampling process. To update model parameters, one must generate synthesized images using Markov Chain Monte Carlo (MCMC) methods, such as Langevin dynamics. However, the probability landscapes of natural images are notoriously multi-modal. Standard MCMC samplers often become trapped in local modes or require an impractical number of steps to converge. Traditional shortcuts like Contrastive Divergence (CD) or Persistent CD (PCD) frequently fail to capture the full diversity of the data distribution, leading to biased gradients and suboptimal synthesis.

Multi-Grid Modeling and Sampling

To address the mode-trapping problem, this research introduces a multi-grid modeling and sampling framework. This approach leverages a hierarchy of image resolutions to facilitate more effective exploration of the energy landscape.

Hierarchical Architecture

The framework defines separate generative ConvNet models across multiple scales—for instance, $4 \times 4$, $16 \times 16$, and $64 \times 64$ pixels. Each grid level possesses its own set of parameters, allowing the model to learn features specific to that resolution.

Coarse-to-Fine Sampling Strategy

The sampling process is initialized not from random noise, but from a minimal $1 \times 1$ version of the training image, which acts as a basic color histogram. This initialization provides a starting point that is less biased than the full image used in standard CD, yet more structured than pure noise.

The multi-grid sampling process progresses from coarse resolutions to fine details.

As illustrated in the figure above, the synthesized image from a coarser grid is up-scaled to serve as the initialization for the MCMC sampling at the next, finer grid. This sequential initialization allows the model to first establish global structures at low resolutions before refining intricate textures at higher resolutions.

Simultaneous Learning

During each training iteration, parameters for all grids are updated simultaneously. The update rule is based on the difference between the synthesized examples and the observed training images at their respective resolutions. This multi-grid approach functions similarly to spatial simulated annealing: the coarser grids represent "hotter," smoother energy landscapes where MCMC can easily traverse between modes, while finer grids represent "colder" landscapes that capture high-frequency details.

Experimental Evaluation

The proposed method was evaluated on several benchmark datasets, including CelebA (faces), LSUN Bedrooms, CIFAR-10, SVHN, and MIT places205. These datasets provide a rigorous testing ground for both the visual quality of synthesized images and the utility of the learned features for downstream tasks.

Visual Synthesis Quality

The multi-grid method produces significantly more realistic and diverse images compared to single-grid baselines or standard PCD. By effectively navigating the multi-modal landscape, the model avoids the common pitfalls of mode collapse or blurry outputs.

Synthesized face images generated by the multi-grid energy-based model.

Quantitative Performance

On the CIFAR-10 dataset, the multi-grid EBM achieved an Inception score of 6.56, placing it on par with contemporary GAN architectures like DCGAN (6.58). Furthermore, the model demonstrated superior performance in semi-supervised classification tasks. On the SVHN dataset with 1,000 labeled images, the multi-grid method achieved a 30.23% error rate, significantly outperforming DCGAN's 38.59%.

Key Insights

  1. Spatial Simulated Annealing: Treating image resolution as a temperature-like parameter allows for a more robust sampling process that captures both global structure and local detail.
  2. Reduced Bias: Initializing from a $1 \times 1$ grid forces the model to learn the underlying data manifold rather than simply memorizing training samples.
  3. Unified Framework: The method requires no auxiliary generator or encoder networks, simplifying the training objective and avoiding issues like manifold mismatch.

Conclusion and Future Work

The multi-grid method represents a significant advancement in training energy-based ConvNets. While it introduces additional computational overhead due to the multiple networks, the gains in synthesis quality and feature representation are substantial. Future research may focus on optimizing the MCMC budget for even higher resolutions or developing more efficient sampling algorithms specifically designed for deep energy-based architectures.

Summary updated

BibTeX
@inproceedings{gao2018learning,
  author = {Ruiqi Gao and Yang Lu and Junpei Zhou and Song-Chun Zhu and Ying Nian Wu},
  title = {{Learning Generative ConvNets via Multi-Grid Modeling and Sampling}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=rJ4oXRZubH},
}
Figure