# Bee Swarm Metropolis-Hastings Sampling for Bayesian Inference in the Ginzburg-Landau Equation
## 3 The Proposed BeeSwarm-MH Algorithm
### Hybrid Sampling Framework Integrating Bee Swarm Intelligence with MH  
The BeeSwarm-MH algorithm introduces a role-based division of labor inspired by bee swarm intelligence, where scout bees perform global exploration while worker bees focus on local exploitation. By combining this division with the statistical consistency and acceptance rules of MH sampling, the algorithm establishes a framework that balances exploratory jumps with stable local refinement. This design enables a dynamic, adaptive balance between exploration and exploitation in high-dimensional posterior spaces, significantly enhancing the performance of classical MH methods on complex models. The overall workflow is illustrated in Figure 3, which comprises five main modules: bee swarm initialization, global exploration by scout bees, local exploitation by worker bees, adaptive step-size adjustment, and convergence diagnostics with result recording.  
Figure 3 illustrates the overall workflow of the proposed BeeSwarm-MH sampling algorithm. The process begins with the bee swarm initialization module, which generates the initial set of candidate solutions, assigns roles (scouts and workers), and evaluates their log-posterior probabilities to provide the foundation for subsequent iterative updates. The algorithm then alternates between two complementary search strategies: global exploration by scout bees and local exploitation by worker bees. Scout bees perform large-scale jumps in the parameter space, effectively expanding the search domain and avoiding entrapment in local optima. Worker bees refine promising regions by performing localized perturbations, thereby enhancing local convergence.  
On top of this division of labor, the algorithm features an adaptive step-size adjustment mechanism that dynamically updates individual and global proposal scales based on sampling feedback. This ensures a balanced trade-off between exploration and exploitation, improving overall sampling efficiency and stability. After each iteration, a convergence diagnostic based on the Gelman-Rubin statistic evaluates the stability and convergence of the multi-chain sampling process. If the convergence criterion is satisfied, the algorithm terminates and outputs the final posterior samples and parameter estimates; otherwise, it returns to the global exploration stage for continued sampling.  
\begin{table}
\begin{tabular}{l l c} \hline \hline
**Symbol** & **Description** & **Range/Unit** \\ \hline \(T,t\) & Total/current iterations & \(\mathbb{N}^{+}\) \\ \(\rho\) & Scout proportion & \((0,1)\) \\ \(T_{1},T_{2}\) & Stage thresholds & \(0<T_{1}<T_{2}<T\) \\ \(\gamma_{k},\delta_{k}\) & Perturbation factors & \(\mathbb{R}^{+}\) \\ \(c\) & Global scale & \(\mathbb{R}^{+}\) \\ \(\sigma_{\min},\sigma_{\max}\) & Step-size bounds & \((0,\infty)\) \\ \(c_{\min},c_{\max}\) & Global bounds & \((0,\infty)\) \\ \(n_{0}\) & Proposals before update & \(\mathbb{N}^{+}\) \\ \(\kappa(r),\alpha(R)\) & Adjustment functions & \([0,1]\rightarrow\mathbb{R}^{+}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: BeeSwarm-MH control parameters.  
\begin{table}
\begin{tabular}{l l c} \hline \hline
**Symbol** & **Description** & **Range/Unit** \\ \hline \(r_{i},R\) & Individual and overall acceptance rates & \([0,1]\) \\ \(Q_{t},Q\) & Max log-posterior at iteration \(t\), history & \(\mathbb{R}\) \\ \(v,u\) & Windowed variance, uniform random variable & \(\mathbb{R}^{+},[0,1]\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: BeeSwarm-MH statistical indicators and diagnostics.  
This workflow effectively combines the cooperative search advantages of bee swarm intelligence with the statistical rigor of MH sampling, substantially improving the ability to sample from complex posterior distributions in Bayesian models while maintaining high sample quality. In the following sections, we describe in detail the role allocation in the bee swarm, the search strategies of scout and worker bees, the adaptive step-size mechanism, and the convergence diagnostics employed in the BeeSwarm-MH algorithm.