Skip to main content
QUICK REVIEW

[Paper Review] Spatial PixelCNN: Generating Images from Patches

Nader Akoury, Anh‐Tu Nguyen|arXiv (Cornell University)|Dec 3, 2017
Generative Adversarial Networks and Image SynthesisComputer Science30 references5 citations
TL;DR

This paper introduces Spatial PixelCNN, a conditional autoregressive model that generates high-resolution images by training on small image patches, using spatial coordinates and global features from a VAE. It achieves state-of-the-art sample quality at original resolution and enables arbitrary upscaling (up to 50×) on MNIST, outperforming PixelCNN++ baselines despite training on only 8×8 patches.

ABSTRACT

In this paper we propose Spatial PixelCNN, a conditional autoregressive model that generates images from small patches. By conditioning on a grid of pixel coordinates and global features extracted from a Variational Autoencoder (VAE), we are able to train on patches of images, and reproduce the full-sized image. We show that it not only allows for generating high quality samples at the same resolution as the underlying dataset, but is also capable of upscaling images to arbitrary resolutions (tested at resolutions up to $50 imes$) on the MNIST dataset. Compared to a PixelCNN++ baseline, Spatial PixelCNN quantitatively and qualitatively achieves similar performance on the MNIST dataset.

Motivation & Objective

  • To address the challenge of training autoregressive generative models on high-resolution images with limited GPU memory.
  • To enable image generation at arbitrary resolutions using only low-resolution training data.
  • To investigate whether spatial conditioning and global latent codes improve sample coherence and scalability in patch-based autoregressive models.
  • To demonstrate that training on small patches with spatial and global conditioning can match full-image training performance.

Proposed method

  • The model uses a conditional autoregressive framework where each pixel is predicted based on previously generated pixels in a local neighborhood.
  • Spatial coordinates (2D grid) are conditioned on to provide positional context, reducing dependency on full-image resolution.
  • A Variational Autoencoder (VAE) extracts global image features, which are used as additional conditioning inputs to maintain structural coherence.
  • The model is trained on small image patches (e.g., 8×8 or 16×16), enabling lower memory usage and scalability.
  • At inference, the model takes a target resolution as input and generates images of arbitrary size by autoregressively sampling pixels conditioned on coordinates and latent codes.
  • The architecture combines PixelCNN++ for local modeling with spatial and global conditioning to enable high-resolution generation from low-res patches.

Experimental results

Research questions

  • RQ1Can spatial conditioning on pixel coordinates improve autoregressive image generation when training on small image patches?
  • RQ2Does combining spatial conditioning with global latent codes from a VAE enhance sample quality and structural coherence at high resolutions?
  • RQ3Can a model trained exclusively on low-resolution patches generate high-quality images at significantly higher resolutions (e.g., 2× to 50×) than the training resolution?
  • RQ4How does patch size affect the trade-off between training efficiency, model capacity, and generation quality?

Key findings

  • Spatial PixelCNN trained on 8×8 patches achieves a LeNet confidence score of 92.1±1.8 on 28×28 MNIST samples, comparable to the PixelCNN++ baseline (93.7±1.7).
  • The model trained on 8×8 patches produces more coherent 56×56 samples than the model trained on 16×16 patches, despite having fewer parameters.
  • Spatial PixelCNN achieves bits-per-dimension (BPD) values of 1.48 on 28×28 MNIST when trained on 20×20 patches with spatial conditioning, indicating strong likelihood modeling.
  • The model successfully generates high-quality images at up to 50× the original resolution (e.g., 224×224 from 8×8 patches), with minimal loss in coherence.
  • Even with only 8×8 patch training, the model maintains high MS-SSIM and confidence scores at 56×56 resolution, outperforming larger models trained on 16×16 patches.
  • The addition of spatial coordinates significantly improves sample quality even when training on very small patches (e.g., 4×4), where baseline models fail to maintain global coherence.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.