Bridging Maximum Likelihood and Optimal Transport for Efficient Inference and Model Selection in Stochastic Block Models

Simon Queric, Cédric Vincent-Cuaz, Charles Bouveyron, Marco CorneliarXiv 2026

TL;DR

This paper establishes a elegant theoretical bridge between maximum likelihood variational inference in Stochastic Block Models (SBMs) and semi-relaxed Gromov-Wasserstein optimal transport. By leveraging this connection and introducing a sparsity-promoting regularization, the authors develop a novel framework that simultaneously learns graph communities and automatically selects the optimal number of clusters in a single, highly efficient optimization step.

What Problem Does This Paper Address?

Stochastic Block Models (SBMs) are a cornerstone of network analysis, used to cluster nodes in a graph based on their connectivity patterns. SBMs are incredibly flexible—unlike simple community detection methods that look only for tightly knit groups, SBMs can identify complex structures like hubs or disassortative (bipartite-like) arrangements.

However, SBMs suffer from a classic unsupervised learning headache: model selection. Determining the true number of clusters ($K^*$) typically requires running computationally expensive grid searches or greedy heuristic procedures (like maximizing the Integrated Classification Likelihood) over many different values of $K$.

At the same time, Optimal Transport (OT)—specifically the Gromov-Wasserstein (GW) distance—has emerged as a powerful tool for comparing graphs. While GW methods excel at graph matching and partitioning, their statistical connections to generative graph models like SBMs have remained largely unexplored. This paper bridges that gap to solve the model selection problem efficiently.

Methods

The authors' approach unfolds in three main steps:

  1. The Variational-OT Equivalence: The authors prove that standard Maximum Likelihood Variational Inference (MLVI) for SBMs is mathematically equivalent to an entropically regularized semi-relaxed Gromov-Wasserstein (srGW) projection problem.
  2. Ditching the Entropy Barrier: In standard OT, entropic regularization is used to smooth the optimization. However, the authors point out that these entropy terms act as barrier functions, forcing the cluster assignments to be dense. This prevents the model from naturally "shutting down" unused clusters. By removing the entropy terms, they introduce unregularized srGW estimators and prove that they are asymptotically consistent—meaning they perfectly recover both the cluster assignments and the graph's connectivity matrix as the graph grows infinitely large.
  3. One-Shot Model Selection via Sparsity: While unregularized srGW works perfectly in theory (asymptotically), finite graphs still struggle to find the right number of clusters because the objective function naturally decreases as you add more clusters. To fix this, the authors introduce an $\ell_{1/2}$ pseudo-norm penalty on the inferred cluster proportions. This penalty forces redundant clusters to receive exactly zero mass.

The resulting optimization problem is solved using an efficient Block Coordinate Descent (BCD) algorithm that alternates between updating the connectivity matrix (which has a closed-form solution) and updating the transport plan using a Majorization-Minimization routine.

Datasets

The method was evaluated on synthetic graph data generated from three distinct SBM regimes to test its versatility:

  • Assortative: Standard communities where nodes connect primarily to others in the same cluster.
  • Hub: A specific structure where a central cluster connects broadly to all other clusters.
  • Disassortative: Bipartite-like structures where nodes prefer connecting to nodes in different clusters.

Graphs were generated with $N = 10^3$ nodes, fixing the true number of clusters at $K^* = 5$, while the algorithms were initialized with a maximum capacity of $K = 20$.

Key Insights and Ideas

  • Entropy is a Double-Edged Sword: While entropic regularization makes optimal transport problems easier to solve and more robust to noise, it fundamentally breaks intrinsic model selection by preventing sparsity.
  • Likelihood-Based Loss Matters: The choice of the "inner loss" in the Gromov-Wasserstein formulation is critical. Using a Negative Log-Likelihood (srGW-NLL) loss aligned with the SBM generative mechanism performs significantly better than a standard squared error ($L_2$) loss, especially in non-standard graph structures.

Key Results

  • Robust Partitioning: The proposed srGW-NLL method consistently recovered the true latent clusters across all three regimes (Assortative, Hub, and Disassortative). Traditional community detection baselines like Louvain and Infomap performed well in the assortative setting but failed completely in the Hub and Disassortative regimes.
Clustering performance (ARI) across different SBM regimes
  • Accurate Model Selection: As shown in the sensitivity analysis, when the graph structure becomes clear enough (higher $\alpha$), the sparsity hyperparameter $\lambda$ exhibits a stable plateau around $10^{-2}$ (roughly $\lambda = K/2N$), where it perfectly identifies the true $K^* = 5$ clusters from an initial pool of 20.
Estimation of K versus the sparsity hyperparameter
  • Massive Speedups: Because the framework performs clustering and model selection simultaneously, it bypasses the need for discrete grid searches. On CPU, srGW-NLL was 1 to 2 orders of magnitude faster than standard Variational EM and greedy ICL methods. Furthermore, the algorithm is highly parallelizable and scales exceptionally well when accelerated on a GPU.

Limitations and Future Work

While the framework is highly efficient, the authors note a few areas for improvement:

  • Hyperparameter Tuning: The selection of the sparsity strength $\lambda$ currently relies on empirical heuristics (e.g., $\lambda \approx K/2N$). A more rigorous, automated method for tuning this parameter is needed.
  • Theoretical Extensions: The current consistency proofs assume the true number of clusters $K^*$ is known. Future work aims to theoretically prove that when $K^*$ is unknown, the target structure learned by the regularized model remains asymptotically weakly isomorphic to the true connectivity matrix.

Summary updated

BibTeX
@misc{queric2026bridging,
  author = {Simon Queric and Cédric Vincent-Cuaz and Charles Bouveyron and Marco Corneli},
  title = {{Bridging Maximum Likelihood and Optimal Transport for Efficient Inference and Model Selection in Stochastic Block Models}},
  year = {2026},
  eprint = {2605.28488},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.28488},
}
Figure