Fast Bayesian Coresets via Subsampling and Quasi-Newton Refinement

Cian Naik, Judith Rousseau, Trevor Campbell

Abstract

Bayesian coresets approximate a posterior distribution by building a small weighted subset of the data points. Any inference procedure that is too computationally expensive to be run on the full posterior can instead be run inexpensively on the coreset, with results that approximate those on the full data. However, current approaches are limited by either a significant run-time or the need for the user to specify a low-cost approximation to the full posterior. We propose a Bayesian coreset construction algorithm that first selects a uniformly random subset of data, and then optimizes the weights using a novel quasi-Newton method. Our algorithm is a simple to implement, black-box method, that does not require the user to specify a low-cost posterior approximation. It is the first to come with a general high-probability bound on the KL divergence of the output coreset posterior. Experiments demonstrate that our method provides significant improvements in coreset quality against alternatives with comparable construction times, with far less storage cost and user input required.

Introduction

Bayesian inference provides a robust framework for uncertainty quantification, but its application to massive datasets is often computationally prohibitive. Standard inference techniques, such as Markov chain Monte Carlo (MCMC), typically require a full pass over the dataset at every iteration, leading to a computational complexity of $\Theta(NT)$ for $N$ data points and $T$ samples. In scenarios where $N$ reaches millions, these methods become impractical.

Bayesian coresets offer a solution by identifying a small, weighted subset of data (the "coreset") that accurately approximates the full dataset's posterior. By running inference on a coreset of size $M \ll N$, researchers can achieve significant speedups. However, existing coreset methods often face a trade-off: Sparse Variational Inference (SVI) methods yield high-quality results but are slow to construct, while sparse regression methods are fast but require a user-specified "low-cost approximation" (e.g., a Laplace approximation) to guide the selection. If this initial approximation is poor, the resulting coreset quality suffers.

Methodology: The QNC Algorithm

This paper introduces QNC (Quasi-Newton Coreset), a two-stage "black-box" algorithm designed to overcome these limitations. Unlike previous methods that focus heavily on complex greedy selection strategies, QNC demonstrates that uniform subsampling is sufficient if paired with a sophisticated weight optimization scheme.

  1. Uniform Subsampling: The algorithm begins by selecting $M$ data points uniformly at random. This random sample serves as an expressive basis for the log-likelihood.
  2. Quasi-Newton Optimization: Once the points are selected, the weights $w$ are optimized to minimize the Kullback-Leibler (KL) divergence between the coreset posterior and the full posterior. The authors derive a novel quasi-Newton step using the Fisher information matrix—the covariance of the log-likelihood gradients—as a regularized proxy for the Hessian. This approach is considered "black-box" as it only requires samples from the current coreset posterior, eliminating the need for manual model approximations.
Algorithm 1: The Quasi-Newton Coreset (QNC) construction procedure.

Experimental Evaluation

The authors evaluated QNC on several benchmarks with datasets scaling up to $N=1,000,000$:

  • Synthetic Gaussian Location Model: A high-dimensional (D=100) controlled environment.
  • Flight Delays: Used for Sparse Linear and Logistic Regression on 100,000 records.
  • UK House Prices: Used for Radial Basis Function (RBF) Regression on 100,000 records.

Key Results

  • Efficiency and Quality: QNC consistently outperformed other fast methods, such as GIGA and IHT, in terms of coreset quality (lower Reverse KL divergence) for equivalent construction times. It is orders of magnitude faster than SVI; in synthetic tests, SVI took over an hour to build a coreset that QNC approximated in seconds.
  • Robustness: In non-Gaussian settings, such as heavy-tailed linear regression, QNC significantly outperformed standard Laplace approximations once the coreset reached a modest size (e.g., 500 points).
  • Theoretical Soundness: The paper provides a general high-probability bound on the KL divergence of the output coreset, offering statistical guarantees that many heuristic methods lack.

Discussion and Conclusion

A primary insight of this research is that the weighting of data points is often more critical than the selection process. By utilizing the Fisher Information Matrix as a Hessian proxy, the authors created an optimizer that converges exponentially fast to near-optimal weights.

However, some limitations remain. Uniform subsampling may occasionally miss rare but highly influential data points, particularly in high-dimensional spaces. Additionally, while the method performs well in practice on non-concave models like logistic regression, the current theoretical proofs assume strong concavity of the log-likelihood. Future work may explore stochastic estimates to make construction time sublinear in $N$, potentially enabling coreset application to even larger datasets.

In summary, QNC provides a fast, reliable, and easy-to-implement method for scaling Bayesian inference, reducing the need for expert-tuned approximations while maintaining high posterior accuracy.

Summary updated

Abstract

Bayesian coresets approximate a posterior distribution by building a small weighted subset of the data points. Any inference procedure that is too computationally expensive to be run on the full posterior can instead be run inexpensively on the coreset, with results that approximate those on the full data. However, current approaches are limited by either a significant run-time or the need for the user to specify a low-cost approximation to the full posterior. We propose a Bayesian coreset construction algorithm that first selects a uniformly random subset of data, and then optimizes the weights using a novel quasi-Newton method. Our algorithm is a simple to implement, black-box method, that does not require the user to specify a low-cost posterior approximation. It is the first to come with a general high-probability bound on the KL divergence of the output coreset posterior. Experiments demonstrate that our method provides significant improvements in coreset quality against alternatives with comparable construction times, with far less storage cost and user input required.
BibTeX
@inproceedings{naik2022fast,
  author = {Cian Naik and Judith Rousseau and Trevor Campbell},
  title = {{Fast Bayesian Coresets via Subsampling and Quasi-Newton Refinement}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=rjIk7L8SbR-},
}
Figure