Non-parametric Structured Output Networks

Andreas M. Lehrmann, Leonid SigalNeurIPS 2017

In the world of machine learning, we often have to choose between two powerful but fundamentally different tools. On one hand, Deep Neural Networks (DNNs) are incredible at learning complex mappings from inputs to outputs, but they usually treat output variables as independent or assume they follow very simple distributions (like a single bell curve). On the other hand, Probabilistic Graphical Models (PGMs) are the masters of "structure"—they excel at modeling how different output variables depend on one another—but they can be slow and difficult to train end-to-end with deep features.

In their NIPS 2017 paper, Andreas Lehrmann and Leonid Sigal introduce Non-parametric Structured Output Networks (NSONs), a framework that effectively marries these two paradigms to handle complex, continuous, and structured data.

The Problem: Continuous, Structured, and Messy Data

Most standard neural networks are "flat." If you’re predicting the colors of pixels in an image, a standard network might predict each pixel’s color independently. However, pixels are highly dependent on their neighbors. While some models (like Conditional Random Fields) handle these dependencies, they usually work with discrete labels (e.g., classifying a pixel as "dog" vs. "cat").

When we move to continuous spaces—like predicting the exact coordinates of a human skeleton or the intensity of pixels—things get messy. Real-world data is often "non-parametric" and "multimodal," meaning the "average" answer is often wrong. For example, if a pixel could be either bright red or dark blue, a standard Gaussian model would predict a murky purple average. We need a way to model these complex dependencies and multiple possibilities in a continuous space, and we need to do it fast.

The Architecture of NSONs

The NSON architecture consists of three clever components working in tandem to solve this problem:

The NSON architecture combines a deep neural network, a non-parametric graphical model, and a recurrent inference network.
  1. The DNN (The Predictor): A deep neural network takes the input (e.g., a noisy image) and predicts the parameters for local distributions. Instead of predicting a single value, it predicts the weights, centers, and widths of "kernels" (small local probability blobs).
  2. The NGM (The Structure): The Non-parametric Graphical Model organizes these local blobs into a graph. It uses a differentiable conditioning operation to ensure that the local predictions respect the global structure (e.g., ensuring pixel $A$ logically depends on pixel $B$).
  3. The RIN (The Inference Engine): This is perhaps the most novel part. Traditional inference (calculating the final probability) requires slow iterative algorithms like MCMC or Variational Inference. The authors instead use a Recurrent Inference Network (RIN)—an RNN trained to "mimic" message-passing.
The Recurrent Inference Network (RIN) mimics message-passing to efficiently compute statistics.

The RIN takes the NGM's parameters and quickly "smooths" them to produce final statistics. Because the entire pipeline is differentiable, the model can be trained end-to-end. The DNN learns to predict better distributions because it "knows" how the RIN will eventually process them.

Key Insights and Ideas

  • Separation of Concerns: By cleanly separating the density modeling (NGM) from the inference (RIN), the model remains modular. You can swap out the inference network depending on whether you need the most likely value (MAP) or the average value (marginal).
  • Learned Inference: Rather than relying on generic, computationally heavy math solvers, the RIN "learns" how to do inference for the specific task at hand. This turns a slow optimization problem into a lightning-fast forward-pass of a neural network.
  • Non-parametric Flexibility: Because it uses kernels, the model can represent "weird" distributions that aren't just simple bell curves, allowing it to capture multiple hypotheses simultaneously.

Experimental Results

The authors evaluated NSONs on synthetic pixel stripes (derived from the MS COCO dataset) corrupted with complex, non-linear noise, as well as 2D image patches to test structure learning.

  • Superior Modeling: In terms of log-likelihood (how well the model fits the data), the NSON outperformed standard Gaussian models and global mixture models by a wide margin. On the stripe task, it achieved a log-likelihood of +16.46 compared to -1.13 for a standard Gaussian.
  • Lightning Speed: The RIN-based inference was 50x faster than Particle Belief Propagation (a common sampling method) and orders of magnitude faster than Black Box Variational Inference.
  • Structural Accuracy: The model successfully learned spatial dependencies in 2D images, proving that it doesn't just need a human to tell it the graph structure; it can discover it dynamically from the data.

Limitations and Future Work

While highly effective, NSONs do face scaling challenges. Handling 10x10 patches works well, but scaling this to full high-resolution images would require more efficient graph structures or hierarchical approaches to prevent the message-passing from becoming a bottleneck. Additionally, while the authors showed the model can learn structure, dynamically generating this structure for every new input remains a complex frontier. Finally, training three interconnected components requires careful tuning of loss functions to ensure stable convergence.

Summary updated

BibTeX
@inproceedings{lehrmann2017non,
  author = {Andreas M. Lehrmann and Leonid Sigal},
  title = {{Non-parametric Structured Output Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=BJ4gmPWObB},
}
Figure