Single MCMC Chain Parallelisation on Decision Trees

Efthyvoulos Drousiotis, Paul G. Spirakis

Abstract

Markov Chain Monte Carlo (MCMC) methods are essential for Bayesian decision tree inference but are traditionally limited by their sequential nature. This paper presents a novel two-phase parallelization strategy designed to accelerate a single MCMC chain. By utilizing multiple CPU cores to evaluate proposals simultaneously, the method achieves up to an 18x speedup on standard multi-core hardware. Statistical validation confirms that the parallelized chain produces distributions identical to those of sequential implementations, effectively overcoming the "sequential bottleneck" of Bayesian tree models.

1. Introduction

Bayesian decision trees offer a robust framework for machine learning, providing inherent uncertainty quantification and the ability to incorporate prior knowledge. However, their reliance on MCMC sampling represents a significant computational hurdle. MCMC is fundamentally sequential: each state in the chain depends on the preceding one, making it difficult to accelerate a single execution path.

While "embarrassingly parallel" approaches—running multiple independent chains—are common, they do not reduce the time required for an individual chain to converge. For large datasets where a single chain might require hours or days to reach a stationary distribution, traditional parallelization is insufficient. This research addresses the "Achilles' heel" of MCMC by parallelizing the proposal mechanism within a single chain, aiming for significant reductions in wall-clock time without sacrificing statistical integrity.

2. Methodology

The proposed method breaks the sequential barrier by parallelizing the tree proposal process across $C$ available CPU cores. The approach is divided into two distinct phases based on the chain's progress.

2.1 Phase 1: Accelerated Convergence

During the initial "burn-in" period, the primary goal is to reach high-probability regions of the feature space as quickly as possible. In this phase, the algorithm uses $C$ cores to generate $C$ different candidate tree structures in parallel. Instead of the standard random walk, the algorithm selects the candidate with the highest acceptance probability. This "greedier" exploration strategy allows the chain to navigate the posterior distribution more efficiently, significantly shortening the time to convergence.

2.2 Phase 2: Parallel Sampling

Once the chain has converged—monitored via F1-score stability—the focus shifts to harvesting samples from the posterior distribution. In this phase, the algorithm continues to propose $C$ candidates in parallel. However, rather than selecting only the best, it evaluates all candidates against the standard Metropolis-Hastings acceptance criteria. Every candidate that meets the criteria is collected as a valid sample. This allows the algorithm to generate multiple independent samples in the time it would normally take to generate one, drastically reducing the total number of iterations required for a complete posterior characterization.

2.3 Statistical Validation

To ensure that these modifications do not introduce bias, the authors employed a two-sample t-test (at a 0.05 significance level). This test compared the distribution of trees generated by the parallel implementation against those from a traditional serial implementation, ensuring the results remained statistically indistinguishable.

3. Experimental Setup

The implementation was evaluated using three standard benchmarks from the scikit-learn and UCI machine learning repositories:

  • Wine Dataset: Chemical analysis for classification.
  • Pima Indians Diabetes Dataset: Diagnostic measurements for medical prediction.
  • Dermatology Dataset: Multi-class classification of skin diseases.

Additionally, synthetic datasets with up to 500,000 entries were used to stress-test the implementation and identify hardware-related performance ceilings.

4. Results and Discussion

4.1 Performance Gains

The parallel implementation demonstrated a maximum runtime improvement of 18x compared to the serial version. For high-dimensional or large-scale problems, this translates to a reduction in processing time from several days to a few hours. Importantly, this speedup was achieved on consumer-grade hardware, such as an Intel i7 laptop, making the method accessible for practical data science applications.

4.2 Statistical Fidelity

The t-test results confirmed that the parallelized chain (tested at 25 and 40 cores) produced samples that were statistically identical to the serial version. This proves that the "greedy" selection in Phase 1 and the multi-sampling in Phase 2 do not compromise the mathematical rigor of the Bayesian inference process.

4.3 Hardware Limitations

The research identified a "hardware ceiling" where the benefits of parallelization begin to plateau. On typical multi-core systems, the speedup curve levels off between 25 and 40 cores. This is primarily due to:

  • Communication Overhead: The cost of coordinating tasks between a high number of cores.
  • Memory Bottlenecks: Large datasets (e.g., 500,000+ rows) require significant RAM when multiple tree structures are being evaluated simultaneously on every core.

5. Conclusion

This research successfully demonstrates that the sequential nature of MCMC for decision trees can be overcome through intelligent parallel proposal strategies. By achieving an 18x speedup while maintaining statistical identity, this method makes Bayesian decision trees a more viable option for time-sensitive and large-scale machine learning tasks. Future work will focus on scaling this approach to High-Performance Computing (HPC) clusters and exploring the integration of data-parallelism to further mitigate memory bottlenecks.

Summary updated

BibTeX
@article{drousiotis2025single,
  author = {Efthyvoulos Drousiotis and Paul G. Spirakis},
  title = {{Single MCMC Chain Parallelisation on Decision Trees}},
  journal = {Ann. Math. Artif. Intell.},
  year = {2025},
  doi = {10.1007/s10472-023-09876-9},
}
Figure