Learning Structured Output Representation using Deep Conditional Generative Models

Kihyuk Sohn, Honglak Lee, Xinchen YanNeurIPS 2015

Introduction

Most supervised deep learning models are designed as "many-to-one" functions. For example, a standard classifier takes millions of pixels and maps them to a single deterministic label like "Cat." However, many real-world computer vision tasks require structured output prediction, where the output is high-dimensional and complex, such as a pixel-perfect segmentation mask.

The fundamental challenge is that these mappings are often "one-to-many." Given a blurry, occluded, or partial image of a bird, there might be several plausible ways to draw its silhouette. Standard Convolutional Neural Networks (CNNs) are deterministic; when faced with multiple valid possibilities, they tend to average them out, producing a blurry or unrealistic result.

To address this, researchers introduced a Conditional Variational Auto-Encoder (CVAE) framework. By incorporating Gaussian latent variables, the model moves beyond deterministic "one-size-fits-all" predictions. It performs probabilistic inference, allowing it to model complex, multi-modal distributions and generate diverse, realistic outputs even when input data is incomplete.

Proposed Methods

The authors propose a Deep Conditional Generative Model (CGM) based on the Variational Auto-Encoder (VAE) architecture, adapted specifically for structured prediction.

The CVAE and GSNN Architectures

Unlike a standard VAE that models the distribution of data $x$, the CVAE models the conditional distribution of output $y$ given input $x$. It uses a "prior network" to modulate Gaussian latent variables ($z$) based on the input. By injecting stochasticity (randomness) into the hidden layers via these latent variables, the model can sample different $z$ values to produce different, yet plausible, outputs $y$ for the same input $x$.

However, a discrepancy exists in standard CVAE training: the model uses a "recognition network" that sees the ground truth $y$ during training, but at test time, it does not have access to $y$. To bridge this gap, the authors proposed the Gaussian Stochastic Neural Network (GSNN), where the training and testing pipelines are kept consistent by only conditioning the latent variables on $x$. Ultimately, they combined the CVAE and GSNN objectives into a single hybrid objective to achieve both efficient training and robust testing.

Graphical models illustrating the baseline CNN, the proposed Conditional Generative Models (generation and recognition), and the recurrent connection variant.

Enhancing Robustness

To further improve the model's performance, the authors introduced two key techniques:

  • Recurrent Connections: Feeding an initial "rough guess" prediction back into the prior network significantly improves the final segmentation, effectively allowing the model to iteratively refine its own outputs.
  • Multi-scale Prediction & Input Omission: The model is trained to predict outputs at multiple resolutions (e.g., $1/4$, $1/2$, and full scale) to learn both global structure and local detail. Additionally, randomly masking out blocks of the input image during training forces the model to learn how to fill in missing information using its learned prior.

Key Insights and Results

The model was evaluated on three primary benchmarks: MNIST (predicting missing quadrants of a digit), Caltech-UCSD Birds 200 (CUB) for fine-grained pixel-level segmentation, and Labeled Faces in the Wild (LFW) for semantic labeling.

Why Stochasticity Works

Deterministic models fail on multi-modal data because they try to minimize the mean squared error across all possibilities, leading to "mean" (blurry) outputs. Stochastic neurons allow the model to commit to one "mode" (one specific valid shape) at a time, preventing blurriness. Because the model learns a generative distribution, it is remarkably good at imputation. If 50% of an image is missing, the CVAE uses the latent space to predict the most likely shape of the missing parts rather than failing outright.

Performance Highlights

  • MNIST Quadrant Prediction: The CVAE achieved significantly lower negative conditional log-likelihood compared to standard neural networks, proving it better captures the variety of ways a digit can be completed.
  • Segmentation Performance: On the CUB dataset, the CVAE/GSNN hybrid reached an Intersection over Union (IoU) of 85.07%, a significant jump over the baseline CNN's 81.90%.
  • Face Labeling: On LFW, the model achieved 93.42% pixel accuracy, outperforming existing state-of-the-art methods like GLOC.
  • Efficiency: Despite the added complexity of stochastic sampling, inference time remained fast (approximately 3.69ms per image on a Titan X GPU), making it viable for real-time applications.

Limitations and Future Work

While highly effective, the stochastic inference is about 60% slower than a deterministic CNN because it requires sampling from the latent distribution. Furthermore, to get the absolute best results, one often needs to draw multiple samples and average them, which increases computational cost.

Looking forward, the authors suggest that because the model can handle partial labels so effectively, it holds strong potential for interactive segmentation. In such a system, a human could provide a few brushstrokes, and the model would instantly and realistically "fill in" the rest of the object.

Summary updated

BibTeX
@inproceedings{sohn2015learning,
  author = {Kihyuk Sohn and Honglak Lee and Xinchen Yan},
  title = {{Learning Structured Output Representation using Deep Conditional Generative Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2015},
}
Figure