Table of Contents
Fetching ...

SPARK: Stochastic Propagation via Affinity-guided Random walK for training-free unsupervised segmentation

Kunal Mahatha, Jose Dolz, Christian Desrosiers

TL;DR

This paper addresses zero-shot, training-free image segmentation by critiquing spectral graph partitioning on diffusion-derived affinities and proposing a dynamic alternative. SPARK fuses global diffusion attention with local spatial structure and replaces eigenvector-based optimization with a stochastic flow equilibrium achieved via Markov-flow propagation, expansion, inflation, and pruning. The method yields sparse, flow-preserving clusters and refines labels through random-walk propagation, delivering state-of-the-art zero-shot results across six benchmarks with sharper boundaries and more stable masks. It also analyzes ablations and limitations, highlighting the robustness of the dynamical-systems perspective for unsupervised visual grouping.

Abstract

We argue that existing training-free segmentation methods rely on an implicit and limiting assumption, that segmentation is a spectral graph partitioning problem over diffusion-derived affinities. Such approaches, based on global graph partitioning and eigenvector-based formulations of affinity matrices, suffer from several fundamental drawbacks, they require pre-selecting the number of clusters, induce boundary oversmoothing due to spectral relaxation, and remain highly sensitive to noisy or multi-modal affinity distributions. Moreover, many prior works neglect the importance of local neighborhood structure, which plays a crucial role in stabilizing affinity propagation and preserving fine-grained contours. To address these limitations, we reformulate training-free segmentation as a stochastic flow equilibrium problem over diffusion-induced affinity graphs, where segmentation emerges from a stochastic propagation process that integrates global diffusion attention with local neighborhoods extracted from stable diffusion, yielding a sparse yet expressive affinity structure. Building on this formulation, we introduce a Markov propagation scheme that performs random-walk-based label diffusion with an adaptive pruning strategy that suppresses unreliable transitions while reinforcing confident affinity paths. Experiments across seven widely used semantic segmentation benchmarks demonstrate that our method achieves state-of-the-art zero-shot performance, producing sharper boundaries, more coherent regions, and significantly more stable masks compared to prior spectral-clustering-based approaches.

SPARK: Stochastic Propagation via Affinity-guided Random walK for training-free unsupervised segmentation

TL;DR

This paper addresses zero-shot, training-free image segmentation by critiquing spectral graph partitioning on diffusion-derived affinities and proposing a dynamic alternative. SPARK fuses global diffusion attention with local spatial structure and replaces eigenvector-based optimization with a stochastic flow equilibrium achieved via Markov-flow propagation, expansion, inflation, and pruning. The method yields sparse, flow-preserving clusters and refines labels through random-walk propagation, delivering state-of-the-art zero-shot results across six benchmarks with sharper boundaries and more stable masks. It also analyzes ablations and limitations, highlighting the robustness of the dynamical-systems perspective for unsupervised visual grouping.

Abstract

We argue that existing training-free segmentation methods rely on an implicit and limiting assumption, that segmentation is a spectral graph partitioning problem over diffusion-derived affinities. Such approaches, based on global graph partitioning and eigenvector-based formulations of affinity matrices, suffer from several fundamental drawbacks, they require pre-selecting the number of clusters, induce boundary oversmoothing due to spectral relaxation, and remain highly sensitive to noisy or multi-modal affinity distributions. Moreover, many prior works neglect the importance of local neighborhood structure, which plays a crucial role in stabilizing affinity propagation and preserving fine-grained contours. To address these limitations, we reformulate training-free segmentation as a stochastic flow equilibrium problem over diffusion-induced affinity graphs, where segmentation emerges from a stochastic propagation process that integrates global diffusion attention with local neighborhoods extracted from stable diffusion, yielding a sparse yet expressive affinity structure. Building on this formulation, we introduce a Markov propagation scheme that performs random-walk-based label diffusion with an adaptive pruning strategy that suppresses unreliable transitions while reinforcing confident affinity paths. Experiments across seven widely used semantic segmentation benchmarks demonstrate that our method achieves state-of-the-art zero-shot performance, producing sharper boundaries, more coherent regions, and significantly more stable masks compared to prior spectral-clustering-based approaches.
Paper Structure (12 sections, 4 theorems, 33 equations, 7 figures, 2 tables)

This paper contains 12 sections, 4 theorems, 33 equations, 7 figures, 2 tables.

Key Result

Theorem 1.1

Let $M \in \mathbb{R}^{n\times n}$ be a row-stochastic, primitive matrix and let $\ell \ge 2$. Define the Markov Clustering operator as where $M^\ell$ corresponds to the expansion step and $\Gamma_r$ to the inflation step. Then $T$ is a strict contraction with respect to Hilbert's projective metric. In particular, and the iterates $M_{t+1} = T(M_t)$ converge to a fixed point.

Figures (7)

  • Figure 1: Radar plot of mIoU (%) on six benchmarks.SPARK, which combines global diffusion-based semantic affinity with local random-walk propagation, consistently outperforms prior training-free methods across all datasets, demonstrating stronger cross-domain generalization and more reliable semantic propagation without supervision.
  • Figure 2: Overview of our training-free unsupervised segmentation pipeline. From an input image, we extract self-attention maps using a frozen Diffusion U-Net encoder to form a global affinity $S_{\text{global}}$ and a sparse local affinity $S_{\text{local}}$. These are normalized and fused into a unified affinity $S$, which defines a Markov random walk over the pixel graph. Iterative Markov-flow propagation drives the system toward stable flow-preserving clusters, whose stationary distribution is used for label assignment, yielding the final segmentation.
  • Figure 3: SPARK vs DiffCut Qualitative comparison of segmentation maps produced by DiffCut (top row) and SPARK (bottom row) on a variety of outdoor and indoor scenes. SPARK produces more spatially coherent and fine-grained segments, particularly along object boundaries.
  • Figure 4: Ablation of post-processing with PAMR. We compare mIoU before and after applying PAMR on the validation splits of each dataset.
  • Figure 5: Effect of the inflation factor on segmentation performance, mIoU on ADE20K evaluated across a range of values, with the peak region highlighted and a dashed line indicating the maximum mIoU level.
  • ...and 2 more figures

Theorems & Definitions (8)

  • Theorem 1.1: Contraction of the Markov Clustering Operator
  • Lemma 1.2: Non-expansiveness of Expansion
  • proof
  • Lemma 1.3: Projective Diameter of Inflation
  • proof
  • Lemma 1.4: Contraction of Inflation
  • proof
  • proof : Proof of Theorem 1