High-Dimensional Bayesian Regularised Regression with the BayesReg Package

Enes Makalic, Daniel F. SchmidtarXiv 2016 · DOI

Abstract

Bayesian penalized regression techniques, such as the Bayesian lasso and the Bayesian horseshoe estimator, have recently received a significant amount of attention in the statistics literature. However, software implementing state-of-the-art Bayesian penalized regression, outside of general-purpose Markov chain Monte Carlo (MCMC) platforms such as Stan, is relatively rare. This paper introduces bayesreg, a new toolbox for fitting Bayesian penalized regression models with continuous shrinkage prior densities. The toolbox features Bayesian linear regression with Gaussian or heavy-tailed error models and Bayesian logistic regression with ridge, lasso, horseshoe, and horseshoe+ estimators. The toolbox is free, open-source, and available for use with the MATLAB and R numerical platforms.

Introduction

In modern data science, researchers frequently encounter "high-dimensional" problems where the number of predictors ($p$) far exceeds the number of observations ($n$). In such scenarios, standard regression models are prone to overfitting, capturing noise rather than the underlying signal. While frequentist statistics addresses this through penalized regression (e.g., the Lasso), Bayesian approaches offer a more robust alternative by providing a full posterior distribution of the results, which facilitates superior uncertainty quantification.

Despite these advantages, a significant software gap has persisted. While frequentist tools like glmnet are ubiquitous, Bayesian practitioners often had to rely on general-purpose probabilistic programming languages like Stan or WinBUGS. While flexible, these platforms can be computationally prohibitive for very large datasets. The bayesreg package was developed to provide a specialized, "turn-key" solution that combines mathematical rigor with high computational efficiency.

Methodology

The core of bayesreg is built upon Gaussian scale mixture representations. This mathematical framework allows complex distributions—such as the heavy-tailed Student-$t$ or sparsity-inducing Horseshoe priors—to be expressed as mixtures of simpler Gaussian distributions. This representation is particularly conducive to efficient MCMC sampling.

Specialized Gibbs Sampling

The package utilizes an iterative Gibbs sampling algorithm specifically tuned for regression hierarchies. A key innovation is the Dual-Speed Sampling strategy. To address the computational bottleneck of sampling regression coefficients, the package automatically toggles between two algorithms based on the data's dimensions:

  • Rue’s Algorithm: Employed when $p$ is small relative to $n$.
  • Bhattacharya et al. Algorithm: Employed when $p$ is much larger than $n$.

This adaptive approach ensures that computational complexity remains linear in $p$, even in ultra-high-dimensional cases.

Logistic Regression and Pólya-gamma Augmentation

For logistic regression, bayesreg implements the state-of-the-art Pólya-gamma augmentation technique. This method allows the logistic model to be treated as a Gaussian mixture, significantly streamlining the sampling process and improving convergence rates compared to traditional Metropolis-Hastings steps.

Supported Shrinkage Priors

The toolbox supports a wide array of priors designed for different sparsity assumptions, including Ridge, Lasso, Horseshoe, and Horseshoe+. The latter two are particularly effective in high-dimensional settings as they possess the "heavy tails" necessary to preserve strong signals while aggressively shrinking noise coefficients toward zero.

Empirical Evaluation

The authors evaluated the package using both synthetic and real-world datasets:

  1. Synthetic Linear Data: The package was tested on simulated datasets with varying signal-to-noise ratios. In an ultra-high-dimensional test case featuring $p = 50,000$ predictors and only $n = 50$ samples, bayesreg generated 2,000 posterior samples in approximately 100 seconds on a standard laptop.
  2. Pima Indians Diabetes Dataset: This classic benchmark ($n = 768, p = 8$) demonstrated the package's utility in medical classification. The model successfully identified glucose levels and BMI as the primary risk factors through intuitive odds-ratio outputs.

Key Insights

  • Dimensionality Awareness: The implementation of dual-sampling strategies proves that recognizing the $p/n$ ratio is critical for maintaining performance across "tall" and "wide" data shapes.
  • Efficiency Gains: In comparative testing against the existing monomvn R package, bayesreg was found to be approximately 40 times faster on high-dimensional data ($n=1,000, p=1,000$).
  • Feature Ranking: Beyond coefficient estimation, the package includes a Bayesian feature ranking algorithm, helping researchers isolate important variables amidst a sea of irrelevant predictors.

Conclusion and Future Work

The bayesreg package provides a high-performance bridge between complex Bayesian theory and practical data analysis. While the initial release focused on continuous predictors and standard regression models, future iterations aim to expand support for categorical data, negative binomial regression for count data, and longitudinal models. Furthermore, the inclusion of advanced priors like the Dirichlet-Laplace and R2–D2 estimators, alongside block sampling for coefficients, will continue to push the boundaries of Bayesian computation for Big Data.

Summary updated

BibTeX
@misc{makalic2016high,
  author = {Enes Makalic and Daniel F. Schmidt},
  title = {{High-Dimensional Bayesian Regularised Regression with the BayesReg Package}},
  year = {2016},
  eprint = {1611.06649},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1611.06649},
}
Figure