The stochastic block model (SBM) is a fundamental tool for community detection in networks, yet the finite-sample performance of inference methods remains underexplored. We evaluate key algorithms-spectral methods, variational inference, and Gibbs sampling-under varying conditions, including signal-to-noise ratios, heterogeneous community sizes, and multimodality. Our results highlight significant performance variations: spectral methods, especially SCORE, excel in computational efficiency and scalability, while Gibbs sampling dominates in small, well-separated networks. Variational Expectation-Maximization strikes a balance between accuracy and cost in larger networks but struggles with optimization in highly imbalanced settings. These findings underscore the practical trade-offs among methods and provide actionable guidance for algorithm selection in real-world applications. Our results also call for further theoretical investigation in SBMs with complex structures. The code can be found at https://github.com/Toby-X/SBM_computation.
翻译:随机块模型(SBM)是网络社区检测的基础工具,然而推理方法在有限样本下的性能仍未得到充分探索。我们在不同条件下评估了关键算法——谱方法、变分推理和吉布斯采样,包括信噪比、异质社区规模和模态多样性。我们的结果揭示了显著的性能差异:谱方法(尤其是SCORE)在计算效率和可扩展性方面表现出色,而吉布斯采样在小型、分离良好的网络中占主导地位。变分期望最大化在较大网络中实现了精度与成本的平衡,但在高度不平衡的设置中面临优化困难。这些发现强调了方法间的实际权衡,并为现实应用中的算法选择提供了可行指导。我们的结果也呼吁对具有复杂结构的SBM进行进一步的理论研究。代码可在 https://github.com/Toby-X/SBM_computation 获取。