Scalable Bayesian Nonparametric Clustering and Classification

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

TL;DR

The authors introduce SIGN (Subset Inference of General Nonparametric Bayesian methods), a multi-step framework that makes flexible Bayesian Nonparametric (BNP) models scalable to large datasets. By recursively clustering data in "embarrassingly parallel" shards and treating resulting clusters as new items for the next step, SIGN achieves state-of-the-art classification accuracy and interpretable clustering in a fraction of the time required by traditional methods.

What Problem Does This Paper Address?

Bayesian Nonparametric (BNP) models, such as Dirichlet Process Mixtures, are beloved by statisticians because they don't require you to pre-specify the number of clusters—the model "learns" the complexity from the data. However, they face a massive scalability wall.

Standard inference relies on Markov chain Monte Carlo (MCMC) algorithms that must scan the entire dataset in every iteration. For a dataset with hundreds of thousands of records, a single MCMC run can take days or weeks. Previous attempts to scale these models often required "conjugate" mathematical structures (specific math shortcuts) that limit the model's flexibility. The authors aim to break this bottleneck, providing a way to use complex, non-conjugate BNP models on "big data" without sacrificing the "Bayesian-ness" of the approach.

Methods

The core innovation is the SIGN algorithm, which operates in $K$ steps:

  1. Sharding: The full dataset is randomly split into many small "shards."
  2. Local Clustering: An MCMC sampler (specifically Neal’s Algorithm 8) runs on each shard in parallel to find "local clusters."
  3. Freezing: Observations within these local clusters are "frozen" together. They are now treated as a single "item" for the next step.
  4. Recursive Merging: These items are again sharded and clustered. Because the number of items is much smaller than the original number of observations, the computation speeds up exponentially.
  5. Global Posterior: The process repeats until the number of items is small enough to be processed on a single machine, yielding "global clusters."

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

Datasets

The paper evaluates SIGN using:

  • Synthetic Simulations: Two scenarios (one with true underlying clusters, one with a non-linear relationship) used to compare SIGN against full MCMC and standard classifiers.
  • Electronic Health Records (EHR): A dataset of 85,021 individuals from China used to predict diabetes. Interestingly, the authors used a Generative Adversarial Network (GAN) to create a privacy-preserving synthetic replica of the data for the study.
  • Bank Telemarketing Data: A public dataset of 37,078 records from a Portuguese bank, used to predict whether customers will subscribe to a long-term deposit.

Key Insights and Ideas

  • "Embarrassingly Parallel" BNP: SIGN allows researchers to use the exact same MCMC code they would use for small data, but distributed across hundreds of CPU cores.
  • The Power of Freezing: By assuming that observations which are very similar in a small shard likely belong together globally, the algorithm drastically reduces the search space for the final clustering step.
  • Beyond Black Boxes: Unlike a Random Forest or a Neural Network, SIGN provides interpretability. For the EHR data, it didn't just predict diabetes; it identified five distinct patient subpopulations with different clinical profiles (e.g., high glucose vs. high BMI groups).
  • Mathematical Generalization: The authors derived a generalized Pólya urn scheme (Equation 4 in the paper) that correctly accounts for the "weight" of frozen clusters during the merging steps, ensuring the Bayesian logic remains sound even when clustering clusters.

Key Results

  • 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).
  • Massive Speedup: For the EHR data, SIGN completed its task in 0.9 hours using 250 cores. In contrast, BART (a popular Bayesian tree model) took 18.7 hours on the same hardware.
  • Scalability: The authors estimate that for a dataset of 1,000,000 observations, SIGN would only take about an hour on 80 compute nodes, making million-row Bayesian nonparametrics a practical reality.

Limitations and Future Work

  • High-Dimensionality ($p$): The paper focuses on "large $n$, small $p$" problems (many rows, few columns). The authors acknowledge that extending this to "large $p$" (thousands of features) is a significant future challenge.
  • The "Frozen" Risk: If the initial parallel step incorrectly groups two observations that should be separate, they can never be "un-frozen" in later steps. While empirical results show this isn't a major issue for accuracy, it is a theoretical limitation of the approximation.
  • Data Access: In its current form, the final step of SIGN still requires access to the full dataset to evaluate likelihoods. The authors suggest that using "summary statistics" instead of raw data in the final step could allow the algorithm to handle even larger, truly massive datasets.

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 competitive classification performance relative to other widely used competing classifiers. Supplementary materials for this article are available online.

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},
}

Loading related content...

Figure