Forming A Random Field via Stochastic Cliques: From Random Graphs to Fully Connected Random Fields

Mohammad Javad Shafiee, Alexander Wong, Paul W. FiegutharXiv 2015

Abstract

Conditional Random Fields (CRFs) are fundamental to image segmentation, yet traditional models often struggle with "short-boundary bias" or computational intractability in fully-connected settings. This paper introduces a framework leveraging stochastic cliques to approximate dense random fields efficiently. By randomly sampling the most informative connections rather than processing every edge, the proposed method enables the use of arbitrary potential functions—such as Hellinger distance and KL divergence—without the rigid mathematical constraints of previous Gaussian-based models. Experimental results across multiple benchmarks demonstrate superior boundary preservation and competitive computational performance.

Introduction

In computer vision, image segmentation requires labeling every pixel accurately. Traditional CRFs typically only consider immediate pixel neighbors, leading to over-smoothed edges and a failure to capture elongated structures. While fully-connected (dense) CRFs address this by connecting every pixel pair, they introduce a "computational explosion"—a standard image can result in billions of connections. Previous solutions, such as the popular Dense CRF (DCRF), achieved tractability by restricting potential functions to specific Gaussian kernels. This work breaks those restrictions, allowing for arbitrary potentials through a stochastic sparsification framework.

Methodology: Stochastic Cliques and Abstraction

The authors propose a framework based on Stochastic Cliques. Instead of constructing a static, dense graph, they stochastically form a sparse representation of the field.

Stochastic Sparsification

Inspired by random graph theory, the method uses a "stochastic indicator function" to decide which cliques are "active" during inference. Leveraging Karger’s theorem on random sampling, the authors prove that a carefully sampled sparse graph retains the essential structural information (the "minimum cut") of the fully-connected version.

The evolution of connectivity in random graphs as the probability $p$ increases, illustrating the transition from sparse to dense structures.

f-Divergence and Abstraction

To determine pixel connectivity, the framework utilizes various similarity measures ($f$-divergences), including Bregman Divergence (BD), Kullback-Leibler (KL) Divergence, and Hellinger Distance (HD). To maintain $O(n)$ complexity, the authors introduce an abstraction strategy: pixels are grouped into sets, and expected connectivity is computed between pixels and these sets, preserving global context without the $O(n^2)$ cost.

Experimental Results

The framework was evaluated on three benchmarks: the Complex Scene Saliency Dataset (CSSD), Microsoft Research Interactive Segmentation (MRIS), and MSRA Fine Structures (MSRA-FS).

Qualitative and Quantitative Performance

Visual results demonstrate the model's ability to preserve thin structures, such as tree stems or fine facial features, which are often lost in traditional models.

Qualitative comparison of segmentation results. The proposed HD and KLD methods show significantly better detail preservation compared to DCRF and PD.

Quantitatively, the Hellinger (HD) and KL versions consistently outperformed competitors in Boundary F1-scores. On the CSSD dataset, the HD realization achieved a score of 0.5659, compared to DCRF's 0.5212. While DCRF remains faster due to its optimized C++ implementation, the proposed MATLAB/MEX implementation (approx. 2.4s per image) is significantly more efficient than the Principled Deep (PD) framework (17.5s) while delivering higher accuracy.

Conclusion

By shifting the paradigm from dense static graphs to stochastic cliques, this research provides a flexible and efficient way to implement fully-connected random fields. The ability to use arbitrary potential functions opens new avenues for designing task-specific segmentation models that capture global context and fine structural details simultaneously. Future work will focus on GPU acceleration and exploring interactions with alternative inference techniques like Loopy Belief Propagation.

Summary updated

Abstract

Random fields have remained a topic of great interest over past decades for the purpose of structured inference, especially for problems such as image segmentation. The local nodal interactions commonly used in such models often suffer the short-boundary bias problem, which are tackled primarily through the incorporation of long-range nodal interactions. However, the issue of computational tractability becomes a significant issue when incorporating such long-range nodal interactions, particularly when a large number of long-range nodal interactions (e.g., fully-connected random fields) are modeled. In this work, we introduce a generalized random field framework based around the concept of stochastic cliques, which addresses the issue of computational tractability when using fully-connected random fields by stochastically forming a sparse representation of the random field. The proposed framework allows for efficient structured inference using fully-connected random fields without any restrictions on the potential functions that can be utilized. Several realizations of the proposed framework using graph cuts are presented and evaluated, and experimental results demonstrate that the proposed framework can provide competitive performance for the purpose of image segmentation when compared to existing fully-connected and principled deep random field frameworks.
BibTeX
@misc{shafiee2015forming,
  author = {Mohammad Javad Shafiee and Alexander Wong and Paul W. Fieguth},
  title = {{Forming A Random Field via Stochastic Cliques: From Random Graphs to Fully Connected Random Fields}},
  year = {2015},
  eprint = {1506.09110},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1506.09110},
}
Figure