Improved Autoregressive Modeling with Distribution Smoothing

Chenlin Meng, Jiaming Song, Yang Song, Shengjia Zhao, Stefano Ermon

Overview

Autoregressive (AR) models are the gold standard for image compression, but their generated samples often resemble "adversarial examples"—mathematically likely according to the model, but visually unrealistic to human observers. This paper introduces Distribution Smoothing, a two-stage approach that first learns a "blurred" version of the data distribution and then learns to denoise it. This method drastically improves sample quality without sacrificing the inherent strengths of autoregressive modeling.

The Problem with Standard Autoregressive Models

Autoregressive models generate data one element at a time (e.g., pixel by pixel). While they achieve excellent likelihood scores, their sample quality often lags behind other generative models like GANs or diffusion models. The authors identify two primary culprits for this discrepancy:

  1. The Manifold Hypothesis: Real-world data, such as natural images, typically clusters around low-dimensional manifolds within a high-dimensional space. This results in "sharp" density functions with high Lipschitz constants—essentially, the probability drops off a cliff the moment you move away from a real image. AR models struggle to learn these sharp transitions.
  2. Compounding Error: Because AR models generate pixels sequentially based on previously generated pixels, a single "mistake" early in the generation process cascades. Interestingly, the model often assigns these unrealistic, noisy samples a high likelihood, treating them much like adversarial examples that fool a classifier.

Proposed Method: Distribution Smoothing

The authors propose a two-stage generative process inspired by randomized smoothing techniques commonly used in adversarial defense.

Two-stage generative process: smoothing the data distribution and then learning to denoise.
  • Stage 1: Smoothing. The original data distribution is convolved with a noise kernel (typically Gaussian or Laplacian). This "fills in" the empty spaces in the high-dimensional space, creating a smoother, easier-to-learn distribution $p(\tilde{x})$.
  • Stage 2: Denoising. To recover the original data, a second step is introduced to "reverse" the smoothing. The authors explore two ways to achieve this:
  • Single-step Denoising: For small amounts of Gaussian noise, they use the gradient of the log-density (the "score") to push noisy samples back toward the data manifold.
  • Two-step Autoregressive Modeling: They train a second conditional AR model $p_\theta(x|\tilde{x})$ that learns to map the noisy image back to a clean one.

By stacking these two models, they optimize an Evidence Lower Bound (ELBO) that encourages the first model to capture the global structure and the second to handle fine-grained details.

Key Insights and Ideas

  • Smoothing as Regularization: The paper provides a formal proof that training on smoothed data is equivalent to adding a second-order gradient regularization term to the objective function. This encourages the model to be "flatter" and more robust to slight perturbations.
  • Bridging the "Valleys": In 1D and 2D experiments, the authors demonstrate that standard models often fail to capture multiple modes (clusters) of data because the "valleys" of zero probability between them are too difficult to navigate during training. Smoothing bridges these valleys, allowing the model to discover all parts of the data distribution.
Comparison on 1D multi-modal data showing the proposed method capturing all modes compared to baselines.
  • Quality vs. Likelihood: The authors highlight a known paradox in generative modeling: models with the highest likelihood (best compression) do not always produce the best images. Their method intentionally trades off a small amount of likelihood to gain massive improvements in visual fidelity.

Experimental Results

The researchers evaluated their method on a mix of synthetic benchmarks (1D multi-modal distributions, 2D "Rings" and "Olympics") and real-world image datasets (MNIST, CIFAR-10, CelebA). They compared against standard AR models like PixelCNN++ and MADE, as well as normalizing flows like RealNVP.

The results on CIFAR-10 were particularly striking:

  • Visual Quality: The "Two-step" model achieved a FID (Fréchet Inception Distance) of 29.83, a massive improvement over the baseline PixelCNN++ (54.25). A lower FID indicates images that are much closer in distribution to the real dataset.
  • Inception Score: Their model reached an Inception Score of 7.84, significantly higher than the baseline's 5.30.
  • Robustness: On synthetic 2D datasets, the smoothed models were able to perfectly capture complex shapes using far fewer parameters than standard models, which often "missed" parts of the shape entirely.

Limitations and Future Work

While the proposed method significantly improves sample quality, it comes with a few trade-offs:

  • The BPD Trade-off: The Bits-Per-Dimension (BPD)—a measure of compression efficiency—was slightly worse than the state-of-the-art for pure AR models, reflecting the intentional trade-off between likelihood and sample quality.
  • Noise Level Heuristics: The choice of how much noise to add ($\sigma$) is currently handled via heuristics, such as the median distance between data points. The authors noted that trying to learn the optimal noise level automatically via the ELBO often leads the model to choose "too much" noise, degrading performance.
  • Computational Overhead: The two-step process requires training and running two models (or one significantly larger joint model), which increases the computational cost compared to a single-stage AR model.

Summary updated

BibTeX
@inproceedings{meng2021improved,
  author = {Chenlin Meng and Jiaming Song and Yang Song and Shengjia Zhao and Stefano Ermon},
  title = {{Improved Autoregressive Modeling with Distribution Smoothing}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=sAxp0Vz1jHn},
}
Figure