Image Segmentation by Iterative Inference from Conditional Score Estimation

Adriana Romero, Michal Drozdzal, Akram Erraqabi, Simon Jégou, Yoshua BengioarXiv 2017

Abstract

Semantic image segmentation typically relies on feedforward neural networks for pixel-wise classification. However, these models often fail to capture the complex spatial dependencies between labels. While Conditional Random Fields (CRFs) are commonly used to model these relationships, they are limited by hand-crafted energy functions and local context. This paper introduces an iterative inference framework that utilizes a conditional Denoising Autoencoder (DAE) to estimate the "score"—the gradient of the log-density of the segmentation mask distribution. By iteratively updating initial predictions along this estimated gradient, the model refines segmentation masks to better reflect global structural constraints. Experiments on the CamVid dataset demonstrate that this approach significantly improves Mean IoU over baseline models and traditional CRFs.

Introduction

In semantic segmentation, the goal is to assign a class label to every pixel in an image. A major challenge is that pixel labels are highly interdependent; for instance, a "car" label is spatially consistent and contextually linked to "road" labels. Standard feedforward architectures often produce noisy or structurally inconsistent predictions because they lack a mechanism to explicitly model these joint distributions.

Traditionally, researchers have turned to graphical models like Conditional Random Fields (CRFs) as a post-processing step to smooth predictions. However, CRFs require explicitly defined energy functions that are often mathematically constrained to local interactions to remain tractable. This paper proposes a more flexible alternative inspired by the human visual system: a fast feedforward pass followed by iterative refinement through lateral and feedback connections.

Methodology

The core of the proposed method is Conditional Score Estimation using a Denoising Autoencoder (DAE). The process involves two main stages: training the DAE to recognize "good" segmentation masks and using it during inference to refine predictions.

Training Scheme

The system consists of a base segmentation network (e.g., FCN-8) and a secondary DAE. The base network generates an initial prediction $y$ and intermediate feature maps $h$.

A key insight of this work is the training strategy for the DAE. Instead of the standard approach of adding noise to the ground truth ($y_{true}$), the authors found that adding noise to the actual feedforward predictions ($y$) is far more effective. This forces the DAE to learn how to correct the specific types of errors and artifacts produced by the base network.

Figure 1: Training scenario where the DAE learns to map noisy feedforward predictions back to the clean ground truth, conditioned on image features.

Iterative Inference

Mathematically, a trained DAE estimates the "score"—the gradient of the log-density of the data distribution. During test time, the DAE acts as a vector field pointing toward the manifold of coherent segmentation masks. Starting from the initial feedforward prediction, the system iteratively updates the mask using gradient ascent: $$y \leftarrow y + \epsilon(r(y, h) - y)$$ where $r(y, h)$ is the reconstruction from the DAE. Each step moves the prediction closer to a refined, lower-energy state.

Figure 2: The iterative inference process where the initial prediction is refined through multiple passes through the DAE.

Key Insights

  • DAEs as Energy Gradient Estimators: By adapting the theoretical property that DAEs can estimate the gradient of a distribution, the authors remove the need for manually designed CRF energy functions.
  • Global Context: Unlike CRFs, which are often limited to local pixel neighborhoods, the convolutional DAE can capture high-order dependencies across the entire image.
  • Architecture for Denoising: The authors observed that standard skip connections in the DAE allowed noise to bypass the bottleneck. Using "unpooling with switches" (tracking indices from pooling layers) proved essential to force the network to learn effective denoising.

Experimental Results

The method was evaluated on the CamVid dataset, which contains urban street scenes with 11 semantic classes. The DAE was tested as a post-processor for two different base architectures:

  1. FCN-8: The base model achieved 57.0% Mean IoU. While a standard CRF improved this to 58.2%, the proposed DAE method reached 60.0% Mean IoU.
  2. FC-DenseNet103: The base model (66.9% Mean IoU) was improved to 67.2% by a CRF and to 67.4% Mean IoU by the DAE.

Qualitatively, the DAE method excels at structural refinement. While CRFs primarily smooth boundaries, the DAE can "hallucinate" missing parts of objects, such as connecting segments of a broken fence, by leveraging the learned global context.

Conclusion

This work demonstrates that conditional score estimation via DAEs provides a powerful and flexible framework for structured prediction in image segmentation. By replacing hand-crafted CRFs with a learned iterative inference process, the model better captures the complex joint distributions of semantic labels. Future work may explore end-to-end training optimizations and applying this framework to other structured output tasks.

Summary updated

BibTeX
@misc{romero2017image,
  author = {Adriana Romero and Michal Drozdzal and Akram Erraqabi and Simon Jégou and Yoshua Bengio},
  title = {{Image Segmentation by Iterative Inference from Conditional Score Estimation}},
  year = {2017},
  eprint = {1705.07450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.07450},
}
Figure