Scalable Bayesian Nonparametric Clustering and Classification

Yang Ni, Peter Müller, Maurice Diesendruck, Sinead A. Williamson, Yitan Zhu, Yuan Ji · DOI

Abstract

We develop a scalable multi-step Monte Carlo algorithm for inference under a large class of nonparametric Bayesian models for clustering and classification. Each step is "embarrassingly parallel" and can be implemented using the same Markov chain Monte Carlo sampler. The simplicity and generality of our approach makes inference for a wide range of Bayesian nonparametric mixture models applicable to large datasets. Specifically, we apply the approach to inference under a product partition model with regression on covariates. We show results for inference with two motivating data sets: a large set of electronic health records (EHR) and a bank telemarketing dataset. We find interesting clusters and favorable classification performance relative to other widely used competing classifiers.

Introduction

Bayesian Nonparametric (BNP) models, such as Dirichlet Process Mixtures, are powerful tools for data analysis because they allow the model complexity—specifically the number of clusters—to be learned directly from the data. However, these models face a significant scalability challenge. Standard inference typically relies on Markov chain Monte Carlo (MCMC) algorithms that require scanning the entire dataset in every iteration. For datasets with hundreds of thousands of records, a single MCMC run can take days or weeks. Previous attempts to scale these models often relied on "conjugate" mathematical structures that limit model flexibility. This paper introduces a framework to break this bottleneck, enabling the use of complex, non-conjugate BNP models on large-scale datasets without sacrificing Bayesian rigor.

The SIGN Algorithm

The core innovation is the SIGN algorithm (Subset Inference of General Nonparametric Bayesian methods), a multi-step framework designed to make BNP models scalable. The algorithm operates through a recursive process of sharding, local clustering, and merging.

The SIGN algorithm's multi-step recursive merging process.

As illustrated in the figure above, the process follows these key steps:

  1. Sharding: The full dataset is randomly partitioned into many small, manageable "shards."
  2. Local Clustering: An MCMC sampler (e.g., Neal’s Algorithm 8) runs on each shard in parallel to identify "local clusters."
  3. Freezing: Observations assigned to the same local cluster are "frozen" together and treated as a single aggregate "item" for subsequent steps.
  4. Recursive Merging: These aggregate items are again sharded and clustered. Because the number of items is significantly smaller than the original observation count, computation speeds up exponentially.
  5. Global Posterior: This process repeats until the number of items is small enough to be processed on a single machine, yielding the final "global clusters."

The authors specifically apply SIGN to the PPMx (Product Partition Model with regression on covariates), which performs clustering and classification simultaneously, allowing the relationship between features and outcomes to vary across different subpopulations.

Experimental Evaluation

The paper evaluates SIGN using synthetic simulations and two real-world datasets:

  • Electronic Health Records (EHR): A dataset of 85,021 individuals from China used to predict diabetes. To preserve privacy, the study utilized a synthetic replica of the data generated via a Generative Adversarial Network (GAN).
  • Bank Telemarketing Data: A public dataset of 37,078 records from a Portuguese bank, used to predict customer subscriptions to long-term deposits.

Key Results and Insights

SIGN demonstrates that BNP models can be made "embarrassingly parallel," allowing researchers to use standard MCMC code distributed across hundreds of CPU cores.

  • Superior Accuracy: On the EHR dataset, SIGN achieved an AUC of 0.880, outperforming Random Forest (0.869), BART (0.867), and Support Vector Machines (0.856).
  • Computational Efficiency: For the EHR data, SIGN completed inference in just 0.9 hours using 250 cores. In comparison, BART took 18.7 hours on the same hardware.
  • Interpretability: Unlike "black box" models, SIGN provides interpretable clusters. In the EHR analysis, it identified five distinct patient subpopulations with unique clinical profiles, such as high-glucose vs. high-BMI groups.
  • Theoretical Soundness: The authors derived a generalized Pólya urn scheme to correctly account for the "weight" of frozen clusters during merging, ensuring the Bayesian logic remains consistent.

Limitations and Future Work

While SIGN offers a major leap in scalability for large $n$ (number of observations), extending it to high-dimensional $p$ (thousands of features) remains a challenge. Additionally, the "freezing" mechanism is an approximation; if observations are incorrectly grouped in an early step, they cannot be separated later. Future work may explore using summary statistics in the final step to handle even larger datasets without requiring full data access on a single node.

Summary updated

Abstract

We develop a scalable multi-step Monte Carlo algorithm for inference under a large class of nonparametric Bayesian models for clustering and classification. Each step is "embarrassingly parallel" and can be implemented using the same Markov chain Monte Carlo sampler. The simplicity and generality of our approach makes inference for a wide range of Bayesian nonparametric mixture models applicable to large datasets. Specifically, we apply the approach to inference under a product partition model with regression on covariates. We show results for inference with two motivating data sets: a large set of electronic health records (EHR) and a bank telemarketing dataset. We find interesting clusters and favorable classification performance relative to other widely used competing classifiers.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
EHRSIGN (PPMx)AUC0.880+0.01 vs baselineDiabetes Prediction · split: test · subset=GAN-replicated EHR data
Source quote
L786: SIGN │ 0.808 (0.067) │ 0.838 (0.067) │ 0.880 │ 0.825
Bank Marketing · BankSIGN (PPMx)AUC0.825+0.03 vs baselineSubscription Prediction · split: test · steps=K=3 · subset=last-contact-duration covariate excluded
Source quote
L786: SIGN │ 0.808 (0.067) │ 0.838 (0.067) │ 0.880 │ 0.825
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
EHRRF baselineAUC0.869Diabetes Prediction · split: test · subset=GAN-replicated EHR data
Source quote
L789: RF │ 0.793 (0.059) │ 0.838 (0.067) │ 0.869 │ 0.786
Bank Marketing · BankBART baselineAUC0.792Subscription Prediction · split: test · subset=last-contact-duration covariate excluded
Source quote
L788: BART │ 0.755 (0.062) │ 0.866 (0.050) │ 0.867 │ 0.792
BibTeX
@article{ni2019scalable,
  author = {Yang Ni and Peter Müller and Maurice Diesendruck and Sinead A. Williamson and Yitan Zhu and Yuan Ji},
  title = {{Scalable Bayesian Nonparametric Clustering and Classification}},
  journal = {Journal of Computational and Graphical Statistics},
  year = {2019},
  doi = {10.1080/10618600.2019.1624366},
}
Figure